:root{
  --bg: #ffffff;
  --surface: #f8f9fb;
  --ink: #10121a;
  --ink-soft: #5a5f6e;
  --line: #e6e7eb;
  --accent: #2c5cf0;
  --accent-soft: #eef1ff;
  --accent-ink: #ffffff;
  --danger: #d3372c;
  --success: #2c5cf0;

  --container: 1200px;
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 18px;
  --space-lg: 32px;
  --space-xl: 56px;
  --space-2xl: 80px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(16, 18, 26, 0.04);
  --shadow-md: 0 8px 24px rgba(16, 18, 26, 0.08);
  --shadow-lg: 0 20px 50px rgba(16, 18, 26, 0.14);
}

[data-theme="dark"]{
  --bg: #0b0c10;
  --surface: #13151a;
  --ink: #e8e9ed;
  --ink-soft: #9aa0ac;
  --line: #23262e;
  --accent: #5b8aff;
  --accent-soft: #1a2540;
  --accent-ink: #0b0c10;
  --danger: #f07070;
  --success: #5b8aff;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

html{ scroll-behavior: smooth; }

html, body{
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Header ---------- */
header{
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

header.scrolled{
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.logo{
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-img{
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}

.logo-text{
  letter-spacing: -0.02em;
}

.header-actions{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.status-pill{
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.6);
}

.status-dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0.35; }
}

/* ---------- Layout ---------- */
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

main{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) 0;
}

.stage{
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-bg{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 92vw, 92vh);
  height: min(640px, 92vw, 92vh);
  max-width: 100%;
  object-fit: contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

/* ---------- Hero ---------- */
.eyebrow{
  position: relative;
  z-index: 1;
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: var(--space-lg);
}

h1{
  position: relative;
  z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  color: var(--ink);
}

.lede{
  position: relative;
  z-index: 1;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto var(--space-xl);
}

/* ---------- Countdown ---------- */
.countdown{
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 32px);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.unit{
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 14px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.unit .num{
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.unit .label{
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.colon{
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 4vw, 34px);
  color: var(--line);
  align-self: center;
}

/* ---------- Form ---------- */
form{
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 460px;
  margin: 0 auto var(--space-sm);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

form input[type="email"]{
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 15px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
}

form input[type="email"]::placeholder{
  color: #a7abb6;
}

form button{
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 0 22px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

form button:hover{ background: #1e46d6; }
form button:disabled{ opacity: 0.6; cursor: not-allowed; }
form button:focus-visible,
form input:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.form-note{
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
  min-height: 18px;
}

.form-note.success{ color: var(--success); font-weight: 600; }
.form-note.error{ color: var(--danger); font-weight: 600; }

/* ---------- Categories ---------- */
.categories{
  position: relative;
  z-index: 1;
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.category{
  cursor: pointer;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.category:hover{
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.category-img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: var(--surface);
}

.category-body{
  padding: 22px 20px 24px;
}

.category-body h3{
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--ink);
}

.category-body p{
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
footer{
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 0;
}

.footer-inner{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

.footer-left{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-left a{
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-left a:hover{ color: var(--accent); }

.socials{
  display: flex;
  align-items: center;
  gap: 10px;
}

.socials a{
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.socials a:hover{
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.socials svg{ width: 16px; height: 16px; }

.socials-label{
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 4px;
}

/* ---------- Modal ---------- */
.modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(16, 18, 26, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active{
  opacity: 1;
  visibility: visible;
}

.modal{
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal{
  transform: translateY(0) scale(1);
}

.modal-header{
  position: relative;
  width: 100%;
}

.modal-img{
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  background: var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-close{
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  padding: 0;
}

.modal-close:hover{
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.08);
}

.modal-close svg{
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.modal-body{
  padding: 24px 28px 28px;
}

.modal-body h2{
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--ink);
}

.modal-body p{
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.modal-close-text{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close-text:hover{
  background: var(--ink);
  color: #ffffff;
}

[data-theme="dark"] .modal-close{
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .modal-close:hover{
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .hero-bg{ width: min(560px, 88vw, 88vh); height: min(560px, 88vw, 88vh); }
}

@media (max-width: 640px){
  header{ padding: 14px 18px; }
  .logo{ font-size: 15px; }
  .status-pill span.long{ display: none; }
  main{ padding: var(--space-lg) 0 var(--space-xl); }
  .stage{ max-width: 100%; padding: 0 4px; }
  .hero-bg{ width: min(400px, 88vw, 80vh); height: min(400px, 88vw, 80vh); }
  h1{ font-size: clamp(30px, 8.5vw, 44px); }
  .lede{ font-size: 14.5px; margin-bottom: var(--space-lg); }
  .eyebrow{ font-size: 11px; padding: 5px 12px; }
  footer{ padding: 20px 0; }
  .footer-inner{
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .categories{
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--space-lg);
  }
  .category-img{ height: 160px; }
}

@media (max-width: 420px){
  .colon{ display: none; }
  .countdown{ gap: 10px; }
  .hero-bg{ width: min(300px, 85vw, 70vh); height: min(300px, 85vw, 70vh); }
  h1{ font-size: clamp(28px, 9vw, 36px); }
  .unit{ min-width: 52px; padding: 12px 8px; }
  .unit .num{ font-size: clamp(22px, 6vw, 30px); }
  form{ flex-direction: column; border-radius: var(--radius-md); }
  form input[type="email"]{
    border-bottom: 1px solid var(--line);
    text-align: center;
    padding: 14px 16px;
    font-size: 14.5px;
  }
  form button{ padding: 14px 16px; font-size: 13.5px; }
  .modal{ max-width: 100%; }
  .modal-img{ height: 180px; }
  .modal-body{ padding: 20px 22px 24px; }
  .modal-body h2{ font-size: 19px; }
}

@media (max-width: 340px){
  .hero-bg{ width: min(260px, 82vw, 62vh); height: min(260px, 82vw, 62vh); }
  h1{ font-size: 24px; }
  .unit{ min-width: 44px; }
}

@media (min-width: 1400px){
  .stage{ max-width: 900px; }
  .hero-bg{ width: min(720px, 90vw, 90vh); height: min(720px, 90vw, 90vh); }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .status-dot{ animation: none; }
  .hero-bg{ animation: none !important; }
}

/* ---------- Dark Theme ---------- */
[data-theme="dark"]{
  --bg: #0b0c10;
  --surface: #13151a;
  --ink: #e8e9ed;
  --ink-soft: #9aa0ac;
  --line: #23262e;
  --accent: #5b8aff;
  --accent-soft: #1a2540;
  --accent-ink: #0b0c10;
  --danger: #f07070;
  --success: #5b8aff;
}

[data-theme="dark"] header{
  background: rgba(11, 12, 16, 0.88);
  border-bottom-color: var(--line);
}

[data-theme="dark"] header.scrolled{
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .status-pill{
  background: rgba(11, 12, 16, 0.6);
  border-color: var(--line);
}

[data-theme="dark"] .hero-bg{
  opacity: 0.12;
}

[data-theme="dark"] .eyebrow{
  background: var(--accent-soft);
}

[data-theme="dark"] .unit{
  background: var(--surface);
  border-color: var(--line);
}

[data-theme="dark"] form{
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] form input[type="email"]::placeholder{
  color: #5a5f6e;
}

[data-theme="dark"] form button:hover{
  background: #4a7aff;
}

[data-theme="dark"] .categories{
  --tw-shadow: var(--shadow-sm);
}

[data-theme="dark"] .category{
  background: var(--surface);
  border-color: var(--line);
}

[data-theme="dark"] .category:hover{
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] footer{
  background: var(--surface);
  border-top-color: var(--line);
}

[data-theme="dark"] .footer-inner{
  color: var(--ink-soft);
}

[data-theme="dark"] .socials a{
  background: var(--bg);
  border-color: var(--line);
}

[data-theme="dark"] .modal-overlay{
  background: rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .modal{
  background: var(--surface);
  border: 1px solid var(--line);
}

[data-theme="dark"] .modal-img{
  background: var(--line);
}

[data-theme="dark"] .modal-close{
  border-color: var(--ink);
  color: var(--ink);
}

[data-theme="dark"] .modal-close:hover{
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Theme Toggle ---------- */
.theme-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  margin-left: 8px;
}

.theme-toggle:hover{
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle svg{
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon{
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon{ display: none; }
[data-theme="dark"] .theme-toggle .icon-sun{ display: block; }
[data-theme="light"] .theme-toggle .icon-sun{ display: none; }
[data-theme="light"] .theme-toggle .icon-moon{ display: block; }
