/* ============================================================
   JengaPulse — marketing site
   Palette lifted from app/styles/colors.ts so the site and the
   product read as one thing.

   Deliberately light-only. The app ships both themes, but the
   site commits to the light one — it is the more readable ground
   for long marketing and legal copy, and a single look means the
   page never depends on the visitor's OS setting to look right.
   ============================================================ */

:root {
  /* Brand */
  --gold:      #F5A623;   /* Sunset Gold  — primary   */
  --gold-ink:  #B26B04;   /* gold that passes on paper */
  --red:       #E63946;   /* Maasai Red   — intensity */
  --green:     #2A9D8F;   /* Safari Green — wellness  */
  --violet:    #7C4DD6;

  /* Grounds — the app's own warm scale, never cold grey */
  --ground:    #FAF9F7;   /* gray-50  "warm sand" */
  --surface:   #FFFFFF;
  --raised:    #F5F3F0;   /* gray-100 */
  --line:      #E8E4DE;   /* gray-200 */
  --ink:       #1D1B18;   /* gray-900 */
  --ink-dim:   #5C554B;   /* gray-600 */
  --ink-faint: #7A7267;   /* gray-500 */

  --shadow: 0 1px 2px rgba(29,27,24,.05), 0 12px 30px -14px rgba(29,27,24,.18);
  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
img { max-width: 100%; display: block; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Karla, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Archivo, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
  margin: 0;
  line-height: 1.06;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: -9999px;
  background: var(--surface); color: var(--ink);
  padding: .7rem 1rem; border-radius: 8px; z-index: 99;
}
.skip:focus { left: var(--gutter); top: .6rem; }

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-ink); margin: 0;
}

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: 66px; }
.mark {
  display: flex; align-items: center; gap: .6rem;
  font-family: Archivo, sans-serif; font-weight: 800;
  letter-spacing: -.03em; font-size: 1.12rem; text-decoration: none;
}
/* The app icon itself, not a stand-in — same artwork as the App Store listing,
   so the site and the product are recognisably the same thing. */
.glyph {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(29,27,24,.06);
}
nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
nav a { text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--ink-dim); }
nav a:hover { color: var(--ink); }
@media (max-width: 760px) { nav .hide-sm { display: none; } }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .62rem 1.1rem; border-radius: 10px;
  font-family: Archivo, sans-serif; font-weight: 700; font-size: .92rem;
  letter-spacing: -.01em; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .14s ease, filter .14s ease, border-color .14s ease;
}
.btn-solid { background: var(--gold); color: #241a06; }
.btn-solid:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-soon { border-color: var(--line); color: var(--ink-faint); background: transparent; cursor: default; }
.btn-soon .pill {
  font-family: "JetBrains Mono", monospace; font-size: .58rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .18rem .4rem; border-radius: 5px;
  background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green);
}

/* ---------- hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.08fr .92fr; } }
.hero h1 { font-size: clamp(2.6rem, 6.6vw, 4.4rem); margin: 1.1rem 0 0; }
.hero h1 em { font-style: normal; color: var(--gold-ink); }
.lede {
  max-width: var(--measure); color: var(--ink-dim);
  font-size: clamp(1.06rem, 1.7vw, 1.2rem); margin: 1.4rem 0 0;
}
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; align-items: center; }
.cta-note {
  font-family: "JetBrains Mono", monospace;
  font-size: .74rem; color: var(--ink-faint); letter-spacing: .04em;
}

/* ---------- phone frame ---------- */
/*
 * Proportioned to a 6.9" iPhone Pro Max, which is what the screenshots are:
 * 1320x2868 source, so the screen is 440pt wide with a ~55pt corner radius.
 * Scaled to a 290px screen that gives a 36px screen radius, a 9px bezel, and
 * a 45px outer radius.
 *
 * Deliberately no notch or Dynamic Island: the screenshots are full-device
 * captures that already contain both, plus the status bar and home indicator.
 * A frame that drew its own would show two.
 */
.phone {
  --screen: 290px;
  --bezel: 9px;
  width: calc(var(--screen) + var(--bezel) * 2);
  max-width: 82vw;
  padding: var(--bezel);
  border-radius: 45px;
  /* brushed titanium: light catches the top-left and bottom-right edges */
  background: linear-gradient(148deg, #cfcac2 0%, #8d867d 18%, #6a645c 48%, #9c958b 78%, #d3cec6 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    0 2px 4px rgba(29,27,24,.10),
    0 24px 48px -20px rgba(29,27,24,.42);
  flex: none;
  margin-inline: auto;
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 870 / 1890;   /* the screenshots' own ratio — nothing is cropped */
  object-fit: cover;
  border-radius: 36px;
  background: var(--raised);  /* a calm panel if a file is ever missing */
}

/* ---------- sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sec-head { max-width: 44ch; }
.sec-head h2 { font-size: clamp(1.85rem, 4vw, 2.8rem); margin-top: .8rem; }
.sec-head p { color: var(--ink-dim); margin: 1rem 0 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* hubs */
.hubs {
  display: grid; gap: 1px; margin-top: 3rem;
  background: var(--line); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
}
@media (min-width: 700px)  { .hubs { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .hubs { grid-template-columns: repeat(4, 1fr); } }
.hub { background: var(--surface); padding: 1.7rem 1.5rem 1.9rem; }
.hub .dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.hub .dot svg { width: 16px; height: 16px; }
.hub h3 { font-size: 1.12rem; margin: 1rem 0 .5rem; }
.hub p { margin: 0; font-size: .93rem; color: var(--ink-dim); }
.hub ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .4rem; }
.hub li { font-size: .84rem; color: var(--ink-faint); padding-left: 1rem; position: relative; }
.hub li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 99px; background: currentColor; opacity: .55;
}

/* walkthrough — numbered because it genuinely is a sequence */
.steps { display: grid; gap: clamp(3rem, 6vw, 4.5rem); margin-top: 3.2rem; }
.step { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 880px) {
  .step { grid-template-columns: 1fr 308px; gap: clamp(2rem, 5vw, 4.5rem); }
  .step.flip > .step-text { order: 2; }
  .step.flip > .phone     { order: 1; }
}
.step-n {
  font-family: "JetBrains Mono", monospace; font-weight: 600;
  font-size: .74rem; letter-spacing: .12em; color: var(--gold-ink);
  display: flex; align-items: center; gap: .7rem;
}
.step-n::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.step h3 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin: .9rem 0 0; }
.step p { color: var(--ink-dim); margin: .8rem 0 0; max-width: 46ch; }

/* pricing */
.plans { display: grid; gap: 1rem; margin-top: 3rem; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan {
  border: 1px solid var(--line); border-radius: 16px;
  padding: 1.6rem 1.5rem 1.8rem; background: var(--surface);
  display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.plan h3 { font-size: 1.2rem; }
.badge {
  font-family: "JetBrains Mono", monospace; font-size: .62rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .28rem .55rem; border-radius: 6px;
  background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold-ink);
}
.price {
  font-family: Archivo, sans-serif; font-weight: 800; font-size: 2.15rem;
  letter-spacing: -.03em; margin: 1rem 0 0; font-variant-numeric: tabular-nums;
}
.price span { font-size: .88rem; font-weight: 600; color: var(--ink-faint); letter-spacing: 0; }
.plan .tag { color: var(--ink-dim); font-size: .9rem; margin: .35rem 0 0; }
.plan ul { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .55rem; }
.plan li { font-size: .89rem; display: flex; gap: .6rem; align-items: flex-start; }
.plan li svg { width: 14px; height: 14px; flex: none; margin-top: .32rem; color: var(--green); }

/* android */
.android {
  border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  display: grid; gap: 1.2rem; align-items: center;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--green) 10%, transparent), transparent 62%),
    var(--surface);
}
@media (min-width: 780px) { .android { grid-template-columns: 1fr auto; gap: 2.5rem; } }
.android h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-top: .7rem; }
.android p { color: var(--ink-dim); margin: .7rem 0 0; max-width: 52ch; }

/* ---------- legal pages ---------- */
.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.legal-head { max-width: 60ch; }
.legal-head h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin-top: .9rem; }
.legal-head .updated {
  font-family: "JetBrains Mono", monospace; font-size: .76rem;
  color: var(--ink-faint); margin: 1.1rem 0 0; letter-spacing: .03em;
}
.legal-body { max-width: 68ch; margin-top: clamp(2rem, 4vw, 3rem); }
.legal-body h2 {
  font-size: 1.32rem; margin: 2.6rem 0 .9rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.legal-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal-body h3 { font-size: 1.02rem; margin: 1.6rem 0 .5rem; }
.legal-body p { margin: 0 0 1rem; color: var(--ink-dim); }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body ul { margin: 0 0 1.2rem; padding-left: 1.1rem; color: var(--ink-dim); }
.legal-body li { margin-bottom: .5rem; }
.legal-body a { color: var(--gold-ink); text-underline-offset: 2px; }

.legal-body table {
  width: 100%; border-collapse: collapse; margin: 0 0 1.4rem;
  font-size: .89rem;
}
.table-scroll { overflow-x: auto; }
.legal-body th, .legal-body td {
  text-align: left; padding: .7rem .8rem;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.legal-body th {
  font-family: "JetBrains Mono", monospace; font-size: .68rem;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); background: var(--raised);
  white-space: nowrap;
}
.legal-body td { color: var(--ink-dim); }

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: var(--surface); border-radius: 10px;
  padding: 1.1rem 1.2rem; margin: 0 0 1.6rem;
}
.callout p:last-child { margin-bottom: 0; }

.toc {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); padding: 1.2rem 1.4rem;
  margin-top: 2rem;
}
.toc p {
  font-family: "JetBrains Mono", monospace; font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 .7rem;
}
.toc ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.toc li { font-size: .9rem; }
.toc a { text-decoration: none; color: var(--ink-dim); }
.toc a:hover { color: var(--gold-ink); text-decoration: underline; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 3rem 0 4rem; }
.foot { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; }
.foot p { margin: 0; font-size: .85rem; color: var(--ink-faint); }
/* Inherits display:flex from the header `nav` rule, which does not wrap — six
   links in one unbreakable row overflowed every page by a few pixels at 375px,
   enough to make the whole document scroll sideways. */
.foot nav { margin-left: auto; flex-wrap: wrap; gap: .7rem 1.4rem; }
.foot nav a { font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
