/* ============================================================
   YORKSHIRE LIFEGUARD ACADEMY — Design System
   main.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  /* Brand colours */
  --navy:        #002147;
  --navy-dark:   #001530;
  --navy-mid:    #003070;
  --gold:        #FFB81C;
  --gold-light:  #FFD060;
  --crimson:     #C8102E;
  --white:       #FFFFFF;
  --coastal-bg:  #F4F8FB;
  --coastal-mid: #E8EFF5;

  /* Text */
  --text-primary:   #002147;
  --text-secondary: #3A5068;
  --text-muted:     #6B88A0;
  --text-light:     #FFFFFF;

  /* Font families */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;
  --space-3xl:  9rem;

  /* Border radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0, 33, 71, 0.08);
  --shadow-md:  0 8px 32px rgba(0, 33, 71, 0.12);
  --shadow-lg:  0 20px 60px rgba(0, 33, 71, 0.18);
  --shadow-hero:0 40px 120px rgba(0, 33, 71, 0.4);

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:cubic-bezier(0.45, 0, 0.55, 1);
  --transition-fast:   0.18s var(--ease-out);
  --transition-normal: 0.35s var(--ease-out);
  --transition-slow:   0.6s var(--ease-out);

  /* Layout */
  --max-width:   1280px;
  --nav-height:  80px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--white);
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

button {
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography Scale ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy);
}

.display-xl {
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.display-lg {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.display-md {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 4.5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.5vw, 3rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 700; }
h5 { font-size: 1rem; font-weight: 600; }

.lead {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-secondary);
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow-crimson {
  color: var(--crimson);
}

/* ── Layout Utilities ──────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.section {
  padding-block: var(--space-2xl);
  position: relative;
}

.section--sm { padding-block: var(--space-xl); }
.section--lg { padding-block: var(--space-3xl); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* ── Colour Utilities ──────────────────────────────────────── */
.bg-navy    { background: var(--navy); color: var(--white); }
.bg-coastal { background: var(--coastal-bg); }
.bg-white   { background: var(--white); }
.text-white { color: var(--white); }
.text-gold  { color: var(--gold); }
.text-crimson { color: var(--crimson); }
.text-navy  { color: var(--navy); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  transition: var(--transition-normal);
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(255, 184, 28, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 184, 28, 0.55);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-navy:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-lg {
  font-size: 1rem;
  padding: 1rem 2.5rem;
}

/* ── Badge / Tag ───────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--coastal-bg);
  color: var(--navy);
}

.badge-gold { background: var(--gold); color: var(--navy); }
.badge-crimson { background: var(--crimson); color: var(--white); }
.badge-navy { background: var(--navy); color: var(--white); }

/* ── Gold accent line ──────────────────────────────────────── */
.accent-line {
  width: 48px;
  height: 4px;
  background: var(--gold);
  border-radius: var(--radius-full);
}

.accent-line--crimson { background: var(--crimson); }

/* ── Section headings ──────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-lg);
}

.section-header--center {
  text-align: center;
}

.section-header--center .accent-line {
  margin-inline: auto;
}

/* ── Images with overlay ───────────────────────────────────── */
.img-overlay {
  position: relative;
  overflow: hidden;
}

.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 33, 71, 0.7) 100%);
}

/* ── Responsive helpers ────────────────────────────────────── */
.hide-mobile { display: block; }
.show-mobile { display: none; }

@media (max-width: 768px) {
  .hide-mobile { display: none; }
  .show-mobile { display: block; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* ── Visually hidden (accessibility) ──────────────────────── */
.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;
}
