/* ==========================================================================
   EDUVAK — Premium Design System
   File: design-system.css
   Layer: FOUNDATION — design tokens, modern reset, base typography, primitives
   --------------------------------------------------------------------------
   Brand: EDUVAK · College Admissions Consultancy
   Tagline: Your Dream. Our Guidance. Your Future.
   Personality: Premium · Luxury · Aspirational · Trustworthy · Modern
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {

  /* ---- 1.1 COLOR · Brand Navy ------------------------------------------- */
  --navy-950: #04121F;
  --navy-900: #07294D;
  --navy-800: #0A3360;
  --navy-700: #0B3D6E;   /* ◆ Brand primary */
  --navy-600: #14528C;
  --navy-500: #1A5FA0;
  --navy-400: #3E80BE;
  --navy-300: #6BA2D4;
  --navy-200: #A8C7E3;
  --navy-100: #DCE8F3;
  --navy-50:  #EEF4FA;

  /* ---- 1.2 COLOR · Luxury Gold ------------------------------------------ */
  --gold-900: #5E4A12;
  --gold-800: #8A6914;
  --gold-700: #A87C2A;
  --gold-600: #C0911C;
  --gold-500: #D4A017;   /* ◆ Brand accent */
  --gold-400: #E8A020;
  --gold-300: #F0BE54;
  --gold-200: #F6D696;
  --gold-100: #FBEBC8;
  --gold-50:  #FDF6E4;

  /* ---- 1.3 COLOR · Ink / Neutral (navy-tinted cool greys) --------------- */
  --ink-900: #0D1B2A;    /* ◆ Primary text */
  --ink-800: #1C2C3D;
  --ink-700: #2A3B4D;
  --ink-600: #3D5166;    /* ◆ Secondary text */
  --ink-500: #5A6E84;
  --ink-400: #8295A8;    /* ◆ Tertiary text / muted */
  --ink-300: #A9B8C6;
  --ink-200: #D3DCE4;
  --ink-100: #E8EDF2;
  --ink-50:  #F2F5F8;

  /* ---- 1.4 COLOR · Surfaces --------------------------------------------- */
  --surface-0: #FFFFFF;  /* base page */
  --surface-1: #F8FAFC;  /* subtle raised */
  --surface-2: #EEF3FA;  /* section alt */
  --surface-3: #E3EBF4;  /* deeper panel */
  --surface-dark: #07294D;
  --surface-darker: #04121F;

  /* ---- 1.5 COLOR · Semantic --------------------------------------------- */
  --success: #1FA971;
  --success-soft: #E4F6EE;
  --warning: #E8A020;
  --warning-soft: #FDF1DA;
  --danger:  #D9534F;
  --danger-soft: #FBE9E8;
  --info:    #1A5FA0;
  --info-soft: #E5EEF6;
  --live: #34D399;       /* "admissions open" pulse dot */

  /* ---- 1.6 SEMANTIC ALIASES (use these in components) ------------------- */
  --color-primary:        var(--navy-700);
  --color-primary-hover:  var(--navy-600);
  --color-primary-deep:   var(--navy-900);
  --color-accent:         var(--gold-500);
  --color-accent-hover:   var(--gold-400);
  --color-bg:             var(--surface-0);
  --color-bg-alt:         var(--surface-1);
  --color-text:           var(--ink-900);
  --color-text-soft:      var(--ink-600);
  --color-text-muted:     var(--ink-400);
  --color-text-invert:    #FFFFFF;
  --color-border:         rgba(11, 61, 110, 0.12);
  --color-border-strong:  rgba(11, 61, 110, 0.22);
  --color-border-gold:    rgba(212, 160, 23, 0.40);

  /* ---- 1.7 GRADIENTS ---------------------------------------------------- */
  --gradient-navy:       linear-gradient(135deg, #14528C 0%, #0B3D6E 45%, #07294D 100%);
  --gradient-navy-deep:  linear-gradient(160deg, #0B3D6E 0%, #07294D 55%, #04121F 100%);
  --gradient-gold:       linear-gradient(135deg, #F0BE54 0%, #D4A017 52%, #A87C2A 100%);
  --gradient-gold-soft:  linear-gradient(135deg, #FBEBC8 0%, #F0BE54 100%);
  --gradient-silver:     linear-gradient(135deg, #FFFFFF 0%, #E3EBF4 48%, #F8FAFC 100%);
  --gradient-sheen:      linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%);
  --gradient-hero-veil:  linear-gradient(115deg, rgba(7,41,77,0.94) 0%, rgba(11,61,110,0.86) 42%, rgba(10,51,96,0.78) 100%);
  --gradient-card-glow:  radial-gradient(120% 120% at 0% 0%, rgba(212,160,23,0.14) 0%, transparent 55%);

  /* ---- 1.8 TYPOGRAPHY · Families ---------------------------------------- */
  --font-display: 'Playfair Display', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* ---- 1.9 TYPOGRAPHY · Fluid type scale (clamp: mobile → desktop) ------ */
  --text-2xs:  clamp(0.66rem, 0.64rem + 0.10vw, 0.72rem);
  --text-xs:   clamp(0.75rem, 0.73rem + 0.12vw, 0.81rem);
  --text-sm:   clamp(0.84rem, 0.81rem + 0.16vw, 0.92rem);
  --text-base: clamp(0.95rem, 0.91rem + 0.20vw, 1.05rem);
  --text-md:   clamp(1.06rem, 1.00rem + 0.30vw, 1.22rem);
  --text-lg:   clamp(1.20rem, 1.10rem + 0.48vw, 1.50rem);
  --text-xl:   clamp(1.40rem, 1.22rem + 0.84vw, 2.00rem);
  --text-2xl:  clamp(1.70rem, 1.40rem + 1.42vw, 2.75rem);
  --text-3xl:  clamp(2.10rem, 1.62rem + 2.30vw, 3.75rem);
  --text-4xl:  clamp(2.55rem, 1.78rem + 3.65vw, 5.25rem);

  /* ---- 1.10 TYPOGRAPHY · Weights, leading, tracking --------------------- */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --leading-tight:   1.12;
  --leading-snug:    1.28;
  --leading-normal:  1.55;
  --leading-relaxed: 1.72;

  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.015em;
  --tracking-normal:  0em;
  --tracking-wide:    0.04em;
  --tracking-wider:   0.12em;
  --tracking-widest:  0.22em;

  /* ---- 1.11 SPACING · 4px base scale ------------------------------------ */
  --space-0:   0;
  --space-1:   0.25rem;   /*  4px */
  --space-2:   0.5rem;    /*  8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.5rem;    /* 24px */
  --space-6:   2rem;      /* 32px */
  --space-7:   2.5rem;    /* 40px */
  --space-8:   3rem;      /* 48px */
  --space-9:   4rem;      /* 64px */
  --space-10:  5rem;      /* 80px */
  --space-11:  6rem;      /* 96px */
  --space-12:  8rem;      /* 128px */
  /* Fluid vertical rhythm for section padding */
  --space-section: clamp(4rem, 2.4rem + 7vw, 9rem);
  --space-gutter:  clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);

  /* ---- 1.12 RADII ------------------------------------------------------- */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-2xl:  36px;
  --radius-pill: 999px;

  /* ---- 1.13 SHADOWS · layered, soft, premium ---------------------------- */
  --shadow-xs:  0 1px 2px rgba(13, 27, 42, 0.06);
  --shadow-sm:  0 2px 6px rgba(13, 27, 42, 0.06), 0 1px 2px rgba(13, 27, 42, 0.05);
  --shadow-md:  0 6px 18px rgba(13, 27, 42, 0.08), 0 2px 6px rgba(13, 27, 42, 0.05);
  --shadow-lg:  0 16px 40px rgba(13, 27, 42, 0.10), 0 4px 12px rgba(13, 27, 42, 0.06);
  --shadow-xl:  0 28px 64px rgba(13, 27, 42, 0.14), 0 10px 24px rgba(13, 27, 42, 0.08);
  --shadow-2xl: 0 40px 96px rgba(7, 41, 77, 0.22), 0 16px 36px rgba(13, 27, 42, 0.12);
  --shadow-navy: 0 24px 60px rgba(11, 61, 110, 0.28);
  --shadow-gold-glow: 0 12px 36px rgba(212, 160, 23, 0.36);
  --shadow-gold-glow-sm: 0 6px 20px rgba(212, 160, 23, 0.28);
  --shadow-card-hover: 0 32px 72px rgba(7, 41, 77, 0.20), 0 12px 28px rgba(13, 27, 42, 0.12);
  --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --ring-focus: 0 0 0 3px rgba(212, 160, 23, 0.45);

  /* ---- 1.14 BLUR / GLASS ------------------------------------------------ */
  --blur-glass:  18px;
  --blur-strong: 28px;
  --glass-light: rgba(255, 255, 255, 0.72);
  --glass-tint:  rgba(255, 255, 255, 0.10);
  --glass-dark:  rgba(7, 41, 77, 0.55);

  /* ---- 1.15 MOTION · durations & easing --------------------------------- */
  --duration-fast:   160ms;
  --duration-base:   280ms;
  --duration-slow:   480ms;
  --duration-slower: 720ms;

  --ease-out-soft:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out-soft: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring:     cubic-bezier(0.34, 1.46, 0.64, 1);

  --transition-base:  all var(--duration-base) var(--ease-out-soft);
  --transition-fast:  all var(--duration-fast) var(--ease-out-soft);
  --transition-slow:  all var(--duration-slow) var(--ease-out-soft);

  /* ---- 1.16 Z-INDEX SCALE ----------------------------------------------- */
  --z-base:      1;
  --z-raised:    10;
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-nav:       300;
  --z-overlay:   400;
  --z-modal:     500;
  --z-toast:     600;
  --z-max:       9999;

  /* ---- 1.17 LAYOUT ------------------------------------------------------ */
  --container-sm:   720px;
  --container-md:   960px;
  --container-max:  1240px;
  --container-wide: 1440px;
  --container-pad:  clamp(20px, 5vw, 64px);
  --nav-height:     90px;
  --nav-height-sm:  72px;

  /* ---- 1.18 BREAKPOINTS (reference — used in @media below) -------------- */
  /* --bp-xs: 480px · --bp-sm: 640px · --bp-md: 768px
     --bp-lg: 1024px · --bp-xl: 1280px · --bp-2xl: 1440px */
}

/* --------------------------------------------------------------------------
   2. MODERN RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-tap-highlight-color: transparent;
  /* Contain horizontal overflow from the off-canvas mobile drawer.
     `clip` is preferred — unlike `hidden` it does NOT turn <html> into a
     scroll container, which avoids breaking sticky positioning and the
     IntersectionObserver that drives scroll-reveal. `hidden` is the
     fallback for older browsers that don't support `clip`. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; border: none; cursor: pointer; }

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

ul[role='list'], ol[role='list'] { list-style: none; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

:where(h1, h2, h3, h4, h5, h6) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }

/* Accessible focus ring */
:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-xs);
}

/* Selection */
::selection {
  background: var(--gold-300);
  color: var(--navy-900);
}

/* Custom scrollbar (desktop) */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 11px; }
  ::-webkit-scrollbar-track { background: var(--surface-2); }
  ::-webkit-scrollbar-thumb {
    background: var(--navy-300);
    border-radius: var(--radius-pill);
    border: 3px solid var(--surface-2);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--navy-500); }
}

/* --------------------------------------------------------------------------
   3. BASE TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h5, h6 {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p { color: var(--color-text-soft); }

strong, b { font-weight: var(--fw-semibold); color: var(--color-text); }

small { font-size: var(--text-xs); }

a.link {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
  transition: var(--transition-fast);
}
a.link:hover { color: var(--color-accent); }

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY UTILITIES
   -------------------------------------------------------------------------- */
.display-1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
}
.display-2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-display { font-family: var(--font-display); }
.text-body    { font-family: var(--font-body); }

.text-2xs  { font-size: var(--text-2xs); }
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md   { font-size: var(--text-md); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }

.fw-light    { font-weight: var(--fw-light); }
.fw-regular  { font-weight: var(--fw-regular); }
.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }

.lead {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-soft);
  font-weight: var(--fw-regular);
}

/* Eyebrow / section tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--gradient-gold);
  border-radius: var(--radius-pill);
}

/* Gold gradient text */
.text-gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* Navy gradient text */
.text-gradient-navy {
  background: var(--gradient-navy);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-primary   { color: var(--color-primary); }
.text-accent    { color: var(--color-accent); }
.text-soft      { color: var(--color-text-soft); }
.text-muted     { color: var(--color-text-muted); }
.text-invert    { color: var(--color-text-invert); }
.text-center    { text-align: center; }
.text-balance   { text-wrap: balance; }
.uppercase      { text-transform: uppercase; letter-spacing: var(--tracking-wide); }

/* --------------------------------------------------------------------------
   5. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--wide { max-width: var(--container-wide); }
.container--md   { max-width: var(--container-md); }
.container--sm   { max-width: var(--container-sm); }

.section {
  position: relative;
  padding-block: var(--space-section);
}
.section--tight  { padding-block: clamp(2.5rem, 1.6rem + 4vw, 5rem); }
.section--alt    { background: var(--surface-1); }
.section--panel  { background: var(--surface-2); }
.section--dark {
  background: var(--gradient-navy-deep);
  color: var(--color-text-invert);
}
.section--dark p { color: rgba(255, 255, 255, 0.74); }

/* Section heading block */
.section-head {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  text-align: center;
}
.section-head .eyebrow { margin-bottom: var(--space-4); }
.section-head .section-title { margin-bottom: var(--space-4); }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head--left .eyebrow::before { display: inline-block; }

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
.section--dark .section-title { color: #fff; }

.section-sub {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-soft);
}

/* Stack & cluster helpers */
.stack    { display: flex; flex-direction: column; }
.stack-2  { gap: var(--space-2); }
.stack-3  { gap: var(--space-3); }
.stack-4  { gap: var(--space-4); }
.stack-6  { gap: var(--space-6); }
.cluster  { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.cluster-4 { gap: var(--space-4); }
.center-x { display: flex; justify-content: center; }

/* Responsive auto grid */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* Decorative divider */
.divider-gold {
  width: 64px;
  height: 3px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--gradient-gold);
}

/* --------------------------------------------------------------------------
   6. UTILITY HELPERS
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.no-scroll { overflow: hidden !important; }

.bg-navy   { background: var(--gradient-navy); color: #fff; }
.bg-gold   { background: var(--gradient-gold); }
.bg-silver { background: var(--gradient-silver); }
.bg-alt    { background: var(--surface-1); }
.bg-panel  { background: var(--surface-2); }

.radius-md { border-radius: var(--radius-md); }
.radius-lg { border-radius: var(--radius-lg); }
.radius-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.mt-auto { margin-top: auto; }
.full-width { width: 100%; }
.relative { position: relative; }

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