/* Zlario — site styles. Colors come from the app's Palette. */
:root {
  --bg: #0d0e17;
  --deep: #07080d;
  --surface: #171927;
  --surface2: #20233a;
  --line: #3a3d55;
  --text: #f4f5fa;
  --muted: #a3a7c2;
  --lime: #c8f53b;
  --violet: #8b7bff;
  --cyan: #4fd1ff;
  --gold: #f5c542;
  --orange: #ff8a5b;
  --pink: #ff5c8a;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  overflow-x: hidden;
  padding-bottom: 120px; /* room for the dock */
}
a { color: inherit; }
::selection { background: var(--lime); color: var(--deep); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

/* Interactive tile board behind everything */
#board {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.page { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px var(--gutter);
  max-width: 1240px; margin: 0 auto;
}
.wordmark {
  font: 700 26px/1 var(--display); letter-spacing: -0.04em; text-decoration: none; color: var(--text);
}
/* The logo: the dot of the i is a lightning bolt. */
.wordmark .i { position: relative; display: inline-block; }
.wordmark .i svg {
  position: absolute; left: 50%; top: -0.1em; transform: translateX(-50%);
  width: 0.26em; height: 0.36em; fill: var(--lime);
}
.io { color: var(--lime); font-weight: 700; }
.clock {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  background: rgba(23, 25, 39, .8); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 13px/1 var(--body); color: var(--muted); white-space: nowrap;
}
.clock .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(200,245,59,.6); animation: ping 2s infinite; }
.clock time { font: 700 14px/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(200,245,59,0); } 100% { box-shadow: 0 0 0 0 rgba(200,245,59,0); } }

/* ---------- floating dock (navigation) ---------- */
.dock {
  position: fixed; z-index: 20; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px;
  background: rgba(23, 25, 39, .86); border: 1px solid var(--line); border-radius: 22px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  max-width: calc(100vw - 32px);
}
.dock a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 74px; padding: 9px 12px 7px; border-radius: 16px;
  text-decoration: none; color: var(--muted); font: 600 12px/1 var(--body);
  transition: background .2s, color .2s, transform .2s;
}
.dock a svg { width: 22px; height: 22px; }
.dock a:hover { color: var(--text); background: var(--surface2); transform: translateY(-2px); }
.dock a[aria-current="page"] { background: var(--lime); color: var(--deep); }
@media (max-width: 420px) {
  .dock { left: 16px; right: 16px; transform: none; justify-content: space-between; }
  .dock a { min-width: 0; flex: 1; padding: 9px 4px 7px; }
}

/* ---------- shared bits ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--lime); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); font: 600 14px/1 var(--body); color: var(--text); text-decoration: none;
}
.chip svg { width: 18px; height: 18px; }
.chip small { color: var(--muted); font-weight: 500; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 22px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--lime); color: var(--deep); font: 700 16px/1 var(--display);
  text-decoration: none; transition: transform .15s, box-shadow .2s;
  box-shadow: 0 6px 0 #8fb420;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #8fb420; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #8fb420; }
[hidden] { display: none !important; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  padding-top: clamp(28px, 6vw, 72px); padding-bottom: clamp(48px, 8vw, 96px);
}
.hero h1 { font-size: clamp(52px, 9vw, 124px); margin: 22px 0 22px; }
.hero h1 .stack { display: block; }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--muted); }
.hero p.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 520px; margin: 0 0 30px; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 10px; }

/* mini memory game card */
.play {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 28px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.45);
  transform: rotate(1.5deg);
}
.play::before {
  content: "DENE"; position: absolute; top: -14px; left: 22px;
  background: var(--violet); color: var(--deep); font: 700 12px/1 var(--display);
  letter-spacing: .14em; padding: 8px 12px; border-radius: 10px; transform: rotate(-4deg);
}
.play header { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 16px; gap: 10px; }
.play h3 { font-size: 22px; }
.play .lvl { font: 700 14px/1 var(--display); color: var(--lime); white-space: nowrap; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid4 button {
  aspect-ratio: 1; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--surface2); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25);
  transition: background .18s, transform .12s;
}
.grid4 button:hover:not(:disabled) { transform: translateY(-2px); }
.grid4 button:disabled { cursor: default; }
.grid4 button.lit { background: var(--lime); box-shadow: 0 0 24px rgba(200,245,59,.45); }
.grid4 button.ok { background: var(--violet); }
.grid4 button.bad { background: var(--pink); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.play .msg { margin: 16px 0 0; min-height: 48px; color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.play .msg .btn { padding: 12px 16px; font-size: 14px; flex-shrink: 0; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--deep); padding: 18px 0; transform: rotate(-1.2deg); margin: 0 -20px; }
.marquee .track { display: flex; width: max-content; animation: roll 38s linear infinite; }
.marquee span { font: 700 clamp(28px, 4vw, 48px)/1 var(--display); letter-spacing: -0.02em; padding-right: 40px; white-space: nowrap; }
.marquee span:nth-child(odd) { color: transparent; -webkit-text-stroke: 1.2px var(--muted); }
.marquee span i { font-style: normal; color: var(--lime); -webkit-text-stroke: 0; padding-left: 40px; }
@keyframes roll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section.block { padding-top: clamp(64px, 10vw, 120px); }
.block h2 { font-size: clamp(36px, 5.5vw, 72px); margin: 16px 0 14px; max-width: 900px; }
.block .sub { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 0 40px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; min-height: 230px; overflow: hidden; transition: transform .25s, border-color .25s;
}
.step:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--c, var(--lime)); }
.step .n { font: 700 86px/1 var(--display); color: var(--c, var(--lime)); letter-spacing: -4px; opacity: .95; }
.step h3 { font-size: 24px; margin: 18px 0 8px; }
.step p { margin: 0; color: var(--muted); }

.games { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.game {
  grid-column: span 2; position: relative; border-radius: var(--radius); padding: 22px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--g1), var(--g2) 55%, var(--g3));
  border: 1px solid rgba(255,255,255,.08); transition: transform .3s;
}
.game:nth-child(n+4) { grid-column: span 3; }
.game:hover { transform: translateY(-6px); }
.game svg.art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.game h3 { font-size: 26px; margin-bottom: 6px; }
.game h3, .game p { text-shadow: 0 1px 14px rgba(7,8,13,.75); }
.game p { margin: 0; font-size: 14px; color: rgba(244,245,250,.78); max-width: 340px; }
.game .unit { position: absolute; top: 18px; right: 18px; font: 600 12px/1 var(--body); padding: 7px 10px; border-radius: 10px; background: rgba(7,8,13,.45); color: var(--text); }

/* city plates */
.plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; }
.plates span {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); font: 700 15px/1 var(--display); color: var(--muted);
  transition: background .3s, color .3s, transform .2s; cursor: default;
}
.plates span.on { background: var(--lime); color: var(--deep); border-color: var(--lime); }
.plates span:hover { transform: scale(1.12); z-index: 2; background: var(--violet); color: var(--deep); border-color: var(--violet); }
.plate-name { margin-top: 18px; font: 700 22px/1.2 var(--display); min-height: 28px; color: var(--text); }
.plate-name small { color: var(--muted); font: 500 14px var(--body); margin-left: 8px; }

.cta {
  margin: clamp(64px, 10vw, 120px) auto 0; text-align: center; padding: clamp(40px, 7vw, 80px) 24px;
  background: var(--lime); color: var(--deep); border-radius: 36px; position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(40px, 7vw, 96px); }
.cta p { font-size: 18px; margin: 16px auto 26px; max-width: 520px; color: #2b3310; }
.cta .chip { background: var(--deep); border-color: var(--deep); }

/* ---------- footer ---------- */
footer.foot { padding-top: 64px; padding-bottom: 24px; color: var(--muted); font-size: 14px; }
footer.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 22px; }
footer.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.foot a { text-decoration: none; }
footer.foot a:hover { color: var(--text); }

/* ---------- document pages (privacy / terms) ---------- */
.doc-head { padding: clamp(32px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.doc-head h1 { font-size: clamp(48px, 8vw, 108px); margin: 18px 0 18px; }
.doc-head p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0; }
.doc-head .meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.doc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.toc { position: sticky; top: 20px; display: grid; gap: 6px; }
.toc a {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px;
  text-decoration: none; color: var(--muted); font-size: 14px; line-height: 1.3; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.toc a span { flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface2); font: 700 13px/1 var(--display); color: var(--text); }
.toc a:hover { color: var(--text); background: var(--surface); }
.toc a.active { color: var(--text); background: var(--surface); border-color: var(--line); }
.toc a.active span { background: var(--lime); color: var(--deep); }
.doc article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.doc section {
  background: rgba(23, 25, 39, .92); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px); scroll-margin-top: 20px;
}
.doc section h2 { font-size: clamp(24px, 2.6vw, 32px); display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.doc section h2 .num { font: 700 14px/1 var(--display); color: var(--deep); background: var(--lime); border-radius: 9px; padding: 8px 9px; flex-shrink: 0; }
.doc section p, .doc section li { color: #d5d7e6; }
.doc section p { margin: 0 0 12px; }
.doc section p:last-child { margin-bottom: 0; }
.doc section ul { margin: 0 0 12px; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.doc section li { position: relative; padding-left: 22px; }
.doc section li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--violet); }
.doc section strong { color: var(--text); }
.doc section a { color: var(--lime); }
.tldr {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px;
}
.tldr div { border-radius: 18px; padding: 18px; background: var(--surface2); border: 1px solid var(--line); }
.tldr b { display: block; font: 700 18px/1.2 var(--display); margin-bottom: 6px; }
.tldr p { margin: 0; color: var(--muted); font-size: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 4px 0 12px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.table-wrap { overflow-x: auto; }
.progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--lime); width: 0; z-index: 30; }

/* ---------- contact ---------- */
.mail-big {
  display: block; font: 700 clamp(34px, 8vw, 112px)/1 var(--display); letter-spacing: -0.04em;
  text-decoration: none; word-break: break-all; margin: 26px 0 10px;
}
.mail-big span { background: linear-gradient(var(--lime), var(--lime)) 0 100% / 0 6px no-repeat; transition: background-size .35s; }
.mail-big:hover span { background-size: 100% 6px; }
.copy { margin-top: 8px; }
.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 48px; }
.topic {
  display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; min-height: 190px; transition: transform .25s, border-color .25s; position: relative;
}
.topic:hover { transform: translateY(-6px); border-color: var(--c); }
.topic .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--c); color: var(--deep); margin-bottom: 18px; }
.topic .ic svg { width: 22px; height: 22px; }
.topic h3 { font-size: 20px; margin-bottom: 6px; }
.topic p { margin: 0; color: var(--muted); font-size: 14px; }
.topic .go { position: absolute; top: 22px; right: 22px; color: var(--muted); font-size: 20px; }
.faq { margin-top: 56px; display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 600 17px/1.3 var(--display); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--lime); font-size: 24px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }
.faq details a { color: var(--lime); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .play { transform: none; max-width: 460px; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .games { grid-template-columns: 1fr 1fr; }
  .game, .game:nth-child(n+4) { grid-column: span 1; }
  .game:nth-child(7) { grid-column: span 2; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .topics { grid-template-columns: 1fr 1fr; }
  .tldr { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .games { grid-template-columns: 1fr; }
  .game:nth-child(7) { grid-column: span 1; }
  .game { min-height: 220px; }
  .topics { grid-template-columns: 1fr; }
  .toc { display: none; }
  .clock .lbl { display: none; }
  .marquee { margin: 0 -8px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 2px 0; }
  .table td:nth-child(2) { color: var(--lime); font-size: 13px; margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
