/* ============================================================================
   TripTiger Landing Page — Custom Styles
   ============================================================================ */

/* ---------- Self-hosted fonts (GDPR-compliant) ---------- */
/* DM Sans — variable weight 300-700, latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Sans — variable weight 300-700, latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Space Mono — 700, latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Space Mono — 700, latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

:root {
  --indigo:  #6366f1;
  --indigo-dark: #4f46e5;
  --orange:  #f97316;
  --orange-light: #fb923c;
  --bg:      #fafaf9;
  --surface: #ffffff;
  --text:    #1c1917;
  --muted:   #78716c;
  --border:  #e7e5e4;
  --radius:  12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0c0a09;
    --surface: #1c1917;
    --text:    #fafaf9;
    --muted:   #a8a29e;
    --border:  #292524;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Skip nav (a11y) ---------- */
.skip-nav {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--indigo);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
}
.skip-nav:focus { left: 8px; }

/* ---------- Noise overlay ---------- */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ---------- Fade-in animation ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger delays */
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }
.delay-6 { animation-delay: 0.48s; }

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger .reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal-stagger .reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal-stagger .reveal:nth-child(4) { transition-delay: 0.21s; }
.reveal-stagger .reveal:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger .reveal:nth-child(6) { transition-delay: 0.35s; }

/* ---------- Hero gradient orbs ---------- */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.25;
}

.hero-glow-1 {
  width: 500px; height: 500px;
  top: -150px; right: -100px;
  background: var(--indigo);
}
.hero-glow-2 {
  width: 400px; height: 400px;
  bottom: -100px; left: -80px;
  background: var(--orange);
  opacity: 0.18;
}

@media (prefers-color-scheme: dark) {
  .hero-glow { opacity: 0.12; }
}

/* ---------- Gradient text ---------- */
.gradient-text {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Email form ---------- */
.email-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  width: 100%;
}

.email-input {
  flex: 1;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.email-input::placeholder { color: var(--muted); }
.email-input:focus { border-color: var(--indigo); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  background: var(--indigo);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  position: relative;
}
.btn-primary:hover { background: var(--indigo-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* Loading spinner inside button */
.btn-primary .spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.btn-primary.loading .spinner { display: inline-block; }
.btn-primary.loading .btn-text { opacity: 0.6; }

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

/* Form feedback */
.form-feedback {
  margin-top: 10px;
  font-size: 14px;
  min-height: 20px;
}
.form-feedback.success { color: #16a34a; }
.form-feedback.error { color: #dc2626; }

/* ---------- Feature cards ---------- */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -8px rgba(99, 102, 241, 0.12);
}

@media (prefers-color-scheme: dark) {
  .feature-card:hover {
    box-shadow: 0 12px 40px -8px rgba(99, 102, 241, 0.2);
  }
}

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }

/* ---------- Step circles ---------- */
.step-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}

/* Step connector line */
.step-connector {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--indigo), var(--orange));
  margin: 0 auto;
  border-radius: 999px;
  opacity: 0.3;
}

/* ---------- Counter ticker ---------- */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ---------- Responsive email form on small screens ---------- */
@media (max-width: 480px) {
  .email-form {
    flex-direction: column;
  }
  .btn-primary {
    justify-content: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-glow { display: none; }
}
