/**
 * Prelaunch Website Template - Modern Architecture Stylesheet
 * 
 * Includes 3 layout presets (centered-minimalist, split-screen, elegant-gradient),
 * dark/light theme tokens, responsive fluid typography, zero-CLS countdown cards,
 * accessible focus states, and reduced-motion support.
 */

:root {
  /* Color Palette - Dark Theme Defaults (Obsidian & Precision Slate) */
  --bg-canvas: #08090d;
  --bg-surface: rgba(18, 21, 30, 0.65);
  --bg-surface-hover: rgba(26, 31, 44, 0.8);
  --bg-card: rgba(15, 18, 26, 0.75);
  --bg-badge: rgba(255, 255, 255, 0.05);
  --bg-input: rgba(12, 14, 20, 0.8);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-focus: #38bdf8;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-label: #cbd5e1;

  --accent-primary: #38bdf8;
  --accent-primary-hover: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.12);
  --accent-live: #10b981;
  --accent-error: #f43f5e;

  /* Typography Stack */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Geometry & Radius */
  --radius-card: 14px;
  --radius-btn: 10px;
  --radius-pill: 9999px;

  /* Spacing Scale */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;

  /* Motion & Transitions */
  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode Overrides */
html[data-theme="light"],
[data-theme="light"] body {
  --bg-canvas: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-hover: #ffffff;
  --bg-card: #ffffff;
  --bg-badge: rgba(0, 0, 0, 0.04);
  --bg-input: #ffffff;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(0, 0, 0, 0.16);
  --border-focus: #0284c7;

  --text-primary: #090d16;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-label: #334155;

  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.12);
  --accent-live: #059669;
  --accent-error: #e11d48;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-family-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* ==========================================================================
   BACKGROUND LAYERS & AMBIENT GLOW
   ========================================================================== */

.background-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.background-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 25%, transparent 80%);
  opacity: 0.6;
}

.background-glow {
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 140vw);
  height: 650px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, rgba(99, 102, 241, 0.04) 45%, transparent 75%);
  filter: blur(90px);
}

/* ==========================================================================
   PAGE SHELL & CONTAINER
   ========================================================================== */

.page-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

@media (min-width: 768px) {
  .page-shell {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
  }
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: var(--space-xl);
  gap: var(--space-md);
}

.brand-identity {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
  border-radius: var(--radius-btn);
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.brand-logo-img {
  max-height: 32px;
  max-width: 140px;
  object-fit: contain;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Badge / Status Pill */
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-badge);
  border: 1px solid var(--border-highlight);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.brand-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

.brand-badge.badge-live::before {
  background-color: var(--accent-live);
  box-shadow: 0 0 8px var(--accent-live);
}

/* ==========================================================================
   HERO TYPOGRAPHY & COPY
   ========================================================================== */

.hero-typography {
  display: flex;
  flex-direction: column;
  align-items: inherit;
  width: 100%;
}

.hero-headline {
  font-size: clamp(2.1rem, 5.5vw, 3.85rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-wrap: balance;
}

.hero-subheadline {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 560px;
  text-wrap: pretty;
}

.hero-description {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

/* ==========================================================================
   LAYOUT PRESET 1: CENTERED MINIMALIST (Default)
   ========================================================================== */

.layout-centered-minimalist .hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto 0;
  padding: var(--space-md) 0 var(--space-xl);
  max-width: 820px;
  align-self: center;
  width: 100%;
}

.layout-centered-minimalist .hero-subheadline,
.layout-centered-minimalist .hero-description {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   LAYOUT PRESET 2: SPLIT SCREEN
   ========================================================================== */

.layout-split-screen .split-layout-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin: auto 0;
  padding: var(--space-md) 0;
  width: 100%;
}

@media (min-width: 900px) {
  .layout-split-screen .split-layout-container {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-2xl);
  }

  .layout-split-screen .split-col-primary {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .layout-split-screen .split-col-primary .hero-subheadline {
    margin-left: 0;
  }

  .layout-split-screen .split-col-social-desktop {
    display: block;
    margin-top: var(--space-lg);
  }

  .layout-split-screen .split-col-social-mobile {
    display: none;
  }
}

@media (max-width: 899px) {
  .layout-split-screen .split-col-social-desktop {
    display: none;
  }

  .layout-split-screen .split-col-social-mobile {
    display: flex;
    justify-content: center;
    margin-top: var(--space-lg);
  }
}

.split-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-xl) var(--space-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ==========================================================================
   LAYOUT PRESET 3: ELEGANT GRADIENT
   ========================================================================== */

.layout-elegant-gradient .background-glow {
  width: min(1300px, 160vw);
  height: 800px;
  background: radial-gradient(circle at 50% 30%, var(--accent-glow) 0%, rgba(168, 85, 247, 0.08) 35%, rgba(59, 130, 246, 0.04) 60%, transparent 80%);
  filter: blur(100px);
}

.layout-elegant-gradient .hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto 0;
  padding: var(--space-md) 0 var(--space-xl);
  max-width: 840px;
  align-self: center;
  width: 100%;
}

.gradient-glass-card {
  width: 100%;
  max-width: 680px;
  margin: var(--space-md) 0 var(--space-xl);
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(145deg, var(--bg-surface), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-highlight);
  border-radius: calc(var(--radius-card) + 4px);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   COUNTDOWN TIMER SECTION & CARDS
   ========================================================================== */

.countdown-section {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.countdown-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.countdown-grid {
  display: grid;
  gap: var(--space-sm);
  width: 100%;
}

.countdown-grid.count-4 {
  grid-template-columns: repeat(4, 1fr);
}

.countdown-grid.count-3 {
  grid-template-columns: repeat(3, 1fr);
}

.countdown-grid.count-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .countdown-grid {
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .countdown-grid.count-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
}

/* Countdown Individual Card */
.countdown-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), background-color var(--transition-smooth);
}

@media (min-width: 640px) {
  .countdown-card {
    padding: var(--space-lg) var(--space-sm);
  }
}

.countdown-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.countdown-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

/* Tabular Numeric Values */
.countdown-value {
  font-family: var(--font-family-base);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  margin-bottom: 6px;
  min-height: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-unit {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Live Post-Launch Banner */
.live-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 580px;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: fadeInLive var(--transition-smooth) forwards;
}

@keyframes fadeInLive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-live);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-badge svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.live-headline {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.live-subheadline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.live-cta-wrapper {
  margin-top: var(--space-sm);
}

/* ==========================================================================
   CALL TO ACTION (CTA) BUTTONS
   ========================================================================== */

.cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  width: 100%;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cta-primary {
  background-color: var(--text-primary);
  color: var(--bg-canvas);
  border: 1px solid transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cta-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cta-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-highlight);
}

.cta-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.cta-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.cta-outline:hover {
  border-color: var(--text-primary);
  background: var(--bg-badge);
}

.cta-external-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

/* ==========================================================================
   EMAIL SIGNUP FORM
   ========================================================================== */

.email-signup-container {
  width: 100%;
  max-width: 480px;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.signup-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.email-signup-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
}

.input-action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

@media (min-width: 520px) {
  .input-action-group {
    flex-direction: row;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-btn);
    padding: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: border-color var(--transition-fast);
  }

  .input-action-group:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--accent-glow);
  }

  .signup-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
}

.signup-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.signup-input::placeholder {
  color: var(--text-muted);
}

.signup-submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background-color: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.signup-submit-btn:hover:not(:disabled) {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.signup-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner-icon {
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.signup-feedback {
  font-size: 0.82rem;
  padding: 4px 0;
  min-height: 1.5em;
  text-align: center;
}

.signup-feedback.success {
  color: var(--accent-live);
  font-weight: 500;
}

.signup-feedback.error {
  color: var(--accent-error);
  font-weight: 500;
}

.signup-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-2xs);
}

.placeholder-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px dashed var(--border-highlight);
  border-radius: var(--radius-btn);
  text-align: left;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.placeholder-notice svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--accent-primary);
  margin-top: 2px;
}

/* ==========================================================================
   SOCIAL LINKS
   ========================================================================== */

.social-links-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.social-icon-link:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.social-icon-link svg {
  width: 17px;
  height: 17px;
}

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

.site-footer {
  width: 100%;
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    text-align: left;
  }
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links-group {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-nav-link:hover {
  color: var(--text-primary);
}

.footer-link-divider {
  font-size: 0.7rem;
  color: var(--border-subtle);
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-live);
}

/* ==========================================================================
   ACCESSIBILITY UTILITIES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

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

  .countdown-card:hover,
  .cta-button:hover,
  .social-icon-link:hover {
    transform: none !important;
  }
}
