/* ============================================================
   Day & Night Bible — Shared Stylesheet
   Matches app design tokens (slate-950 dark / indigo-400 / orange-600)
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,700&family=Lora:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- CSS Variables — Dark (default) ---------- */
:root {
  --bg: #020617;
  /* slate-950  — dnNightBackground */
  --bg-surface: #0F172A;
  /* slate-900  — dnNightSurface    */
  --bg-card: #111827;
  --bg-section: #0a0f1c;
  --indigo: #818CF8;
  /* indigo-400 — dnNightAccent     */
  --indigo-dark: #4F46E5;
  /* indigo-600 — primaryIndigo     */
  --indigo-dim: #1E1B4B;
  /* indigo-950 — dnNightAccentDark */
  --orange: #EA580C;
  /* orange-600 — dnDayAccent       */
  --orange-light: #FFEDD5;
  /* orange-100 — dnDayAccentLight  */
  --text: #F1F5F9;
  /* slate-100  — dnNightText       */
  --text-muted: #94A3B8;
  /* slate-400  — dnNightTextMuted  */
  --border: rgba(30, 41, 59, 0.9);
  --border-glow: rgba(129, 140, 248, 0.22);
  --nav-bg: rgba(2, 6, 23, 0.85);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --nav-h: 68px;
}

/* ---------- CSS Variables — Light (dnDay*) ---------- */
[data-theme="light"] {
  --bg: #FFF7ED;
  /* orange-50  — dnDayBackground   */
  --bg-surface: #FFFFFF;
  /* white      — dnDayCard         */
  --bg-card: #FFFFFF;
  --bg-section: #FEF3C7;
  /* amber-100  — warm section tint */
  --indigo: #4F46E5;
  /* indigo-600 — visible on light  */
  --indigo-dark: #4338CA;
  /* indigo-700                     */
  --indigo-dim: #EEF2FF;
  /* indigo-50                      */
  --text: #1E293B;
  /* slate-800  — dnDayText         */
  --text-muted: #6B7280;
  /* gray-500                       */
  --border: rgba(229, 231, 235, 0.9);
  --border-glow: rgba(79, 70, 229, 0.2);
  --nav-bg: rgba(255, 247, 237, 0.92);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: var(--indigo);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--indigo-dark);
}

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

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  flex: 1;
}

.nav-brand span.amp {
  color: var(--orange);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--indigo);
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--indigo);
  background: var(--indigo-dim);
  color: var(--indigo);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(4rem, 10vw, 7rem) clamp(1.5rem, 5vw, 4rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 50% 0%, rgba(129, 140, 248, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 80% 80%, rgba(234, 88, 12, 0.07) 0%, transparent 60%);
  pointer-events: none;
  transition: background 0.3s;
}

[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse 75% 55% at 50% 0%, rgba(234, 88, 12, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 20% 80%, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(234, 88, 12, 0.1);
  border: 1px solid rgba(234, 88, 12, 0.3);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  max-width: 780px;
  margin-bottom: 1.25rem;
}

.hero-title em {
  font-style: italic;
  color: var(--indigo);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), #c2410c);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f97316, var(--orange));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--indigo);
  border: 1px solid var(--border-glow);
}

.btn-outline:hover {
  border-color: var(--indigo);
  background: var(--indigo-dim);
  color: var(--indigo-dark);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
section {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
}

.section-alt {
  background: var(--bg-section);
  transition: background 0.3s;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
}

/* ---------- Feature Grid ---------- */
.features-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.features-header {
  text-align: center;
  margin-bottom: 3rem;
}

.features-header .section-desc {
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s, background 0.3s;
}

.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.1);
}

.feature-icon {
  font-size: 1.9rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--indigo);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---------- Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------- Page Header (privacy / support) ---------- */
.page-header {
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

[data-theme="light"] .page-header::before {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(234, 88, 12, 0.06) 0%, transparent 70%);
}

/* ---------- Content (privacy / support) ---------- */
.content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem) clamp(3rem, 7vw, 5rem);
}

.content-wrap h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--indigo);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.content-wrap h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

.content-wrap p {
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  font-size: 0.97rem;
}

.content-wrap ul,
.content-wrap ol {
  color: var(--text-muted);
  padding-left: 1.4rem;
  margin-bottom: 0.9rem;
  font-size: 0.97rem;
}

.content-wrap li {
  margin-bottom: 0.35rem;
}

/* Table */
.content-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}

.content-wrap th {
  background: var(--bg-surface);
  color: var(--indigo);
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
}

.content-wrap td {
  color: var(--text-muted);
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
}

.content-wrap td:first-child {
  color: var(--text);
}

/* Support card */
.support-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin-top: 2.5rem;
  transition: background 0.3s, border-color 0.3s;
}

.support-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.support-card h2 {
  border: none;
  padding: 0;
  margin: 0 0 0.6rem;
  font-size: 1.4rem;
}

.support-card p {
  max-width: 420px;
  margin: 0 auto 1.6rem;
}

.support-email {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--indigo-dim);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 0.65rem 1.3rem;
  font-weight: 600;
  color: var(--indigo);
  font-size: 1rem;
  transition: all 0.2s;
}

.support-email:hover {
  border-color: var(--indigo);
  color: var(--indigo-dark);
  background: var(--indigo-dim);
  filter: brightness(0.95);
}

.support-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem !important;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color 0.3s;
}

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--indigo);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .nav-links {
    gap: 1.2rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}