/* ══════════════════════════════════════════════════════════════
   Rays Education — Shared Stylesheet
   Extracted from 6 landing pages. Page-specific styles remain
   inline. Override --primary, --primary-dark, --primary-light
   per page if needed (defaults to purple).
   ══════════════════════════════════════════════════════════════ */

/* ── Font Faces — Variable font (40KB replaces 9 × 33KB statics) ── */
@font-face {
  font-family: 'Helvena';
  src: url('/fonts/helvena-variable.woff2') format('woff2'),
       url('/fonts/helvena-variable.ttf') format('truetype');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Groteska aliased to same variable font (same underlying typeface) */
@font-face {
  font-family: 'Groteska';
  src: url('/fonts/helvena-variable.woff2') format('woff2'),
       url('/fonts/helvena-variable.ttf') format('truetype');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Primary — override per page if needed */
  --primary:       #2a3990;
  --primary-dark:  #1e2a6e;
  --primary-light: #e8ebf7;
  --primary-mid:   #7b8fd4;

  /* Legacy aliases (used in existing pages) */
  --purple:        var(--primary);
  --purple-dark:   var(--primary-dark);
  --purple-light:  var(--primary-light);
  --purple-mid:    var(--primary-mid);

  /* Accent: Red */
  --red:           #eb2127;
  --red-dark:      #c41920;
  --red-light:     #fdeaea;

  /* Accent: Gold */
  --gold:          #f5a623;
  --gold-light:    #fff8ed;
  --gold-dark:     #e09520;

  /* Neutrals */
  --ink:           #0a0a0f;
  --body:          #3d3d4a;
  --muted:         #8b8b9e;
  --border:        #e8e8f0;
  --white:         #ffffff;
  --off-white:     #fafafa;
  --dark:          #0d0d1a;

  /* Feedback */
  --success:       #16a34a;
  --success-light: #e8f5e9;

  /* Spacing scale (4px base) */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 56px;
  --space-3xl: 80px;
  --space-4xl: 100px;

  /* Fluid section padding — scales smoothly between breakpoints */
  --section-pad-y: clamp(64px, 8vw, 100px);
  --section-pad-x: clamp(20px, 4vw, 56px);
  --content-max:   1200px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Groteska', 'Helvetica Neue', Arial, sans-serif;
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ─────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--section-pad-x);
  height: 72px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s, height .3s;
}
nav.scrolled { height: 60px; box-shadow: 0 4px 32px rgba(42,57,144,.08); }
.nav-logo img { height: 40px; object-fit: contain; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  text-decoration: none;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--body);
  transition: color .2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-cta {
  background: var(--primary); color: var(--white);
  padding: 10px 24px;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  border: none; cursor: pointer; text-decoration: none;
  border-radius: 6px;
  display: inline-block;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(42,57,144,.3);
}
.nav-cta:active { transform: translateY(0); box-shadow: none; }
.nav-mobile { display: none; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary); color: var(--white);
  padding: 15px 32px;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  border: none; cursor: pointer; text-decoration: none;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(42,57,144,.35);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(42,57,144,.2); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink);
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  padding: 15px 24px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.btn-secondary:active { transform: translateY(0); }
.btn-gold {
  padding: 14px 28px;
  background: var(--gold); color: var(--dark);
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  border: none; cursor: pointer; text-decoration: none;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(245,166,35,.35);
}
.btn-gold:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(245,166,35,.2); }
.btn-white-outline {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--white);
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  padding: 15px 24px;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 8px;
  transition: border-color .2s, background .2s;
}
.btn-white-outline:hover {
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.08);
}
.btn-white-outline:active { transform: translateY(0); }

/* ── Section Utilities ──────────────────────────────────────── */
.section { padding: var(--section-pad-y) var(--section-pad-x); content-visibility: auto; contain-intrinsic-size: auto 600px; }
.section-tight  { --section-pad-y: clamp(48px, 5.5vw, 72px); }
.section-spacious { --section-pad-y: clamp(80px, 10vw, 128px); }
.section-narrow { max-width: var(--content-max); margin: 0 auto; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px; border-radius: 100px;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 20px;
}
.section-title {
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(34px, 3.8vw, 54px);
  font-weight: 800; line-height: 1.08;
  color: var(--ink); letter-spacing: -.02em;
  margin-bottom: 16px;
  text-wrap: balance;
}
.section-title .accent { color: var(--primary); }
.section-title .italic-word {
  font-style: italic;
  font-family: 'Groteska', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
}
.section-desc {
  font-size: 16px; line-height: 1.7; color: var(--body);
  max-width: 520px; font-weight: 400;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--body); margin-bottom: 6px;
}
.form-field input,
.form-field select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--off-white);
  font-family: 'Groteska', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-field input:focus,
.form-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42,57,144,.12);
  background: var(--white);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-submit {
  width: 100%;
  background: var(--primary); color: var(--white);
  padding: 15px;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  border: none; cursor: pointer;
  border-radius: 8px;
  margin-top: 8px;
  transition: background .2s, box-shadow .2s, transform .15s;
}
.form-submit:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 24px rgba(42,57,144,.4);
  transform: translateY(-1px);
}
.form-submit:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(42,57,144,.2); }
.form-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.form-note {
  font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px;
  line-height: 1.5;
}
.form-note a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--dark); color: var(--white);
  padding: clamp(48px, 6vw, 72px) var(--section-pad-x) 36px;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo img { height: 38px; object-fit: contain; margin-bottom: 18px; display: block; }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,.4); line-height: 1.7; }
.footer-phone {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 24px;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px; font-weight: 700; color: var(--primary-mid);
  text-decoration: none;
  transition: color .2s;
}
.footer-phone:hover { color: var(--white); }
.footer-col h4 {
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.3); margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  text-decoration: none; font-size: 14px;
  color: rgba(255,255,255,.55);
  transition: color .2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 32px;
  font-size: 12px; color: rgba(255,255,255,.2);
  flex-wrap: wrap; gap: 12px;
}

/* ── Float CTA ──────────────────────────────────────────────── */
.float-cta {
  position: fixed; bottom: 28px; right: 28px; z-index: 99;
  background: var(--red); color: var(--white);
  padding: 14px 24px;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-decoration: none;
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(235,33,39,.45);
  animation: floatIn .6s cubic-bezier(.34,1.56,.64,1) 1.5s both;
  transition: background .2s, transform .2s, box-shadow .2s, opacity .3s;
}
.float-cta:hover {
  background: var(--red-dark);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(235,33,39,.5);
}
.float-cta:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(235,33,39,.3); }

/* ── FAQ (Repeater pages) ───────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item:hover { border-color: var(--primary-mid); }
.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; border: none; cursor: pointer;
  font-family: 'Helvena', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px; font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: color .2s;
}
.faq-question:hover { color: var(--primary); }
.faq-icon {
  font-size: 20px; font-weight: 300; color: var(--muted);
  transition: transform .3s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--primary); }
.faq-answer {
  max-height: 0; overflow: hidden;
  padding: 0 24px;
  font-size: 14px; line-height: 1.7; color: var(--body);
  transition: max-height .35s ease, padding .35s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: .1s; }
.fade-up-delay-2 { transition-delay: .2s; }
.fade-up-delay-3 { transition-delay: .3s; }
.fade-up-delay-4 { transition-delay: .4s; }

.hero-animate { animation: heroReveal .75s cubic-bezier(.22,1,.36,1) both; }
.ha1 { animation-delay: .05s; }
.ha2 { animation-delay: .15s; }
.ha3 { animation-delay: .25s; }
.ha4 { animation-delay: .38s; }
.ha5 { animation-delay: .52s; }
.ha6 { animation-delay: .66s; }

/* ── Accessibility / Hardening ──────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100%; left: 16px; z-index: 9999; padding: 12px 24px; background: #2a3990; color: #fff; font-family: 'Helvena', sans-serif; font-weight: 700; font-size: 14px; border-radius: 0 0 8px 8px; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 0; }
*:focus-visible { outline: 2px solid #2a3990; outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: #2a3990; box-shadow: 0 0 0 3px rgba(42,57,144,.15); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ── Shared Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  /* nav padding now handled by clamp() via --section-pad-x */
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-mobile { display: block; }
  /* .section padding now handled by clamp() in .section */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  /* footer padding now handled by clamp() */
  .faq-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .float-cta { bottom: 16px; right: 16px; left: 16px; text-align: center; border-radius: 10px; }
  .faq-grid { grid-template-columns: 1fr; }
}
