/* Pixelquest — dark cosmic observatory: near-black void, midnight-navy cards, starfield grain, soft 24px curves */

:root {
  --void: #0d100d;
  --void-2: #11150f;
  --surface: #0e1730;
  --surface-2: #0b1226;
  --halo: #ffffff;
  --muted: #9aa0b4;
  --faint: #6a7086;
  --hairline: rgba(255, 255, 255, 0.10);
  --hairline-2: rgba(255, 255, 255, 0.16);
  --accent: #7c8cff;
  --accent-2: #b98cff;

  --font-ui: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-pixel: 'Press Start 2P', ui-monospace, monospace;

  --s12: 12px;
  --s16: 16px;
  --s20: 20px;
  --s24: 24px;
  --s32: 32px;
  --s40: 40px;
  --s48: 48px;
  --s64: 64px;
  --s96: 96px;

  --page: 1160px;
  --r: 24px;
  --r-sm: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--halo);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* starfield: two sparse layers of faint points over the void */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 75% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 50% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 10% 80%, rgba(180,200,255,0.5), transparent),
    radial-gradient(1px 1px at 35% 90%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 65% 40%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 90% 45%, rgba(200,180,255,0.4), transparent);
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.6;
}

body > *:not(.starfield) { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--halo); padding: var(--s12) var(--s16); z-index: 60; border-radius: var(--r-sm); }
.skip:focus { left: var(--s16); top: var(--s12); }

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--s24); }
.wrap--narrow { max-width: 780px; }

/* ——— logo ——— */

.logo { display: inline-flex; align-items: center; gap: var(--s12); text-decoration: none; }
.logo__mark { width: 14px; height: 14px; background: var(--accent); box-shadow: 5px 0 var(--accent-2), 0 5px var(--accent-2), -5px 0 var(--accent); flex: none; }
.logo__text { font-size: 18px; font-weight: 500; letter-spacing: 0.02em; }

/* ——— nav ——— */

.nav { position: sticky; top: 0; z-index: 50; background: rgba(13,16,13,0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hairline); }
.nav__inner { max-width: var(--page); margin-inline: auto; padding: var(--s16) var(--s24); display: flex; align-items: center; gap: var(--s24); }
.nav__links { display: flex; align-items: center; gap: var(--s24); margin-inline: auto; }
.nav__link { font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav__link:hover { color: var(--halo); }
.nav__cta { flex: none; }

.burger { display: none; background: none; border: 1px solid var(--hairline-2); border-radius: var(--r-sm); color: var(--halo); padding: var(--s12); cursor: pointer; margin-left: auto; }

.mobile-nav { display: none; flex-direction: column; padding: 0 var(--s24) var(--s16); border-bottom: 1px solid var(--hairline); }
.mobile-nav__link { text-decoration: none; color: var(--muted); padding: var(--s12) 0; border-bottom: 1px solid var(--hairline); font-size: 15px; }

/* ——— buttons ——— */

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 11px var(--s24);
  cursor: pointer;
  text-decoration: none;
  background: none;
  color: var(--halo);
}
.btn--halo { background: var(--halo); color: var(--void); }
.btn--halo:hover { background: #e9e9ff; }
.btn--ghost { border-color: var(--hairline-2); }
.btn--ghost:hover { border-color: var(--halo); }
.btn--sm { font-size: 14px; padding: 8px var(--s16); }

.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ——— typography ——— */

.kicker { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s20); }
.h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 500; line-height: 1.12; letter-spacing: 0.01em; }
.lead { color: var(--muted); font-size: 16px; max-width: 64ch; margin-top: var(--s12); }

.section { padding-block: var(--s64); scroll-margin-top: 80px; }
.section__head { margin-bottom: var(--s32); }

/* ——— hero ——— */

.hero { padding-block: var(--s96) var(--s64); text-align: center; }
.hero__title { font-size: clamp(32px, 5vw, 52px); font-weight: 500; line-height: 1.08; letter-spacing: 0.01em; max-width: 20ch; margin-inline: auto; }
.hero__sub { color: var(--muted); font-size: 17px; max-width: 60ch; margin: var(--s24) auto 0; }
.hero__actions { display: flex; gap: var(--s12); justify-content: center; flex-wrap: wrap; margin-top: var(--s32); }

/* ——— filters ——— */

.filters { display: flex; flex-wrap: wrap; gap: var(--s12); margin-bottom: var(--s32); }
.chip {
  font-family: inherit;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  padding: 8px var(--s16);
  color: var(--muted);
  cursor: pointer;
}
.chip:hover { border-color: var(--hairline-2); color: var(--halo); }
.chip--active { background: var(--halo); border-color: var(--halo); color: var(--void); }

/* ——— cards ——— */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s24); }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card[hidden] { display: none; }
.card__frame { border-bottom: 1px solid var(--hairline); }
.card__frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; image-rendering: auto; }
.card__body { padding: var(--s24); display: flex; flex-direction: column; flex: 1; }
.card__head { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s12); align-items: center; }
.card__icon { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--hairline); }
.card__title { font-size: 17px; font-weight: 500; line-height: 1.2; }
.card__dev { font-size: 13px; color: var(--faint); }
.pill { font-size: 12px; color: var(--accent); border: 1px solid var(--hairline-2); border-radius: 9999px; padding: 3px 10px; white-space: nowrap; }
.card__text { color: var(--muted); font-size: 14px; margin-top: var(--s16); flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s12); margin-top: var(--s20); }
.card__link { font-size: 14px; color: var(--halo); text-decoration: none; white-space: nowrap; }
.card__link:hover { color: var(--accent); }
.empty { color: var(--faint); }

/* ——— stars ——— */

.rating { display: inline-flex; align-items: center; gap: 6px; }
.rating__num { font-size: 13px; color: var(--halo); }
.rating__free { font-size: 12px; color: var(--accent); border-left: 1px solid var(--hairline-2); padding-left: 8px; }
.stars { position: relative; display: inline-flex; line-height: 0; }
.stars__base, .stars__fill { display: inline-flex; gap: 1px; }
.stars__base svg { fill: rgba(255,255,255,0.18); }
.stars__fill { position: absolute; inset: 0; overflow: hidden; white-space: nowrap; }
.stars__fill svg { fill: var(--accent); flex: none; }

/* ——— panels (method) ——— */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s24); }
.panel { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r); padding: var(--s24); }
.panel__n { font-family: var(--font-pixel); font-size: 12px; color: var(--accent); }
.panel__t { font-size: 17px; font-weight: 500; margin-block: var(--s12); }
.panel__p { font-size: 14px; color: var(--muted); }

/* ——— split ——— */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s48); align-items: center; }
.split--form { align-items: start; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); border: 1px solid var(--hairline); }
.shot__cap { font-size: 13px; color: var(--faint); margin-top: var(--s12); }

.reasons { list-style: none; display: grid; gap: var(--s16); margin-block: var(--s20); }
.reasons__item { position: relative; padding-left: var(--s24); color: var(--muted); font-size: 15px; }
.reasons__dot { position: absolute; left: 0; top: 8px; width: 8px; height: 8px; background: var(--accent); }

/* ——— stats ——— */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s24); }
.stat { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r); padding: var(--s24); }
.stat__k { font-size: 13px; color: var(--faint); }
.stat__v { font-size: clamp(28px, 3.4vw, 36px); font-weight: 500; margin-top: var(--s12); }

/* ——— quotes ——— */

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s24); }
.quote { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); padding: var(--s32); }
.quote__body { font-size: 16px; margin-bottom: var(--s20); }
.quote__by { display: flex; align-items: center; gap: var(--s12); }
.ini { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--hairline-2); color: var(--accent); display: grid; place-items: center; font-size: 12px; flex: none; }
.quote__name { display: block; font-size: 14px; }
.quote__role { display: block; font-size: 13px; color: var(--faint); }

/* ——— form ——— */

.form { display: grid; gap: var(--s16); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); padding: var(--s32); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s16); }
.form__row { display: grid; gap: 8px; }
.form__lab { font-size: 13px; color: var(--muted); }
.form__opt { color: var(--faint); }
.form__in { border: 1px solid var(--hairline-2); border-radius: var(--r-sm); background: var(--surface-2); padding: 12px var(--s16); font-family: inherit; font-size: 15px; color: var(--halo); width: 100%; }
.form__in::placeholder { color: var(--faint); }
.form__in:focus { border-color: var(--accent); }
.form__consent { display: grid; grid-template-columns: auto 1fr; gap: var(--s12); align-items: start; font-size: 13px; color: var(--muted); }
.form__consent input { margin-top: 3px; accent-color: var(--accent); }
.form button[type="submit"] { justify-self: start; }
.form__err { font-size: 14px; border-left: 2px solid var(--accent-2); padding-left: var(--s12); }
.form__ok { font-size: 14px; border-left: 2px solid var(--accent); padding-left: var(--s12); color: var(--muted); }

/* ——— faq ——— */

.faq__i { border-bottom: 1px solid var(--hairline); }
.faq__i:first-child { border-top: 1px solid var(--hairline); }
.faq__q { font-weight: 400; }
.faq__b { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s16); background: none; border: none; font-family: inherit; font-size: 18px; color: var(--halo); text-align: left; padding: var(--s24) 0; cursor: pointer; }
.faq__chev { transition: transform .2s ease; flex: none; color: var(--faint); }
.faq__i--open .faq__chev { transform: rotate(180deg); }
.faq__a { padding-bottom: var(--s24); color: var(--muted); font-size: 15px; }

/* ——— footer ——— */

.footer { border-top: 1px solid var(--hairline); padding-block: var(--s64); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s32); }
.footer__note { color: var(--muted); font-size: 14px; margin-top: var(--s16); max-width: 36ch; }
.footer__col { display: flex; flex-direction: column; gap: var(--s12); }
.footer__title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.footer__link { font-size: 14px; color: var(--muted); text-decoration: none; }
.footer__link:hover { color: var(--halo); }
.footer__bottom { margin-top: var(--s48); padding-top: var(--s24); border-top: 1px solid var(--hairline); color: var(--faint); font-size: 13px; }

/* ——— to top + cookie ——— */

.totop { position: fixed; right: var(--s24); bottom: var(--s24); z-index: 40; width: 44px; height: 44px; display: grid; place-items: center; background: var(--halo); color: var(--void); border: none; border-radius: 50%; cursor: pointer; }
.totop[hidden] { display: none; }

.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: rgba(11,18,38,0.94); backdrop-filter: blur(8px); border-top: 1px solid var(--hairline-2); padding: var(--s16) var(--s24); display: flex; align-items: center; justify-content: center; gap: var(--s16); flex-wrap: wrap; }
.cookie[hidden] { display: none; }
.cookie__text { color: var(--muted); font-size: 14px; max-width: 72ch; }
.cookie__actions { display: flex; gap: var(--s12); }

/* ——— legal ——— */

.legal { padding-block: var(--s48) var(--s64); }
.legal__title { font-size: clamp(28px, 4vw, 44px); font-weight: 500; line-height: 1.08; }
.legal__updated { color: var(--faint); font-size: 14px; margin-top: var(--s12); }
.legal__back { margin-top: var(--s20); }
.legal h2 { font-size: 22px; font-weight: 500; margin-top: var(--s40); margin-bottom: var(--s12); }
.legal h3 { font-size: 17px; font-weight: 500; margin-top: var(--s24); margin-bottom: 8px; }
.legal p, .legal li { color: var(--muted); font-size: 15px; max-width: 76ch; }
.legal p { margin-bottom: var(--s12); }
.legal ul { margin: 0 0 var(--s16) var(--s24); }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--halo); font-weight: 500; }

/* ——— responsive ——— */

@media (max-width: 1040px) {
  .nav__links, .nav__cta { display: none; }
  .burger { display: inline-flex; }
  .mobile-nav:not([hidden]) { display: flex; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .split, .split--rev { grid-template-columns: 1fr; gap: var(--s32); }
  .split--rev .shot { order: 2; }
  .section { padding-block: var(--s48); }
  .hero { padding-block: var(--s64) var(--s48); }
}

@media (max-width: 560px) {
  .cards, .steps, .stats { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .cookie { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq__chev { transition: none; }
}
