/* StreamGarden — dark, high-contrast, sage-lit. The palette is lifted from the app itself,
   so the site and the product read as one thing.

   Two layouts share this file:
     • desktop  — a normal scrolling page, every section stacked
     • mobile   — an app shell: one panel at a time, fixed tab bar, the page never scrolls */

:root {
  --ink:        #0B0D08;
  --ink-2:      #10130C;
  --surface:    #151A0F;
  --surface-2:  #1B2114;
  --line:       rgba(174, 201, 138, 0.13);
  --line-2:     rgba(174, 201, 138, 0.26);

  --sage:       #AEC98A;
  --sage-hi:    #C9E4A4;
  --sage-deep:  #7C935E;

  --text:       #EDEFE3;
  --muted:      #949B80;
  --dim:        #6B7357;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body:    "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1140px;
  --r:    18px;
  --bar:  calc(64px + env(safe-area-inset-bottom));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ── type ─────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.9rem); }
h3 { font-size: 1.14rem; letter-spacing: -0.015em; line-height: 1.25; }
p { color: var(--muted); text-wrap: pretty; }
.lede { font-size: clamp(1rem, 1.5vw, 1.18rem); max-width: 58ch; }

.eyebrow {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--sage);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--sage); opacity: 0.65; }

/* ── header ───────────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 8, 0.76);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
header.stuck { border-bottom-color: var(--line); }
header .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
.mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--sage-hi), var(--sage-deep));
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(174, 201, 138, 0.24);
}
.mark svg { width: 17px; height: 17px; }

header nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
header nav a { color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
header nav a:hover { color: var(--text); }

/* ── buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 0.95rem; padding: 12px 22px; border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.24s ease, background 0.2s, border-color 0.2s;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-sm { padding: 9px 17px; font-size: 0.86rem; }
.btn-primary {
  background: linear-gradient(160deg, var(--sage-hi), var(--sage));
  color: #101408;
  box-shadow: 0 10px 34px rgba(174, 201, 138, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(174, 201, 138, 0.34); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface); border-color: var(--sage-deep); }

/* ── panels (desktop = stacked sections) ──────────────────────────── */
.panel { padding: clamp(52px, 6vw, 84px) 0; position: relative; }
#home { padding-top: clamp(44px, 5vw, 72px); }
.section-head { max-width: 62ch; margin-bottom: clamp(26px, 3.2vw, 40px); }
.section-head h2 { margin: 14px 0 0; }
.section-head p { margin-top: 14px; }

/* ── hero ─────────────────────────────────────────────────────────── */
#home::before {
  content: ""; position: absolute; inset: -20% 0 auto -8%; height: 640px; pointer-events: none;
  background:
    radial-gradient(46% 42% at 22% 34%, rgba(174, 201, 138, 0.16), transparent 68%),
    radial-gradient(38% 40% at 82% 12%, rgba(124, 147, 94, 0.13), transparent 66%);
  filter: blur(6px);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(30px, 4.5vw, 68px); align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-copy h1 { margin: 18px 0 0; }
.accent { background: linear-gradient(96deg, var(--sage-hi), var(--sage-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy .lede { margin-top: 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }
.meta-row span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); flex: none; }

/* ── platforms ────────────────────────────────────────────────────── */
.platforms { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.plat-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }
.plat-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.plat {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 11px;
  background: var(--ink-2); transition: border-color 0.22s, color 0.22s, transform 0.22s;
  color: var(--muted);
}
.plat:hover { border-color: var(--line-2); color: var(--text); transform: translateY(-2px); }
.plat svg { width: 15px; height: 15px; flex: none; }
.plat b { font-size: 0.8rem; font-weight: 500; }
.plat-txt { padding-inline: 14px; }

/* ── hero visual ──────────────────────────────────────────────────── */
.viz { border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(168deg, var(--surface), var(--ink-2)); padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.viz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.viz-title { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.viz-chip { font-family: var(--mono); font-size: 0.66rem; color: var(--sage); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px; }
.track { margin-bottom: 14px; }
.track-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); margin-bottom: 7px; }
.track-label b { color: var(--sage); font-weight: 500; }
.bar { height: 7px; border-radius: 999px; background: rgba(174,201,138,.11); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--sage-deep), var(--sage-hi)); transition: width .28s linear; }
.merge { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--dim); font-family: var(--mono); font-size: 0.68rem; }
.merge .rule { flex: 1; height: 1px; background: var(--line); }
.result { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--ink-2); opacity: .35; transition: opacity .4s, border-color .4s; }
.result.on { opacity: 1; border-color: var(--line-2); }
.result .ic { width: 32px; height: 32px; border-radius: 10px; background: rgba(174,201,138,.13); display: grid; place-items: center; flex: none; }
.result .ic svg { width: 16px; height: 16px; color: var(--sage); }
.result .nm { font-size: .85rem; font-weight: 600; display: block; }
.result .sb { font-family: var(--mono); font-size: .68rem; color: var(--dim); display: block; }

/* ── cards ────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 15px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g3, .g2 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(170deg, var(--surface), var(--ink-2));
  padding: 24px 22px 26px;
  transition: border-color .28s, transform .28s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card .ic { width: 36px; height: 36px; border-radius: 11px; background: rgba(174,201,138,.1); display: grid; place-items: center; margin-bottom: 15px; }
.card .ic svg { width: 18px; height: 18px; color: var(--sage); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .93rem; }
.card b { color: var(--text); }
.card.lit { background: linear-gradient(170deg, rgba(174,201,138,.09), var(--ink-2)); border-color: var(--line-2); }

/* ── formats ──────────────────────────────────────────────────────── */
.fmt-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }
@media (max-width: 720px) { .fmt-wrap { grid-template-columns: 1fr; } }
.fmt-col { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 13px; }
.chip { font-family: var(--mono); font-size: .78rem; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.hi { color: #101408; background: linear-gradient(160deg, var(--sage-hi), var(--sage)); border-color: transparent; font-weight: 500; }
.fmt-note { font-size: .88rem; }

/* ── screenshots ──────────────────────────────────────────────────── */
.shots { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots::-webkit-scrollbar { height: 6px; }
.shots::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
.shot { flex: 0 0 auto; width: 236px; scroll-snap-align: center; }
.shot img { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); }
.shot figcaption { margin-top: 11px; font-size: .82rem; color: var(--muted); text-align: center; }

/* ── specs ────────────────────────────────────────────────────────── */
.specs { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.spec { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 16px 22px; align-items: baseline; }
.spec + .spec { border-top: 1px solid var(--line); }
.spec dt { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--dim); text-transform: uppercase; }
.spec dd { font-size: .93rem; }
.spec dd span { color: var(--muted); }
@media (max-width: 620px) { .spec { grid-template-columns: 1fr; gap: 5px; } }

/* ── faq ──────────────────────────────────────────────────────────── */
details { border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2); padding: 0 20px; }
details + details { margin-top: 9px; }
details[open] { border-color: var(--line-2); }
summary { list-style: none; cursor: pointer; padding: 17px 0; font-weight: 600; font-size: .97rem; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--sage); font-size: 1.1rem; flex: none; transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 18px; font-size: .93rem; }
details b { color: var(--text); }

/* ── footer ───────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 50px 0 60px; }
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.foot-desc { margin-top: 14px; font-size: .9rem; max-width: 54ch; }
.foot-links { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.foot-h { font-family: var(--mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 3px; }
.foot-links a, .linky { color: var(--muted); font-size: .9rem; transition: color .2s; text-align: left; }
.foot-links a:hover, .linky:hover { color: var(--sage); }
.foot-mut { color: var(--dim); font-size: .86rem; }
.legal { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--dim); line-height: 1.7; max-width: 82ch; }
.legal b { color: var(--muted); }

/* ── mobile tab bar (hidden on desktop) ───────────────────────────── */
.tabbar { display: none; }

/* ── download card ────────────────────────────────────────────────── */
.sheet-bg {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 6, 3, .72); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 20px;
  animation: fade .22s ease both;
}
.sheet-bg[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97) } to { opacity: 1; transform: none } }

.dl-card {
  position: relative; width: 100%; max-width: 380px;
  border: 1px solid var(--line-2); border-radius: 26px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(174,201,138,.14), var(--ink-2) 58%);
  padding: 30px 26px 26px; text-align: center;
  box-shadow: 0 40px 90px rgba(0,0,0,.6);
  animation: pop .3s cubic-bezier(.22,.9,.28,1) both;
  max-height: 92dvh; overflow-y: auto;
}
.dl-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.dl-x:hover { background: var(--surface); color: var(--text); }
.dl-x svg { width: 17px; height: 17px; }

.dl-icon {
  width: 74px; height: 74px; border-radius: 21px; margin: 0 auto 16px;
  background: linear-gradient(150deg, var(--sage-hi), var(--sage-deep));
  display: grid; place-items: center;
  box-shadow: 0 14px 40px rgba(174,201,138,.32), inset 0 1px 0 rgba(255,255,255,.4);
}
.dl-icon svg { width: 36px; height: 36px; }
.dl-card h3 { font-size: 1.5rem; }
.dl-sub { font-size: .88rem; margin-top: 5px; }

.dl-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 20px 0; }
.dl-stats div { border: 1px solid var(--line); border-radius: 13px; padding: 11px 6px; background: var(--ink); }
.dl-stats b { display: block; font-family: var(--display); font-size: 1.02rem; letter-spacing: -.02em; }
.dl-stats span { display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: 3px; }

.dl-list { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.dl-list li { font-size: .87rem; color: var(--muted); display: flex; align-items: flex-start; gap: 9px; }
.dl-list li::before { content: ""; width: 15px; height: 15px; margin-top: 3px; flex: none; border-radius: 50%; background: rgba(174,201,138,.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23AEC98A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 10px; background-repeat: no-repeat; background-position: center; }
.dl-go { width: 100%; }
.dl-note { font-size: .72rem; color: var(--dim); margin-top: 13px; line-height: 1.6; }

/* ── reveal ───────────────────────────────────────────────────────── */
.js .rise { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.22,.9,.28,1); }
.js .rise.in { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════════════════
   MOBILE — the site becomes an app: one panel at a time, tab bar at
   the bottom, and the page itself never scrolls.
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 820px) {
  html, body { height: 100%; overflow: hidden; }

  header { position: fixed; inset: 0 0 auto; }
  header .wrap { height: 58px; padding-inline: 18px; }
  header nav .desk, .desk { display: none !important; }

  #shell {
    position: fixed;
    inset: 58px 0 var(--bar);
    overflow: hidden;
  }
  .panel {
    position: absolute; inset: 0;
    padding: 22px 0 26px;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    display: none;
    animation: panelIn .3s cubic-bezier(.22,.9,.28,1) both;
  }
  .panel.active { display: block; }
  @keyframes panelIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

  .wrap { padding-inline: 18px; }
  #home::before { height: 380px; }

  h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  h2 { font-size: clamp(1.55rem, 6.4vw, 2rem); }
  .lede { font-size: 1rem; }

  .cta-row .btn { width: 100%; }
  .viz { display: none; }          /* the hero animation is desktop-only; phones get the copy */
  .platforms { margin-top: 24px; }

  footer { display: none; }        /* its content lives in the Details panel instead */

  /* tab bar */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; inset: auto 0 0; z-index: 60;
    height: var(--bar); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(11, 13, 8, .92); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--dim); transition: color .2s; }
  .tab svg { width: 20px; height: 20px; }
  .tab span { font-size: .62rem; letter-spacing: .04em; }
  .tab.active { color: var(--sage); }
  .tab:active { transform: scale(.94); }

  .tab-dl { position: relative; }
  .dl-orb {
    position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(160deg, var(--sage-hi), var(--sage));
    color: #101408; display: grid; place-items: center;
    box-shadow: 0 10px 28px rgba(174,201,138,.4);
    border: 4px solid var(--ink);
  }
  .dl-orb svg { width: 22px; height: 22px; }
  .tab-dl:active .dl-orb { transform: translateX(-50%) scale(.93); }

  .shot { width: 200px; }
  .dl-card { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  .js .rise { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }
