/* =========================================================
   TakeMyMock - styles
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font);
  --primary: #7c5cff;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --ok: #22c55e;
  --bad: #ef4444;
  --warn: #f59e0b;
  --grad: linear-gradient(135deg, #7c5cff 0%, #22d3ee 55%, #f472b6 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 72px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070816;
  --bg-soft: #0e1029;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eceefe;
  --muted: #a0a5c8;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --header-bg: rgba(7, 8, 22, 0.72);
  --tag-1: #c4b5fd;
  --tag-2: #67e8f9;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5fb;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --border: rgba(25, 25, 70, 0.11);
  --text: #14162e;
  --muted: #555b7d;
  --shadow: 0 25px 50px -25px rgba(40, 40, 100, 0.28);
  --header-bg: rgba(244, 245, 251, 0.78);
  --tag-1: #5b3fd6;
  --tag-2: #0e7490;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px 420px at 8% 12%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(520px 420px at 92% 35%, rgba(34, 211, 238, 0.11), transparent 60%),
    radial-gradient(640px 520px at 50% 105%, rgba(244, 114, 182, 0.10), transparent 60%);
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.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: 1rem; top: -100px; z-index: 200;
  padding: 0.6rem 1rem; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #7c5cff, #5b8cff 60%, #22d3ee);
  box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 16px 40px -12px rgba(124, 92, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25); }

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { border-color: rgba(124, 92, 255, 0.6); }

.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-strong); }

.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; }
.btn-small { padding: 0.5rem 0.95rem; font-size: 0.9rem; }
.btn-block { width: 100%; }


.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.icon-btn:hover { border-color: rgba(124, 92, 255, 0.6); }
[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header.scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}

.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
}
.logo-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--grad);
  color: #fff; font-weight: 800;
  box-shadow: 0 8px 20px -6px rgba(124, 92, 255, 0.75);
  transform: perspective(200px) rotateY(-16deg) rotateX(8deg);
  transition: transform 0.4s;
}
.logo:hover .logo-mark { transform: perspective(200px) rotateY(16deg) rotateX(-8deg); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.tagline {
  font-family: var(--font);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

.nav-links { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500; font-size: 0.95rem;
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-strong); }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.nav-toggle { display: none; }
.nav-toggle span {
  display: block; width: 18px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 2rem) 0 5rem;
  overflow: hidden;
  isolation: isolate;
}
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#hero-canvas.ready { opacity: 1; }

.hero-glow {
  position: absolute; right: -10%; top: 12%;
  width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.32), transparent 62%);
  filter: blur(40px);
  z-index: -2;
}

.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 2rem; }
.hero-copy { max-width: 640px; }

.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--muted); font-size: 0.85rem;
  margin-bottom: 1.25rem;
}
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  animation: pulse 2s infinite;
}

.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4.3rem); margin-bottom: 1rem; }
.lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 2.2rem; }

.scroll-hint {
  position: absolute; bottom: 1.5rem; left: 50%;
  translate: -50% 0;
  width: 26px; height: 42px;
  border: 2px solid var(--border); border-radius: 20px;
}
.scroll-hint span {
  position: absolute; top: 8px; left: 50%;
  width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--text);
  animation: scroll 1.8s infinite;
}

/* ---------- Sections & cards ---------- */
.section { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.section-head p { color: var(--muted); }
.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan);
}
[data-theme="light"] .eyebrow { color: #0891b2; }

.card {
  position: relative;
  padding: 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

/* 3D tilt + reveal (reveal uses `translate`, tilt uses `transform`, so they don't fight) */
.reveal { opacity: 0; translate: 0 28px; transition: opacity 0.7s ease, translate 0.7s ease; }
.reveal.visible { opacity: 1; translate: 0 0; }

[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.2s ease-out, border-color 0.25s, opacity 0.7s ease, translate 0.7s ease;
}
[data-tilt]::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.09), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
}
[data-tilt]:hover::after { opacity: 1; }
[data-tilt]:hover { border-color: rgba(124, 92, 255, 0.45); }

/* ---------- Year cards ---------- */
.year-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.year-card { padding: 2rem; overflow: hidden; }
.year-card::before {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.25), transparent 70%);
  pointer-events: none;
}
.year-card-final::before { background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 70%); }
.year-badge {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 3.2rem; line-height: 1;
  margin-bottom: 0.75rem;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.year-card h3 { font-size: 1.4rem; }
.year-card ul { list-style: none; margin: 1.2rem 0 1.6rem; padding: 0; display: grid; gap: 0.55rem; }
.year-card li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--muted); }
.year-card li::before { content: "✓"; color: var(--ok); font-weight: 700; }

/* ---------- Tracks ---------- */
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.track-card { display: flex; flex-direction: column; }
.track-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 16px;
  margin-bottom: 1.1rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  color: #fff;
  background: var(--accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  box-shadow: 0 14px 26px -10px var(--accent);
  transform: perspective(300px) rotateX(12deg) rotateY(-14deg);
  transition: transform 0.4s;
}
.track-card:hover .track-icon { transform: perspective(300px) rotateX(-6deg) rotateY(14deg) scale(1.06); }
.track-card h3 { font-size: 1.15rem; }
.track-card p { flex: 1; color: var(--muted); font-size: 0.95rem; }
.track-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.85rem; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.step-num {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 1rem;
  background: var(--grad); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 12px 24px -10px rgba(124, 92, 255, 0.8);
}

/* ---------- Forms ---------- */
.field { display: grid; gap: 0.5rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 0.95rem; padding: 0; }
.field legend { margin-bottom: 0.5rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18);
}
select option { background: var(--bg-soft); color: var(--text); }
textarea { resize: vertical; line-height: 1.55; }


.consent { display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer; font-size: 0.92rem; color: var(--muted); }
.consent input { flex-shrink: 0; width: 18px; height: 18px; margin-top: 0.2rem; accent-color: var(--primary); }

/* ---------- Registration ---------- */
.book-grid { max-width: 780px; margin-inline: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.4rem; }
.form-grid .full { grid-column: 1 / -1; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reg-success {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}
.reg-success strong { font-family: ui-monospace, Consolas, monospace; color: var(--ok); letter-spacing: 0.04em; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 0.8rem; }
.faq details { padding: 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem;
  cursor: pointer; list-style: none;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--cyan); transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 1.3rem 1.2rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer-inner p { margin: 0.5rem 0 0; font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { color: var(--muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--text); }
.copyright { width: 100%; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 100;
  translate: -50% 20px;
  max-width: calc(100% - 2rem);
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  font-weight: 500; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, translate 0.3s;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- Animations ---------- */
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); } 50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .nav-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute; top: calc(var(--header-h) - 4px); left: 1rem; right: 1rem;
    flex-direction: column;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .nav-links.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .nav-links a { padding: 0.85rem 1rem; font-size: 1rem; border-radius: 12px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy, .lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  #hero-canvas.ready { opacity: 0.45; }

}

@media (max-width: 760px) {
  .year-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { width: min(1180px, 100% - 1.5rem); }
  .steps, .form-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
}

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