/* ==========================================================================
   Orbit — website design system
   Derived directly from the iOS app palette (iosApp/iosApp/AppCore/AppTheme.swift
   and Widget/BirthdayWidget.swift). Warm birthday theme, light & dark adaptive.
   ========================================================================== */

:root { color-scheme: light dark; }

/* Light mode palette (matches iOS light appearance) */
:root {
  /* Surface hierarchy (warm cream) */
  --bg: #FAF5F0;
  --nav-bg: rgba(250, 245, 240, 0.82);
  --card: #FFFFFF;
  --card-alt: #F3EBE2;
  --stroke: rgba(36, 26, 48, 0.10);
  --card-hover-stroke: rgba(36, 26, 48, 0.22);

  /* Accent palette (festive rose + periwinkle) */
  --accent: #E0495C;
  --accent-hover: #C93B50;
  --accent-2: #B29EFF;
  --accent-2-hover: #9C7BFF;
  --gold: #E8A03C;
  --gold-2: #CF8324;

  /* Tint / glow layers */
  --accent-soft: rgba(224, 74, 92, 0.14);
  --accent-2-soft: rgba(178, 158, 255, 0.16);
  --gold-soft: rgba(232, 160, 60, 0.16);

  /* Typography */
  --text: #241A30;
  --text-2: rgba(36, 26, 48, 0.62);

  /* Radius / shadow */
  --radius: 16px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 24px rgba(36, 26, 48, 0.08);
  --shadow-glow: 0 8px 24px rgba(224, 74, 92, 0.18);

  --maxw: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Surface hierarchy (warm plum) */
    --bg: #130E1C;
    --nav-bg: rgba(19, 14, 28, 0.82);
    --card: #241A30;
    --card-alt: #2E2240;
    --stroke: rgba(255, 255, 255, 0.08);
    --card-hover-stroke: rgba(255, 255, 255, 0.20);

    /* Accent palette (periwinkle + rose) */
    --accent: #B29EFF;
    --accent-hover: #C6B3FF;
    --accent-2: #E0495C;
    --accent-2-hover: #EF5E70;
    --gold: #F5B14C;
    --gold-2: #FFC76B;

    /* Tint / glow layers */
    --accent-soft: rgba(178, 158, 255, 0.18);
    --accent-2-soft: rgba(224, 74, 92, 0.16);
    --gold-soft: rgba(245, 177, 76, 0.16);

    /* Typography */
    --text: #FFFFFF;
    --text-2: rgba(255, 255, 255, 0.62);

    /* Radius / shadow */
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 8px 24px rgba(178, 158, 255, 0.22);
  }
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Soft celebration background layers */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at top left, var(--accent-soft) 0%, transparent 50%),
    radial-gradient(circle at bottom right, var(--accent-2-soft) 0%, transparent 45%),
    radial-gradient(circle at center, var(--gold-soft) 0%, transparent 60%),
    var(--bg);
}

/* Layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--stroke);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  padding: 8px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
}
@media (prefers-color-scheme: dark) { .nav-cta { color: #1A1233 !important; } }
.nav-cta:hover { background: var(--accent-hover); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ==========================================================================
   Hero (emblem + gradient wordmark + tagline)
   ========================================================================== */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
}
.hero-emblem {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  font-size: 60px;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--text-2);
  margin-top: 12px;
  font-weight: 500;
}
.hero-sub {
  max-width: 620px;
  margin: 16px auto 0;
  color: var(--text-2);
  font-size: 16px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-glow); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #1A1233; } }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: linear-gradient(135deg, var(--card), var(--card-alt));
  color: var(--text);
  border: 1.5px solid var(--stroke);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-blue { background: var(--accent-2); color: #1A1233; }
.btn-blue:hover { background: var(--accent-2-hover); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 80px 0; }
.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-2);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 16px;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: linear-gradient(135deg, var(--card), var(--card-alt));
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--card-hover-stroke); }

/* How it works — 4 steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.step-card { text-align: left; }
.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}
.step-icon.violet { background: var(--accent-2-soft); color: var(--accent-2); }
.step-icon.gold { background: var(--gold-soft); color: var(--gold); }
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-card p { color: var(--text-2); font-size: 15px; }

/* Reminder options */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.mode-card { display: flex; flex-direction: column; }
.mode-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.mode-card p { color: var(--text-2); font-size: 15px; flex: 1; }
.mode-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  width: fit-content;
}
.mode-badge.daily { background: var(--accent-2-soft); color: var(--accent-2); }
.mode-badge.practice { background: var(--accent-soft); color: var(--accent); }
.mode-badge.gold { background: var(--gold-soft); color: var(--gold); }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card { text-align: left; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-2); font-size: 15px; }

/* CTA band */
.cta-band {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-2-soft));
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
}
.cta-band h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-bottom: 12px; }
.cta-band p { color: var(--text-2); margin-bottom: 28px; font-size: 16px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--stroke);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-2); font-size: 14px; }

/* ==========================================================================
   Page header (Support / Privacy subpages)
   ========================================================================== */
.page-header {
  text-align: center;
  padding: 72px 24px 40px;
}
.page-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p { color: var(--text-2); margin-top: 12px; font-size: 17px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   FAQ accordion (Support page)
   ========================================================================== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: linear-gradient(135deg, var(--card), var(--card-alt));
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-question:hover { background: var(--accent-soft); }
.faq-arrow { transition: transform 0.25s; color: var(--text-2); flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 22px 18px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 600px; }

/* ==========================================================================
   Content blocks (Privacy / Support body)
   ========================================================================== */
.content-block { max-width: 760px; margin: 0 auto; padding: 0 24px 60px; }
.content-block h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text);
}
.content-block h2:first-child { margin-top: 0; }
.content-block p { color: var(--text-2); font-size: 15px; line-height: 1.8; margin-bottom: 14px; }
.content-block ul { color: var(--text-2); font-size: 15px; line-height: 1.8; margin: 0 0 14px 20px; }
.content-block li { margin-bottom: 6px; }
.content-block a { color: var(--accent); }
.content-block strong { color: var(--text); }

/* Contact card */
.contact-card {
  max-width: 560px;
  margin: 32px auto 0;
  text-align: center;
  padding: 32px;
}
.contact-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.contact-card p { color: var(--text-2); font-size: 15px; margin-bottom: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--stroke);
  }
  .hero { padding: 56px 24px 40px; }
  .section { padding: 56px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}