/* FORGE site: tokens, base elements and the pieces every page shares.
   Page-specific layout lives in forge-pages.css. Colours and type follow
   the app (dark ground, lime accent, Bebas Neue / Space Grotesk / mono). */

:root {
  --ground: #0a0d08;
  --surface: #11170d;
  --raised: #182014;
  --line: #232c20;
  --line-strong: #3a4a2a;
  --line-accent: #5e7a2e;
  --accent: #d7ff64;
  --text: #f5f1e6;
  --muted: #b4bdb1;
  --faint: #9aa39a;

  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 28px;
  --section: clamp(72px, 10vw, 136px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 180ms;
  --slow: 900ms;

  /* Scale applied to display type; scripts without a condensed face
     (see the :lang rule below) are set smaller so lines still fit. */
  --display-scale: 1;
}

@view-transition { navigation: auto; }

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
em { font-style: normal; color: var(--accent); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 20;
  padding: 12px 18px; border-radius: 12px; background: var(--accent); color: var(--ground); font-weight: 700;
}
.skip:focus { top: 16px; color: var(--ground); }

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

/* ---- Type ---------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: calc(var(--fs, 64px) * var(--display-scale));
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

/* Bebas Neue has no glyphs for these scripts, and their characters are
   far wider than a condensed Latin face. */
:lang(ja), :lang(ko), :lang(hi) { --display-scale: 0.56; }
:lang(ja) .display, :lang(ko) .display, :lang(hi) .display {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.01em;
}
/* Korean breaks between words, not syllables; Japanese has no spaces and
   must stay free to wrap anywhere the line-breaking rules allow. */
:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) body { line-break: strict; }

h2.display { --fs: clamp(44px, 6vw, 96px); }
h3.display { --fs: clamp(36px, 4.4vw, 64px); }

.lead { max-width: 60ch; font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); }

.tag, .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
.hot { color: var(--accent); }
.eyebrow { display: flex; align-items: center; gap: 12px; }

.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ---- Buttons and chips --------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 26px; border-radius: 28px;
  font-weight: 700; font-size: 16px; border: 1px solid transparent;
  transition: transform var(--fast) var(--ease-out), background var(--fast), color var(--fast);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-solid { background: var(--accent); color: var(--ground); }
.btn-solid:hover { background: #e6ff97; color: var(--ground); }
.btn-line { border-color: var(--line-accent); }
.btn-dark { background: var(--ground); color: var(--text); }
.btn-dark:hover { color: var(--accent); }
.btn.is-soon { color: var(--faint); border-style: dashed; cursor: default; }
.btn.is-soon:hover { transform: none; }
.btn-solid.on-accent { background: var(--ground); color: var(--text); }
.btn-line.on-accent { border-color: var(--ground); color: var(--ground); }
.btn.is-soon.on-accent { color: #3a4a2a; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips > li, .chips > a, .chips > li > a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 22px; font-size: 15px;
}
.chips > li:has(> a) { padding: 0; border: 0; }
.chips [aria-current] { border-color: var(--accent); color: var(--accent); font-weight: 600; }

.more { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Header -------------------------------------------------------- */

.site-header { position: sticky; top: 0; z-index: 10; background: var(--ground); border-bottom: 1px solid var(--line); }
.nav {
  max-width: var(--wrap); margin-inline: auto; padding: 0 var(--gutter); min-height: 72px;
  display: flex; align-items: center; gap: clamp(12px, 3vw, 40px);
}
.wordmark { font-family: var(--font-display); font-size: 32px; letter-spacing: 0.1em; color: var(--accent); }
.nav-links { flex: 1; display: flex; gap: clamp(16px, 2.4vw, 32px); font-size: 15px; font-weight: 500; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
.nav-links [aria-current] { color: var(--accent); }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 22px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: '▾'; margin-left: 8px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px;
  display: grid; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px;
}
.lang-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; }
.lang-menu a:hover { background: var(--raised); }
.lang-menu [aria-current] { color: var(--accent); }

@media (max-width: 760px) {
  .nav { flex-wrap: wrap; row-gap: 0; }
  .nav-links { order: 5; flex: 1 0 100%; overflow-x: auto; border-top: 1px solid var(--line); }
  .wordmark { margin-right: auto; }
}

/* ---- Shared sections ----------------------------------------------- */

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }

.page-head { padding-block: clamp(56px, 8vw, 96px) clamp(40px, 5vw, 64px); display: grid; gap: 24px; }
.page-head-center { justify-items: center; text-align: center; }
.page-title { --fs: clamp(60px, 9.4vw, 152px); max-width: 16ch; line-height: 0.86; }

.crumbs { padding-top: 28px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.faq { padding: 20px 0; border-top: 1px solid var(--line); }
.faq:first-child { border-top-color: var(--line-strong); }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; font-size: 19px; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-mono); color: var(--accent); transition: transform var(--fast); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: 8px; max-width: 64ch; font-size: 16px; color: var(--muted); }

.split { padding-block: var(--section); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(32px, 5vw, 64px); }
.split-copy { display: grid; gap: 20px; align-content: start; justify-items: start; }
.split h2.display { --fs: clamp(44px, 5vw, 80px); }

.cta { background: var(--accent); color: var(--ground); }
.cta .wrap { padding-block: clamp(72px, 9vw, 112px); display: grid; gap: 32px; justify-items: start; }
.cta-title { --fs: clamp(64px, 12vw, 200px); line-height: 0.84; }

.app-banner {
  margin-top: var(--section); padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line-accent); border-radius: 32px; background: var(--raised);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px;
}
.app-banner h2.display { --fs: clamp(40px, 4.6vw, 64px); margin-bottom: 12px; }
.app-banner p { max-width: 52ch; color: var(--muted); }

/* ---- Device frames ------------------------------------------------- */

.phone { padding: 2.6%; border: 2px solid var(--line-strong); border-radius: 15% / 7%; background: var(--surface); }
.phone img { width: 100%; border-radius: 13% / 6%; }
.watch { padding: 4%; border: 3px solid var(--line-accent); border-radius: 26%; background: var(--ground); }
.watch img { width: 100%; border-radius: 22%; }

/* ---- Footer -------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.footer-row { padding-block: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-content: start; }
.footer-row nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- Motion -------------------------------------------------------- */

/* Sections rise into place as they enter the viewport; forge.js adds
   .is-in. Without script (or with reduced motion) they are simply there. */
.js .reveal { opacity: 0; transform: translateY(48px); transition: opacity var(--slow) var(--ease-out), transform var(--slow) var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Reading progress along the top edge, where the browser can drive an
   animation from scroll position. */
@supports (animation-timeline: scroll()) {
  .site-header::after {
    content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
    background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
    animation: progress linear both; animation-timeline: scroll(root);
  }
  @keyframes progress { to { transform: scaleX(1); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

/* Japanese headlines wrap between phrases rather than mid-word where the
   browser can tell the difference. */
:lang(ja) .display { word-break: auto-phrase; }
