/* harfevi.com — Landing page styles
   Design tokens, sections, and responsive rules per design handoff. */

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

:root {
  --bg:          #0b0b1e;
  --bg-2:        #14143a;
  --bg-3:        #1c1c4a;
  --line:        #2a2a5c;
  --yellow:      #FBC02D;
  --yellow-soft: rgba(251, 192, 45, 0.20);
  --green:       #6AAA64;
  --amber:       #C9B458;
  --gray:        #3a3a55;
  --text:        #ECEAFF;
  --muted:       #9696c8;
  --muted-2:     #6c6ca0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
  font-feature-settings: 'ss01' on, 'cv11' on;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

section { scroll-margin-top: 80px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
}

.display {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.muted   { color: var(--muted); }
.muted-2 { color: var(--muted-2); }

/* ── NAV ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
}
.nav-brand {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 22px;
  color: var(--yellow);
  letter-spacing: -0.01em;
}
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 24px; }
.nav-link {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--text); }
.nav-cta {
  background: var(--yellow);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.nav-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ── HERO ────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex; align-items: center;
  padding: 80px 32px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 70%;
  background: radial-gradient(ellipse 60% 50% at 60% 30%, rgba(251, 192, 45, 0.10) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px;
  align-items: center;
  position: relative; z-index: 1;
}
.hero-left { display: flex; flex-direction: column; gap: 24px; }
.hero-eyebrow { margin-bottom: -4px; }
.hero-wordmark {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: clamp(56px, 10vw, 156px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--yellow);
  text-shadow: 0 0 60px rgba(251, 192, 45, 0.25);
}
.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--yellow); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--muted); color: var(--yellow); }
.btn-big { font-size: 17px; padding: 18px 28px; border-radius: 16px; }

.hero-stats {
  display: flex; align-items: center; gap: 32px;
  margin-top: 8px;
}
.hero-stat {
  display: flex; flex-direction: column; gap: 2px;
}
.hero-stat .v {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 36px;
  line-height: 1;
  color: var(--yellow);
}
.hero-stat .l {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hero-stat-divider {
  width: 1px; height: 36px; background: var(--line);
}

.hero-right {
  display: flex; align-items: center; justify-content: center;
}

/* ── Tile grid (hero animation) ─────────────────────────────────── */

.tile-grid {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
}
.tile-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.tile {
  width: 64px; height: 64px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 32px;
  color: var(--text);
  border: 2px solid transparent;
  transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.tile.empty   { background: transparent;  border-color: var(--line); }
.tile.filled  { background: #1a1a3e;      border-color: #3a3a6e; }
.tile.correct { background: var(--green); color: white; }
.tile.present { background: var(--amber); color: #1a1a30; }
.tile.absent  { background: var(--gray); }
.tile.yellow  { background: var(--yellow); color: var(--bg); }
.tile.reveal  { transform: rotateX(0deg); animation: tile-flip 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes tile-flip {
  0%   { transform: rotateX(0deg); }
  50%  { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

/* ── MODES ──────────────────────────────────────────────────────── */

.section { padding: 100px 32px; }
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
  display: flex; flex-direction: column; gap: 12px;
  align-items: center;
}
.section-title {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-title em { font-style: normal; color: var(--yellow); }
.section-sub { font-size: 17px; color: var(--muted); max-width: 540px; }

.mode-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.mode-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.mode-card:hover { transform: translateY(-4px); border-color: rgba(251, 192, 45, 0.4); }
.mode-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.mode-card-icon { flex-shrink: 0; }
.mode-card-badge {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--yellow);
  padding: 4px 10px;
  border-radius: 999px;
}
.mode-card-title {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 28px;
  line-height: 1;
  color: var(--text);
}
.mode-card-desc { font-size: 15px; color: var(--muted); }
.mode-card-bg {
  position: absolute;
  right: -20px; bottom: -20px;
  width: 160px; height: 160px;
  opacity: 0.06;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}

/* ── HOW IT WORKS ───────────────────────────────────────────────── */

.how {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.how-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
.how-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.how-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--yellow);
}
.how-title {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 28px;
  color: var(--text);
  line-height: 1;
}
.how-desc { font-size: 15px; color: var(--muted); }

/* ── LEADERBOARD ────────────────────────────────────────────────── */

.lb-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.lb-list {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px;
}
.lb-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 12px;
}
.lb-row + .lb-row { margin-top: 2px; }
.lb-rank {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 14px;
}
.lb-rank.top { background: var(--yellow); color: var(--bg); }
.lb-rank.mid { background: var(--bg-3); color: var(--muted); }
.lb-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.lb-name .sen {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  background: var(--yellow);
  color: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
}
.lb-streak {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--muted-2);
}
.lb-score {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 18px;
  color: var(--text);
}
.lb-row.you {
  background: var(--yellow-soft);
  border: 1px solid var(--yellow);
}
.lb-row.you .lb-name,
.lb-row.you .lb-score { color: var(--yellow); }

/* ── FINAL CTA ──────────────────────────────────────────────────── */

.final {
  position: relative;
  text-align: center;
  padding: 100px 32px;
  overflow: hidden;
}
.final::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(251, 192, 45, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.final-inner {
  max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 20px; align-items: center;
  position: relative; z-index: 1;
}
.final-headline {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--yellow);
}
.final-sub { font-size: 17px; color: var(--muted); }

/* ── FOOTER ─────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 48px 32px 32px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 24px;
  color: var(--yellow);
  margin-bottom: 8px;
}
.footer-blurb { font-size: 14px; color: var(--muted-2); max-width: 280px; }
.footer-col-h {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  color: var(--muted-2);
  font-size: 14px;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted-2);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .section { padding: 64px 20px; }
  .hero { padding: 64px 20px; min-height: auto; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-right { order: -1; }    /* grid above wordmark on mobile */
  .nav-links { display: none; }
  .nav-inner { padding: 14px 20px; }
  .hero-buttons .btn { flex: 1; }
  .hero-stats { gap: 24px; }
  .hero-stat .v { font-size: 28px; }
  .how-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .tile { width: 50px; height: 50px; font-size: 24px; }
}

@media (max-width: 520px) {
  .section { padding: 56px 16px; }
  .hero-wordmark { font-size: 56px; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn { width: 100%; }
  .tile-grid { transform: scale(0.78); transform-origin: center top; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stat-divider { display: none; }
}

@media (max-width: 380px) {
  .hero-wordmark { font-size: 48px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
