/* ==========================================================================
   XX1.LOL — components
   Dark glass, road-sign type. The hero is a live demo board rather than a
   phone: the game is the screenshot.
   ========================================================================== */

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center;
  border-bottom: 1px solid var(--rule);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; overflow: hidden; display: block;
  border: 1px solid var(--rule-2); box-shadow: 0 6px 18px -6px rgba(0,0,0,0.8);
  transition: transform var(--t), border-color var(--t);
}
.brand:hover .brand-mark { transform: scale(1.05) rotate(-3deg); border-color: var(--green); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: 0.08em; color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link { position: relative; font-size: 0.9rem; font-weight: 500; color: var(--text-2); transition: color var(--t); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 2px;
  background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.btn-green {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; color: var(--green-ink);
  background: var(--green);
  box-shadow: 0 8px 22px -10px rgba(54,194,90,0.8);
  transition: transform var(--t), box-shadow var(--t), background var(--t);
}
.btn-green:hover { transform: translateY(-1px); background: #45d169; box-shadow: 0 12px 28px -10px rgba(54,194,90,0.9); }
.btn-green span:last-child { transition: transform var(--t); }
.btn-green:hover span:last-child { transform: translateX(2px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; color: var(--text);
  border: 1px solid var(--rule-2); background: var(--surface);
  transition: border-color var(--t), background var(--t);
}
.btn-ghost:hover { border-color: var(--green); background: var(--green-tint); color: var(--ink); }

.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--rule-2); flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--text); transition: transform var(--t); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: left; background: var(--green);
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    background: rgba(11, 11, 12, 0.97); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--rule);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity var(--t), transform var(--t);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-link { padding: 0.9rem 0; font-size: 0.95rem; border-bottom: 1px solid var(--rule); }
  .nav-link:last-child { border-bottom: none; }
  .nav-link::after { display: none; }
  .nav-actions .btn-green { display: none; }
}

/* ---------- shared ---------- */
.label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
}
.label i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-tint); }
.title { font-size: clamp(2.4rem, 5.5vw, 3.8rem); margin: 0.75rem 0 0.9rem; text-wrap: balance; }
.lede { font-size: 1.0625rem; max-width: 36rem; color: var(--text-2); }
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 500; color: var(--text-2); border: 1px solid var(--rule); background: var(--surface);
}
.pill b { color: var(--green); font-weight: 600; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 3.5rem 0 5rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; } .hero { padding: 4.5rem 0 6rem; } }
.hero h1 { font-size: clamp(3.6rem, 9vw, 6.6rem); line-height: 0.92; margin: 1.1rem 0 1.25rem; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-lede { font-size: 1.125rem; line-height: 1.55; max-width: 32rem; margin-bottom: 1.75rem; }
.hero-lede b { color: var(--ink); font-weight: 600; }

.join { display: flex; gap: 0.6rem; max-width: 30rem; }
.join input {
  flex: 1; min-width: 0; padding: 0.95rem 1rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--rule-2); color: var(--ink);
  font: inherit; font-size: 0.95rem; outline: none; transition: border-color var(--t);
}
.join input::placeholder { color: var(--text-4); }
.join input:focus { border-color: var(--green); }
.join input.bad { border-color: var(--red); }
.join button {
  padding: 0.95rem 1.35rem; border-radius: 12px; white-space: nowrap;
  background: var(--green); color: var(--green-ink); font-weight: 600; font-size: 0.95rem;
  transition: transform var(--t), background var(--t);
}
.join button:hover { transform: translateY(-1px); background: #45d169; }
.join button:disabled { opacity: 0.7; transform: none; }
@media (max-width: 520px) { .join { flex-direction: column; } }
.join-fine { margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-3); }
.join-fine span { margin: 0 0.5rem; opacity: 0.5; }
.join-ok {
  margin-top: 0.9rem; padding: 0.9rem 1rem; border-radius: 12px; font-size: 0.95rem;
  background: var(--green-tint); border: 1px solid var(--rule-green); color: #bff0cc;
}

/* demo board */
.demo { position: relative; border-radius: 28px; padding: 1.6rem; }
@media (max-width: 520px) { .demo { padding: 1.1rem; border-radius: 22px; } }
.demo-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.demo-top .d1 { font-size: 0.8rem; color: var(--text-3); font-weight: 500; }
.sum { display: flex; align-items: baseline; gap: 0.3rem; font-family: var(--font-display); font-weight: 800; font-size: 2.75rem; line-height: 1; color: var(--ink); min-width: 4.4rem; justify-content: flex-end; transition: color var(--t); }
.sum small { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); font-weight: 500; }
.sum.hit { color: var(--green); }
.sum.bust { color: var(--red); }
.board { position: relative; aspect-ratio: 1 / 1; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 0.6rem; height: 100%; }
.tile {
  position: relative; z-index: 1;
  display: grid; place-items: center; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--rule);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.6rem); color: var(--text);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.tile.on { background: var(--green); color: var(--green-ink); border-color: var(--green); transform: scale(1.04); }
.tile.done { background: var(--green-deep); }
.tile.bad { background: var(--red); color: #fff; border-color: var(--red); }
svg.path { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
svg.path polyline { fill: none; stroke: var(--green-ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.5; }
.result { margin-top: 1.1rem; display: flex; align-items: center; justify-content: space-between; min-height: 2.1rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--rule); font-size: 0.8rem; font-weight: 600; color: var(--text);
  opacity: 0; transform: translateY(4px); transition: opacity var(--t), transform var(--t);
}
.badge.show { opacity: 1; transform: none; }
.badge.best { border-color: var(--rule-green); color: #bff0cc; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.badge.best .dot { background: var(--green); }
.caption { font-size: 0.75rem; color: var(--text-3); }

/* ---------- steps ---------- */
.steps { padding: 5rem 0; border-top: 1px solid var(--rule); }
.steps-grid { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 760px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step { border-radius: var(--r); padding: 1.75rem 1.5rem; }
.step .n { font-family: var(--font-display); font-weight: 800; font-size: 2.75rem; line-height: 1; color: var(--green); margin-bottom: 0.9rem; }
.step h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.1rem; line-height: 1.3; margin-bottom: 0.5rem; }
.step p { font-size: 0.95rem; line-height: 1.6; }

/* ---------- share ---------- */
.share { padding: 5rem 0; border-top: 1px solid var(--rule); }
.share-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 860px) { .share-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.stats { display: flex; gap: 2.5rem; margin-top: 2rem; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--ink); }
.stat span { font-size: 0.8rem; color: var(--text-3); }
.card {
  border-radius: 22px; padding: 1.4rem 1.5rem; max-width: 24rem;
  font-family: var(--font-mono); font-size: 0.95rem; line-height: 1.7; color: var(--text);
}
.card .t { font-family: var(--font-sans); font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }
.card .emo { letter-spacing: 2px; font-size: 1.15rem; line-height: 1.35; }
.card .u { color: var(--green); margin-top: 0.5rem; }

/* ---------- faq ---------- */
.faq-section { padding: 5rem 0; border-top: 1px solid var(--rule); }
.faq-list { margin-top: 2.5rem; display: grid; gap: 0.6rem; max-width: 46rem; }
.faq { border-radius: 14px; overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.25rem; font-weight: 600; color: var(--ink); font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--green); font-size: 1.2rem; transition: transform var(--t); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 1.25rem 1.2rem; font-size: 0.95rem; line-height: 1.65; color: var(--text-2); }

/* ---------- closing cta ---------- */
.close-cta { padding: 6rem 0; border-top: 1px solid var(--rule); text-align: center; }
.close-cta h2 { font-size: clamp(3rem, 7vw, 5.5rem); line-height: 0.95; }
.close-cta .lede { margin: 1rem auto 0; }
.close-cta .join { margin: 1.75rem auto 0; }
.close-cta .join-ok { max-width: 30rem; margin-left: auto; margin-right: auto; }

/* ---------- footer ---------- */
.ftr { position: relative; z-index: 2; padding: 3.5rem 0 3rem; border-top: 1px solid var(--rule); background: var(--ground-2); }
.ftr-top { display: grid; gap: 2.5rem; margin-bottom: 3rem; }
@media (min-width: 820px) { .ftr-top { grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); gap: 4rem; } }
.ftr-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.85rem; }
.ftr-brand img { border-radius: 9px; }
.ftr-brand span { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.08em; color: var(--ink); }
.ftr-desc { font-size: 0.875rem; line-height: 1.7; color: var(--text-3); max-width: 32ch; }
.ftr-cols { display: grid; grid-template-columns: repeat(2,1fr); gap: 2rem; }
@media (min-width: 560px) { .ftr-cols { grid-template-columns: repeat(3,1fr); } }
.ftr-h { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-2); margin-bottom: 1rem; }
.ftr-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.ftr-link { font-size: 0.875rem; color: var(--text-3); text-align: left; transition: color var(--t); }
.ftr-link:hover { color: var(--green); }
.ftr-btm {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-top: 1.75rem; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--text-4);
}

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.nf h1 { font-size: clamp(5rem, 18vw, 12rem); line-height: 0.9; color: var(--red); }
.nf p { margin: 0.75rem 0 1.5rem; }
