/* Sacred Flame Design System — Publifye.org */
/* Professional, warm, scripture-focused visual language */

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

:root {
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-card: #141c2b;
  --accent-primary: #c9a227;
  --accent-secondary: #d4af37;
  --accent-muted: rgba(201, 162, 39, 0.15);
  --accent-glow: rgba(201, 162, 39, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border-color: #2d3748;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 24px rgba(201, 162, 39, 0.06);
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
}

.light {
  --bg-primary: #faf9f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f3f4f6;
  --bg-card: #ffffff;
  --accent-primary: #9a7520;
  --accent-secondary: #8b6914;
  --accent-muted: rgba(154, 117, 32, 0.1);
  --accent-glow: rgba(154, 117, 32, 0.05);
  --text-primary: #1a1a2e;
  --text-secondary: #4b5563;
  --border-color: #e5e7eb;
  --border-subtle: rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 24px rgba(154, 117, 32, 0.04);
}

.sepia {
  --bg-primary: #f5f0e8;
  --bg-secondary: #ede4d4;
  --bg-tertiary: #e5dac8;
  --bg-card: #ede4d4;
  --accent-primary: #8b6914;
  --accent-secondary: #6b5010;
  --accent-muted: rgba(139, 105, 20, 0.12);
  --accent-glow: rgba(139, 105, 20, 0.06);
  --text-primary: #3d2b1f;
  --text-secondary: #5c4433;
  --border-color: #d4c4a8;
  --border-subtle: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 24px rgba(139, 105, 20, 0.04);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent-primary); text-decoration: none; transition: opacity 150ms ease; }
a:hover { opacity: 0.85; }

h1, h2, h3, h4 {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Layout */
.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
main { flex: 1; }

/* ── Nav ─────────────────────────────────────────── */
nav {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.875rem 1.5rem; max-width: 72rem; margin: 0 auto; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 200ms ease;
}
.nav-links a:hover { color: var(--accent-primary); opacity: 1; }
.nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo img { width: 2rem; height: 2rem; }
.nav-logo span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-variant: small-caps;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

/* Mobile nav */
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); padding: 1rem 1.5rem; gap: 1rem; }
  .nav-links.open { display: flex; }
}

/* ── Buttons ─────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 200ms ease;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201, 162, 39, 0.3); color: #ffffff; opacity: 1; }

.btn-outline {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.btn-outline:hover { border-color: var(--accent-primary); background-color: var(--accent-muted); color: var(--text-primary); opacity: 1; }

/* ── Cards ───────────────────────────────────────── */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: var(--accent-muted);
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  background: linear-gradient(180deg, var(--text-primary) 60%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-secondary);
  font-size: 1.1875rem;
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  position: relative;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }

@media (max-width: 768px) {
  .hero { padding: 3.5rem 1.5rem 3rem; }
  .hero h1 { font-size: 2.25rem; }
}

/* ── Grid ────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .grid-3 { grid-template-columns: 1fr; } }
@media (min-width: 769px) and (max-width: 1024px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

/* ── Section ─────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section-title {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--accent-primary);
  margin: 0.75rem auto 0;
  border-radius: 1px;
}

/* ── Trust signals ───────────────────────────────── */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
}
.trust-item { text-align: center; min-width: 8rem; }
.trust-item .number {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: block;
  line-height: 1.2;
}
.trust-item .label { font-size: 0.8125rem; color: var(--text-secondary); letter-spacing: 0.03em; text-transform: uppercase; margin-top: 0.25rem; }

/* ── Footer ──────────────────────────────────────── */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: auto;
}
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { color: var(--text-secondary); font-size: 0.8125rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.8125rem; transition: color 200ms ease; }
.footer-links a:hover { color: var(--accent-primary); opacity: 1; }

/* ── Form ────────────────────────────────────────── */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.form-group textarea { min-height: 8rem; resize: vertical; }

/* ── Theme toggle ────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: border-color 200ms ease, color 200ms ease;
}
.theme-toggle:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* ── Alert ───────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}
.alert-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: #22c55e; }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #ef4444; }

/* ── Page header ─────────────────────────────────── */
.page-header { margin-bottom: 3rem; padding-top: 1rem; }
.page-header h1 { font-size: 2.5rem; margin-bottom: 0.75rem; }
.page-header p { color: var(--text-secondary); font-size: 1.0625rem; max-width: 36rem; line-height: 1.7; }
.page-header.text-center p { margin-left: auto; margin-right: auto; }

/* ── About page ──────────────────────────────────── */
.timeline {
  border-left: 2px solid var(--border-color);
  padding-left: 2rem;
  margin: 2rem 0;
  max-width: 48rem;
}
.timeline-item {
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.25rem;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--bg-primary), 0 0 8px var(--accent-muted);
}
.timeline-item h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  letter-spacing: 0;
}
.timeline-item p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; }

/* ── Utility ─────────────────────────────────────── */
.text-gold { color: var(--accent-primary); }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-box {
  position: relative;
  max-width: 26rem;
  width: 90%;
  animation: modalIn 200ms ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.confirm-code {
  font-family: "Cormorant Garamond", Georgia, monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.4em;
  display: inline-block;
}

/* ── Honeypot ───────────────────────────────────── */
.honeypot { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; overflow: hidden; }
