/* ============================================================
   The public website (homepage, pro/, and the navigation and footer shared
   with About, Contact, Privacy and Terms). Built by site/build-site.mjs.

   Two layers:
   1. .sn / .sf : the shared navigation and footer. These also sit on the four
      older pages, which keep their own inline styles, so nothing here may
      touch a bare element.
   2. body.site-page … : the homepage and pro/ only.

   Colors and type are the app's (DESIGN.md; css/main.css :root wins).
   ============================================================ */
:root {
  --s-bg: #1A1614; --s-bg-warm: #221D1A; --s-panel: #2A231F; --s-panel-light: #342C27;
  --s-rule: #433730; --s-border-strong: #5A4A41;
  --s-ink: #F5F1E8; --s-ink-dim: #C9BDAF; --s-ink-faint: #8F7F72; --s-ink-inverse: #1A1614;
  --s-accent: #E8C36B; --s-accent-deep: #C99B45;
  --s-display: 'Sora', system-ui, sans-serif;
  --s-ui: 'Mulish', system-ui, sans-serif;
  --s-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

/* ---------- 1. shared navigation ---------- */
.sn { border-bottom: 1px solid var(--s-rule); background: var(--s-bg); }
.sn-in {
  max-width: 1080px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
}
.sn-narrow .sn-in, .sf-narrow .sf-in { max-width: 720px; }
.sn-brand {
  font-family: var(--s-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  color: var(--s-ink); text-decoration: none; white-space: nowrap;
}
.sn-links { display: flex; align-items: center; gap: 6px; }
.sn-links a {
  font-family: var(--s-ui); font-weight: 600; font-size: 16px; line-height: 1;
  color: var(--s-ink-dim); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
}
.sn-links a:hover { color: var(--s-ink); }
.sn-links a[aria-current="page"] { color: var(--s-ink); box-shadow: inset 0 -2px 0 var(--s-accent); border-radius: 0; }
.sn-links a.sn-open {
  margin-left: 8px; padding: 0 16px; min-height: 40px;
  background: var(--s-accent); color: var(--s-ink-inverse); font-weight: 700;
}
.sn-links a.sn-open:hover { background: var(--s-accent-deep); color: var(--s-ink-inverse); }
.sn a:focus-visible, .sf a:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }
@media (max-width: 480px) {
  .sn-in { padding: 10px 16px; gap: 2px 12px; justify-content: flex-start; }
  .sn-brand { font-size: 16px; }
  /* Row 1: the name and the button. Row 2: Pro and About. */
  .sn-links { display: contents; }
  .sn-links a.sn-open { order: 1; margin-left: auto; }
  .sn-links a:not(.sn-open) { order: 2; padding: 0 12px 0 0; }
  .sn-in::after { content: ''; order: 1; flex-basis: 100%; height: 0; }
}

/* ---------- 1b. shared footer ---------- */
.sf { border-top: 1px solid var(--s-rule); background: var(--s-bg); margin-top: 72px; }
.sf-in {
  max-width: 1080px; margin: 0 auto; padding: 22px 24px 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
}
.sf a {
  font-family: var(--s-ui); font-weight: 600; font-size: 16px; color: var(--s-ink-dim); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px 0 0;
}
.sf a:hover { color: var(--s-accent); }
@media (max-width: 480px) { .sf-in { padding: 18px 16px 32px; } }

/* ---------- 2. the homepage and pro/ ---------- */
body.site-page {
  margin: 0; background: var(--s-bg); color: var(--s-ink-dim);
  font: 400 17px/1.6 var(--s-ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
.site-page *, .site-page *::before, .site-page *::after { box-sizing: border-box; }
.site-page img { display: block; max-width: 100%; height: auto; }
.site-page main a { color: var(--s-accent); }
.site-page main a:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; border-radius: 4px; }
.site-page h1, .site-page h2, .site-page h3 { font-family: var(--s-display); color: var(--s-ink); margin: 0; text-wrap: balance; }
.site-page p { margin: 0; }
.w { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .w { padding: 0 16px; } }

.kicker { font: 500 13px/1 var(--s-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--s-accent); margin: 0 0 22px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  font: 700 17px/1 var(--s-ui); text-decoration: none; border-radius: 10px; border: 1px solid transparent;
}
.site-page main a.btn-main { background: var(--s-accent); color: var(--s-ink-inverse); }
.site-page main a.btn-main:hover { background: var(--s-accent-deep); }
.site-page main a.btn-second { border-color: var(--s-border-strong); color: var(--s-ink); background: transparent; }
.site-page main a.btn-second:hover { border-color: var(--s-accent); color: var(--s-accent); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* hero: centered block, then the board, the largest item on the screen */
.hero { padding: 64px 0 24px; text-align: center; }
.hero h1 { font-weight: 700; font-size: clamp(32px, 5.2vw, 54px); line-height: 1.1; letter-spacing: -0.02em; max-width: 17em; margin: 0 auto; }
.hero .sub { font-size: clamp(17px, 1.8vw, 20px); max-width: 36em; margin: 20px auto 0; }
.hero .btns { justify-content: center; margin-top: 30px; }
.hero .plain { margin-top: 18px; color: var(--s-ink); font-weight: 600; }
.hero .phone-note { display: none; margin: 10px auto 0; max-width: 26em; }
@media (max-width: 700px) {
  .hero { padding: 40px 0 16px; }
  .hero .btns .btn { flex: 1 1 100%; }
  .hero .phone-note { display: block; }
}

/* pictures from the app */
.shot { margin: 0; }
.shot .frame { border: 1px solid var(--s-rule); border-radius: 12px; overflow: hidden; background: var(--s-bg-warm); }
.shot figcaption { margin-top: 12px; font-size: 16px; line-height: 1.5; color: var(--s-ink-dim); }
.hero .shot { margin-top: 44px; }
/* A picture of a menu keeps the size it has in the app. */
.shot.narrow .frame { max-width: 384px; margin: 0 auto; }
.shot.narrow figcaption { text-align: center; }
.hero .shot figcaption { text-align: center; }
/* the page's parts, under the first picture */
.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.site-page main .jump a {
  font: 600 16px/1.25 var(--s-ui); color: var(--s-ink); text-decoration: none; text-align: center;
  padding: 12px 18px; border: 1px solid var(--s-border-strong); border-radius: 10px;
}
.site-page main .jump a:hover { border-color: var(--s-accent); color: var(--s-accent); }
@media (max-width: 700px) {
  .jump { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; }
  .site-page main .jump a { padding: 13px 8px; display: grid; place-items: center; min-height: 48px; }
  .jump a:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* A wide board on a narrow screen: the picture keeps a readable size and slides
   sideways inside its frame, the way the board does in the app on a phone. */
@media (max-width: 700px) {
  .shot.wide .frame { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .shot.wide .frame img { width: 760px; max-width: none; }
  .shot.wide .frame:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }
  .shot.wide figcaption::after { content: ' Slide the picture sideways to see the whole neck.'; }
  .shot.wide.screen figcaption::after { content: ' Slide the picture sideways to see all of it.'; }
}

/* sections */
.sec { padding: 72px 0 0; }
.sec-head { max-width: 40em; margin-bottom: 40px; }
.sec-head h2 { font-weight: 700; font-size: clamp(27px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -0.015em; }
.sec-head p { margin-top: 14px; font-size: clamp(17px, 1.7vw, 19px); }
@media (max-width: 700px) { .sec { padding-top: 56px; } .sec-head { margin-bottom: 28px; } }

/* one example: words, then (or beside) its picture */
.ex { padding: 32px 0; border-top: 1px solid var(--s-rule); }
.ex h3 { font-weight: 700; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; letter-spacing: -0.01em; }
.ex .words > p { margin-top: 12px; max-width: 38em; }
.ex .shot { margin-top: 24px; }
.ex.side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.ex.side .shot { margin-top: 0; }
.ex.side.flip .words { order: 2; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--s-rule); }
.pair .ex { border-top: 0; }
@media (max-width: 860px) {
  .ex.side { display: block; }
  .ex.side .shot { margin-top: 24px; }
  .pair { display: block; border-top: 0; }
  .pair .ex { border-top: 1px solid var(--s-rule); }
}

/* Free and Pro labels under an example */
.tiers { margin: 18px 0 0; padding: 0; display: grid; gap: 8px; max-width: 38em; }
.tiers div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.tiers dt {
  font: 500 12px/1 var(--s-mono); letter-spacing: 0.12em; text-transform: uppercase; text-align: center;
  padding: 6px 0 5px; border-radius: 6px; border: 1px solid var(--s-border-strong); color: var(--s-ink);
}
.tiers dt.t-pro { border-color: var(--s-accent-deep); color: var(--s-accent); }
.tiers dd { margin: 0; font-size: 16px; line-height: 1.5; color: var(--s-ink-dim); }

/* Free and Pro in brief (homepage) and the two plan columns (pro/) */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan { background: var(--s-panel); border: 1px solid var(--s-rule); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; }
.plan.pro { border-color: var(--s-accent-deep); }
.plan-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.plan h3, .plan h2 { font-weight: 700; font-size: 26px; line-height: 1.1; }
.plan .price { font: 500 15px/1.2 var(--s-mono); letter-spacing: 0.04em; color: var(--s-ink); }
.plan.pro .price { color: var(--s-accent); }
.plan .plus { margin-top: 18px; color: var(--s-ink); font-weight: 600; }
.plan ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--s-border-strong); }
.plan.pro li::before { background: var(--s-accent-deep); }
.plan li b { display: block; color: var(--s-ink); font-weight: 700; }
.plan li span { display: block; }
.plan .btns { margin-top: auto; padding-top: 26px; }
.plan .after-buy { margin-top: 14px; }
.site-page .plans-note { margin-top: 22px; max-width: 46em; }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } .plan { padding: 22px 20px; } .plan .btns .btn { flex: 1 1 100%; } }

/* pro/ page */
.pro-head .lead { margin-top: 18px; font-size: clamp(17px, 1.7vw, 19px); }
.pro-head { padding: 56px 0 36px; max-width: 44em; }
.pro-head h1 { font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; letter-spacing: -0.02em; }
.steps { counter-reset: step; list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; max-width: 44em; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.steps li::before { content: counter(step); font: 500 15px/1 var(--s-mono); color: var(--s-accent); border: 1px solid var(--s-accent-deep); border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; }
.steps b { color: var(--s-ink); }
.site-page .fine { margin-top: 28px; max-width: 46em; }
.site-page .fine.terms { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--s-rule); }

/* who makes it */
.maker { max-width: 44em; }
.maker h2 { font-weight: 700; font-size: clamp(24px, 3vw, 30px); line-height: 1.2; margin-bottom: 16px; }
.maker p + p { margin-top: 14px; }

@media (max-width: 700px) { .pro-head { padding: 36px 0 28px; } }
