/* ===== Base ===== */
:root {
  --bg: #050505;
  --surface: #0E0E0E;
  --border: #1A1A1A;
  --text: #FFFFFF;
  --muted: #8A8A8A;
  --secondary: #D9D9D9;
  --accent: #FF3B30;
  --accent-2: #FF6259;
  --accent-soft: #FF8E87;
  --success: #00D084;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; }

/* ===== Preloader ===== */
#preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-orb {
  width: 56px; height: 56px; border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), var(--accent) 60%, transparent 80%);
  box-shadow: 0 0 60px rgba(255,59,48,.5);
  animation: pulseGlow 1.4s ease-in-out infinite;
}

/* ===== Reveal animations ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }

/* ===== Keyframes ===== */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(.5deg); }
}
@keyframes floatAlt {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(10px) rotate(-.5deg); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,.55), 0 0 30px rgba(255,59,48,.4); }
  50% { box-shadow: 0 0 0 14px rgba(255,59,48,0), 0 0 60px rgba(255,59,48,.65); }
}
@keyframes gradientShift {
  0%, 100% { transform: translate3d(-5%, -10%, 0) scale(1); opacity: .55; }
  50% { transform: translate3d(5%, 10%, 0) scale(1.15); opacity: .8; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-float { animation: float 7s ease-in-out infinite; }
.animate-float-alt { animation: floatAlt 8s ease-in-out infinite; }
.animate-float-slow { animation: float 11s ease-in-out infinite; }
.animate-pulse-glow { animation: pulseGlow 2.4s ease-in-out infinite; }
.animate-gradient { animation: gradientShift 12s ease-in-out infinite; }
.animate-spin-slow { animation: spin 18s linear infinite; }

/* ===== Type cursor ===== */
.type-cursor::after {
  content: '▍';
  color: var(--accent);
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .95rem 1.75rem;
  background: linear-gradient(135deg, #FF3B30 0%, #FF6259 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  transition: transform .25s ease, box-shadow .3s ease, filter .25s;
  box-shadow: 0 10px 40px -10px rgba(255,59,48,.6), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 50px -10px rgba(255,59,48,.8), inset 0 1px 0 rgba(255,255,255,.25); filter: brightness(1.05); }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .8s ease;
}
.btn-primary:hover::before { transform: translateX(100%); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .9rem 1.5rem;
  border: 1px solid #2a2a2a;
  background: rgba(255,255,255,.02);
  color: #fff;
  font-weight: 500;
  border-radius: 999px;
  transition: border-color .25s, background .25s, transform .25s;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(255,59,48,.06); transform: translateY(-1px); }
.btn-ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ===== Card ===== */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.025) 0%, rgba(255,255,255,0) 100%);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .35s, box-shadow .35s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,59,48,.4);
  box-shadow: 0 30px 60px -30px rgba(255,59,48,.4);
}

.card-glow {
  position: relative;
}
.card-glow::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,59,48,.6), rgba(255,59,48,0) 50%, rgba(255,59,48,.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ===== Hero floating gradient ===== */
.hero-glow {
  position: absolute;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,59,48,.35) 0%, rgba(255,59,48,.08) 35%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* ===== Mock dashboard ===== */
.mock-dash {
  position: relative;
  background: linear-gradient(180deg, #0d0d0d 0%, #070707 100%);
  border: 1px solid #1c1c1c;
  border-radius: 1.5rem;
  box-shadow: 0 60px 120px -40px rgba(0,0,0,.8), 0 0 60px -20px rgba(255,59,48,.25);
  transform: perspective(1400px) rotateY(-8deg) rotateX(4deg);
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
@media (min-width: 1024px) {
  .mock-dash:hover { transform: perspective(1400px) rotateY(-4deg) rotateX(2deg); }
}

.mock-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 500;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: #d9d9d9;
}
.mock-pill.active {
  background: rgba(255,59,48,.15);
  border-color: rgba(255,59,48,.5);
  color: #FF8E87;
}

/* ===== Floating mini cards ===== */
.float-card {
  position: absolute;
  background: rgba(15,15,15,.85);
  backdrop-filter: blur(12px);
  border: 1px solid #232323;
  border-radius: .85rem;
  padding: .65rem .85rem;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.6);
}

/* ===== Marquee shimmer for trust badges ===== */
.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.06) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

/* ===== FAQ ===== */
.faq-item summary {
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-chev { transition: transform .3s ease; }
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-item .faq-body { overflow: hidden; }

/* ===== Sticky bottom CTA ===== */
#sticky-cta {
  transform: translateY(120%);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
#sticky-cta.is-visible { transform: translateY(0); }

/* ===== Countdown ===== */
.count-box {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.04);
  border: 1px solid #1f1f1f;
  border-radius: .85rem;
  padding: .9rem 1.1rem;
  min-width: 78px;
}
.count-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1;
}
.count-lbl {
  font-size: .68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-top: .4rem;
}

/* ===== Grid background ===== */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
          -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

/* ===== Section divider gradient line ===== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,59,48,.4) 50%, transparent 100%);
}

/* ===== Mobile nav ===== */
#mobile-nav {
  transform: translateX(100%);
  transition: transform .35s ease;
}
#mobile-nav.is-open { transform: translateX(0); }

/* ===== Scrollbar (subtle) ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .mock-dash { transform: none; }
}
