/* ───────────────────────────────────────────────────
   CaptionAddr – Website Design System
   Mirrors the SwiftUI GlassPalette dark-mode aesthetic
   ─────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  color: #e8eaed;
  background: #000;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Backdrop (matches StudioBackdrop dark) ────────── */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #000000 0%, #0f1119 100%);
  overflow: hidden;
}

.backdrop::before,
.backdrop::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

/* Primary orb – white 12% (matches backdropOrbPrimary dark) */
.backdrop::before {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  top: -260px;
  right: -100px;
}

/* Secondary orb – white 6% (matches backdropOrbSecondary dark) */
.backdrop::after {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  bottom: -180px;
  left: -170px;
}

/* ── Container ─────────────────────────────────────── */
.site-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-container.wide {
  max-width: 960px;
}

/* ── Glass Card (matches SettingsSurfaceCard dark) ── */
.glass-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 10px 36px rgba(0,0,0,0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.glass-card + .glass-card {
  margin-top: 16px;
}

/* ── Glass Inset (matches glassInsetBackground dark) */
.glass-inset {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px 16px;
}

/* ── Typography ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 600; }

h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; letter-spacing: -0.015em; }
h3 { font-size: 1.125rem; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.54);
}

.subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.54);
}

.secondary {
  color: rgba(255,255,255,0.54);
}

.tertiary {
  color: rgba(255,255,255,0.34);
}

/* ── Hero ──────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 120px 0 64px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero .tagline {
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  font-weight: 500;
  color: rgba(255,255,255,0.58);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

/* ── Pill Button (matches SelectVideoPillButton) ──── */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  padding: 0 36px;
  height: 58px;
  min-width: 220px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.32);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  position: relative;
  overflow: visible;
}

.pill-btn:hover {
  opacity: 0.88;
  transform: scale(1.015);
}

.pill-btn:active {
  opacity: 0.78;
  transform: scale(0.995);
}

/* ── Top gradient overlay (matches app's screen-blend gradient) ── */
.pill-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.20) 0%,
    rgba(255,255,255,0.06) 50%,
    transparent 100%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Static border on top of everything (drawn by box-shadow) */
.pill-btn {
  box-shadow:
    0 10px 36px rgba(0,0,0,0.32),
    inset 0 0 0 1px rgba(255,255,255,0.22);
}

.pill-btn.secondary-pill {
  background: rgba(255,255,255,0.04);
  font-size: 1rem;
  height: 50px;
  min-width: 180px;
  box-shadow: 0 10px 36px rgba(0,0,0,0.32),
              inset 0 0 0 1px rgba(255,255,255,0.12);
}

.pill-btn.secondary-pill::after {
  display: none;
}

/* Apple logo styling */
.apple-logo {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  font-size: 1.3em;
  line-height: 1;
}

/* ── Feature Grid ─────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.feature-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.40);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(0,0,0,0.50);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.12) 100%);
  border: 1px solid rgba(255,255,255,0.16);
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.54);
  line-height: 1.55;
}

/* ── Comparison Table (matches UpgradeView) ────────── */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.comparison-table th {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.54);
}

.comparison-table th:nth-child(2),
.comparison-table td:nth-child(2) {
  text-align: center;
  width: 90px;
}

.comparison-table th:nth-child(3),
.comparison-table td:nth-child(3) {
  text-align: center;
  width: 90px;
}

.comparison-table th:nth-child(3) {
  color: rgba(219,240,255,0.9);
}

.comparison-table td {
  font-size: 0.95rem;
  font-weight: 500;
}

.comparison-table td:nth-child(2) {
  font-weight: 700;
  color: rgba(255,255,255,0.54);
}

.comparison-table td:nth-child(3) {
  font-weight: 700;
  color: #e8eaed;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* ── Navigation ────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #e8eaed;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.58);
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #e8eaed;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ── Footer ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 20px 32px;
  margin-top: 80px;
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.42);
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.72);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.28);
  line-height: 1.65;
}

/* ── Section Spacing ───────────────────────────────── */
.section {
  padding: 64px 0;
}

.section-header {
  margin-bottom: 32px;
}

.section-header .eyebrow {
  margin-bottom: 5px;
}

/* ── Legal / Content Pages ─────────────────────────── */
.legal-page {
  padding: 120px 0 64px;
}

.legal-page h1 {
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.42);
  margin-bottom: 32px;
}

.legal-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
}

.legal-body h2 {
  color: #e8eaed;
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.legal-body h3 {
  color: #e8eaed;
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.legal-body p {
  margin-bottom: 14px;
}

.legal-body ul, .legal-body ol {
  margin: 12px 0 18px 24px;
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body a {
  color: rgba(219,240,255,0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s;
}

.legal-body a:hover {
  color: #fff;
}

.legal-body strong {
  color: #e8eaed;
  font-weight: 600;
}

/* ── Support Page ──────────────────────────────────── */
.support-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  margin-bottom: 12px;
  transition: background 0.18s ease;
}

.support-card:hover {
  background: rgba(255,255,255,0.07);
}

.support-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.12) 100%);
  border: 1px solid rgba(255,255,255,0.16);
}

.support-card h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.support-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.54);
  line-height: 1.5;
}

/* ── FAQ Accordion ─────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  background: none;
  border: none;
  color: #e8eaed;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s;
}

.faq-question:hover {
  color: rgba(255,255,255,0.82);
}

.faq-chevron {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-bottom: 18px;
}

.faq-answer p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.58);
  line-height: 1.65;
}

/* ── Badge Rows (for settings-style links) ─────────── */
.badge-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s ease;
}

.badge-row:hover {
  background: rgba(255,255,255,0.08);
}

.badge-row + .badge-row {
  margin-top: 8px;
}

.badge-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.12) 100%);
  border: 1px solid rgba(255,255,255,0.16);
  flex-shrink: 0;
}

.badge-label {
  font-size: 0.925rem;
  font-weight: 600;
  flex: 1;
}

.badge-chevron {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.38);
}

/* ── App Preview (phone mockup) ────────────────────── */
.phone-frame {
  width: 260px;
  height: 540px;
  border-radius: 42px;
  border: 3px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, #0a0b10 0%, #0f1119 100%);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  border-radius: 14px;
  background: #000;
}

.phone-content {
  padding: 56px 20px 20px;
  width: 100%;
  text-align: center;
}

.phone-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.phone-content p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.54);
  margin-bottom: 24px;
}

.phone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 44px;
  border-radius: 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

/* Progress ring mockup */
.progress-mockup {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 10px solid rgba(255,255,255,0.08);
  position: relative;
  margin: 28px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-mockup::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 10px solid transparent;
  border-top-color: rgba(255,255,255,0.92);
  border-right-color: rgba(255,255,255,0.92);
  transform: rotate(60deg);
}

.progress-mockup span {
  font-size: 1.5rem;
  font-weight: 600;
}

/* ── Animations ────────────────────────────────────── */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.animate-in {
  animation: fade-in-up 0.6s ease forwards;
  opacity: 0;
}

.animate-in.delay-1 { animation-delay: 0.1s; }
.animate-in.delay-2 { animation-delay: 0.2s; }
.animate-in.delay-3 { animation-delay: 0.3s; }
.animate-in.delay-4 { animation-delay: 0.4s; }
.animate-in.delay-5 { animation-delay: 0.5s; }
.animate-in.delay-6 { animation-delay: 0.6s; }

/* Floating animation for phone frame */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.float {
  animation: float 5s ease-in-out infinite;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 100px 0 48px; }
  .section { padding: 48px 0; }
  .glass-card { padding: 20px; border-radius: 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-toggle { display: block; }
  
  .hero-split {
    flex-direction: column;
    gap: 40px;
  }

  .phone-frame {
    width: 220px;
    height: 460px;
    border-radius: 36px;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
