/* ForgeForm website. Tokens mirror fittnes_tracker/lib/core/design_tokens.dart. */

@font-face { font-family: "Montserrat"; src: url("fonts/Montserrat-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/Montserrat-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("fonts/Exo2-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("fonts/Exo2-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("fonts/Exo2-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light dark;
  --orange: #ff6b3e;          /* brand: on dark grounds, and for non-text marks next to a label */
  --orange-fill: #b24b2b;     /* any fill under white text, either theme (5.32:1) */
  --charcoal: #333333;

  --bg: #f5f5f5;
  --surface: #ffffff;
  --sunk: #ececec;
  --text: #1c1c1c;
  --muted: #666666;
  --line: #d6d6d6;
  --accent: #b24b2b;          /* orange as text or a ring on light grounds */
  --accent-tint: #fbe9e3;
  --ok: #327835;
  --shadow: 0 1px 2px rgb(40 40 40 / 0.06), 0 2px 8px -2px rgb(40 40 40 / 0.10);

  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Exo 2", system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --pill: 999px;

  --gutter: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1e1e1e;
    --sunk: #2c2c2c;
    --text: #f2f2f2;
    --muted: #b0b0b0;
    --line: #3d3d3d;
    --accent: #ff6b3e;        /* 4.94:1 on #2c2c2c, 5.89:1 on #1e1e1e */
    --accent-tint: #3a2620;
    --ok: #5cb860;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5);
  }
}

@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; scrollbar-color: var(--muted) var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-body);
  caret-color: var(--accent);
}
::selection { background: var(--orange-fill); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
.num { font-family: var(--font-head); font-variant-numeric: tabular-nums; font-weight: 700; }
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 16px; top: -48px; z-index: 30; background: var(--surface); color: var(--text); padding: 8px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 16px; }

/* Buttons: one primary label per intent across the page. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r-sm); border: 0;
  background: var(--orange-fill); color: #fff;
  font: 600 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}
.btn:hover { background: #9c4125; }
.btn:active { transform: scale(0.97); }
.btn .icon { width: 20px; height: 20px; transition: transform 200ms var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--on-fill { background: #fff; color: var(--orange-fill); }
.btn--on-fill:hover { background: #fdf1ed; }
.link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 0.25em; }
.link:hover { text-decoration-thickness: 2px; }

/* Nav: the app bar, charcoal in both themes. */
.nav { position: sticky; top: 0; z-index: 20; background: var(--charcoal); color: #fff; }
.nav__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 700 1.125rem/1 var(--font-head); letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
/* Under 400px the name, the language switch and Sign in don't fit in one row; the link keeps its aria-label. */
@media (max-width: 399px) { .brand__name { display: none; } }
.nav__links { display: none; gap: 24px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav__links a { text-decoration: none; color: #e6e6e6; font-weight: 500; padding: 8px 0; white-space: nowrap; }
.nav__links a:hover { color: #fff; text-decoration: underline; }
.lang { display: inline-flex; margin-left: auto; border: 1px solid #6b6b6b; border-radius: var(--pill); padding: 4px; }
.lang a { min-width: 44px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--pill); text-decoration: none; font-weight: 600; font-size: 0.875rem; color: #e6e6e6; }
.lang a[aria-current="true"] { background: #fff; color: var(--charcoal); }
/* Visible at every width: a returning user on a phone needs it as much as on a desktop. */
.nav__signin { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: #fff; font-weight: 600; white-space: nowrap; }
.nav__signin:hover { text-decoration: underline; }
.nav .btn { display: none; min-height: 40px; padding: 0 16px; }
.nav :focus-visible { outline-color: var(--orange); }
@media (min-width: 900px) { .nav .btn { display: inline-flex; } }
/* The section links need the most room: the German row, with the button, wraps below 1200px. */
@media (min-width: 1200px) {
  .nav__links { display: flex; }
  .lang { margin-left: 0; }
}

/* Hero */
.hero { padding: 40px 0 64px; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.625rem); }
.hero__sub { margin-top: 24px; font-size: 1.1875rem; color: var(--muted); max-width: 34ch; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
@media (min-width: 1024px) {
  .hero { padding: 64px 0 96px; }
  /* The check-in gets the wider column: narrower than about 600 px, its
     own 12 px labels fall under 10 px, and the card is the page's argument. */
  .hero__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: 48px; }
}


/* Screenshots of the real console and app. One frame for all of them; the
   picture swaps with the reader's theme so the product matches the page. */
.shot { margin: 0; position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; }
/* Captures narrower than their column are shown at their own size (half
   their pixels, since every capture is 2x), never stretched. */
.shot--phone { max-width: 392px; }
.shot--chat { max-width: 414px; }
.shot--wide { margin-top: 40px; }
.caption { margin-top: 12px; font-size: 0.875rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.caption .icon { width: 18px; height: 18px; }
.hero__shot { margin: 0; }

/* A ring drawn over one tile of the real check-in card. Positions are the
   tiles' boxes in the 720 x 720 capture (website/tools/capture.mjs, CROPS). */
.ring { position: absolute; border-radius: var(--r-md); box-shadow: 0 0 0 3px var(--accent), 0 0 0 9px rgb(178 75 43 / 0.16); opacity: 0; transform: scale(1.03); transition: opacity 260ms var(--ease), transform 260ms var(--ease); pointer-events: none; }
.ring[data-ring="sessions"] { left: 4.7%; top: 30.2%; width: 44.4%; height: 16%; }
.ring[data-ring="calories"] { left: 51%; top: 30.2%; width: 44.4%; height: 16%; }
.ring[data-ring="protein"] { left: 4.7%; top: 48.1%; width: 44.4%; height: 16.1%; }
.ring[data-ring="weight"] { left: 51%; top: 48.1%; width: 44.4%; height: 16.1%; }
.ring[data-ring="answers"] { left: 2.4%; top: 66.2%; width: 95.2%; height: 22.6%; border-radius: var(--r-sm); }
.ring.on { opacity: 1; transform: none; }

/* Sections */
.section { padding: 64px 0; }
@media (min-width: 1024px) { .section { padding: 96px 0; } }
.section h2 { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.625rem); max-width: 22ch; }
.lede { margin-top: 16px; font-size: 1.1875rem; color: var(--muted); max-width: 60ch; }

/* Problem: three plain statements, set large. */
.pains { margin-top: 40px; display: grid; gap: 32px; counter-reset: pain; }
.pain h3 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem); }
.pain p { margin-top: 8px; color: var(--muted); max-width: 52ch; }
@media (min-width: 900px) {
  .pains { grid-template-columns: repeat(3, 1fr); gap: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
}

/* Trace: the same check-in pinned on the left, each figure's source on the right. */
.trace { display: grid; gap: 32px; margin-top: 48px; }
.trace__mini { display: none; }
.trace__sources { display: grid; gap: 56px; }
.source { display: grid; gap: 12px; }
.source h3 { font-size: 1.5rem; }
.source p { color: var(--muted); max-width: 52ch; }
.source .shot { margin-top: 12px; }
@media (min-width: 1024px) {
  .trace { grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; }
  .trace__mini { display: block; position: sticky; top: 104px; }
  .trace__sources { gap: 96px; padding-bottom: 32px; }
}

/* The rest of the week: the roster, then a plain list. */
.more { margin-top: 40px; list-style: none; padding: 32px 0 0; border-top: 1px solid var(--line); display: grid; gap: 24px 48px; }
.more h3 { font-size: 1.125rem; }
.more p { color: var(--muted); margin-top: 4px; }
@media (min-width: 760px) { .more { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .more { grid-template-columns: repeat(4, 1fr); } }

/* How it works: a line with the invite code as its centre. */
.steps { margin-top: 48px; list-style: none; padding: 0; display: grid; gap: 32px; counter-reset: step; }
.step { position: relative; padding-left: 56px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-fill); color: #fff; font: 700 1rem/1 var(--font-head); }
.step h3 { font-size: 1.1875rem; padding-top: 8px; }
.step p { margin-top: 4px; color: var(--muted); }
.sub-title { margin-top: 48px; font-size: 1.25rem; }
.code { margin-top: 12px; display: inline-flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface); border: 1.5px dashed var(--accent); }
@media (prefers-color-scheme: dark) { .code { background: var(--sunk); } }
.code b { font: 700 1.375rem/1 var(--font-head); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.code span { font-size: 0.8125rem; color: var(--muted); }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .step { padding-left: 0; padding-top: 56px; }
  .step::after { content: ""; position: absolute; top: 20px; left: 56px; right: -24px; height: 2px; background: var(--line); }
  .step:last-child::after { display: none; }
}

/* Pricing */
.plans { margin-top: 40px; display: grid; gap: 12px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; display: grid; gap: 4px; align-content: start; }
@media (prefers-color-scheme: dark) { .plan { background: var(--sunk); border-color: var(--line); } }
.plan h3 { font-size: 1.125rem; }
.plan__seats { color: var(--muted); }
.plan__price { margin-top: 12px; font-size: 2.25rem; letter-spacing: -0.02em; }
.plan__price small { font: 500 1rem/1 var(--font-body); color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 0.9375rem; }
.plan li { display: flex; gap: 8px; align-items: start; }
.plan li .icon { width: 20px; height: 20px; color: var(--ok); }
.plan li.no { color: var(--muted); }
.plan li.no .icon { color: var(--muted); }
.plan--free { background: transparent; border-style: dashed; box-shadow: none; }
.worth { margin-top: 24px; max-width: 70ch; }
.worth strong { font-family: var(--font-head); }
.pricing__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.pricing__actions p { color: var(--muted); }
@media (min-width: 640px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .plans { grid-template-columns: repeat(4, 1fr); } }

/* FAQ */
.faq { margin-top: 32px; max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 0; font: 600 1.125rem/1.35 var(--font-head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 28px; height: 28px; color: var(--accent); transition: transform 220ms var(--ease); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 0 24px; color: var(--muted); max-width: 66ch; }
.faq summary:hover { color: var(--accent); }

/* Close: the one full field of colour. */
.close { background: var(--orange-fill); color: #fff; padding: 72px 0; }
.close h2 { font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3rem); max-width: 18ch; }
.close p { margin-top: 16px; font-size: 1.125rem; color: #fff2ec; max-width: 52ch; }
.close .btn { margin-top: 32px; }
.close :focus-visible { outline-color: #fff; }

/* Footer */
.foot { padding: 32px 0 48px; font-size: 0.9375rem; color: var(--muted); }
.foot__inner { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--text); padding: 8px 0; display: inline-block; }

/* Legal stub pages */
.doc { max-width: 760px; padding-block: 48px 96px; }
.doc h1 { font-size: clamp(1.875rem, 1.4rem + 2vw, 2.5rem); }
.doc h2 { font-size: 1.25rem; margin-top: 32px; }
.doc p, .doc li { margin-top: 12px; color: var(--muted); }
.draft { margin-top: 24px; padding: 16px; border-radius: var(--r-sm); background: var(--accent-tint); color: var(--text); }

/* The cancellation form (§312k BGB): one column, labels above, every control at least 44px. */
.form { margin-top: 32px; display: grid; gap: 24px; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form label, .form legend { display: block; font-weight: 600; color: var(--text); }
.form .hint { margin-top: 4px; font-size: 0.9375rem; color: var(--muted); }
.form input[type="text"], .form input[type="email"], .form input[type="date"], .form textarea {
  display: block; width: 100%; margin-top: 8px; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  font: 1rem/1.4 var(--font-body);
}
.form textarea { min-height: 96px; resize: vertical; }
.form .choice { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 4px; font-weight: 400; }
.form input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--orange-fill); }
.form :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
