/* Glixy — marketing site.
 *
 * Same design system as the app (web/static/app.css): neo-brutalist, hard 2px
 * borders, square corners, flat fills, one loud accent. Dark outright rather
 * than OS-dependent, so the two properties look like one product.
 *
 * Mobile first, like the app: everything here is the phone layout, and the
 * multi-column grids are additive at 900px.
 *
 * No build step, no framework, no web fonts — one stylesheet, same as the app.
 */

:root {
  --page:    #0b0b0d;
  --shell:   #17171a;
  --panel:   #202024;
  --panel-2: #292930;
  --line:    #3c3c45;
  --edge:    #e9e9e6;
  --fg:      #f4f4f2;
  --muted:   #91919c;
  --acc:     #4dff00;
  --acc-ink: #0a0a0a;
  --grid-a:  #ff00c8;
  --grid-b:  #4dff00;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  overflow-x: hidden;
}

img { max-width: 100%; }

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--acc); color: var(--acc-ink);
  padding: 10px 16px; font: 800 13px/1 var(--sans);
}
.skip:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

/* Faint CRT lines over everything. Pointer-events none so it never eats a tap. */
.scanlines {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: repeating-linear-gradient(
    180deg, rgba(0,0,0,0.22) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* ------------------------------------------------------------------ nav -- */

/* The bar is full-bleed so its rule spans the window, but the contents sit in
 * the same 1180 column as every section -- otherwise the wordmark drifts away
 * from the copy it belongs to on a wide display. */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11,11,13,0.86);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.nav-in {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand b {
  font: 800 19px/1 var(--sans);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.brand.small b { font-size: 16px; }

/* The app's mark: four explicit quadrants, not a conic shorthand — the
 * shorthand antialiases its wedges at this size into a flat brown. */
.mark {
  width: 30px; height: 30px; flex: none;
  border: 2px solid var(--line);
  background-image: conic-gradient(
    var(--grid-a) 25%, var(--grid-b) 0 50%,
    var(--grid-a) 0 75%, var(--grid-b) 0);
  background-size: 10px 10px;
  animation: markflick 7s infinite steps(1);
}
.brand.small .mark { width: 22px; height: 22px; background-size: 7px 7px; }

/* Every keyframe restates BOTH properties, including `none`. A property only
 * animates across the keyframes that mention it, so declaring `filter` once and
 * omitting it afterwards holds that filter for the rest of the loop rather than
 * dropping it — and with steps(1) there is no interpolation to disguise it. */
@keyframes markflick {
  0%, 96%   { filter: none; transform: none; }
  97%       { filter: hue-rotate(90deg); transform: translate(1px, -1px); }
  98%       { filter: invert(1); transform: none; }
  99%       { filter: none; transform: translate(-1px, 1px); }
  100%      { filter: none; transform: none; }
}

.navlinks { display: flex; align-items: center; gap: 6px; }
.navlinks > a:not(.btn) {
  display: none;
  font: 700 13px/1 var(--sans);
  text-decoration: none;
  color: var(--muted);
  padding: 10px;
}
.navlinks > a:not(.btn):hover { color: var(--fg); }

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid var(--edge);
  background: none;
  color: var(--fg);
  font: 800 13px/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--line); }
.btn:active { transform: none; box-shadow: none; }

.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn-primary:hover { box-shadow: 4px 4px 0 var(--grid-a); }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 15px; }

/* ----------------------------------------------------------------- hero -- */

.hero {
  display: grid;
  gap: 32px;
  padding: 40px 16px 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.kicker {
  margin: 0 0 14px;
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acc);
}

h1 {
  margin: 0 0 18px;
  font: 800 clamp(38px, 11vw, 82px)/0.94 var(--sans);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

/* Chromatic split. Two copies of the text offset in the brand's two colours,
 * sliced with clip-path on a steps() timeline so it snaps rather than eases —
 * a smooth glitch reads as a blur. */
.glitch { position: relative; display: inline-block; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0; width: 100%;
  pointer-events: none;
}
.glitch::before {
  color: var(--grid-a);
  animation: gl-a 4.2s infinite steps(1);
}
.glitch::after {
  color: var(--acc);
  animation: gl-b 4.2s infinite steps(1);
}

@keyframes gl-a {
  0%, 82%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  84%  { clip-path: inset(14% 0 62% 0); transform: translate(-4px, 0); }
  86%  { clip-path: inset(58% 0 22% 0); transform: translate(3px, 0); }
  88%  { clip-path: inset(30% 0 48% 0); transform: translate(-2px, 0); }
  90%  { clip-path: inset(100% 0 0 0); }
  93%  { clip-path: inset(72% 0 10% 0); transform: translate(5px, 0); }
  95%  { clip-path: inset(100% 0 0 0); }
}
@keyframes gl-b {
  0%, 82%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  84%  { clip-path: inset(60% 0 18% 0); transform: translate(4px, 0); }
  86%  { clip-path: inset(20% 0 58% 0); transform: translate(-3px, 0); }
  88%  { clip-path: inset(70% 0 12% 0); transform: translate(2px, 0); }
  90%  { clip-path: inset(100% 0 0 0); }
  93%  { clip-path: inset(24% 0 56% 0); transform: translate(-5px, 0); }
  95%  { clip-path: inset(100% 0 0 0); }
}

.h1-sm { font: 800 clamp(30px, 8vw, 54px)/1 var(--sans); letter-spacing: -0.04em; text-transform: uppercase; margin: 0 0 12px; }

.lede {
  margin: 0 0 26px;
  font-size: 18px;
  color: var(--muted);
  max-width: 46ch;
}

.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li {
  position: relative;
  padding-left: 24px;
  font: 500 14px/1.5 var(--mono);
  color: var(--muted);
}
.ticks li::before {
  content: "▸";
  position: absolute; left: 4px; top: 0;
  color: var(--acc);
}

/* ----------------------------------------------------------------- demo -- */

.demo { align-self: start; margin: 0; }

/* Matches the composed asset exactly (900x672: two 448x672 clips plus a 4px
 * divider) so the frame never letterboxes it. */
.demo-frame {
  position: relative;
  aspect-ratio: 900 / 672;
  border: 2px solid var(--edge);
  background: var(--panel);
  overflow: hidden;
}

.demo-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Static, because each half is always the same thing -- no JS timing to drift
 * out of sync, and the text stays crisp at any size instead of being baked into
 * the video at one resolution. */
.demo-label {
  position: absolute; bottom: 10px;
  padding: 5px 9px;
  font: 800 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lab-a { left: 10px;  background: var(--panel-2); color: var(--fg); border: 1px solid var(--line); }
.lab-b { right: 10px; background: var(--acc);     color: var(--acc-ink); }

.demo-bar {
  display: flex; align-items: center; gap: 7px;
  border: 2px solid var(--line); border-top: 0;
  padding: 10px 12px;
  background: var(--panel-2);
}
.demo-bar .dot { width: 9px; height: 9px; background: var(--line); }
.demo-bar .dot:first-child { background: var(--acc); }
.demo-bar em {
  margin-left: auto;
  font: 500 12px/1 var(--mono); font-style: normal; color: var(--muted);
}

/* --------------------------------------------------------------- ticker -- */

.ticker {
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  margin: 20px 0 8px;
}
.ticker-run {
  display: flex; align-items: center; gap: 22px;
  padding: 12px 0;
  white-space: nowrap;
  width: max-content;
  animation: roll 26s infinite linear;
  font: 800 12px/1 var(--mono);
  letter-spacing: 0.2em;
}
.ticker-run i { color: var(--grid-a); font-style: normal; }
@keyframes roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

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

.section { max-width: 1180px; margin: 0 auto; padding: 46px 16px; }

.h2 {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 22px;
  font: 800 clamp(24px, 6vw, 34px)/1.1 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.h2.tight { margin-bottom: 14px; }
.h2 .num { font: 800 13px/1 var(--mono); color: var(--acc); letter-spacing: 0; }

.h3 {
  margin: 40px 0 12px;
  font: 800 18px/1.2 var(--sans);
  text-transform: uppercase; letter-spacing: -0.02em;
}

.body { margin: 0 0 14px; color: var(--muted); max-width: 62ch; }
.body.lead { font-size: 17px; margin-bottom: 26px; }
.body.small { font-size: 14px; }
.muted { color: var(--muted); }

.card {
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 22px;
}
.card.wide { padding: 26px; }

/* ---------------------------------------------------------------- steps -- */

.steps { display: grid; gap: 14px; }
.step-n {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 2px solid var(--acc);
  color: var(--acc);
  font: 800 16px/1 var(--mono);
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font: 800 18px/1.2 var(--sans); letter-spacing: -0.02em; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* -------------------------------------------------------------- privacy -- */

.privacy { display: grid; gap: 24px; align-items: center; }
.countdown {
  border: 2px solid var(--acc);
  padding: 22px;
  text-align: center;
  background: var(--panel-2);
}
.countdown-num {
  font: 800 68px/1 var(--sans);
  letter-spacing: -0.06em;
  color: var(--acc);
}
.countdown-lab {
  font: 800 11px/1.5 var(--mono);
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 6px;
}

/* --------------------------------------------------------------- pricing -- */

.packs { display: grid; gap: 14px; }

.pack { position: relative; display: flex; flex-direction: column; gap: 8px; }
.pack h3 {
  margin: 0;
  font: 800 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.pack .price { font: 800 42px/1 var(--sans); letter-spacing: -0.045em; }
.pack .credits {
  display: flex; align-items: center; gap: 7px;
  font: 700 14px/1 var(--mono);
  color: var(--acc);
}
.pack-note { margin: 2px 0 14px; font-size: 14px; color: var(--muted); }
.pack .btn { margin-top: auto; }

.pack.featured { border-color: var(--acc); }
.flag {
  position: absolute; top: -2px; right: -2px;
  background: var(--acc); color: var(--acc-ink);
  padding: 5px 10px;
  font: 800 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
}

.bands { display: grid; gap: 8px; margin-bottom: 14px; }
.band {
  display: flex; align-items: center; justify-content: space-between;
  border: 2px solid var(--line);
  background: var(--panel-2);
  padding: 12px 14px;
}
.band b { font: 800 13px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }
.bc {
  display: flex; align-items: center; gap: 6px;
  font: 700 14px/1 var(--mono); color: var(--acc);
}

/* --------------------------------------------------------------- finale -- */

.finale { text-align: center; border-color: var(--edge); }
.finale .body { margin-left: auto; margin-right: auto; }
.finale .btn { margin-top: 8px; }

/* ----------------------------------------------------------------- foot -- */

.foot { border-top: 2px solid var(--line); margin-top: 30px; background: var(--shell); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 26px 16px 40px; display: grid; gap: 12px; }
.fine { margin: 0; font-size: 13px; color: var(--muted); max-width: 62ch; }

/* ------------------------------------------------------------------ 900 -- */

@media (min-width: 900px) {
  .nav-in { padding: 14px 28px; }
  .navlinks > a:not(.btn) { display: inline-flex; }

  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
    padding: 68px 28px 36px;
  }

  .section { padding: 68px 28px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .packs { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .bands { grid-template-columns: repeat(5, 1fr); }
  .band { flex-direction: column; align-items: flex-start; gap: 10px; }
  .privacy { grid-template-columns: 1fr 260px; gap: 36px; }
  .foot-in { padding: 32px 28px 48px; }
}

/* ------------------------------------------------------ reduced motion -- */
/*
 * Everything above is decoration. Someone who has asked the OS for less motion
 * gets the same page with all of it switched off — including the glitch
 * pseudo-elements, which are hidden outright rather than merely stilled, since
 * a frozen chromatic split just looks like broken text.
 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .glitch::before, .glitch::after { display: none; }
  .scanlines { display: none; }
  /* The demo video is paused by the inline script in index.html and parked on
   * the close-up, since CSS cannot stop a <video>. It stays visible: it is the
   * content, not decoration, and a still frame still shows the before/after. */
}
