/* ============================================================
   HMG ACADEMY — SHARED DESIGN SYSTEM
   His Marvellous Grace Educational Consult © 2025
   Aesthetic: Refined Navy + Gold Authority — editorial precision
   Fonts: Fraunces (display serif, gravitas) + DM Sans (clean body)
============================================================ */

/* ── Google Fonts Import ── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,400;1,9..144,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Brand palette */
  --navy:        #0F2547;
  --navy-deep:   #081730;
  --navy-mid:    #1B3A6B;
  --navy-light:  #2E5490;
  --navy-pale:   #EEF3FA;
  --gold:        #E8A020;
  --gold-bright: #F5B942;
  --gold-muted:  #C8891A;
  --gold-wash:   rgba(232,160,32,0.10);
  --emerald:     #0D9E6A;
  --coral:       #E05A3A;
  --white:       #FFFFFF;
  --off-white:   #F9FAFB;
  --grey-100:    #F3F4F6;
  --grey-200:    #E5E7EB;
  --grey-400:    #9CA3AF;
  --grey-600:    #4B5563;
  --grey-800:    #1F2937;
  --text-body:   #2D3748;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(15,37,71,0.08);
  --shadow-sm:  0 2px 10px rgba(15,37,71,0.10);
  --shadow-md:  0 8px 30px rgba(15,37,71,0.12);
  --shadow-lg:  0 20px 60px rgba(15,37,71,0.16);
  --shadow-gold: 0 8px 30px rgba(232,160,32,0.30);

  /* Geometry */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  /* Animation */
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.24s var(--ease-out);

  /* Layout */
  --max-w: 1180px;
  --section-v: 88px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.68;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.18;
  color: var(--navy);
  letter-spacing: -0.02em;
}
p { color: var(--grey-600); }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-wash);
  border: 1px solid rgba(232,160,32,0.22);
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 16px;
}
.section-eyebrow::before { content: ''; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }

.section-title {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--grey-600);
  max-width: 560px;
  line-height: 1.72;
}
.section-header-centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-header-centered .section-subtitle { text-align: center; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.btn:hover::after { background: rgba(255,255,255,0.08); }

.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
  box-shadow: 0 2px 8px rgba(232,160,32,0.25);
}
.btn-gold:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--grey-200);
}
.btn-ghost:hover {
  border-color: var(--navy);
  background: var(--navy-pale);
  transform: translateY(-2px);
}
.btn-wa {
  background: #25D366;
  color: #fff;
}
.btn-wa:hover {
  background: #1db954;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.32);
}
.btn-white-ghost {
  background: transparent;
  color: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-white-ghost:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.65);
  transform: translateY(-2px);
}
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }

/* ── NAVIGATION ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-200);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 44px;
  height: 44px;
  background: var(--navy);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.nav-logo-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,160,32,0.12) 0%, transparent 70%);
}
.nav-logo-text .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--navy);
  display: block;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.nav-logo-text .sub {
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--grey-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--grey-600);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--navy); background: var(--navy-pale); }
.nav-links a.active { color: var(--navy); font-weight: 600; background: var(--navy-pale); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.nav-cta {
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 9px 20px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  border: none !important;
  font-size: 0.86rem !important;
}
.nav-cta:hover {
  background: var(--navy-deep) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm) !important;
  background: none !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5.5px;
  cursor: pointer;
  padding: 7px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}
.hamburger:hover { background: var(--grey-100); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--grey-200);
  padding: 14px 20px 20px;
  gap: 3px;
  box-shadow: var(--shadow-sm);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--grey-600);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mobile-nav a:hover { background: var(--grey-100); color: var(--navy); }
.mobile-nav .mobile-wa {
  margin-top: 10px;
  background: #25D366;
  color: #fff !important;
  text-align: center;
  border-radius: var(--radius-sm);
  padding: 12px 14px !important;
  font-weight: 600 !important;
}

/* ── PAGE HERO ── */
.page-hero {
  background: linear-gradient(145deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-light) 100%);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 90% 50%, rgba(232,160,32,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 40% 60% at -10% 80%, rgba(46,84,144,0.4) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--white);
  clip-path: ellipse(60% 100% at 50% 100%);
}
.page-hero-inner { position: relative; z-index: 2; }
.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}
.page-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.72);
  max-width: 600px;
  line-height: 1.72;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.50);
  margin-bottom: 24px;
}
.breadcrumb a { color: rgba(255,255,255,0.55); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: rgba(255,255,255,0.28); }
.breadcrumb .current { color: var(--gold-bright); }

/* ── SECTION WRAPPER ── */
.section { padding: var(--section-v) 0; }
.section-alt { background: var(--off-white); }
.section-navy { background: var(--navy-deep); }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: rgba(15,37,71,0.18);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
  opacity: 0;
  transition: opacity 0.24s;
}
.card:hover::before { opacity: 1; }

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ── FOOTER ── */
footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.65);
  padding: 64px 0 0;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.50);
  line-height: 1.72;
  margin-top: 18px;
  max-width: 300px;
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.social-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  transition: var(--transition);
}
.social-btn:hover { background: var(--gold); color: var(--navy-deep); transform: translateY(-2px); }
.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--gold-bright); }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.55);
}
.footer-contact-item a { color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-contact-item a:hover { color: var(--gold-bright); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 0.80rem;
  color: rgba(255,255,255,0.30);
  flex-wrap: wrap;
}
.footer-bottom a { color: rgba(255,255,255,0.40); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--gold); }

/* ── FLOATING WHATSAPP ── */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 13px 20px 13px 16px;
  border-radius: 99px;
  box-shadow: 0 6px 24px rgba(37,211,102,0.40);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.86rem;
  transition: var(--transition);
  max-width: 58px;
  overflow: hidden;
  white-space: nowrap;
}
.wa-float:hover {
  max-width: 220px;
  background: #1db954;
  box-shadow: 0 10px 32px rgba(37,211,102,0.50);
  transform: translateY(-2px);
}
.wa-float svg { width: 22px; height: 22px; fill: white; flex-shrink: 0; }
.wa-label { overflow: hidden; transition: max-width 0.35s, opacity 0.35s; opacity: 0; max-width: 0; }
.wa-float:hover .wa-label { opacity: 1; max-width: 160px; }

/* ── BADGE / TAG ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}
.badge-live { background: rgba(13,158,106,0.12); color: var(--emerald); }
.badge-live::before { content: ''; width: 6px; height: 6px; background: var(--emerald); border-radius: 50%; animation: pulse-dot 1.5s ease-in-out infinite; }
.badge-soon { background: rgba(232,160,32,0.12); color: var(--gold-muted); }
.badge-navy { background: rgba(15,37,71,0.10); color: var(--navy); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── STAT BLOCK ── */
.stat-block {
  text-align: center;
  padding: 24px 20px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.04em;
}
.stat-number span { color: var(--gold); }
.stat-label {
  font-size: 0.84rem;
  color: var(--grey-400);
  font-weight: 500;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --section-v: 60px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .wa-float { bottom: 20px; right: 20px; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
