/* Parlor. Dark, editorial, restrained. */

:root {
  --ink: #101014;
  --panel: #16161c;
  --panel-2: #131318;
  --line: #26262e;
  --line-soft: #1d1d24;
  --cream: #f2ead9;
  --muted: #a39b8b;
  --brass: #d9a441;
  --brass-dim: #b8892f;
  --felt: #2e6b4f;
  --danger: #b4453a;
  --board-light: #e9e2d0;
  --board-dark: #2e6b4f;
  --serif: ui-serif, 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, system-ui, Inter, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

a { color: var(--brass); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--brass); color: var(--ink); }

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cream);
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.12; }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { max-width: 42rem; }

.kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 38rem;
}

.muted { color: var(--muted); }

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 16, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.75rem;
  flex-wrap: wrap;
  padding-block: 0.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--cream);
  margin-right: auto;
}
.wordmark:hover { text-decoration: none; }
.wordmark svg { display: block; }

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.site-nav nav a {
  color: var(--muted);
  font-size: 0.92rem;
}
.site-nav nav a:hover { color: var(--cream); text-decoration: none; }
.site-nav nav a[aria-current="page"] { color: var(--cream); }

.btn {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
}
.btn.primary {
  background: var(--brass);
  color: var(--ink);
}
.btn.primary:hover { background: #e4b355; text-decoration: none; }
.btn.ghost {
  border-color: var(--line);
  color: var(--cream);
}
.btn.ghost:hover { border-color: var(--muted); text-decoration: none; }

.site-nav .btn { padding: 0.42rem 0.95rem; }

/* ---------- sections ---------- */

main section {
  padding-block: clamp(5rem, 9vw, 8.5rem);
}
main section + section { border-top: 1px solid var(--line-soft); }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { max-width: 30ch; }
.section-head .lede { margin-top: 1rem; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(4rem, 8vw, 7rem) clamp(4rem, 7vw, 6rem); }
.hero h1 { max-width: 14ch; }
.hero .lede { margin-top: 1.5rem; }
.hero-ctas { display: flex; gap: 0.9rem; margin-top: 2.25rem; flex-wrap: wrap; }
.hero-note { margin-top: 3.5rem; }

/* ---------- hero scene ---------- */

.scene {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 13rem) minmax(0, 1fr);
  align-items: center;
  column-gap: 0;
}

.app-frame {
  border-radius: 20px;
  padding: 1rem 1rem 0.85rem;
  max-width: 23rem;
  width: 100%;
  justify-self: center;
}
.app-frame.skin-light {
  background: #ece5d3;
  border: 1px solid #d8cdb4;
  color: #1a1a20;
}
.app-frame.skin-dark {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--cream);
}

.frame-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.frame-head .app-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.skin-light .frame-head .app-label { color: #6c6350; }
.skin-dark .frame-head .app-label { color: var(--muted); }
.frame-head .frame-status { font-size: 0.78rem; }
.skin-light .frame-head .frame-status { color: #494437; }
.skin-dark .frame-head .frame-status { color: var(--muted); }

.board-holder {
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  border: 1px solid rgba(16, 16, 20, 0.25);
}
.skin-dark .board-holder { border-color: var(--line); }
.board { width: 100%; height: auto; display: block; }

.pc { stroke-linejoin: round; pointer-events: none; }
.pc.w { fill: #f2ead9; stroke: #2a2a30; stroke-width: 1.2; }
.pc.b { fill: #191920; stroke: #d8cfba; stroke-width: 1; }

.target-sq {
  fill: var(--brass);
  opacity: 0;
  animation: target-glow 9s ease-in-out infinite;
}
.hero-knight { animation: knight-move 9s cubic-bezier(0.65, 0, 0.3, 1) infinite; }

@keyframes knight-move {
  0%, 38%   { transform: translate(0, 0); }
  46%, 86%  { transform: translate(40px, -80px); }
  94%, 100% { transform: translate(0, 0); }
}
@keyframes target-glow {
  0%, 20%  { opacity: 0; }
  30%, 42% { opacity: 0.35; }
  52%, 100% { opacity: 0; }
}

.clock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.55rem;
  font-size: 0.85rem;
}
.clock-row + .clock-row { border-top: 1px solid rgba(16, 16, 20, 0.12); }
.skin-dark .clock-row + .clock-row { border-top-color: var(--line-soft); }
.clock-row .who { font-weight: 600; }
.clock-row .rating { font-weight: 400; opacity: 0.65; font-size: 0.8rem; }

.clk {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  opacity: 0.65;
}
.skin-light .clk { background: rgba(16, 16, 20, 0.07); }
.skin-dark .clk { background: rgba(242, 234, 217, 0.06); }
.clk.active {
  opacity: 1;
  border-color: var(--brass);
  color: inherit;
}

.hub {
  display: flex;
  align-items: center;
  align-self: center;
  width: 100%;
}
.hub .link {
  position: relative;
  flex: 1;
  height: 1px;
  background: var(--line);
  min-width: 1.5rem;
}
.hub .link::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass);
  animation: flow-h 3.2s linear infinite;
}
@keyframes flow-h { from { left: 0; } to { left: calc(100% - 5px); } }

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.9rem;
}
.node-disc {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
}
.node-label {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--cream);
}

.scene-caption {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 2.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  justify-self: center;
}

@media (max-width: 860px) {
  .scene { grid-template-columns: minmax(0, 1fr); }
  .hub { flex-direction: column; height: 8.5rem; width: auto; justify-self: center; }
  .hub .link { width: 1px; height: auto; flex: 1; min-width: 0; min-height: 1.25rem; }
  .hub .link::after { left: -2px; top: 0; animation-name: flow-v; }
  @keyframes flow-v { from { top: 0; } to { top: calc(100% - 5px); } }
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 960px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.step .num {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--brass);
  line-height: 1;
}
.step h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 650; }
.step p { font-size: 0.92rem; color: var(--muted); }
.step pre { margin-top: auto; }

/* ---------- code ---------- */

pre {
  background: #0c0c10;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #ddd5c4;
}
pre .cm { color: #6f6a5e; }
pre .brass { color: var(--brass); }
pre .green { color: #7fb89a; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}
pre code { background: none; border: none; padding: 0; font-size: inherit; }

/* ---------- feature grids ---------- */

.cols {
  display: grid;
  gap: 2.5rem 3rem;
}
.cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .cols.two, .cols.three { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }

.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--muted); font-size: 0.95rem; }
.feature + .feature { }

ul.plain { list-style: none; }
ul.plain li { padding-block: 0.85rem; border-bottom: 1px solid var(--line-soft); max-width: 42rem; }
ul.plain li:first-child { border-top: 1px solid var(--line-soft); }
ul.plain strong { display: block; color: var(--cream); font-weight: 650; margin-bottom: 0.15rem; }
ul.plain span { color: var(--muted); font-size: 0.95rem; }

/* ---------- panels ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 860px) { .panel-grid { grid-template-columns: minmax(0, 1fr); } }

.stat .n {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--cream);
  line-height: 1.15;
  display: block;
}
.stat p { color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem; }

/* ---------- tables ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 46rem;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
tr:last-child th, tr:last-child td { border-bottom: none; }
thead th {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
tbody th { font-weight: 600; color: var(--cream); white-space: normal; min-width: 13rem; }
td { color: var(--muted); }
td.yes { color: var(--cream); }
td.win { color: var(--cream); }
col.parlor-col { background: rgba(217, 164, 65, 0.05); }
thead th.parlor { color: var(--brass); }

/* ---------- pricing ---------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 1080px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiers { grid-template-columns: minmax(0, 1fr); } }

.tier {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.tier.featured { border-color: var(--brass-dim); }
.tier h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 650; letter-spacing: 0.02em; }
.tier .price { font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.tier .price small { display: block; margin-top: 0.3rem; font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.tier p { font-size: 0.92rem; color: var(--muted); }
.tier .btn { margin-top: auto; align-self: flex-start; }

.notice {
  border: 1px solid var(--brass-dim);
  background: rgba(217, 164, 65, 0.06);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  font-size: 0.95rem;
  max-width: 46rem;
}

/* ---------- faq / legal ---------- */

.qa { max-width: 46rem; }
.qa h3 { margin-top: 2.5rem; margin-bottom: 0.6rem; }
.qa p { color: var(--muted); }

.legal { max-width: 46rem; }
.legal h2 { font-size: 1.45rem; margin-top: 3rem; margin-bottom: 0.75rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.25rem; margin-block: 0.75rem; }
.legal li { margin-bottom: 0.5rem; max-width: 40rem; }
.legal strong { color: var(--cream); font-weight: 600; }
.effective { font-size: 0.9rem; color: var(--muted); margin-top: 1rem; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 3rem 3.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: baseline;
}
footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--cream); text-decoration: none; }

/* ---------- misc ---------- */

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.crumb-link { font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-knight, .target-sq, .hub .link::after { animation: none; }
}
