/* ================================================================
   ABROAD EDUCATIONAL SPECIALISTS
   Design System: Luxury Editorial
   Aesthetic: High-end travel magazine meets Swiss precision
   ================================================================ */

/* ---- Design Tokens ---- */
:root {
  /* Brand Palette */
  --navy: #0A1628;
  --navy-90: #0E1E38;
  --navy-80: #132847;
  --navy-70: #1A3461;
  --navy-60: #234278;
  --slate: #2C3E5D;
  --gold: #C8965A;
  --gold-light: #DEBA8A;
  --gold-glow: rgba(200, 150, 90, 0.12);
  --gold-bright: #E6B87D;
  --cream: #FAF6F0;
  --cream-dark: #F0EAE0;
  --ivory: #FFFDF8;
  --white: #FFFFFF;
  --charcoal: #1C1C1E;
  --graphite: #3A3A3C;
  --steel: #636366;
  --silver: #8E8E93;
  --mist: #AEAEB2;
  --cloud: #D1D1D6;
  --snow: #F2F2F7;
  --emerald: #2D8B5F;
  --coral: #E07C5A;
  --sky: #4A90D9;

  /* Typography Scale */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-heading: 'Satoshi', 'Sora', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Fluid Type */
  --fs-hero: clamp(2.8rem, 6vw + 1rem, 5.5rem);
  --fs-h1: clamp(2.2rem, 4vw + 0.5rem, 3.8rem);
  --fs-h2: clamp(1.8rem, 3vw + 0.5rem, 2.8rem);
  --fs-h3: clamp(1.3rem, 2vw + 0.3rem, 1.75rem);
  --fs-h4: clamp(1.05rem, 1.5vw + 0.2rem, 1.3rem);
  --fs-body: clamp(0.95rem, 1vw + 0.1rem, 1.1rem);
  --fs-small: clamp(0.8rem, 0.9vw, 0.92rem);
  --fs-caption: clamp(0.7rem, 0.8vw, 0.82rem);
  --fs-label: 0.72rem;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;
  --section-pad: clamp(64px, 10vw, 120px);

  /* Borders & Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(10, 22, 40, 0.04);
  --shadow-card: 0 4px 20px rgba(10, 22, 40, 0.06), 0 1px 3px rgba(10, 22, 40, 0.04);
  --shadow-elevated: 0 12px 40px rgba(10, 22, 40, 0.1), 0 2px 8px rgba(10, 22, 40, 0.05);
  --shadow-dramatic: 0 24px 60px rgba(10, 22, 40, 0.16), 0 4px 12px rgba(10, 22, 40, 0.06);
  --shadow-gold: 0 8px 30px rgba(200, 150, 90, 0.2);
  --shadow-inner: inset 0 2px 4px rgba(10, 22, 40, 0.06);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.2s;
  --dur-normal: 0.4s;
  --dur-slow: 0.7s;

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* Dark mode tokens override */
[data-theme="dark"] {
  --cream: #0A1628;
  --cream-dark: #0E1E38;
  --ivory: #132847;
  --white: #0A1628;
  --snow: #1A3461;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--graphite);
  background: var(--ivory);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}
button { cursor: pointer; }
::selection { background: var(--gold); color: var(--white); }

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { color: var(--steel); line-height: 1.7; }
.text-balance { text-wrap: balance; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: 20px;
}
.container-narrow { max-width: 880px; }
.container-wide { max-width: 1440px; }

.section {
  padding-block: var(--section-pad);
  position: relative;
}

/* Grain overlay texture */
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  transition: all var(--dur-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.btn:hover::before { opacity: 1; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: var(--white);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(200, 150, 90, 0.35);
}
.btn-gold:active { transform: translateY(-1px); }

.btn-navy {
  background: var(--navy);
  color: var(--cream);
}
.btn-navy:hover { background: var(--navy-80); transform: translateY(-3px); }

.btn-outline {
  border: 2px solid var(--gold);
  color: var(--gold);
  background: transparent;
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--navy);
  padding: 10px 0;
  border-radius: 0;
  gap: 8px;
}
.btn-ghost::after {
  content: '→';
  transition: transform var(--dur-normal) var(--ease-spring);
}
.btn-ghost:hover::after { transform: translateX(6px); }
.btn-ghost:hover { color: var(--gold); }
.btn-ghost::before { display: none; }

.btn-white-outline {
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--white);
}
.btn-white-outline:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-sm { padding: 11px 24px; font-size: var(--fs-caption); }
.btn-lg { padding: 18px 42px; font-size: var(--fs-body); }
.btn i { font-size: 0.9em; }

/* ---- Section Headers ---- */
.sec-header { margin-bottom: 56px; }
.sec-header.center { text-align: center; }
.sec-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  color: var(--gold);
  margin-bottom: 16px;
}
.sec-label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.sec-header.center .sec-label::before { display: none; }
.sec-header.center .sec-label {
  justify-content: center;
}
.sec-header h2 { margin-bottom: 16px; }
.sec-header p {
  font-size: var(--fs-body);
  max-width: 560px;
  line-height: 1.7;
}
.sec-header.center p { margin-inline: auto; }

/* ================================================================
   HEADER / NAVIGATION
   ================================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: 76px;
  display: flex;
  align-items: center;
  transition: all var(--dur-normal) var(--ease-out);
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(10, 22, 40, 0.05);
  opacity: 0;
  transition: opacity var(--dur-normal) var(--ease-out);
}
.header.scrolled::before { opacity: 1; }
.header.scrolled { box-shadow: 0 1px 30px rgba(10, 22, 40, 0.06); }

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--navy-70));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.15;
  top: -4px;
  right: -4px;
}

/* Desktop Nav */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 18px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate);
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
}
.nav-link:hover { color: var(--navy); background: rgba(10, 22, 40, 0.04); }
.nav-link.active { color: var(--gold); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2.5px;
  background: var(--gold);
  border-radius: 2px;
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-trigger::after { content: ' ▾'; font-size: 0.7em; opacity: 0.5; }
.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dramatic);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--dur-normal) var(--ease-out);
  border: 1px solid rgba(10, 22, 40, 0.06);
}
.dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  transition: all var(--dur-fast);
}
.dropdown-panel a:hover {
  background: var(--gold-glow);
  color: var(--gold);
}
.dropdown-panel .dd-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.header-cta { display: none; }

/* Hamburger */
.hamburger {
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  z-index: 10;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--dur-normal) var(--ease-out);
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); width: 24px; }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); width: 24px; }

/* Mobile nav overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  pointer-events: none;
}
.mobile-overlay .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--dur-normal) var(--ease-out);
}
.mobile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(380px, 85vw);
  height: 100%;
  background: var(--ivory);
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  overflow-y: auto;
  padding: 100px 32px 40px;
  display: flex;
  flex-direction: column;
}
.mobile-overlay.open {
  pointer-events: all;
}
.mobile-overlay.open .backdrop { opacity: 1; }
.mobile-overlay.open .mobile-drawer { transform: translateX(0); }
.mobile-drawer a {
  display: block;
  padding: 16px 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--slate);
  border-bottom: 1px solid rgba(10, 22, 40, 0.06);
  transition: color var(--dur-fast);
}
.mobile-drawer a:hover { color: var(--gold); }
.mobile-drawer .sub { padding-left: 24px; font-size: 0.95rem; color: var(--silver); }
.mobile-drawer .drawer-cta { margin-top: auto; padding-top: 32px; }

@media (min-width: 1080px) {
  .hamburger { display: none; }
  .mobile-overlay { display: none; }
  .header-cta { display: inline-flex; }
}
@media (max-width: 1079px) {
  .nav { display: none; }
}

/* ================================================================
   HERO SECTION — Cinematic fullscreen
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 76px 0 0;
  overflow: hidden;
  background: var(--navy);
}
/* Layered gradient background */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(200, 150, 90, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(35, 66, 120, 0.15) 0%, transparent 50%),
    linear-gradient(170deg, var(--navy) 0%, #0d1f3a 40%, #162d50 100%);
}
/* Animated mesh dots */
.hero-mesh {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.8) 1px, transparent 0);
  background-size: 48px 48px;
}
/* Decorative floating orb */
.hero-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 150, 90, 0.06), transparent 70%);
  top: 10%;
  right: -10%;
  animation: orbFloat 20s ease-in-out infinite;
  pointer-events: none;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.05); }
}
.hero-orb-2 {
  width: 300px; height: 300px;
  top: auto; bottom: 5%; right: auto; left: 5%;
  background: radial-gradient(circle, rgba(74, 144, 217, 0.05), transparent 70%);
  animation-delay: -10s;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  padding-block: 60px;
}
.hero-content { max-width: 640px; }
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(200, 150, 90, 0.12);
  border: 1px solid rgba(200, 150, 90, 0.2);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 28px;
  animation: fadeInUp 0.8s var(--ease-out) both;
}
.hero-label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: var(--fs-hero);
  color: var(--white);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s 0.15s var(--ease-out) both;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  position: relative;
}
.hero h1 em::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
  opacity: 0.3;
  border-radius: 2px;
}
.hero-desc {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 520px;
  animation: fadeInUp 0.8s 0.3s var(--ease-out) both;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s 0.45s var(--ease-out) both;
}

/* Hero metrics strip */
.hero-metrics {
  display: flex;
  gap: 0;
  margin-top: 56px;
  animation: fadeInUp 0.8s 0.6s var(--ease-out) both;
}
.hero-metric {
  flex: 1;
  padding: 20px 0;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-metric:last-child { border-right: none; }
.hero-metric .val {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}
.hero-metric .lbl {
  font-family: var(--font-heading);
  font-size: var(--fs-caption);
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Hero visual (right side image) */
.hero-visual {
  position: relative;
  display: none;
}
.hero-img-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-dramatic);
  position: relative;
}
.hero-img-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.hero-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.4) 0%, transparent 50%);
}
.hero-float-badge {
  position: absolute;
  bottom: 24px;
  left: -24px;
  background: var(--white);
  padding: 16px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: floatBadge 4s ease-in-out infinite;
  z-index: 3;
}
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-float-badge .badge-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.hero-float-badge strong { font-family: var(--font-heading); font-size: 0.95rem; color: var(--navy); }
.hero-float-badge span { font-size: var(--fs-caption); color: var(--silver); }

@media (min-width: 1024px) {
  .hero .container { grid-template-columns: 1fr 0.85fr; }
  .hero-visual { display: block; }
  .hero-content { max-width: none; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ================================================================
   SCROLL REVEAL
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-left { transform: translateX(-40px); }
.reveal-left.visible { transform: translateX(0); }
.reveal-right { transform: translateX(40px); }
.reveal-right.visible { transform: translateX(0); }
.reveal-scale { transform: scale(0.92); }
.reveal-scale.visible { transform: scale(1); }
