/* First Layer website: same palette and fonts as the game (scripts/ui/ui.gd) */
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #0f1215;
  --panel: #1b2024;
  --panel2: #222a2f;
  --line: #2c353b;
  --text: #e7eaed;
  --muted: #8a949c;
  --accent: #ff6b4a;
  --accent-soft: rgba(255, 107, 74, 0.14);
  --accent-line: rgba(255, 107, 74, 0.5);
  --ok: #4fc7a0;
  --warn: #f2c26b;
  --dark: #1a0d09;
  --radius: 21px;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: #ff8a70; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.05; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.accent { color: var(--accent); }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 62ch; }
.lead { font-size: 1.15rem; color: #c3cad0; max-width: 58ch; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); font-size: 1.05rem; margin: 0 0 0.6em; }

/* buttons */
.btn { display: inline-block; background: var(--accent); color: var(--dark); font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none; padding: 0.55em 1.5em; border-radius: 18px; border: 2px solid var(--accent); transition: transform 0.15s ease, background 0.15s ease; }
.btn:hover { background: #ff8a70; border-color: #ff8a70; color: var(--dark); transform: translateY(-2px); }
.btn-ghost { background: var(--panel2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel); border-color: var(--accent-line); color: var(--text); }
.btn-small { font-size: 1.1rem; padding: 0.3em 1em; border-radius: 14px; }
.btn[aria-disabled="true"] { background: var(--panel2); border-color: var(--line); color: var(--muted); pointer-events: none; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(15, 18, 21, 0.88); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--display); font-size: 1.7rem; letter-spacing: 0.03em; }
.brand b { color: var(--accent); font-weight: 700; }
.brand img { border-radius: 9px; }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a:not(.btn) { color: var(--muted); text-decoration: none; font-family: var(--display); font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.04em; }
.nav nav a:not(.btn):hover { color: var(--text); }

/* hero */
.hero { padding: clamp(40px, 8vw, 90px) 0 clamp(40px, 6vw, 80px); background: radial-gradient(900px 500px at 78% 30%, rgba(255, 107, 74, 0.13), transparent 70%), var(--bg); }
.hero-in { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.6em 0 1em; }
.hero-shot { display: flex; justify-content: center; }

/* phone frame */
.phone { background: #090b0d; border: 3px solid var(--line); border-radius: 38px; padding: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03); width: min(260px, 70vw); flex: none; }
.phone img { border-radius: 28px; width: 100%; }
.phone-lg { width: min(310px, 72vw); transform: rotate(2deg); }

/* sections */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section.alt { background: var(--panel); border-block: 2px solid var(--line); }

.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 2em; counter-reset: s; }
.steps li { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 26px; }
.steps h3 { margin-top: 0.6em; }
.steps p { color: #b3bcc3; margin: 0; }
.num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); border: 2px solid var(--accent-line); color: var(--accent); font-family: var(--display); font-size: 1.6rem; }

/* gallery */
.gallery { display: flex; gap: 28px; overflow-x: auto; padding: 36px max(20px, calc((100vw - 1120px) / 2)) 28px; scroll-snap-type: x mandatory; scrollbar-color: var(--line) transparent; }
.gallery:focus-visible { outline: 2px solid var(--accent-line); outline-offset: -4px; }
.gallery figure { margin: 0; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.gallery figcaption { max-width: 260px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.gallery figcaption b { display: block; font-family: var(--display); text-transform: uppercase; font-size: 1.35rem; color: var(--text); letter-spacing: 0.03em; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 2em; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--panel2); border: 2px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color 0.2s ease, transform 0.2s ease; }
.section:not(.alt) .card { background: var(--panel); }
.card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.card h3 { color: var(--text); }
.card p { color: #b3bcc3; margin: 0; }
.dl p { margin-bottom: 1.4em; }
.dl .dl-meta { margin: 0.9em 0 0; font-family: var(--mono); font-size: 0.8rem; }

.news { list-style: none; display: grid; gap: 14px; max-width: 75ch; margin-top: 1.6em; }
.news li { padding: 14px 18px; background: var(--panel2); border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; color: #c3cad0; }
.news b { color: var(--text); }

/* roadmap */
.road-bar { height: 14px; background: var(--panel2); border-radius: 10px; overflow: hidden; margin-top: 1.6em; border: 2px solid var(--line); }
.road-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ff8a70); border-radius: 10px; transition: width 1s ease; }
.road-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0 1.6em; }
.chip { font-family: var(--display); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--panel2); color: var(--muted); border: 2px solid var(--line); border-radius: 14px; padding: 0.3em 1em; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.road { list-style: none; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-left: 38px; }
.road::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; background: var(--line); border-radius: 2px; }
.phase { position: relative; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 0; }
.phase::before { content: ""; position: absolute; left: -35px; top: 24px; width: 17px; height: 17px; border-radius: 50%; background: var(--bg); border: 3px solid var(--muted); }
.phase[data-status="done"]::before { background: var(--ok); border-color: var(--ok); }
.phase[data-status="current"]::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.phase[data-status="current"] { border-color: var(--accent-line); }
.phase[hidden] { display: none; }
.phase summary { list-style: none; cursor: pointer; padding: 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; }
.phase summary::-webkit-details-marker { display: none; }
.phase summary:focus-visible { outline: 2px solid var(--accent-line); outline-offset: -4px; border-radius: var(--radius); }
.phase .ver { font-family: var(--mono); color: var(--accent); font-size: 0.95rem; }
.phase h3 { margin: 0; font-size: 1.7rem; }
.phase .goal { grid-column: 1 / -1; color: var(--muted); margin: 0; font-size: 0.95rem; }
.badge { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--panel2); white-space: nowrap; }
.phase[data-status="done"] .badge { color: var(--ok); border-color: rgba(79, 199, 160, 0.4); background: rgba(79, 199, 160, 0.1); }
.phase[data-status="current"] .badge { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.meter { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.phase[data-status="current"] .meter i { background: var(--accent); }
.phase ul { list-style: none; padding: 0 24px 22px; display: grid; gap: 8px; }
.phase li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: #b3bcc3; font-size: 0.95rem; }
.phase li .tick { width: 18px; height: 18px; margin-top: 4px; border-radius: 6px; border: 2px solid var(--line); }
.phase li.done { color: var(--muted); }
.phase li.done .tick { background: var(--ok); border-color: var(--ok); position: relative; }
.phase li.done .tick::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid var(--dark); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.later { margin-top: 2.4em; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { border: 2px dashed var(--line); color: var(--muted); border-radius: 14px; padding: 6px 14px; font-size: 0.9rem; }

/* footer */
.foot { border-top: 2px solid var(--line); padding: 40px 0 60px; background: var(--bg); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.foot-logo { width: 240px; margin-bottom: 14px; }
.foot p { margin: 0 0 4px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; text-align: left; }
  .hero-shot { order: -1; }
  .nav nav a:not(.btn) { display: none; }
  .phone-lg { transform: none; }
}
@media (max-width: 520px) {
  .phase summary { grid-template-columns: minmax(0, 1fr); }
  .phase summary .badge { justify-self: start; order: -1; }
  .nav-in { padding: 8px 0; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* feedback form */
.fb { max-width: 760px; margin-top: 28px; display: grid; gap: 20px; }
.fb:hover { transform: none; border-color: var(--line); }
.fb fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.fb legend { padding: 0; margin-bottom: 10px; font-family: var(--display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text); }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; font-family: var(--display); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--panel); color: var(--muted); border: 2px solid var(--line); border-radius: 14px; padding: 0.3em 1em; cursor: pointer; }
.pill span:hover { color: var(--text); }
.pill input:checked + span { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-family: var(--display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.04em; }
.field > span i { font-family: var(--body); font-style: normal; font-size: 0.8rem; text-transform: none; letter-spacing: 0; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--text); background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 0.6em 0.8em; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.field small { justify-self: end; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.fb-actions .btn { cursor: pointer; font-family: var(--display); }
.fb-actions .btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.fb-status { margin: 0; color: var(--muted); }
.fb-status[data-kind="ok"] { color: var(--ok); }
.fb-status[data-kind="err"] { color: var(--warn); }
@media (max-width: 520px) { .fb-row { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .road-bar-fill { transition: none; }
}
