/* ============================================================
   Milanenkosini Training Academy — Design System
   Navy + Gold, institutional/accredited-provider positioning
   ============================================================ */

:root {
  /* Color tokens */
  --navy-900: #0a1a2e;
  --navy-800: #12294a;
  --navy-700: #1d3a61;
  --navy-600: #2c4d78;
  --navy-gradient: linear-gradient(to right, var(--navy-900), var(--navy-700));
  --gold-600: #a8821f;
  --gold-500: #c9a227;
  --gold-400: #d9bb63;
  --gold-100: #f4ead0;
  --ink: #17233a;
  --body-text: #3d4a5f;
  --muted: #52607a;
  --bg: #ffffff;
  --bg-alt: #f6f4ee;
  --bg-alt-2: #eef1f5;
  --border: #e3e0d4;
  --border-dark: rgba(255, 255, 255, 0.16);
  --white: #ffffff;
  --success: #1e6b3c;
  --danger: #b3261e;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Type scale */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;

  --font-heading: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(10, 26, 46, 0.06), 0 1px 1px rgba(10, 26, 46, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 26, 46, 0.1);
  --shadow-lg: 0 20px 48px rgba(10, 26, 46, 0.16);
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
  --container: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--body-text);
  background: var(--bg);
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
ul { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: var(--text-5xl); font-weight: 500; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
p { text-wrap: pretty; }

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

:focus-visible {
  outline: 3px solid var(--navy-800);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(201, 162, 39, 0.35);
  border-radius: 2px;
}
.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: var(--gold-400);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.25);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 768px) { .container { padding-inline: var(--space-6); } }

.on-dark { background: var(--navy-gradient); color: rgba(255, 255, 255, 0.88); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--white); }
.on-dark p { color: rgba(255, 255, 255, 0.78); }

section { padding-block: var(--space-8); }
.section-alt { background: var(--bg-alt); }
.section-tight { padding-block: var(--space-7); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: var(--space-3);
}
.on-dark .eyebrow { color: var(--gold-400); }

.section-head { max-width: 640px; margin-bottom: var(--space-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: var(--text-lg); margin-top: var(--space-3); }
.on-dark .section-head p { color: rgba(255, 255, 255, 0.72); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  cursor: pointer;
  min-height: 44px;
  border: 1.5px solid transparent;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-400); box-shadow: var(--shadow-md); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }
.btn-outline-navy { border-color: var(--navy-800); color: var(--navy-800); }
.btn-outline-navy:hover { background: var(--navy-800); color: var(--white); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--border); }
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-3);
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand img { height: 34px; width: auto; }
.brand-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  letter-spacing: 0.05em;
  color: var(--ink);
  text-transform: uppercase;
}
.brand-name span { color: var(--gold-600); }

.nav-links { display: none; align-items: center; gap: var(--space-6); }
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--navy-800);
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { border-color: var(--gold-500); }
.nav-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--bg-alt-2); }
.nav-toggle svg { width: 26px; height: 26px; color: var(--navy-800); }
.icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-panel {
  display: none;
  position: fixed;
  top: 76px;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--white);
  z-index: 99;
  overflow-y: auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
}
.mobile-panel.is-open { display: block; }
.mobile-panel a {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.mobile-panel .btn { margin-top: var(--space-6); }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-panel { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(201, 162, 39, 0.16), transparent 60%),
    linear-gradient(to right, var(--navy-900), var(--navy-800) 55%, var(--navy-700));
  color: var(--white);
  overflow: hidden;
  padding-block: var(--space-9) var(--space-8);
}
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 64px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(201, 162, 39, 0.14);
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: var(--gold-400);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  margin-bottom: var(--space-5);
}
.hero h1 { color: var(--white); font-size: clamp(2.25rem, 5vw, var(--text-5xl)); max-width: 16ch; }
.hero .lede { font-size: var(--text-xl); color: rgba(255, 255, 255, 0.82); margin-top: var(--space-5); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-7); }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-7);
  border-top: 1px solid var(--border-dark);
}
.hero-stats .stat-num { font-family: var(--font-heading); font-size: var(--text-3xl); color: var(--gold-400); }
.hero-stats .stat-label { font-size: var(--text-xs); letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); margin-top: var(--space-1); }

@media (min-width: 768px) {
  .hero-stats { grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--space-9); }
}

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.trust-row {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-6);
}
.trust-item { display: flex; align-items: flex-start; gap: var(--space-3); }
.trust-item .icon { color: var(--gold-600); flex-shrink: 0; margin-top: 2px; }
.trust-item strong { display: block; color: var(--ink); font-size: var(--text-sm); }
.trust-item span { display: block; font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }
@media (min-width: 768px) { .trust-row { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease), border-color 220ms var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--gold-400); }

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--gold-100);
  color: var(--gold-600);
  margin-bottom: var(--space-5);
}
.icon-badge svg { width: 26px; height: 26px; }

.program-card { display: flex; flex-direction: column; height: 100%; }
.program-card .nqf-pill {
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy-800);
  background: var(--bg-alt-2);
  border: 1px solid var(--border);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  margin-bottom: var(--space-4);
}
.program-card h3 { margin-bottom: var(--space-2); }
.program-card p { color: var(--muted); font-size: var(--text-sm); flex: 1; }
.program-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
}
.program-card .meta strong { color: var(--ink); }
.program-card .card-link {
  margin-top: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--navy-800);
}
.program-card .card-link svg { width: 16px; height: 16px; transition: transform 180ms var(--ease); }
.program-card:hover .card-link svg { transform: translateX(3px); }

/* ---------- Qualification table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); }
.qual-table { min-width: 640px; }
.qual-table th, .qual-table td { text-align: left; padding: var(--space-4) var(--space-5); font-size: var(--text-sm); }
.qual-table thead th {
  background: var(--navy-800);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
}
.qual-table tbody tr:not(:last-child) td { border-bottom: 1px solid var(--border); }
.qual-table tbody tr:hover { background: var(--bg-alt); }
.qual-table td strong { color: var(--ink); }
.qual-table td.num { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--navy-gradient);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(600px 260px at 50% 0%, rgba(201, 162, 39, 0.22), transparent 70%);
}
.cta-banner > * { position: relative; }
.cta-banner h2 { color: var(--white); max-width: 24ch; margin-inline: auto; }
.cta-banner p { color: rgba(255, 255, 255, 0.78); margin-top: var(--space-3); max-width: 52ch; margin-inline: auto; }
.cta-banner .hero-actions { justify-content: center; margin-top: var(--space-6); }

/* ---------- Timeline / value list ---------- */
.value-list { display: grid; gap: var(--space-5); }
.value-item { display: flex; gap: var(--space-4); align-items: flex-start; }
.value-item .icon-badge { margin-bottom: 0; flex-shrink: 0; }
.value-item h3 { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.value-item p { color: var(--muted); font-size: var(--text-sm); }

/* ---------- Accreditation box ---------- */
.accred-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}
.accred-box dl { display: grid; grid-template-columns: 1fr; gap: var(--space-4); margin-top: var(--space-4); }
.accred-box dt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.accred-box dd { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--ink); margin-top: 2px; }
@media (min-width: 640px) { .accred-box dl { grid-template-columns: repeat(2, 1fr); } }

.notice {
  display: flex;
  gap: var(--space-3);
  background: #fbf3e2;
  border: 1px solid var(--gold-400);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  font-size: var(--text-sm);
  color: #5c4a12;
}
.notice .icon { color: var(--gold-600); flex-shrink: 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .form-grid.two-col { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.field .required { color: var(--danger); margin-left: 2px; }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: var(--text-base);
  padding: 0.75rem var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  min-height: 48px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--navy-600); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy-800);
  box-shadow: 0 0 0 4px rgba(18, 41, 74, 0.14);
}
.field .hint { font-size: var(--text-xs); color: var(--muted); }
.field .error { font-size: var(--text-xs); color: var(--danger); display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .error { display: block; }
.form-status {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.success { background: #eaf6ee; color: var(--success); border: 1px solid #bfe3cb; }
.form-status.error { background: #fbeceb; color: var(--danger); border: 1px solid #f0c2be; }

/* ---------- Contact page layout ---------- */
.contact-grid { display: grid; gap: var(--space-7); }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.contact-detail { display: flex; gap: var(--space-4); padding-block: var(--space-4); border-bottom: 1px solid var(--border); }
.contact-detail:first-child { padding-top: 0; }
.contact-detail .icon-badge { margin-bottom: 0; }
.contact-detail strong { display: block; color: var(--ink); font-size: var(--text-sm); margin-bottom: 2px; }
.contact-detail a, .contact-detail span { font-size: var(--text-sm); color: var(--muted); }
.contact-detail a:hover { color: var(--navy-800); }
.map-frame { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-top: var(--space-6); box-shadow: var(--shadow-sm); }
.map-frame iframe { width: 100%; height: 280px; border: 0; display: block; }

/* ---------- Breadcrumb / page header ---------- */
.page-header { background: var(--navy-gradient); color: var(--white); padding-block: var(--space-8) var(--space-7); }
.page-header .eyebrow { color: var(--gold-400); }
.page-header h1 { color: var(--white); font-size: clamp(2rem, 4vw, var(--text-4xl)); max-width: 22ch; }
.page-header p { color: rgba(255, 255, 255, 0.78); margin-top: var(--space-4); max-width: 60ch; font-size: var(--text-lg); }
.breadcrumb { display: flex; gap: var(--space-2); align-items: center; font-size: var(--text-xs); color: rgba(255, 255, 255, 0.6); margin-bottom: var(--space-5); text-transform: uppercase; letter-spacing: 0.04em; }
.breadcrumb a { color: rgba(255, 255, 255, 0.8); }
.breadcrumb a:hover { color: var(--gold-400); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-gradient); color: rgba(255, 255, 255, 0.72); }
.footer-top { display: grid; gap: var(--space-7); padding-block: var(--space-8); border-bottom: 1px solid var(--border-dark); }
.footer-brand .brand-name { color: var(--white); }
.footer-brand p { margin-top: var(--space-4); font-size: var(--text-sm); max-width: 34ch; color: rgba(255, 255, 255, 0.6); }
.social-links { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}
.social-links a:hover { background: var(--gold-500); color: var(--navy-900); transform: translateY(-2px); }
.social-links svg { width: 19px; height: 19px; }
.footer-col h4 { color: var(--white); font-family: var(--font-body); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-4); }
.footer-col ul { display: grid; gap: var(--space-3); }
.footer-col a { font-size: var(--text-sm); }
.footer-col a:hover { color: var(--gold-400); }
.footer-col .contact-line { display: flex; gap: var(--space-2); font-size: var(--text-sm); align-items: flex-start; }
.footer-col .contact-line svg { width: 18px; height: 18px; color: var(--gold-400); flex-shrink: 0; margin-top: 2px; }
.footer-bottom { display: flex; flex-direction: column; gap: var(--space-3); padding-block: var(--space-5); font-size: var(--text-xs); color: rgba(255, 255, 255, 0.5); }
@media (min-width: 768px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 1; transform: none; }
.js-anim [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 560ms var(--ease), transform 560ms var(--ease); }
.js-anim [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.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: absolute; left: var(--space-4); top: -60px;
  background: var(--navy-900); color: var(--white);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm);
  z-index: 200; transition: top 160ms var(--ease);
}
.skip-link:focus { top: var(--space-4); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
