/* ==========================================================================
   FJ FAITH & FAMILY — DESIGN SYSTEM & CORE STYLES
   Warm, uplifting, family-friendly, and faith-centered styling.
   ========================================================================== */

:root {
  /* Core Color Palette */
  --ink: #1e242e;
  --ink-soft: #3e4856;
  --ink-light: #64748b;
  --paper: #faf6ee;
  --paper-soft: #f4ecdc;
  --paper-deep: #eadecb;
  --card-bg: #ffffff;
  
  /* Brand Accent Colors */
  --terracotta: #c2410c;
  --terracotta-light: #ea580c;
  --terracotta-subtle: #fff3eb;
  --gold: #d97706;
  --gold-light: #f59e0b;
  --gold-bright: #fbbf24;
  --gold-subtle: #fef8eb;
  --royal: #1d4ed8;
  --royal-light: #2563eb;
  --royal-soft: #eff6ff;
  --emerald: #047857;
  --emerald-light: #10b981;
  --emerald-soft: #ecfdf5;
  
  /* UI System Tokens */
  --rule: rgba(30, 36, 46, 0.12);
  --rule-gold: rgba(217, 119, 6, 0.28);
  --shadow-sm: 0 2px 8px rgba(30, 36, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(30, 36, 46, 0.09);
  --shadow-lg: 0 16px 40px rgba(30, 36, 46, 0.13);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.35);
  
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  
  --maxw: 1180px;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Keep keyboard users oriented across the whole studio. */
:where(a, button):focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(var(--paper-soft) 1.5px, transparent 1.5px), radial-gradient(var(--paper-soft) 1.5px, var(--paper) 1.5px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

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

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

/* Bilingual Engine (Instant Toggle) */
.en, .es {
  display: contents;
}

html[data-lang="en"] .es,
html[data-lang="es"] .en {
  display: none !important;
}

/* Eyebrow & Badges */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--terracotta);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '✦';
  color: var(--gold-light);
  font-size: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-gold {
  background: var(--gold-subtle);
  color: var(--gold);
  border: 1px solid var(--gold-light);
}

.badge-emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid var(--emerald-light);
}

.badge-royal {
  background: var(--royal-soft);
  color: var(--royal);
  border: 1px solid var(--royal-light);
}

.badge-terracotta {
  background: var(--terracotta-subtle);
  color: var(--terracotta);
  border: 1px solid var(--terracotta-light);
}

.badge-pill-hot {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Masthead */
.masthead {
  background: linear-gradient(90deg, #241c14, #382c20, #241c14);
  color: #fef3c7;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 9px 20px;
  text-align: center;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(217, 119, 6, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.masthead .sparkle {
  color: var(--gold-bright);
  animation: pulse-sparkle 2.5s infinite ease-in-out;
}

@keyframes pulse-sparkle {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 6px #f59e0b); }
}

/* Sticky Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 48px);
  transition: all 0.2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-logo-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid var(--rule-gold);
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 28px);
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--terracotta);
  border-radius: 2px;
}

.nav-game-badge {
  background: linear-gradient(135deg, var(--gold), var(--terracotta));
  color: #fff !important;
  padding: 6px 15px !important;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.nav-game-badge:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.45);
}

/* Controls: Language & Sound */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  background: #fff;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-full);
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.lang-toggle button {
  background: transparent;
  border: 0;
  color: var(--ink-light);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.76rem;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: all 0.18s ease;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--terracotta);
  color: #fff;
}

.sound-toggle {
  background: #fff;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-full);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.sound-toggle:hover {
  transform: scale(1.08);
  border-color: var(--gold-light);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #c2410c, #9a3412);
  color: #ffffff;
  border-color: #c2410c;
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  border-color: #ea580c;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(194, 65, 12, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.35);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-light));
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.5);
  color: #ffffff;
}

.btn-royal {
  background: linear-gradient(135deg, var(--royal-light), var(--royal));
  color: #ffffff;
  border-color: var(--royal);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-royal:hover {
  background: linear-gradient(135deg, #3b82f6, var(--royal-light));
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Sections General */
.section {
  padding: clamp(60px, 8vw, 100px) 20px;
}

.section-container {
  max-width: var(--maxw);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}

.section-head h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.65;
}

/* Parent Confidence Trust Bar */
.trust-bar {
  background: #ffffff;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: var(--shadow-md);
  margin: 40px auto;
  max-width: var(--maxw);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.trust-text h4 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.trust-text p {
  color: var(--ink-light);
  font-size: 0.86rem;
  margin: 0;
}

/* Footer */
footer {
  background: #151a24;
  color: #f1f5f9;
  padding: 70px 20px 40px;
  border-top: 2px solid var(--gold);
}

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

.footer-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  font-style: italic;
  color: var(--gold-bright);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.4;
}

.footer-contact {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 620px;
  margin: 0 auto 36px;
}

.footer-contact p {
  color: #cbd5e1;
  font-size: 0.96rem;
  margin-bottom: 12px;
}

.footer-emails {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.footer-emails a {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.footer-emails a:hover {
  background: var(--terracotta);
  transform: translateY(-2px);
}

.footer-fine {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav {
    padding: 12px 20px;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
    gap: 20px;
    border-bottom: 2px solid var(--rule);
    box-shadow: 0 16px 30px rgba(0,0,0,0.12);
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
  }
  
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav-links a {
    font-size: 1.15rem;
    width: 100%;
  }
  
  .nav-controls {
    margin-top: 10px;
    width: 100%;
    justify-content: space-between;
  }
}
