/* ============================================================
   DataCruise Arcade — Hub stylesheet
   Bright / orange / black aesthetic, with a quieter cool palette
   for the Word Games section so the two series feel distinct.
============================================================ */

:root {
  --bg:        #fff8f1;
  --ink:       #0e0e10;
  --ink-soft:  #3a3a40;
  --muted:     #6b6b73;

  --orange:    #ff6a00;
  --orange-dk: #d75200;
  --yellow:    #ffc94d;

  --blue:      #2563eb;
  --teal:      #0ea5a4;
  --lilac:     #a78bfa;

  --card:      #ffffff;
  --line:      #1a1a1f;
  --shadow:    0 6px 0 0 var(--line);
  --shadow-hover: 0 10px 0 0 var(--line);

  --radius:    14px;
  --font:      ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }

/* ===================== HERO ===================== */

.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 80% -10%, #ffd07a 0%, transparent 60%),
    radial-gradient(900px 500px at 10% 110%, #ffb060 0%, transparent 55%),
    var(--bg);
  border-bottom: 3px solid var(--line);
  overflow: hidden;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 28px 72px;
  text-align: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 18px;
  margin-bottom: 28px;
}
.logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--line);
}
.logo-text em {
  font-style: normal;
  color: var(--orange-dk);
}

.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 auto 18px;
  max-width: 18ch;
}
.hero h1 .hl {
  display: inline-block;
  background: var(--yellow);
  padding: 0 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  transform: rotate(-1deg);
}

.tagline {
  max-width: 56ch;
  margin: 0 auto 28px;
  font-size: 18px;
  color: var(--ink-soft);
}

.hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 14px 22px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  box-shadow: var(--shadow);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 0 var(--line);
}

.btn-primary { background: var(--orange); color: white; }
.btn-ghost   { background: white; color: var(--ink); }

/* ===================== SECTIONS ===================== */

.games-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 28px 32px;
}

.section-chart { /* default orange context */ }

.section-word {
  background: linear-gradient(180deg, #f4f1ff 0%, var(--bg) 100%);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  margin-top: 48px;
}
.section-word > .section-header,
.section-word > .card-grid {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-dk);
  background: white;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}
.section-word .section-tag {
  color: var(--blue);
  background: white;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.section-header p {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 17px;
}

/* ===================== CARDS ===================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.game-card:hover .card-preview {
  transform: scale(1.04);
}
.game-card:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 0 var(--line);
}

.card-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 2px solid var(--line);
  background: #fff;
  transition: transform 220ms ease;
}

.card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px 16px;
}

.game-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.game-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  flex: 1;
  line-height: 1.35;
}

.card-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--yellow);
  color: var(--ink);
  margin-top: 2px;
}

.game-card.word .card-chip {
  background: #ddd6fe;
}

/* ===================== ABOUT ===================== */

.about {
  max-width: 800px;
  margin: 48px auto 0;
  padding: 32px 28px 64px;
  text-align: center;
}
.about h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.about p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 8px;
}
.about .small {
  font-size: 14px;
  color: var(--muted);
}

/* ===================== FOOTER ===================== */

footer {
  border-top: 3px solid var(--line);
  background: white;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 28px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer-inner a:hover { color: var(--orange-dk); }
.footer-inner .dot { margin: 0 6px; color: var(--muted); }

/* ===================== HERO META STRIP ===================== */

.hero-meta {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  background: white;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow);
  font-size: 14px;
}
.hero-meta.is-unlocked { background: #e7f7e8; }
.hero-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}
.hero-meta-icon { font-size: 16px; }
.hero-meta-action {
  background: var(--orange);
  color: white;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 3px 0 0 var(--line);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.hero-meta-action:hover { transform: translateY(-1px); box-shadow: 0 4px 0 0 var(--line); }
.hero-meta-action:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--line); }
.hero-meta-action.is-unlocked { background: #0ea5a4; }

/* ===================== LOCKED / FREE CARD STATES ===================== */

.game-card { position: relative; }

.card-free-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #0ea5a4;
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid var(--line);
  box-shadow: 0 2px 0 0 var(--line);
  z-index: 2;
}

.card-lock-badge {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(14, 14, 16, 0.62);
  color: white;
  z-index: 3;
  pointer-events: none;
}
.card-lock-icon { font-size: 28px; line-height: 1; }
.card-lock-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--orange);
  border: 2px solid var(--line);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 0 0 var(--line);
}

.game-card.is-locked .card-preview { filter: saturate(0.6) brightness(0.9); }
.game-card.is-locked h3 { color: var(--muted); }

/* ===================== UNLOCK MODAL ===================== */

.unlock-modal {
  width: min(440px, calc(100% - 32px));
  max-width: 440px;
  padding: 28px;
  border: 3px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 0 0 var(--line);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}
.unlock-modal::backdrop {
  background: rgba(14, 14, 16, 0.6);
}

.unlock-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: white;
  font-size: 18px;
  font-weight: 900;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 0 0 var(--line);
}
.unlock-close:hover { transform: translateY(-1px); }

.unlock-modal h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.unlock-blurb {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 15px;
}

.unlock-section {
  background: white;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.unlock-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}
.unlock-section form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.unlock-section input[type="text"] {
  flex: 1 1 100%;
  min-width: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
}
.unlock-section input[type="text"]::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
.unlock-section form .btn {
  flex: 0 0 auto;
}
.unlock-section input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--yellow);
}
.unlock-section input[type="text"]:disabled {
  opacity: 0.6;
}
.unlock-section .btn {
  padding: 10px 18px;
  font-size: 14px;
  box-shadow: 0 3px 0 0 var(--line);
}

.unlock-error {
  margin: 10px 0 0;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
}

.unlock-divider {
  position: relative;
  text-align: center;
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.unlock-divider span {
  background: var(--bg);
  padding: 0 10px;
  position: relative;
  z-index: 1;
}
.unlock-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  opacity: 0.2;
}

.unlock-price {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--ink-soft);
}
.unlock-price strong {
  font-size: 26px;
  color: var(--ink);
  font-weight: 900;
}

.unlock-buy {
  display: block;
  text-align: center;
  width: 100%;
}

.unlock-small {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

[data-unlock-view="success"],
[data-unlock-view="manage"] {
  text-align: center;
}
.unlock-success-icon {
  font-size: 48px;
  margin-bottom: 4px;
}
[data-unlock-view="manage"] .unlock-section { text-align: left; }
[data-unlock-view="manage"] .unlock-blurb { margin-bottom: 14px; }

.unlock-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.unlock-key-row code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.unlock-key-toggle {
  background: white;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 3px 0 0 var(--line);
  cursor: pointer;
  flex-shrink: 0;
}
.unlock-key-toggle:hover { transform: translateY(-1px); box-shadow: 0 4px 0 0 var(--line); }
.unlock-key-toggle:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--line); }

.unlock-danger { border-color: #c2410c33; }
.unlock-danger h3 { color: #b91c1c; }
.unlock-signout {
  background: white;
  color: #b91c1c;
  margin-top: 6px;
}

.unlock-done { margin-top: 6px; width: 100%; }

/* ===================== RESPONSIVE ===================== */

@media (max-width: 480px) {
  .hero-inner { padding: 40px 18px 56px; }
  .games-section { padding: 48px 18px 24px; }
  .section-word > .section-header,
  .section-word > .card-grid {
    padding-left: 18px;
    padding-right: 18px;
  }
}
