/* base.css — fonts, variables, reset, typography, buttons, utilities */

/* ── FONTS (self-hosted, latin subset; both are variable fonts covering all weights used) ── */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/syne-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('fonts/dm-sans-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/dm-sans-italic-latin.woff2') format('woff2');
}

:root {
  --navy: #0d1f3c;
  --navy-mid: #162d52;
  --teal: #0f7b6c;
  --teal-light: #13a896;
  --accent: #f4a623;
  --slate: #4a5568;
  --light: #f7f9fc;
  --white: #ffffff;
  --border: #e2e8f0;
  --text: #1a202c;
  --muted: #5f6b7f; /* darkened from #718096 to reach 4.5:1 on white and --light */
  --radius: 4px;
  --shadow: 0 2px 16px rgba(13, 31, 60, 0.10);
  --shadow-lg: 0 8px 40px rgba(13, 31, 60, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Keep in-page targets and focused elements clear of the sticky header */
  scroll-padding-top: 5rem;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: 'Syne', sans-serif;
  line-height: 1.15;
  font-weight: 700;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── FOCUS ── */
/* Teal ring plus a white gap so focus is visible on both light and navy backgrounds */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--white);
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 1000;
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 8px;
}

main:focus {
  outline: none;
}

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--navy);
}

.btn-primary:hover {
  background: #e8971a;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(244, 166, 35, 0.4);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.08);
}

.btn-teal {
  background: var(--teal);
  color: white;
}

.btn-teal:hover {
  background: var(--teal-light);
  transform: translateY(-1px);
}

/* ── SECTIONS ── */
section {
  padding: 80px 5vw;
}

.section-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  color: var(--navy);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.65;
  font-weight: 300;
}

.section-head {
  margin-bottom: 52px;
}

/* ── UTILITIES ── */
.text-center {
  text-align: center;
}

.text-center .section-sub {
  margin: 0 auto;
}

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.hidden,
[hidden] {
  display: none !important;
}

.stars {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* ── BACK TO TOP ── */
#back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 50;
  box-shadow: var(--shadow);
  border: none;
}

#back-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* ── NAVY PAGE HERO (accreditation, contact, courses) ── */
.page-hero {
  background: var(--navy);
  padding: 72px 5vw;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 50px);
  color: white;
  margin-bottom: 16px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
}

.section-label--light {
  color: var(--teal-light);
}

/* ── REDUCED MOTION ── */
@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;
  }
}