/* EnLatin shared subpage styles — homepage visual system, subpage layout */

/* ============================================
   ROOT VARIABLES (mirrors website/assets/css/home.css)
   ============================================ */
:root {
  --space-blue: #0f172a;
  --space-blue-light: #1e293b;
  --royal-blue: #1e3a5f;
  --royal-blue-light: #2d4a6f;
  --gold: #E8C547;
  --gold-light: #d4b43a;
  --ocean-white: #e0f2fe;
  --ocean-light: #f0f9ff;
  --bg: #f4f8ff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;

  /* Homepage Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;

  /* Quote Overlay Fonts (fallbacks) */
  --font-quote-serif: 'Canela-Light', 'Playfair Display', Calibri, Georgia, serif;
  --font-quote-label: 'Avenir Next LT W04 Condensed', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-quote-button: 'Avenir Next LT W04 Bold Cond', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* 8-unit spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;
  --s-11: 96px;
}

/* ============================================
   BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.7;
}

/* Ensure fixed header does not overlap in-page anchors */
[id] {
  scroll-margin-top: calc(var(--header-height, 120px) + var(--s-4));
}

/* ============================================
   PAGE HERO — light, centered, homepage display font
   ============================================ */
.page-hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: calc(var(--header-height, 132px) + var(--s-8)) var(--s-8) var(--s-9);
  background: transparent;
}

.page-hero-label {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #3474cd;
  margin-bottom: var(--s-5);
  font-weight: 500;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--space-blue);
  margin-bottom: var(--s-5);
  letter-spacing: -0.02em;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero .lead {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 900px;
  margin: 0 auto;
  font-weight: 350;
}

/* ============================================
   CONTENT WRAP & SECTIONS — homepage-style white cards
   ============================================ */
.content-wrap {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--s-8) var(--s-11);
}

.content-section {
  background: rgba(254, 254, 254, 0.95);
  border: 1.5px solid rgba(226, 232, 240, 0.6);
  border-radius: 8px;
  padding: var(--s-8);
  margin-bottom: var(--s-6);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
  border-color: var(--ocean-white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--space-blue);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-3);
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.content-section h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--royal-blue);
  margin: var(--s-7) 0 var(--s-3);
}

.content-section p {
  margin-bottom: var(--s-4);
  color: var(--text-secondary);
}

.content-section ul,
.content-section ol {
  margin: var(--s-3) 0 var(--s-4) var(--s-6);
  color: var(--text-secondary);
}

.content-section li {
  margin-bottom: var(--s-3);
}

.content-section a {
  color: var(--royal-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.content-section a:hover {
  border-bottom-color: var(--royal-blue);
}

/* Highlight box */
.highlight-box {
  background: var(--bg);
  border-left: 3px solid var(--gold);
  padding: var(--s-5) var(--s-6);
  border-radius: 0 8px 8px 0;
  margin: var(--s-6) 0;
}

.highlight-box p {
  margin: 0;
  color: var(--text-primary);
}

/* ============================================
   BUTTONS — match homepage CTA / quote-now styling
   ============================================ */
.hero-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 1.5px solid #2E5C8A;
  color: #2E5C8A;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-family: var(--font-body);
}

.hero-cta::before,
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2E5C8A, #4A7BA7);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.hero-cta:hover,
.btn:hover {
  color: white;
  border-color: #2E5C8A;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(46, 92, 138, 0.3);
}

.hero-cta:hover::before,
.btn:hover::before {
  left: 0;
}

.hero-cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

/* Solid variant */
.btn--solid {
  background: var(--space-blue);
  color: #fff;
  border-color: var(--space-blue);
}

.btn--solid::before {
  background: #fff;
}

.btn--solid:hover {
  color: var(--space-blue);
  border-color: var(--space-blue);
}

/* Royal variant */
.btn--royal {
  border-color: var(--royal-blue);
  color: var(--royal-blue);
}

.btn--royal::before {
  background: var(--royal-blue);
}

.btn--royal:hover {
  color: #fff;
  border-color: var(--royal-blue);
}

/* ============================================
   STATS GRID — matches homepage .stats-grid
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: var(--s-6) auto 0;
}

.stat-card {
  text-align: center;
  padding: var(--s-6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 600;
  color: var(--space-blue);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   FINAL CTA STRIP (optional subpage closer)
   ============================================ */
.subpage-final-cta {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--s-10) var(--s-8);
}

.subpage-final-cta h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--space-blue);
  margin-bottom: var(--s-6);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
  .page-hero {
    padding: calc(var(--header-height, 106px) + var(--s-6)) var(--s-5) var(--s-8);
  }

  .page-hero h1 {
    font-size: 2.5rem;
  }

  .page-hero .lead {
    font-size: 1.1rem;
  }

  .content-wrap {
    padding: 0 var(--s-5) var(--s-10);
  }

  .content-section {
    padding: var(--s-6);
  }

  .content-section h2 {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .subpage-final-cta h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .page-hero h1 {
    font-size: 2rem;
  }

  .hero-cta,
  .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }
}

/* Override legacy subpage dark-hero styles */
section.page-hero,
.page-hero {
  background: transparent !important;
}
.page-hero h1,
.page-hero h1 span,
.page-hero .lead {
  color: var(--space-blue) !important;
}
.page-hero .lead {
  color: var(--text-secondary) !important;
}
