/* Helakora's site: the app's own colours (app/src/theme/theme.tsx), Archivo and DM Mono. The same palette is in the
   trainer page. Light or dark follows the phone, unless the theme button (site.js) sets data-theme on <html>.
   Macro colours: the plain ones fill bars and dots, the -ink ones are for text. */
/* The fonts come from helakora.com itself (assets/fonts, SIL Open Font License), so no visitor's address goes to Google. */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/assets/fonts/archivo-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/assets/fonts/archivo-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/dm-mono-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/dm-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/dm-mono-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/dm-mono-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F1F3F2; --surface: #FBFCFA; --surface2: #E4E8E7; --line: #D5DBDA;
  --fg: #11161A; --fg2: #4C565C; --fg3: #667077;
  --accent: #2A3AE0; --on-accent: #FFFFFF; --accent-wash: #E0E3FB; --accent-ink: #2A3AE0;
  --protein: #D03F2C; --carbs: #CF9A10; --fat: #0A78B0;
  --protein-ink: #BC3526; --carbs-ink: #946500; --fat-ink: #0A6EA3;
  --ok: #0A7A5C; --amber: #946500; --danger: #B3261E;
  color-scheme: light;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0E1113; --surface: #171B1E; --surface2: #22282C; --line: #2B3237;
  --fg: #E8ECEC; --fg2: #A7B0B5; --fg3: #7F898F;
  --accent: #4C5DFF; --on-accent: #FFFFFF; --accent-wash: #1B2046; --accent-ink: #A9B2FF;
  --protein: #D9402F; --carbs: #BA8D14; --fat: #1E94B8;
  --protein-ink: #E5604F; --carbs-ink: #BA8D14; --fat-ink: #1E94B8;
  --ok: #4FC3A1; --amber: #F2B94B; --danger: #FF7A6B;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1113; --surface: #171B1E; --surface2: #22282C; --line: #2B3237;
  --fg: #E8ECEC; --fg2: #A7B0B5; --fg3: #7F898F;
  --accent: #4C5DFF; --on-accent: #FFFFFF; --accent-wash: #1B2046; --accent-ink: #A9B2FF;
  --protein: #D9402F; --carbs: #BA8D14; --fat: #1E94B8;
  --protein-ink: #E5604F; --carbs-ink: #BA8D14; --fat-ink: #1E94B8;
  --ok: #4FC3A1; --amber: #F2B94B; --danger: #FF7A6B;
  color-scheme: dark;
}
/* Switching themes fades instead of flashing. Only while it switches, so hovers and taps stay instant. */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, fill 0.35s ease, stroke 0.35s ease, box-shadow 0.35s ease !important;
}
@media (prefers-reduced-motion: reduce) { html.theme-fade, html.theme-fade * { transition: none !important; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.55 Archivo, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--accent-ink); }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { font-weight: 600; font-stretch: 125%; letter-spacing: 0.28em; font-size: 15px; color: var(--fg); text-decoration: none; margin-right: auto; display: inline-flex; align-items: center; gap: 10px; }
/* The mark: ultramarine, #2A3AE0 on light and #4C5DFF on dark, through --accent. */
.brand .mark { width: 30px; height: 30px; flex: none; color: var(--accent); margin: -4px 0; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; color: var(--fg2); font: 500 12px/1 "DM Mono", ui-monospace, monospace; letter-spacing: 0.06em; padding: 8px 10px; min-height: 34px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--surface2); color: var(--fg); }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn:hover { color: var(--fg); }
.theme-btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 500; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; font-size: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible, .lang button:focus-visible, a:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* Type */
.kicker { font: 500 12px/1.2 "DM Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg3); margin: 0 0 14px; }
h1 { font-weight: 300; font-stretch: 125%; font-size: clamp(32px, 5.4vw, 56px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 20px; text-wrap: balance; }
h2 { font-weight: 400; font-stretch: 125%; font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.01em; margin: 0 0 18px; text-wrap: balance; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.lead { font-size: 18px; color: var(--fg2); max-width: 36em; margin: 0 0 28px; }
.muted { color: var(--fg3); }
.mail { font-family: "DM Mono", ui-monospace, monospace; font-size: 15px; user-select: all; }

/* Sections */
section { padding-block: 64px; border-top: 1px solid var(--line); }
.hero { border-top: 0; padding-block: 56px 72px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 48px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ask { margin: 18px 0 0; color: var(--fg2); font-size: 15px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; min-width: 0; }
.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--fg2); }
.list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 9px; margin-left: 4px; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.principles p { margin: 0; color: var(--fg2); }
.num { font: 500 12px/1 "DM Mono", ui-monospace, monospace; color: var(--accent-ink); letter-spacing: 0.08em; display: block; margin-bottom: 12px; }
.story p { max-width: 40em; color: var(--fg2); font-size: 17px; margin: 0; }
footer { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--fg3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* The Today card: what the app shows, in its own units */
.phone { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.45); max-width: 340px; width: 100%; justify-self: center; display: grid; gap: 18px; }
.phone .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.phone .label { font: 500 11px/1.2 "DM Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg3); }
.phone .value { font-variant-numeric: tabular-nums; color: var(--fg); font-size: 15px; }
.curve { width: 100%; height: auto; display: block; color: var(--accent); }
.curve .peak { fill: var(--accent-wash); }
.curve .base { stroke: var(--line); }
.bar { height: 8px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 82%; background: var(--protein); border-radius: 999px; }
.next { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface2); }
.next .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }

/* Testers area */
.intro { padding-block: 48px 24px; }
.tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tgrid .box { display: grid; gap: 12px; align-content: start; }
.tgrid .box p { margin: 0; color: var(--fg2); }
.notice { border: 1px solid var(--accent); background: var(--accent-wash); border-radius: 14px; padding: 14px 16px; color: var(--fg); max-width: 40em; }
.soon { font-size: 13px; color: var(--fg3); }

/* Join page (Helakora Link) */
.tgrid-box { display: grid; gap: 12px; align-content: start; }
.tgrid-box p { margin: 0; color: var(--fg2); }
.tgrid-box .btn { justify-self: start; }
.code { word-break: break-all; background: var(--surface2); border-radius: 10px; padding: 10px 12px; color: var(--fg); }

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px 56px; gap: 36px; }
  .cols, .principles, .tgrid { grid-template-columns: minmax(0, 1fr); }
  section { padding-block: 48px; }
  .top { position: static; }
}
@media (max-width: 480px) { .hide-narrow { display: none; } }
@media (prefers-reduced-motion: no-preference) { .btn { transition: filter 0.15s ease; } }
