/* Stagely marketing site — design tokens from app theme */
:root {
  --primary: #FF6B35;
  --primary-dark: #E55A2B;
  --primary-light: #FF8C5A;
  --secondary: #4ECDC4;
  --secondary-dark: #3BA8A0;
  --background: #0A0A0A;
  --surface: #1A1A1A;
  --surface-light: #2A2A2A;
  --text: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-tertiary: #707070;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(26, 26, 26, 0.72);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-glow: 0 0 80px rgba(255, 107, 53, 0.15);
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-height: 72px;
  --max-width: 1180px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Ambient background */
.page {
  position: relative;
  min-height: 100vh;
}

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

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 12s ease-in-out infinite;
}

.orb--primary {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: -120px;
  right: -80px;
}

.orb--secondary {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  bottom: 10%;
  left: -100px;
  animation-delay: -4s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.05); }
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 max(24px, calc((100% - var(--max-width)) / 2));
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.nav--scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 10, 0.85);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}

.nav__icon {
  color: var(--primary);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__cta {
  padding: 10px 20px !important;
  background: var(--primary) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.2s !important;
}

.nav__cta:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
}

.nav__soon {
  display: none;
  margin-left: auto;
  margin-right: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 53, 0.4);
  background: rgba(255, 107, 53, 0.12);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-light);
}

.nav__menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__menu span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

.nav__menu[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav__menu[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 24px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
  color: var(--primary);
}

/* Typography helpers */
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 8px 14px 8px 12px;
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.35);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-light);
}

.soon-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.55);
  animation: pulse-dot 2s ease-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 107, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s;
}

.btn--primary {
  background: var(--primary);
  color: var(--text);
  box-shadow: 0 4px 24px rgba(255, 107, 53, 0.35);
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn--soon {
  background: rgba(255, 107, 53, 0.16);
  color: var(--text);
  border: 1px solid rgba(255, 107, 53, 0.4);
  box-shadow: none;
}

.btn--soon:hover {
  background: rgba(255, 107, 53, 0.24);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  min-height: 100vh;
  padding: calc(var(--nav-height) + 48px) max(24px, calc((100% - var(--max-width)) / 2)) 80px;
  max-width: calc(var(--max-width) + 48px);
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero__stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__stats strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.hero__stats span {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* Phone mockups & screenshots */
.hero__visual {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.phone-stack {
  position: relative;
  width: min(100%, 360px);
  height: 520px;
}

.phone {
  transition: transform 0.6s var(--ease-out);
}

.phone--back {
  position: absolute;
  right: -8px;
  top: 48px;
  z-index: 1;
  transform: rotate(8deg) scale(0.88);
  opacity: 0.75;
  filter: blur(0.2px);
}

.phone--front {
  position: relative;
  z-index: 2;
  transform: rotate(-6deg);
}

.phone-stack:hover .phone--front {
  transform: rotate(-3deg) translateY(-4px);
}

.phone-stack:hover .phone--back {
  transform: rotate(10deg) scale(0.9) translateX(8px);
}

.phone__frame {
  width: 280px;
  padding: 10px;
  background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
  border-radius: 40px;
  box-shadow:
    var(--shadow-glow),
    0 40px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.phone__frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 32px;
}

.phone--showcase .phone__frame {
  width: 300px;
  position: relative;
}

.phone--compact .phone__frame {
  width: 220px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 32px;
}

.phone--compact .phone__frame img {
  border-radius: 26px;
}

/* Preview section */
.preview {
  padding-top: 80px;
}

.preview__controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 48px;
}

.preview__tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}

.preview__tab:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--surface-light);
}

.preview__tab.is-active {
  border-color: rgba(255, 107, 53, 0.45);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.12) 0%, rgba(78, 205, 196, 0.06) 100%);
  color: var(--text);
  transform: translateY(-2px);
}

.preview__tab-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.preview__tab-desc {
  font-size: 0.8125rem;
}

.preview__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.preview__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle, rgba(255, 107, 53, 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.phone--showcase {
  position: relative;
  z-index: 1;
  transform: none;
}

.preview__shot {
  width: 100%;
  height: auto;
  border-radius: 32px;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.preview__shot.is-active {
  opacity: 1;
  transform: scale(1);
}

.preview__shot[hidden] {
  display: none;
}

.preview__caption {
  position: relative;
  z-index: 1;
  max-width: 480px;
  text-align: center;
}

.preview__caption-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.preview__caption-text.is-active {
  opacity: 1;
  transform: translateY(0);
}

.preview__caption-text[hidden] {
  display: none;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 100px max(24px, calc((100% - var(--max-width)) / 2));
  max-width: calc(var(--max-width) + 48px);
  margin: 0 auto;
}

.section--dark {
  background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 26, 0.5) 50%, transparent 100%);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section__header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section__lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section__subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}

.feature-card__preview {
  padding: 24px 24px 0;
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.06) 0%, transparent 100%);
}

.feature-card__body {
  padding: 24px 32px 32px;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.feature-card__icon--primary {
  background: rgba(255, 107, 53, 0.15);
  color: var(--primary);
}

.feature-card__icon--secondary {
  background: rgba(78, 205, 196, 0.15);
  color: var(--secondary);
}

.feature-card__icon--accent {
  background: rgba(255, 213, 79, 0.12);
  color: #FFD54F;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card > p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.feature-card__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-card__list li {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  padding-left: 20px;
  position: relative;
}

.feature-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.7;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.step__number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.9;
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* CTA */
.cta {
  padding-bottom: 120px;
}

.cta__inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 40px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.12) 0%, rgba(78, 205, 196, 0.08) 100%);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
}

.cta__inner h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta__lead {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.soon-note {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.app-store-badge {
  display: inline-block;
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}

.app-store-badge:hover {
  transform: scale(1.04);
  opacity: 0.95;
}

.app-store-badge svg {
  width: 160px;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 48px max(24px, calc((100% - var(--max-width)) / 2)) 40px;
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer__brand {
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.footer__soon {
  font-size: 0.8125rem;
  color: var(--primary-light);
  margin-top: -12px;
  margin-bottom: 24px;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }

/* Responsive */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
    padding-top: calc(var(--nav-height) + 32px);
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__visual {
    order: -1;
  }

  .page--soon .hero__visual {
    order: 0;
  }

  .phone-stack {
    height: 460px;
    margin: 0 auto;
  }

  .phone--back {
    right: 0;
    top: 32px;
  }

  .phone--front,
  .phone--back {
    transform: none;
  }

  .phone-stack:hover .phone--front,
  .phone-stack:hover .phone--back {
    transform: none;
  }

  .preview__controls {
    grid-template-columns: 1fr;
  }

  .features,
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }

  .nav__menu {
    display: flex;
  }

  .nav__soon {
    display: inline-flex;
    align-items: center;
  }

  .hero__stats {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .cta__inner {
    padding: 48px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orb,
  .reveal,
  .phone,
  .feature-card,
  .btn,
  .app-store-badge,
  .soon-badge__dot {
    animation: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
