@charset "utf-8";
/* ==========================================================================
   Grid Fill — hattorisushi.lt
   One stylesheet. Tokens lifted verbatim from the game's Nebula theme.
   Single-theme dark site by design: no light mode, no prefers-color-scheme
   for color — the page is the game's boot splash, always.
   ========================================================================== */

@font-face {
  font-family: "Fredoka";
  src: url("../assets/fonts/fredoka-vf.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Grid Fill site palette — the game's Nebula theme, verbatim */
  --ink: #080B1E;        /* page ground = the game's boot splash */
  --panel: #0D1230;      /* board ground */
  --card: #141A3B;       /* empty cell */
  --card-hi: #1A2150;    /* background_top */
  --line: rgba(234, 242, 255, 0.09);
  --text: #F2F7FF;
  --dim: #9EA8D9;
  --gold: #FFC94A;       /* reward — every CTA */
  --gold-ink: #4A2E00;   /* UiStyle.GOLD_TEXT */
  --magenta: #F06CD0;    /* accent — combo moments only */
  --coral: #F45B74;
  --amber: #FFA23E;
  --citrine: #F7CF45;
  --lime: #9BE24B;
  --cyan: #4FD8E8;
  --violet: #8B7DF7;
  --display: "Fredoka", "Avenir Next Rounded", -apple-system, sans-serif;
  --body: -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --radius: 22px;        /* the game's button radius */
  --header-h: 64px;
}

/* ---------- base ---------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; }

[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

::selection { background: var(--gold); color: var(--gold-ink); }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--gold); color: var(--gold-ink);
  font-family: var(--display); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 0 0 12px 12px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ---------- reveal on scroll (classes added by JS only — content is
   fully visible without JS and under prefers-reduced-motion) ---------- */

.js-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease var(--rd, 0s),
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) var(--rd, 0s);
}
.js-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(8, 11, 30, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; height: var(--header-h);
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 17px;
  letter-spacing: 0.02em; color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo svg { border-radius: 7px; flex: none; }

.site-nav { display: none; }
.site-nav a {
  font-family: var(--display); font-weight: 500; font-size: 13.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim);
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--gold); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -8px;
  background: transparent; border: none; cursor: pointer; border-radius: 10px;
}
.nav-toggle .bars { display: block; width: 20px; }
.nav-toggle .bars i {
  display: block; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle .bars i + i { margin-top: 5px; }
body.nav-open .nav-toggle .bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle .bars i:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle .bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 719.98px) {
  body.nav-open .site-nav {
    display: flex; flex-direction: column;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--panel); border-bottom: 1px solid var(--line);
    padding: 6px 22px 14px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  }
  body.nav-open .site-nav a {
    padding: 13px 2px; font-size: 15px;
    border-bottom: 1px solid var(--line);
  }
  body.nav-open .site-nav a:last-child { border-bottom: none; }
}

@media (min-width: 720px) {
  .wrap { padding: 0 28px; }
  .site-nav { display: flex; gap: 26px; }
  .nav-toggle { display: none; }
}

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

.section { padding: clamp(64px, 9vw, 96px) 0; border-bottom: 1px solid var(--line); }
.section.band { background: var(--panel); }

.eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 13px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--magenta);
  margin-bottom: 12px;
}

h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 44px); line-height: 1.12;
  text-wrap: balance; margin-bottom: 14px;
}

h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 21px; margin: 40px 0 12px;
}

.note { max-width: 68ch; color: var(--dim); font-size: 17px; }
.note strong { color: var(--text); font-weight: 600; }
.note + .note { margin-top: 12px; }

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

.btn-gold {
  display: inline-block; text-align: center;
  font-family: var(--display); font-weight: 700; font-size: 17px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(180deg, #FFD97A, var(--gold));
  color: var(--gold-ink); border: none; border-radius: var(--radius);
  padding: 16px 34px; cursor: pointer;
  box-shadow: 0 6px 0 #B8860B, 0 12px 28px rgba(255, 201, 74, 0.25);
}
.btn-gold:hover { filter: brightness(1.05); text-decoration: none; color: var(--gold-ink); }
.btn-gold:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #B8860B, 0 8px 18px rgba(255, 201, 74, 0.2);
}

.btn-ghost {
  display: inline-block; text-align: center;
  font-family: var(--display); font-weight: 600; font-size: 15px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(234, 242, 255, 0.06); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 28px; cursor: pointer;
}
.btn-ghost:hover { background: rgba(234, 242, 255, 0.1); text-decoration: none; color: var(--text); }

/* ---------- store badges (self-hosted inline SVG) ---------- */

.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.cta .badge-row { justify-content: center; }
.appstore-badge, .gplay-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.appstore-badge svg, .gplay-badge svg { height: 54px; width: auto; display: block; }
.appstore-badge:hover, .gplay-badge:hover { filter: brightness(1.18); }

.req-line { display: block; margin-top: 16px; font-size: 13.5px; color: var(--dim); }

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

.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 480px at 22% -80px, rgba(240, 108, 208, 0.13), transparent 70%),
    radial-gradient(760px 460px at 92% 14%, rgba(139, 125, 247, 0.16), transparent 70%),
    var(--ink);
  padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 9vw, 104px);
}

.hero-grid { display: grid; gap: 56px; align-items: center; }

.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(44px, 7vw, 84px); line-height: 1.02;
  letter-spacing: -0.01em; text-wrap: balance; margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--gold); }

.hero .lede { color: var(--dim); font-size: 18.5px; max-width: 44ch; margin-bottom: 30px; }
.hero .lede strong { color: var(--text); font-weight: 600; }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.12fr 0.88fr; }
}

/* ---------- phone frame (real screenshots) ---------- */

.phone {
  width: min(310px, 84vw); margin: 0 auto;
  background: #05070F; border-radius: 46px; padding: 12px;
  border: 1px solid rgba(234, 242, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}
.phone-screen { border-radius: 35px; overflow: hidden; background: var(--panel); }
.phone-screen img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1170 / 2532;
  object-fit: cover;
  background-color: var(--panel); /* holds the layout if a shot is missing */
}
.phone--sm { width: min(250px, 74vw); border-radius: 38px; padding: 10px; }
.phone--sm .phone-screen { border-radius: 29px; }

/* ---------- live demo board ---------- */

.board-stage { position: relative; display: flex; justify-content: center; }

.board-frame {
  background: var(--panel);
  border: 3px solid rgba(56, 68, 130, 0.9); /* ground.lightened bezel */
  border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.board {
  display: grid; grid-template-columns: repeat(8, var(--cell, 38px));
  gap: 2px; background: var(--panel);
  --cell: clamp(28px, 8.4vw, 42px);
  aspect-ratio: 1 / 1; /* holds shape before JS fills the cells */
}
.board .c { display: block; width: var(--cell); height: var(--cell); background: var(--card); }
.board .c1 { background: var(--coral); }
.board .c2 { background: var(--amber); }
.board .c3 { background: var(--citrine); }
.board .c4 { background: var(--lime); }
.board .c5 { background: var(--cyan); }
.board .c6 { background: var(--violet); }
.board .c7 { background: var(--magenta); }
.board .cG { background: var(--gold); animation: rowflash 1.6s ease-in-out infinite; }
.board .miss {
  background: transparent;
  outline: 2px dashed rgba(255, 201, 74, 0.7);
  outline-offset: -3px;
}
@keyframes rowflash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.45); }
}
@media (prefers-reduced-motion: reduce) {
  .board .cG { animation: none; }
}
.board--scatter { --cell: clamp(24px, 7vw, 34px); }

.combo-callout {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
  transform: rotate(-5deg); text-shadow: 0 4px 26px rgba(0, 0, 0, 0.7);
}
.combo-callout .word {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(38px, 6vw, 56px); letter-spacing: 0.04em;
}
.combo-callout .num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(78px, 12vw, 112px); line-height: 0.9; color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.board-caption { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--dim); }

/* ---------- how it plays ---------- */

.split-grid { display: grid; gap: 52px; align-items: center; }
@media (min-width: 860px) {
  .split-grid { grid-template-columns: 1fr 400px; gap: 64px; }
}

.steps { list-style: none; margin-top: 28px; display: grid; gap: 18px; counter-reset: step; }
.steps li { position: relative; padding-left: 56px; color: var(--dim); font-size: 16.5px; }
.steps li strong { color: var(--text); font-weight: 600; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--card-hi); border: 1px solid var(--line); color: var(--gold);
  font-family: var(--display); font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- power-up cards ---------- */

.feat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px; margin-top: 36px;
}
.feat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 26px 24px;
}
.band .feat { background: var(--card); }
.feat .ic {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.feat .ic svg { width: 28px; height: 28px; }
.feat .ic--pick3 { background: rgba(139, 125, 247, 0.22); }
.feat .ic--hammer { background: rgba(244, 91, 116, 0.22); }
.feat .ic--laser { background: rgba(79, 216, 232, 0.22); }
.feat .ic--shield { background: rgba(155, 226, 75, 0.22); }
.feat b {
  font-family: var(--display); font-weight: 600; font-size: 17px;
  letter-spacing: 0.05em; display: block; margin-bottom: 6px;
}
.feat span { font-size: 14.5px; color: var(--dim); line-height: 1.6; display: block; }

/* ---------- stats strip ---------- */

.stat-strip { display: flex; gap: 40px 64px; flex-wrap: wrap; margin-top: 14px; }
.stat b {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 6vw, 56px); color: var(--gold);
  display: block; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 13px; color: var(--dim); letter-spacing: 0.08em;
  text-transform: uppercase; font-family: var(--display); font-weight: 500;
}

/* ---------- themes ---------- */

.theme-strip {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; margin-top: 32px;
  -webkit-overflow-scrolling: touch;
}
.theme-card {
  flex: none; width: 150px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
}
.theme-card .sky { height: 56px; }
.theme-card .row { display: flex; height: 24px; }
.theme-card .row i { flex: 1; }
.theme-card .nm {
  font-family: var(--display); font-weight: 600; font-size: 13px;
  padding: 9px 12px; background: var(--card);
}
.theme-card--more {
  display: flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--dim);
  font-family: var(--display); font-weight: 600; font-size: 14px;
  min-height: 104px;
}

.shot-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px; justify-items: center; margin-top: 36px; max-width: 640px;
}
.shot { text-align: center; }
.shot figcaption { margin-top: 16px; font-size: 13.5px; color: var(--dim); }

/* ---------- soundtrack wave ---------- */

.wave { display: flex; align-items: center; gap: 6px; height: 76px; margin-top: 38px; }
.wave i {
  width: 7px; border-radius: 4px; height: var(--h, 24px);
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  animation: wave 1.9s ease-in-out var(--d, 0s) infinite;
}
@keyframes wave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1.45); }
}
@media (prefers-reduced-motion: reduce) {
  .wave i { animation: none; }
}

/* ---------- privacy strip / contact card ---------- */

.strip-card {
  display: flex; align-items: center; gap: 20px 24px; flex-wrap: wrap;
  background: var(--card); border: 1px solid rgba(155, 226, 75, 0.35);
  border-radius: 18px; padding: 24px 28px;
}
.strip-card .strip-ic {
  width: 52px; height: 52px; flex: none; border-radius: 14px;
  background: rgba(155, 226, 75, 0.14);
  display: flex; align-items: center; justify-content: center;
}
.strip-card .strip-ic svg { width: 28px; height: 28px; }
.strip-card .strip-body { flex: 1 1 320px; }
.strip-card b { font-family: var(--display); font-weight: 600; font-size: 18px; display: block; margin-bottom: 2px; }
.strip-card span { color: var(--dim); font-size: 15px; display: block; max-width: 60ch; }

.strip-card--gold { border-color: rgba(255, 201, 74, 0.4); }
.strip-card--gold .strip-ic { background: rgba(255, 201, 74, 0.14); }
.strip-card .cta-mail { margin-left: auto; flex: none; }
.strip-card .cta-mail .btn-gold { font-size: 14.5px; padding: 13px 24px; white-space: nowrap; }
@media (max-width: 719.98px) {
  .strip-card .cta-mail { margin-left: 0; }
}

/* ---------- CTA band ---------- */

.cta {
  text-align: center;
  padding: clamp(88px, 12vw, 128px) 0;
  background:
    radial-gradient(720px 400px at 50% -40px, rgba(255, 201, 74, 0.1), transparent 70%),
    var(--ink);
}
.cta h2 { margin-bottom: 12px; }
.cta p { color: var(--dim); font-size: 17px; max-width: 46ch; margin: 0 auto 32px; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--ink); padding: 56px 0 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 36px; flex-wrap: wrap; }
.footer-brand p { color: var(--dim); font-size: 14px; margin-top: 14px; max-width: 34ch; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; padding-top: 6px; }
.footer-nav a {
  font-family: var(--display); font-weight: 500; font-size: 13.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim);
}
.footer-nav a:hover { color: var(--text); text-decoration: none; }
.footer-legal {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 13px;
}

/* ---------- document pages (support / privacy / terms) ---------- */

.doc { padding-top: clamp(52px, 8vw, 80px); padding-bottom: clamp(80px, 10vw, 112px); }
.doc-inner { max-width: 720px; }
.doc h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(38px, 6vw, 54px); line-height: 1.08; margin-bottom: 6px;
}
.doc .updated {
  color: var(--dim); font-size: 14.5px; margin-bottom: 30px;
  font-variant-numeric: tabular-nums;
}

.toc-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.toc-chips a {
  font-size: 12.5px; color: var(--dim); border: 1px solid var(--line);
  background: var(--card); border-radius: 999px; padding: 6px 14px;
  font-family: var(--display); font-weight: 500;
}
.toc-chips a:hover { color: var(--gold); border-color: rgba(255, 201, 74, 0.45); text-decoration: none; }

.prose h2 { font-size: 22px; font-weight: 600; margin: 38px 0 8px; }
.prose p { font-size: 16px; color: var(--dim); max-width: 62ch; margin-bottom: 12px; }
.prose p strong { color: var(--text); font-weight: 600; }
.prose ul { list-style: none; max-width: 62ch; margin-bottom: 12px; }
.prose li { font-size: 16px; color: var(--dim); padding: 5px 0 5px 22px; position: relative; }
.prose li::before {
  content: ""; position: absolute; left: 2px; top: 15px;
  width: 8px; height: 8px; border-radius: 2px; background: var(--gold);
}
.prose li strong { color: var(--text); font-weight: 600; }

/* ---------- FAQ ---------- */

.faq { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 8px 0 44px; }
.faq details { border-bottom: 1px solid var(--line); background: var(--card); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  font-family: var(--display); font-weight: 600; font-size: 16.5px;
  padding: 18px 22px; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq .a { padding: 0 22px 18px; font-size: 15px; color: var(--dim); max-width: 64ch; }
.faq .a strong { color: var(--text); font-weight: 600; }

/* ---------- 404 ---------- */

.notfound {
  text-align: center;
  padding-top: clamp(56px, 9vw, 88px);
  padding-bottom: clamp(88px, 12vw, 120px);
}
.notfound .board-stage { margin-bottom: 44px; }
.notfound h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(72px, 14vw, 128px); line-height: 1; color: var(--gold);
  font-variant-numeric: tabular-nums; margin-bottom: 10px;
}
.notfound p { color: var(--dim); max-width: 44ch; margin: 0 auto 34px; }
.notfound p strong { color: var(--text); font-weight: 600; }
