/* ============================================================================
   The TRMR App — site design system
   ----------------------------------------------------------------------------
   Every page shares this file, INCLUDING the generated Website/terms.html.
   terms.html is written by scripts/legal_sync.py and must never be hand-edited,
   so the design lives here in CSS and the generator only emits structure:
       nav.top > a.brand      h1   p.meta   p.lead
       .card / .card.promise / .card.warn        h2  p  ul  hr  footer
   Restyle those selectors freely; changing the generator's markup means
   editing scripts/legal_sync.py and re-running --generate.

   Palette is the app's own brandGradient (#1c6b80 -> #0d4354) so the site and
   the App Store screenshots read as one product.
   ========================================================================= */

:root {
  --brand-900:#082b37; --brand-800:#0a3949; --brand-700:#0d4354;
  --brand-600:#155a70; --brand-500:#1c6b80; --brand-300:#5aa6bd;

  --bg:#ffffff; --bg-alt:#f5f8fa; --fg:#12161b; --muted:#5b6270;
  --rule:#e2e7ee; --card:#f8fafc; --card-rule:#e2e7ee;
  --accent:#12556f; --accent-hov:#0d4354;
  --strong:#0f4c75; --strongbg:#eef6fa; --strongrule:#bcdcec;
  --warnbg:#fdf5ea; --warnrule:#e0b075; --warnfg:#6d4110;

  --shadow-sm:0 1px 2px rgba(10,40,55,.06), 0 1px 3px rgba(10,40,55,.05);
  --shadow-md:0 4px 12px rgba(10,40,55,.07), 0 2px 4px rgba(10,40,55,.05);
  --shadow-lg:0 18px 45px rgba(8,43,55,.16), 0 6px 14px rgba(8,43,55,.09);

  --r-sm:8px; --r-md:12px; --r-lg:18px; --r-xl:26px;
  --wrap:46rem; --wrap-wide:68rem;
  --ease:cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:#101418; --bg-alt:#151b21; --fg:#e9edf2; --muted:#9aa3b1;
    --rule:#252c35; --card:#171d24; --card-rule:#252c35;
    --accent:#7fc3e2; --accent-hov:#a3d6ee;
    --strong:#9ed0f0; --strongbg:#12232e; --strongrule:#23445a;
    --warnbg:#2a2114; --warnrule:#8a6532; --warnfg:#eecb9a;
    --shadow-sm:0 1px 2px rgba(0,0,0,.4);
    --shadow-md:0 4px 14px rgba(0,0,0,.45);
    --shadow-lg:0 18px 45px rgba(0,0,0,.55);
  }
}

*, *::before, *::after { box-sizing:border-box; }

html { -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  * { animation:none !important; transition:none !important; }
}

body {
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font:17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
       Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* ---------------------------------------------------------------- header --
   nav.top is emitted by legal_sync.py, so it has to work as a plain flex row
   of links with a brand lockup first. Styled here as a sticky app-like bar. */
nav.top {
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; gap:1.5rem;
  padding:.85rem 1.5rem;
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--rule);
  font-size:.94rem;
}
nav.top a { color:var(--muted); text-decoration:none; transition:color .15s var(--ease); }
nav.top a:hover { color:var(--fg); }
nav.top a.brand {
  display:inline-flex; align-items:center; gap:.6rem;
  font-weight:650; color:var(--fg); letter-spacing:-.01em;
  margin-right:auto;              /* pushes the rest of the links right */
}
nav.top a.brand img { border-radius:7px; display:block; box-shadow:var(--shadow-sm); }
@media (max-width: 30rem) {
  nav.top { gap:1rem; padding:.7rem 1rem; font-size:.88rem; }
}

/* ----------------------------------------------------------------- layout */
main {
  max-width:var(--wrap);
  margin:0 auto;
  padding:3rem 1.25rem 5rem;
}
main.flush { max-width:none; padding:0; }

section { scroll-margin-top:5rem; }

/* ------------------------------------------------------------- typography */
h1 {
  font-size:clamp(2rem, 5vw, 2.6rem); line-height:1.12;
  letter-spacing:-.03em; font-weight:700; margin:0 0 .4rem;
}
h2 {
  font-size:clamp(1.35rem, 3vw, 1.6rem); line-height:1.25;
  letter-spacing:-.02em; font-weight:650; margin:3rem 0 .9rem;
}
h3 { font-size:1.06rem; font-weight:650; letter-spacing:-.01em; margin:1.6rem 0 .4rem; }
p { margin:0 0 1.05rem; }
.meta { color:var(--muted); font-size:.94rem; margin:0 0 2rem; }
.lead { font-size:1.12rem; line-height:1.6; color:var(--fg); }
ul { padding-left:1.3rem; margin:0 0 1.05rem; }
li { margin:.42rem 0; }
strong { font-weight:650; }
a { color:var(--accent); text-underline-offset:2px; text-decoration-thickness:1px; }
a:hover { color:var(--accent-hov); }
hr { border:0; border-top:1px solid var(--rule); margin:3.5rem 0 1.75rem; }
:focus-visible { outline:2px solid var(--brand-500); outline-offset:3px; border-radius:4px; }

/* ------------------------------------------------------------------ cards */
.card {
  background:var(--card); border:1px solid var(--card-rule);
  border-radius:var(--r-md); padding:1.15rem 1.3rem; margin:1.6rem 0;
  box-shadow:var(--shadow-sm);
}
.card > :last-child { margin-bottom:0; }
.card.promise { background:var(--strongbg); border-color:var(--strongrule); }
.card.promise strong { color:var(--strong); }
.card.warn { background:var(--warnbg); border-color:var(--warnrule); color:var(--warnfg); }
.card.warn strong, .card.warn a { color:var(--warnfg); }

/* ----------------------------------------------------------------- footer */
footer { color:var(--muted); font-size:.9rem; line-height:1.6; }
footer a { color:var(--muted); }
footer a:hover { color:var(--fg); }

/* ==========================================================================
   Landing-page components (index.html)
   ======================================================================== */

.hero {
  position:relative; overflow:hidden;
  background:
    radial-gradient(115% 85% at 85% -10%, rgba(90,166,189,.42) 0%, transparent 58%),
    linear-gradient(158deg, var(--brand-500) 0%, var(--brand-700) 52%, var(--brand-900) 100%);
  color:#fff;
  padding:clamp(3rem, 8vw, 5.5rem) 1.5rem clamp(3rem, 7vw, 4.5rem);
}
.hero-inner {
  position:relative; z-index:1;
  max-width:var(--wrap-wide); margin:0 auto;
  display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
  gap:clamp(2rem,5vw,4rem); align-items:center;
}
@media (max-width: 52rem) {
  .hero-inner { grid-template-columns:1fr; gap:2.5rem; }
}

.hero-icon {
  border-radius:22px; display:block; margin:0 0 1.4rem;
  box-shadow:0 10px 30px rgba(0,0,0,.32);
}
.eyebrow {
  text-transform:uppercase; letter-spacing:.14em; font-size:.75rem;
  font-weight:650; opacity:.82; margin:0 0 .85rem;
}
.hero h1 {
  font-size:clamp(2.3rem, 6vw, 3.4rem); letter-spacing:-.035em;
  margin:0 0 .9rem; color:#fff;
}
.hero p.sub {
  font-size:clamp(1.05rem, 2.2vw, 1.2rem); line-height:1.55;
  opacity:.92; margin:0 0 1.8rem; max-width:34rem;
}

/* "Coming soon" is a status, not a button — it must not look clickable. */
.badge-soon {
  display:inline-flex; align-items:center; gap:.75rem;
  background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.34);
  border-radius:var(--r-lg); padding:.75rem 1.3rem;
  font-weight:600; font-size:1rem; color:#fff;
  box-shadow:var(--shadow-md);
}
.badge-soon .dot {
  width:.55rem; height:.55rem; border-radius:50%; background:#7fe0b0;
  box-shadow:0 0 0 4px rgba(127,224,176,.22); flex:none;
}
.badge-soon small { display:block; font-weight:400; opacity:.82; font-size:.79rem; letter-spacing:.01em; }
.hero .note { font-size:.9rem; opacity:.8; margin:1.15rem 0 0; max-width:27rem; }
/* The page accent is a dark teal tuned for a white background; on the hero it
   all but disappears. Links inside the gradient get their own light colour. */
.hero a { color:#cdeaf7; text-decoration:underline; }
.hero a:hover { color:#fff; }

.hero-art { display:flex; justify-content:center; }
/* The device PNGs carry their own rounded corners with real transparency, so
   they get a drop-shadow (which follows the alpha) rather than a box-shadow and
   a border (which would trace a rectangle around the transparent corners). */
.hero-art img {
  width:100%; max-width:290px; height:auto; display:block;
  filter:drop-shadow(0 22px 48px rgba(0,0,0,.42)) drop-shadow(0 6px 14px rgba(0,0,0,.28));
}

/* alternating full-bleed bands */
.band { padding:clamp(3rem,6vw,4.5rem) 1.5rem; }
.band.alt { background:var(--bg-alt); border-block:1px solid var(--rule); }
.band-inner { max-width:var(--wrap-wide); margin:0 auto; }
.band-inner.narrow { max-width:var(--wrap); }
.band h2 { margin-top:0; }
.band-lede { color:var(--muted); font-size:1.05rem; max-width:38rem; margin:0 0 2.25rem; }

/* 17.5rem so six cards break 3+3 on a wide screen and 2+2+2 on a tablet,
   rather than stranding two of them alone on a fourth-column row. */
.features { display:grid; grid-template-columns:repeat(auto-fit, minmax(17.5rem,1fr)); gap:1.25rem; }
.feature {
  background:var(--card); border:1px solid var(--card-rule);
  border-radius:var(--r-lg); padding:1.5rem 1.4rem; box-shadow:var(--shadow-sm);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease);
}
.feature:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); }
.feature h3 { margin:0 0 .5rem; }
.feature p { margin:0; color:var(--muted); font-size:.97rem; }
.feature .ico {
  display:grid; place-items:center; width:2.6rem; height:2.6rem; margin-bottom:1rem;
  border-radius:var(--r-md); background:var(--strongbg); color:var(--strong);
  border:1px solid var(--strongrule);
}
.feature .ico svg { width:1.35rem; height:1.35rem; }

/* screenshot rail */
.shots {
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(210px,1fr);
  gap:1.15rem; overflow-x:auto; padding:.25rem .25rem 1.25rem;
  scroll-snap-type:x mandatory; scrollbar-width:thin;
}
.shots figure { margin:0; scroll-snap-align:start; }
.shots img {
  width:100%; height:auto; display:block;
  filter:drop-shadow(0 10px 22px rgba(8,43,55,.16)) drop-shadow(0 2px 5px rgba(8,43,55,.10));
}
@media (prefers-color-scheme: dark) {
  .shots img { filter:drop-shadow(0 10px 26px rgba(0,0,0,.6)); }
}
.shots figcaption { font-size:.88rem; color:var(--muted); margin-top:.65rem; }
@media (max-width: 40rem) { .shots { grid-auto-columns:minmax(165px,1fr); } }

/* numbered steps */
.steps { counter-reset:step; display:grid; gap:1rem; margin:0; padding:0; list-style:none; }
.steps li {
  counter-increment:step; position:relative; margin:0;
  padding:1.05rem 1.25rem 1.05rem 3.6rem;
  background:var(--card); border:1px solid var(--card-rule);
  border-radius:var(--r-md); box-shadow:var(--shadow-sm);
}
.steps li::before {
  content:counter(step); position:absolute; left:1.1rem; top:1.05rem;
  width:1.75rem; height:1.75rem; border-radius:50%;
  background:var(--brand-500); color:#fff;
  display:grid; place-items:center; font-size:.85rem; font-weight:650;
}
.steps strong { display:block; margin-bottom:.15rem; }
.steps span { color:var(--muted); font-size:.96rem; }

/* privacy band — the strongest visual claim on the page */
.privacy-band {
  background:linear-gradient(150deg, var(--brand-700), var(--brand-900));
  color:#fff; border-radius:var(--r-xl); padding:clamp(2rem,4vw,3rem);
  box-shadow:var(--shadow-lg);
}
.privacy-band h2 { margin:0 0 .75rem; color:#fff; }
.privacy-band p { opacity:.93; }
.privacy-band p:last-child { margin-bottom:0; }
.privacy-band a { color:#bfe6f5; }
.privacy-band a:hover { color:#fff; }

/* site footer band */
.site-footer { background:var(--bg-alt); border-top:1px solid var(--rule); padding:2.75rem 1.5rem; }
.site-footer .band-inner { display:flex; flex-wrap:wrap; gap:1.5rem 2.5rem; align-items:flex-start; }
.site-footer .fcol { flex:1 1 14rem; }
.site-footer h4 { font-size:.82rem; text-transform:uppercase; letter-spacing:.1em;
                  color:var(--muted); margin:0 0 .7rem; font-weight:650; }
.site-footer ul { list-style:none; padding:0; margin:0; }
.site-footer li { margin:.35rem 0; }
.site-footer a { color:var(--fg); text-decoration:none; font-size:.94rem; }
.site-footer a:hover { text-decoration:underline; }
.site-footer .legal { flex-basis:100%; color:var(--muted); font-size:.86rem;
                      border-top:1px solid var(--rule); padding-top:1.5rem; margin-top:.5rem; }
