/* ==========================================================================
   TrueFWD Labs — design system
   Neutral, editorial studio brand. Colour is reserved for the products.
   ========================================================================== */

/* ---- tokens: light ------------------------------------------------------ */
:root {
  --bg:          #fbfaf8;
  --bg-elev:     #ffffff;
  --bg-sunk:     #f4f2ed;
  --ink:         #15120f;
  --ink-2:       #676057;
  --ink-3:       #9a9187;
  --line:        #e8e3da;
  --line-strong: #d9d3c8;
  --ember:       #c2410c;
  --ember-soft:  #fcf0e8;

  --shadow-sm: 0 1px 2px rgba(20,16,10,.05);
  --shadow-md: 0 8px 24px -8px rgba(20,16,10,.14), 0 2px 6px rgba(20,16,10,.05);
  --shadow-lg: 0 30px 60px -22px rgba(20,16,10,.24), 0 10px 24px -12px rgba(20,16,10,.12);

  --glow-a: rgba(255,122,69,.13);
  --glow-b: rgba(255,178,56,.10);

  --radius:    14px;
  --radius-lg: 22px;
  --wrap:      1080px;
  --ease:      cubic-bezier(.22,.68,.32,1);

  color-scheme: light;
}

/* ---- tokens: dark ------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0b0a09;
    --bg-elev:     #141210;
    --bg-sunk:     #100e0d;
    --ink:         #f5f2ec;
    --ink-2:       #a79e92;
    --ink-3:       #6f675e;
    --line:        #241f1c;
    --line-strong: #342d28;
    --ember:       #ff7a45;
    --ember-soft:  #231510;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 10px 30px -10px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.35);
    --shadow-lg: 0 40px 80px -28px rgba(0,0,0,.75), 0 12px 30px -14px rgba(0,0,0,.5);

    --glow-a: rgba(255,122,69,.20);
    --glow-b: rgba(255,178,56,.10);

    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:          #0b0a09;
  --bg-elev:     #141210;
  --bg-sunk:     #100e0d;
  --ink:         #f5f2ec;
  --ink-2:       #a79e92;
  --ink-3:       #6f675e;
  --line:        #241f1c;
  --line-strong: #342d28;
  --ember:       #ff7a45;
  --ember-soft:  #231510;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 10px 30px -10px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.35);
  --shadow-lg: 0 40px 80px -28px rgba(0,0,0,.75), 0 12px 30px -14px rgba(0,0,0,.5);

  --glow-a: rgba(255,122,69,.20);
  --glow-b: rgba(255,178,56,.10);

  color-scheme: dark;
}

/* ---- base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 680;
  letter-spacing: -0.022em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

a { color: var(--ember); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { opacity: .78; }

img, svg { max-width: 100%; display: block; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-size: 14px;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 20px; } }

.eyebrow {
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 18px;
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); /* fallback where color-mix is unsupported */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-weight: 640; font-size: 15.5px; letter-spacing: -.015em;
  white-space: nowrap;
}
.brand:hover { opacity: 1; }
.brand .mark { color: var(--ink); flex: 0 0 auto; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--ink-2); text-decoration: none;
  font-size: 14px; font-weight: 520;
  padding: 7px 11px; border-radius: 8px;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.site-nav a:hover { color: var(--ink); background: var(--bg-sunk); opacity: 1; }
.site-nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 620px) { .site-nav a.opt { display: none; } }

.theme-toggle {
  margin-left: 6px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px;
  background: transparent; color: var(--ink-2);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); background: var(--bg-sunk); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun  { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun  { display: none; }
}

/* ---- hero --------------------------------------------------------------- */
.hero { position: relative; padding: clamp(72px, 12vw, 132px) 0 clamp(56px, 8vw, 88px); }
.hero::before {
  content: ""; position: absolute; inset: -30% -20% auto -20%; height: 130%;
  background:
    radial-gradient(46% 52% at 72% 22%, var(--glow-a) 0%, transparent 70%),
    radial-gradient(40% 46% at 18% 70%, var(--glow-b) 0%, transparent 72%);
  pointer-events: none; z-index: -1;
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 72px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.03;
  max-width: 16ch;
}
.hero h1 .accent { color: var(--ember); }
.hero .lead {
  margin: 24px 0 0;
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 54ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { opacity: 1; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--bg-sunk); }

/* ---- sections ----------------------------------------------------------- */
.section { padding: clamp(64px, 9vw, 108px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2, .h-sec { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.028em; }
.section-head p { color: var(--ink-2); margin: 16px 0 0; font-size: 17px; }

/* ---- app showcase ------------------------------------------------------- */
.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
@media (max-width: 900px) {
  .app-layout { grid-template-columns: minmax(0, 1fr); }
  .app-visual { order: -1; justify-self: center; }
}

.app-id { display: flex; align-items: center; gap: 18px; }
.app-id img {
  width: 76px; height: 76px; border-radius: 18px;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.app-id h3 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.app-id .tag { color: var(--ink-2); font-size: 15.5px; margin: 4px 0 0; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 640; letter-spacing: .01em;
  padding: 5px 13px 5px 10px; border-radius: 999px;
  background: var(--ember-soft); color: var(--ember);
  border: 1px solid color-mix(in srgb, var(--ember) 22%, transparent);
  margin-top: 22px;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.spec-list { list-style: none; margin: 30px 0 0; padding: 0; }
.spec-list li {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  padding: 13px 0; border-top: 1px solid var(--line);
}
.spec-list li:last-child { border-bottom: 1px solid var(--line); }
.spec-list .ic { color: var(--ember); margin-top: 2px; }
.spec-list b { display: block; font-weight: 600; font-size: 15px; }
.spec-list span { color: var(--ink-2); font-size: 14.5px; }

/* ---- phone mockup ------------------------------------------------------- */
.phone {
  --w: clamp(260px, 30vw, 306px);
  width: var(--w);
  aspect-ratio: 306 / 648;
  background: linear-gradient(160deg, #38332f 0%, #131110 34%, #0a0908 100%);
  border-radius: 46px;
  padding: 4px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.phone::after {
  content: ""; position: absolute; inset: 0; border-radius: 46px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
  pointer-events: none;
}
.phone .screen {
  width: 100%; height: 100%;
  border-radius: 42px;
  background:
    radial-gradient(120% 60% at 12% 0%, #2a211c 0%, transparent 58%),
    radial-gradient(90% 50% at 100% 4%, #241a19 0%, transparent 60%),
    #0d0c0b;
  overflow: hidden;
  display: flex; flex-direction: column;
  color: #f2efe9;
  font-size: 11px;
}

.entry {
  background: rgba(255,255,255,.055); border-radius: 13px;
  padding: 11px 13px; display: flex; align-items: center; justify-content: space-between;
}
.entry .kcal { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.entry .when { text-align: right; }
.entry .when b { display: block; font-size: 10.5px; font-weight: 520; color: #e6e1d8; }
.entry .when i { font-style: normal; font-size: 9px; color: #8b8378; }

.tabbar {
  margin: auto 10px 11px; padding: 7px 6px;
  background: rgba(255,255,255,.07); border-radius: 20px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  flex: 0 0 auto;
}
.tabbar div { display: grid; justify-items: center; gap: 3px; color: #8b8378; }
.tabbar div.on { color: #ff8a4a; }
.tabbar span { font-size: 8.5px; font-weight: 560; }

/* ---- principles --------------------------------------------------------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
@media (max-width: 820px) { .principles { grid-template-columns: 1fr; } }
.principle { padding: 30px 32px 30px 0; border-top: 1px solid var(--line); }
@media (min-width: 821px) {
  .principle + .principle { padding-left: 32px; border-left: 1px solid var(--line); }
}
.principle .num {
  font-size: 11.5px; font-weight: 640; letter-spacing: .12em;
  color: var(--ink-3); display: block; margin-bottom: 14px;
}
.principle h3 { font-size: 18px; letter-spacing: -.018em; margin-bottom: 9px; }
.principle p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* ---- about / contact ---------------------------------------------------- */
.about-grid {
  display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr);
  gap: clamp(32px, 6vw, 72px);
}
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p { color: var(--ink-2); font-size: 16.5px; }
.about-grid p + p { margin-top: 16px; }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  display: grid; grid-template-columns: 108px 1fr; gap: 14px;
  padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px;
}
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts dt, .facts .k { color: var(--ink-3); }
.facts .v { color: var(--ink); }

.cta {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px;
}
.cta h2 { font-size: clamp(21px, 2.6vw, 27px); letter-spacing: -.026em; }
.cta p { color: var(--ink-2); margin: 10px 0 0; font-size: 15.5px; }

/* ---- footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 64px; }
.foot-top {
  display: flex; flex-wrap: wrap; gap: 28px;
  justify-content: space-between; align-items: flex-start;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.foot-links a:hover { color: var(--ink); opacity: 1; }
.foot-bot {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  color: var(--ink-3); font-size: 13px;
}

/* ---- prose (legal pages) ------------------------------------------------ */
.prose { max-width: 68ch; padding: clamp(44px, 7vw, 76px) 0 clamp(64px, 9vw, 96px); }
.prose h1 { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -.032em; }
.prose .meta { color: var(--ink-3); font-size: 14px; margin: 14px 0 0; }
.prose h2 {
  font-size: 20px; letter-spacing: -.02em;
  margin: 46px 0 12px; padding-top: 26px; border-top: 1px solid var(--line);
}
.prose h3 { font-size: 16.5px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 16px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .lede { font-size: 18px; color: var(--ink-2); line-height: 1.62; }

.callout {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; margin: 0 0 26px;
}
.callout p:last-child { margin-bottom: 0; }
.callout p { color: var(--ink); }

.toc { list-style: none; padding: 0; margin: 30px 0 0; column-count: 2; column-gap: 32px; }
@media (max-width: 620px) { .toc { column-count: 1; } }
.toc li { margin-bottom: 6px; font-size: 14.5px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ember); opacity: 1; }

/* ---- support page ------------------------------------------------------- */
.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 28px;
  box-shadow: var(--shadow-sm); margin: 0 0 14px;
}
.contact-card h2 { font-size: 19px; margin: 0 0 6px; padding: 0; border: 0; }
.contact-card p { margin: 0; font-size: 15px; color: var(--ink-2); }

.faq { margin: 8px 0 0; }
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 17px 34px 17px 0; position: relative;
  font-size: 16px; font-weight: 560; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 1.8px solid var(--ink-3); border-bottom: 1.8px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .22s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--ember); }
.faq .answer { padding: 0 0 18px; }
.faq .answer p:last-child, .faq .answer ul:last-child { margin-bottom: 0; }

.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li {
  display: grid; grid-template-columns: 20px 1fr; gap: 11px;
  padding: 7px 0; color: var(--ink-2); font-size: 15.5px;
}
.checklist li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ember); margin: 9px 0 0 6px;
}

/* ---- reveal ------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* A real screenshot rather than a hand-built replica: a replica has to be re-drawn on every
   design change, and silently stops matching the app the first time nobody remembers to. */
.phone .screen .shot {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block; border-radius: 42px;
}
