@font-face { font-family: 'Chakra Petch'; font-weight: 600; font-display: swap; src: url('/fonts/chakra-petch-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-weight: 700; font-display: swap; src: url('/fonts/chakra-petch-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --night: #0b0e19;
  --night-2: #10152a;
  --plate: #151b31;
  --plate-2: #11162a;
  --rule: #262e4d;
  --ink: #eef2fb;
  --ink-2: #aab4d0;
  --ink-3: #7f8bb0;
  --cyan: #22d3ff;
  --violet: #8b5cf6;
  --violet-ink: #b9a2ff;
  --on-accent: #061019;
  --cut: 14px;
  --display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--rule) var(--night); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--night);
  background-image:
    radial-gradient(60rem 40rem at 78% 8%, rgb(139 92 246 / 0.16), transparent 70%),
    radial-gradient(50rem 36rem at 70% 0%, rgb(34 211 255 / 0.10), transparent 70%),
    repeating-linear-gradient(45deg, rgb(255 255 255 / 0.022) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.022) 0 1px, transparent 1px 34px);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--violet); color: #fff; }
a { color: var(--cyan); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:not(.btn):hover { color: #7fe6ff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2 { font-family: var(--display); font-weight: 700; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
.icon { width: 1em; height: 1em; flex: none; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--cyan); color: var(--on-accent); padding: 10px 16px; font: 600 0.95rem var(--display);
}
.skip:focus { top: 16px; }
a.skip:hover { color: var(--on-accent); }

/* Top bar */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.125rem var(--display); letter-spacing: 0.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.topbar nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.topbar nav a { color: var(--ink-2); text-decoration: none; font: 600 0.95rem var(--display); letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 0; }
.topbar nav a:hover { color: var(--ink); }

/* World: the trail sits behind every section */
.world { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.trail path { fill: none; stroke-linejoin: miter; }
.trail-bg { stroke: rgb(170 180 208 / 0.22); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: square; }
.trail-lit { stroke-width: 3; filter: drop-shadow(0 0 6px rgb(34 211 255 / 0.55)); }
.marker {
  position: absolute; left: 0; top: 0; z-index: 3; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: #fff; outline: 3px solid var(--night); outline-offset: 0;
  pointer-events: none; will-change: transform;
}
.gate, .map, .finish { position: relative; z-index: 1; }

/* Gate (first viewport) */
.gate {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  min-height: min(86svh, 820px); padding: clamp(24px, 5vh, 56px) 0 clamp(72px, 12vh, 140px);
}
.gate h1 { font-size: clamp(2.75rem, 6.4vw, 5.6rem); line-height: 0.95; letter-spacing: -0.02em; }
.gate h1 span { color: var(--cyan); }
.lede { margin-top: 28px; max-width: 34ch; font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--ink-2); }
.gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 40px; }
.platforms { font: 600 0.95rem var(--display); letter-spacing: 0.03em; color: var(--ink-3); }
.gate-logo { justify-self: center; width: min(100%, 520px); }
.gate-logo img { width: 100%; animation: gate-in 1.1s var(--ease-out) both; }
@keyframes gate-in {
  from { opacity: 0.35; transform: scale(0.96); filter: blur(10px) saturate(0.4); }
  to { opacity: 1; transform: none; filter: none; }
}

/* Buttons: cut at 45°, like the logo */
.btn {
  --btn-bg: var(--cyan); --btn-ink: var(--on-accent);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; min-height: 48px;
  background: var(--btn-bg); color: var(--btn-ink); text-decoration: none;
  font: 700 1rem var(--display); letter-spacing: 0.04em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn:hover { --btn-bg: #fff; color: var(--btn-ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--violet); }
.btn-primary .icon { transition: transform 0.3s var(--ease-out); }
.btn-primary:hover .icon { transform: translateY(3px); }
.btn-store { --btn-bg: var(--rule); --btn-ink: var(--ink); padding: 10px 16px; min-height: 44px; font-size: 0.9rem; }
.btn-store:hover { --btn-bg: var(--violet); --btn-ink: #fff; }

/* Level map */
.levels { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(64px, 9vw, 120px); }
.level { display: flex; justify-content: flex-end; }
.level:nth-child(even) { justify-content: flex-start; }
.node { position: relative; width: min(100%, 460px); }
/* The frame is scuffed gunmetal sampled from the logo; the dark plate sits only behind the text. */
.edge {
  --metal: url('/brand/gunmetal.webp') 0 0 / 256px;
  --sheen: linear-gradient(135deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0) 38%, rgb(0 0 0 / 0.3));
  padding: 6px;
  background: var(--sheen), var(--metal);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background 0.5s var(--ease-out), transform 0.35s var(--ease-out);
}
.plate {
  padding: 30px 32px 28px 40px;
  background: linear-gradient(160deg, rgb(21 27 49 / 0.96), rgb(13 17 32 / 0.97));
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.level:nth-child(even) .plate { padding: 30px 40px 28px 32px; }
.node h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.05; letter-spacing: -0.01em; }
.aka { margin-top: 6px; color: var(--violet-ink); font-weight: 500; }
.tagline { margin-top: 14px; color: var(--ink-2); max-width: 40ch; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.facts li {
  padding: 4px 10px; background: rgb(255 255 255 / 0.05); color: var(--ink-2);
  font: 600 0.8rem/1.4 var(--display); letter-spacing: 0.06em; text-transform: uppercase;
}
.facts li [lang='el'] { text-transform: none; font-family: var(--body); font-weight: 500; letter-spacing: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 24px; }
.policy { font-weight: 500; color: var(--ink-2); }
.policy:hover { color: var(--ink); }

/* Level badge: a diamond that lights when the trail reaches it */
.badge {
  position: absolute; top: 26px; left: -27px; z-index: 2;
  display: grid; place-items: center; width: 54px; height: 54px;
  transform: rotate(45deg);
  background: var(--night-2); box-shadow: inset 0 0 0 2px var(--rule);
  transition: background 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.level:nth-child(even) .badge { left: auto; right: -27px; }
.badge > span {
  transform: rotate(-45deg);
  font: 700 1.1rem var(--display); letter-spacing: 0.02em; color: var(--ink-3); font-variant-numeric: tabular-nums;
  transition: color 0.45s var(--ease-out);
}
.reached .badge, html:not(.js) .badge {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 8px 18px -6px rgb(0 0 0 / 0.7);
}
.reached .badge > span, html:not(.js) .badge > span { color: var(--on-accent); }
.reached .edge, html:not(.js) .edge { background: linear-gradient(135deg, rgb(34 211 255 / 0.5), rgb(139 92 246 / 0.28) 45%, transparent 75%), var(--sheen), var(--metal); }
.node:hover .edge { background: linear-gradient(135deg, rgb(34 211 255 / 0.8), rgb(139 92 246 / 0.55) 55%, transparent 85%), var(--sheen), var(--metal); }

/* Finish */
.finish { display: grid; justify-items: center; text-align: center; padding: clamp(120px, 16vw, 200px) 0 clamp(96px, 12vw, 160px); }
.finish .badge { position: relative; top: auto; left: auto; width: 72px; height: 72px; margin-bottom: 44px; }
.finish .badge > span { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; }
.finish h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1; letter-spacing: -0.02em; }
.finish p { margin-top: 20px; max-width: 44ch; color: var(--ink-2); font-size: 1.125rem; }
.finish .btn { margin-top: 36px; text-transform: none; letter-spacing: 0.01em; }

/* Footer */
.footer {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 0.95rem;
  display: grid; gap: 16px;
}
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--ink); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.footer nav > span { font: 600 0.8rem var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; }

/* Phone: the trail runs down the left gutter */
@media (max-width: 759px) {
  .topbar { padding-top: 16px; padding-bottom: 16px; }
  .brand span { font-size: 1rem; }
  .gate { grid-template-columns: 1fr; min-height: 0; padding: 8px 0 88px; gap: 8px; }
  .gate-logo { order: -1; width: min(72vw, 300px); }
  .gate h1 { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .lede { margin-top: 20px; }
  .gate-actions { margin-top: 28px; }
  .levels { gap: 56px; }
  .level, .level:nth-child(even) { justify-content: flex-start; padding-left: 40px; }
  .node { width: 100%; }
  .plate, .level:nth-child(even) .plate { padding: 24px 22px 22px 34px; }
  .badge, .level:nth-child(even) .badge { left: -21px; right: auto; top: 22px; width: 42px; height: 42px; }
  .badge > span { font-size: 0.95rem; }
  .finish { justify-items: start; text-align: left; padding-left: 74px; padding-top: 96px; }
  .finish .badge { position: absolute; left: 19px; top: 88px; width: 42px; height: 42px; margin: 0; }
  .finish .badge > span { font-size: 0.72rem; letter-spacing: 0.02em; }
  .finish h2 { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-logo img { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* 3D run (world3d.js): the canvas replaces the 2D trail and, on wide screens, the hero logo */
.scene { display: none; }
.three .scene { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.three .topbar, .three .world { position: relative; z-index: 1; }
@media (min-width: 760px) {
  .three .trail, .three .marker, .three .finish .badge { visibility: hidden; }
}
.three .footer { background: var(--night); max-width: none; }
.three .footer > * { width: 100%; max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
@media (min-width: 760px) {
  .three .gate-logo img { visibility: hidden; }
}
.three .gate-copy, .three .finish { text-shadow: 0 2px 14px rgb(11 14 25 / 0.85); }
.three .btn, .three .badge { text-shadow: none; }
