/* =============================================================
   MATCHDAY — Design System
   Liquid glass · light + dark · Apple-grade motion
   Fonts: Clash Display (headings) + Satoshi (body) via Fontshare
   ============================================================= */
@import url("https://api.fontshare.com/v2/css?f[]=clash-display@600,700&f[]=satoshi@400,500,700,900&display=swap");

/* ---------- Tokens: shared ---------- */
:root {
  --accent-from: #22d38a;
  --accent-to: #0d9d63;
  --accent: #12b981;
  --accent-ink: #ffffff;
  --gold: #f5b642;
  --good: #22c55e;
  --warn: #f59e0b;
  --hot: #ff5c7a;

  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 30px;
  --glass-blur: 22px;
  --maxw: 1200px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Clash Display", var(--font);
}

/* ---------- Dark theme (default) ---------- */
:root, :root[data-theme="dark"] {
  --bg: #05070b;
  --bg-2: #0a0d14;
  --surface: rgba(255, 255, 255, 0.07);
  --surface-2: rgba(255, 255, 255, 0.11);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-strong: rgba(255, 255, 255, 0.17);
  --text: #f4f6fb;
  --text-dim: #aab2c5;
  --text-faint: #737c92;
  --shadow-soft: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 24px 70px -20px rgba(0, 0, 0, 0.75);
  --nav-bg: rgba(9, 11, 18, 0.86);
  --nav-bg-scroll: rgba(9, 11, 18, 0.96);
  --sheen: rgba(255, 255, 255, 0.4);
  --field-bg: rgba(0, 0, 0, 0.35);
  --aurora-1: rgba(34, 211, 138, 0.20);
  --aurora-2: rgba(13, 157, 99, 0.16);
  --aurora-3: rgba(245, 182, 66, 0.08);
  --dot-grid: rgba(255, 255, 255, 0.05);
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-2: #eaeef4;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-2: rgba(255, 255, 255, 0.97);
  --stroke: rgba(12, 20, 34, 0.08);
  --stroke-strong: rgba(12, 20, 34, 0.16);
  --text: #0d1424;
  --text-dim: #47506a;
  --text-faint: #8a92a6;
  --shadow-soft: 0 10px 34px -14px rgba(16, 30, 54, 0.28);
  --shadow-pop: 0 26px 60px -22px rgba(16, 30, 54, 0.35);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-bg-scroll: rgba(255, 255, 255, 0.97);
  --sheen: rgba(255, 255, 255, 0.9);
  --field-bg: rgba(255, 255, 255, 0.7);
  --aurora-1: rgba(34, 211, 138, 0.18);
  --aurora-2: rgba(13, 157, 99, 0.12);
  --aurora-3: rgba(245, 182, 66, 0.10);
  --dot-grid: rgba(12, 20, 34, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.4s var(--ease);
}

/* Ambient aurora background */
.aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(60% 55% at 15% 8%, var(--aurora-1), transparent 60%),
    radial-gradient(55% 55% at 92% 12%, var(--aurora-2), transparent 60%),
    radial-gradient(70% 60% at 50% 110%, var(--aurora-3), transparent 60%),
    var(--bg);
  transition: background 0.5s var(--ease);
}
.aurora::after {
  content: ""; position: absolute; inset: -10%;
  background-image: radial-gradient(var(--dot-grid) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 80%);
  opacity: 0.5;
}

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

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(52px, 9vw, 130px) 0; position: relative; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 0.4em; font-weight: 600; letter-spacing: -0.01em; line-height: 1.04; }
h1 { font-size: clamp(2.4rem, 6.2vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(1.85rem, 4vw, 3.1rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.7rem); }
p { margin: 0 0 1em; color: var(--text-dim); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
  padding: 7px 14px; border-radius: 100px; background: var(--surface); border: 1px solid var(--stroke);
}
.lead { font-size: clamp(1.02rem, 1.8vw, 1.28rem); color: var(--text-dim); max-width: 60ch; }
.grad-text { background: linear-gradient(100deg, var(--accent-from), var(--accent-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-faint); }

/* ---------- Glass primitive ---------- */
.glass {
  position: relative; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 var(--sheen);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, var(--sheen), rgba(255,255,255,0.02) 30%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.5; pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 100px; font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em;
  border: 1px solid transparent; color: var(--text);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(100deg, var(--accent-from), var(--accent-to)); color: var(--accent-ink); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -12px var(--accent); }
.btn-ghost { background: var(--surface); border-color: var(--stroke); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--stroke-strong); transform: translateY(-2px); }
.btn-wa { background: #1fab5a; color: #fff; box-shadow: 0 10px 30px -12px rgba(31,171,90,0.7); }
.btn-wa:hover { transform: translateY(-2px); background: #23bf64; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Chips / badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.03em;
  padding: 5px 11px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--stroke); color: var(--text-dim);
}
.badge.hot { color: #ff5c7a; background: rgba(255,92,122,0.12); border-color: rgba(255,92,122,0.3); }
.badge.good { color: var(--good); background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3); }
.badge.warn { color: var(--warn); background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.hot .dot { animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,92,122,0.6); } 70% { box-shadow: 0 0 0 8px rgba(255,92,122,0); } 100% { box-shadow: 0 0 0 0 rgba(255,92,122,0); } }

/* ---------- Navbar ---------- */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; pointer-events: none; }
.nav-inner {
  pointer-events: auto; width: min(var(--maxw), calc(100% - 28px)); display: flex; align-items: center; gap: 14px;
  padding: 9px 10px 9px 18px; border-radius: 100px; background: var(--nav-bg); border: 1px solid var(--stroke);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-soft); transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.scrolled .nav-inner { background: var(--nav-bg-scroll); box-shadow: var(--shadow-pop); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 1.08rem; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.82rem; box-shadow: 0 6px 18px -6px var(--accent);
}
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { padding: 9px 13px; border-radius: 100px; font-size: 0.9rem; color: var(--text-dim); transition: color 0.25s, background 0.25s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-tools { display: flex; align-items: center; gap: 7px; }

/* icon button (theme toggle) */
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--stroke); color: var(--text-dim); transition: 0.25s var(--ease); flex-shrink: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* language switcher */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 100px; font-size: 0.85rem; background: var(--surface); border: 1px solid var(--stroke); color: var(--text-dim); transition: 0.25s; }
.lang-btn:hover { background: var(--surface-2); color: var(--text); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 180px; padding: 7px; border-radius: 16px;
  background: var(--nav-bg-scroll); border: 1px solid var(--stroke); backdrop-filter: blur(20px); box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(-8px) scale(0.98); pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); z-index: 20;
}
.lang.open .lang-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; background: none; border: 0; color: var(--text-dim); font-size: 0.92rem; transition: 0.2s; }
.lang-menu button:hover { background: var(--surface-2); color: var(--text); }
.lang-menu button.active { color: var(--text); }
.lang-menu button .flag { font-size: 1.15rem; }

.nav-burger { display: none; background: var(--surface); border: 1px solid var(--stroke); color: var(--text); padding: 9px 15px; border-radius: 100px; font-size: 0.85rem; font-weight: 600; align-items: center; justify-content: center; }
@media (max-width: 940px) {
  .nav-links { position: fixed; inset: 78px 14px auto 14px; flex-direction: column; align-items: stretch; padding: 12px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: 0.3s var(--ease); }
  .nav.menu-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 13px 16px; font-size: 1rem; }
  .nav-burger { display: flex; }
  .brand .mark { display: none; }
  .brand span.full { display: inline-block; background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); color: #fff; padding: 6px 14px; border-radius: 100px; font-size: 0.92rem; letter-spacing: 0.02em; box-shadow: 0 6px 16px -6px var(--accent); }
  .nav-cta { display: none; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--stroke); padding: 60px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; }
.footer h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.footer a { display: block; color: var(--text-dim); padding: 5px 0; font-size: 0.94rem; transition: color 0.2s; }
.footer a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--stroke); color: var(--text-faint); font-size: 0.84rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; } .reveal.d4 { transition-delay: 0.32s; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

/* Card */
.card { padding: 20px; border-radius: var(--radius); transition: transform 0.5s var(--ease), border-color 0.4s; }
.card.link:hover { transform: translateY(-6px); border-color: var(--stroke-strong); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-teams { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em; }
.card-meta { color: var(--text-faint); font-size: 0.88rem; }
.card-price { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.02em; }
.card-price small { font-family: var(--font); font-weight: 500; font-size: 0.8rem; color: var(--text-faint); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; flex-wrap: wrap; }

/* Copy field */
.copy-field { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 14px; background: var(--field-bg); border: 1px solid var(--stroke); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9rem; }
.copy-field code { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.copy-btn { flex-shrink: 0; }

/* toast */
.toast-host { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; width: max-content; max-width: 90vw; }
.toast { padding: 12px 20px; border-radius: 100px; font-size: 0.92rem; font-weight: 550; background: var(--nav-bg-scroll); border: 1px solid var(--stroke-strong); color: var(--text); backdrop-filter: blur(14px); box-shadow: var(--shadow-pop); animation: toastIn 0.4s var(--ease-out); }
.toast.ok { border-color: rgba(34,197,94,0.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* section head */
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ---------- Form controls (shared) ---------- */
.input, .textarea, .select {
  width: 100%; padding: 13px 15px; border-radius: 13px; background: var(--field-bg); border: 1px solid var(--stroke);
  color: var(--text); font-family: inherit; font-size: 0.96rem; line-height: 1.4;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.textarea { resize: vertical; min-height: 130px; }
.select { appearance: auto; }
.field-group { margin-bottom: 16px; text-align: left; }
.field-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }

/* ---------- Icon-free helpers ---------- */
/* No icons anywhere: these keep old markup harmless + provide
   typographic substitutes (number badges, meta rows). */
.ic-svg { display: none; }
.meta-ic { display: inline-flex; align-items: center; gap: 6px; }

/* number badge used in feature / step cards */
.num-badge {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 8%, transparent));
  border: 1px solid var(--stroke); color: var(--accent);
}
.num-badge.lg { width: 58px; height: 58px; border-radius: 16px; font-size: 1.4rem; }

/* pill buttons in the nav (theme / language) */
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 100px;
  font-size: 0.85rem; font-weight: 600; background: var(--surface); border: 1px solid var(--stroke); color: var(--text-dim);
  transition: background 0.25s, color 0.25s; white-space: nowrap;
}
.pill-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface); border: 1px solid var(--stroke); color: var(--text-dim); transition: background 0.25s, color 0.25s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.pill-btn.caret::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: 0.7; }
.lang-menu .lang-code { display: inline-block; min-width: 24px; font-weight: 700; font-size: 0.78rem; color: var(--text-faint); }
.lang-menu button.active .lang-code { color: var(--accent); }

/* utility */
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
.spacer { flex: 1; }
.hide { display: none !important; }
hr.sep { border: 0; border-top: 1px solid var(--stroke); margin: 22px 0; }

/* RTL */
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .footer-bottom { direction: rtl; }

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .section-head { margin-bottom: 30px; }
  .btn-lg { padding: 14px 22px; font-size: 1rem; }
  .toast-host { bottom: 16px; }
}
