/* Écho Run website: the game's navy stage, chunky outlined surfaces and Lilita headings. */
@font-face { font-family: "Lilita One"; src: url("fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito-800.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --bg: #0b1230;
  --surface: #16214d;
  --surface2: #1f2e66;
  --border: #2c3f85;
  --edge: #050a1e;
  --text: #f4f6ff;
  --text2: #b9c6f0;
  --text3: #7d8cc4;
  --gold: #ffc93c;
  --gold-edge: #c77700;
  --son: #4c9bff;
  --ampli: #ff5c6c;
  --go: #2fd06a;
  --go-edge: #1a8a41;
  --gem: #8e6cff;
  --radius: 22px;
  --capture-frame-radius: 22px;
  --capture-screen-radius: 16px;
  --page: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 8rem; scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 20% -10%, #1a2a66 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 400 18px/1.6 "Nunito", ui-rounded, system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffe08a; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: "Lilita One", "Nunito", system-ui, sans-serif; font-weight: 400; line-height: 1.12; letter-spacing: .2px; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }
.skip { position: fixed; left: -999px; top: 8px; z-index: 40; background: var(--gold); color: var(--edge); padding: 8px 14px; border-radius: 12px; }
.skip:focus { left: 8px; }

/* Header: a sticky bar of frosted navy, the links in a pill like the game's tab bar. */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(11, 18, 48, .82); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 2px solid rgba(44, 63, 133, .55);
}
.top { display: flex; align-items: center; gap: 12px 20px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 400 1.5rem "Lilita One", sans-serif; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand img { width: 42px; }
.brand .run, .gold { color: var(--gold); }
.nav {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--edge); box-shadow: inset 0 2px 0 rgba(255,255,255,.05);
  font-weight: 800; font-size: .95rem;
}
.nav a { color: var(--text2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 14px; border-radius: 999px; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.nav a:hover { color: var(--text); background: var(--surface2); }
.nav a[aria-current="page"] { color: var(--edge); background: var(--gold); }
.btn.small { padding: 8px 16px; font-size: 1.05rem; border-radius: 14px; box-shadow: inset 0 -4px 0 var(--gold-edge), 0 3px 0 var(--edge); }
.btn.small svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  html { scroll-padding-top: 9rem; }
  .top { gap: 8px 12px; padding-block: 8px; }
  .brand { gap: 7px; font-size: 1.35rem; }
  .brand img { width: 36px; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .nav a { flex: 1; text-align: center; padding: 7px 6px; font-size: .88rem; }
}

/* Buttons: the game's chunky look, a darker lip under a bright face. */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 12px 24px; border-radius: 18px;
  font: 400 1.25rem "Lilita One", sans-serif; letter-spacing: .3px; text-decoration: none;
  color: var(--edge); background: var(--gold);
  border: 3px solid var(--edge); box-shadow: inset 0 -6px 0 var(--gold-edge), 0 4px 0 var(--edge);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: var(--edge); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 -3px 0 var(--gold-edge), 0 1px 0 var(--edge); }
.btn svg { width: 24px; height: 24px; flex: none; }
.note { color: var(--text3); font-size: .95rem; margin-top: 12px; }

.card {
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 3px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.08), 0 5px 0 var(--edge);
  padding: 22px;
}

/* Hero */
.hero { display: grid; gap: 32px; align-items: center; padding: 28px clamp(16px, 3vw, 28px) 56px; }
.hero .lead { font-size: clamp(1.08rem, 1.5vw, 1.2rem); color: var(--text2); max-width: 38em; }
.hero h1 { max-width: 17ch; }
.hero .btn { min-height: 56px; }
.hero > div:first-child { min-width: 0; }
.keys { display: flex; gap: 6px; margin: 0 0 18px; }
.keys span { width: 22px; height: 30px; border-radius: 6px; border: 2px solid var(--edge); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }

/* Sections */
section { scroll-margin-top: 8rem; }
section.feature-section, section.faq-section { padding-block: clamp(64px, 8vw, 104px); }
section.faq-section { border-top: 1px solid var(--surface2); }
.how-section {
  margin-block: 24px; padding-block: clamp(64px, 8vw, 104px);
  border-block: 1px solid rgba(76,155,255,.22);
  background: linear-gradient(120deg, rgba(31,46,102,.62), rgba(22,33,77,.48) 58%, rgba(11,18,48,.18));
}
.kicker { font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); font-size: .85rem; margin-bottom: 8px; }
.section-intro { max-width: 60ch; margin: 0 0 clamp(32px, 5vw, 56px); color: var(--text2); font-size: 1.08rem; }
.steps { display: grid; gap: 24px; counter-reset: step; }
.step { display: grid; gap: 18px; align-items: center; }
.step .num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--edge); color: var(--gold); font: 400 1.4rem "Lilita One", sans-serif; margin-bottom: 10px;
}
.step p { color: var(--text2); }
.step .num { transition: color .18s ease, background .18s ease, border-color .18s ease; }
.step.is-current .num { color: var(--edge); background: var(--gold); border-color: var(--gold-edge); }
.game-frame {
  width: min(300px, 100%); margin: 0 auto; padding: 7px; border: 1px solid rgba(185,198,240,.4);
  border-radius: var(--capture-frame-radius); background: linear-gradient(145deg, #30374c, #111626 58%, #343a4d);
  box-shadow: inset 0 0 0 2px var(--edge), 0 18px 38px rgba(0,0,0,.3);
}
.game-shot { width: 100%; height: auto; border-radius: var(--capture-screen-radius); background: var(--surface); }
.hero-frame { width: min(340px, 86%); }
.step-frame { width: min(300px, 100%); }
.steps-visual { display: none; }
.steps-frame { width: min(340px, 88%); }
.steps-screen { transition: opacity .18s ease; }
.steps-screen.is-switching { opacity: .35; }
.grid { display: grid; gap: 16px; }
.grid .card h3 { margin-bottom: .3em; }
.grid .card p { color: var(--text2); margin: 0; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 8px; border: 2px solid var(--edge); vertical-align: -1px; }
.styles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.styles li { background: var(--bg); border: 2px solid var(--edge); border-radius: 999px; padding: 4px 14px; font-weight: 700; color: var(--text); font-size: .95rem; }

/* FAQ */
details { border-bottom: 2px solid var(--surface2); padding: 14px 0; }
summary { cursor: pointer; font-weight: 800; font-size: 1.1rem; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 4px 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font: 400 1.4rem "Lilita One", sans-serif; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--text2); margin: 10px 0 0; }

/* Closing call */
.cta { padding-top: clamp(36px, 6vw, 64px); padding-bottom: clamp(48px, 7vw, 80px); }
.cta-panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .58fr);
  align-items: center; gap: clamp(24px, 5vw, 64px); overflow: hidden;
  padding: clamp(28px, 5vw, 64px); border: 3px solid var(--border); border-radius: 32px;
  background: radial-gradient(500px 340px at 92% 18%, rgba(76,155,255,.2), transparent 70%), linear-gradient(135deg, var(--surface2), var(--surface) 62%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.08), 0 7px 0 var(--edge);
}
.cta-copy { position: relative; z-index: 1; max-width: 620px; }
.cta .kicker { color: var(--gold); }
.cta h2 { max-width: 13ch; font-size: clamp(2rem, 4.5vw, 3.2rem); }
.cta .lead { color: var(--text2); max-width: 34em; font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.cta-action { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.cta-action .note { margin: 0; }
.cta-visual { position: relative; min-width: 0; display: flex; justify-content: center; align-items: center; }
.cta-frame { width: min(250px, 100%); }
.not-found { padding-top: clamp(64px, 12vh, 120px); padding-bottom: clamp(64px, 12vh, 120px); text-align: center; }
.not-found img { width: 140px; margin: 0 auto 12px; }
.not-found .lead { color: var(--text2); }

/* Legal pages */
.legal { max-width: 760px; padding-top: 24px; padding-bottom: 48px; }
.legal h2 { font-size: 1.6rem; margin-top: 1.6em; }
.legal h3 { font-family: "Nunito", sans-serif; font-weight: 800; font-size: 1.1rem; margin: 1.2em 0 .3em; }
.legal p, .legal li { color: var(--text2); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal strong { color: var(--text); }
.meta { color: var(--text3); font-size: .95rem; }
.summary { display: grid; gap: 12px; margin: 24px 0; }
.summary .card { padding: 16px 18px; }
.summary h3 { margin: 0 0 4px; font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.2rem; }
.summary p { margin: 0; }
.table { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: .98rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--surface2); vertical-align: top; }
.table th { color: var(--text); font-weight: 800; }
.table td { color: var(--text2); }
.scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
.scroll:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Footer */
footer { border-top: 2px solid var(--surface2); padding: 28px 0 40px; color: var(--text3); font-size: .95rem; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 10px; }
footer a { color: var(--text2); }

@media (min-width: 800px) {
  .hero { grid-template-columns: 1.2fr .8fr; padding-top: 48px; }
  .step { grid-template-columns: 1fr 1fr; }
  .step:nth-child(even) .step-frame { order: -1; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .summary { grid-template-columns: repeat(3, 1fr); }
  .js .steps-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(260px, .95fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
  .js .steps { display: block; }
  .js .step { display: flex; min-height: min(66vh, 520px); align-items: center; }
  .js .step > div:first-child { max-width: 42rem; }
  .js .step .step-frame {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .js .steps-visual { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); display: grid; align-self: start; min-height: 66vh; place-items: center; }
}
@media (max-width: 640px) {
  .cta-panel { grid-template-columns: 1fr; gap: 18px; padding: 28px 22px 0; }
  .cta h2 { max-width: 15ch; }
  .cta-action { align-items: flex-start; flex-direction: column; gap: 10px; }
  .cta-action .btn { width: 100%; justify-content: center; padding-inline: 12px; font-size: clamp(1.05rem, 4.5vw, 1.25rem); }
  .cta-visual { min-height: 210px; }
  .cta-frame { width: min(190px, 58vw); }
}
@media (min-width: 800px) {
  .legal { max-width: 816px; }
  .legal > p { max-width: 72ch; }
  .step > div:first-child { max-width: 42rem; }
}
@media (max-width: 380px) {
  .btn.small { gap: 6px; padding: 7px 10px; font-size: .95rem; }
  .nav a { padding-inline: 4px; font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; }
  .btn { transition: none; }
  .step .num, .steps-screen { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}
