:root {
  --ink: #002c59;
  --ink-soft: #284c70;
  --raf-red: #d60829;
  --sky: #72a1cd;
  --ice: #f3f7fb;
  --white: #ffffff;
  --line: #d8e1ea;
  --gold: #ffd600;
  --orange: #f08100;
  --accent-blue: #0070b9;
  --navigation-blue: #3486ba;
  --green: #84992f;
  --supporting-blue: #569eba;
  --shadow: 0 18px 48px rgba(0, 44, 89, 0.15);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Myriad Pro", "Myriad", "Segoe UI", Arial, sans-serif;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  background: var(--white);
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
}

.skip-link:focus {
  left: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  width: min(var(--max), calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 280px;
}

.brand > span {
  display: block;
  padding-left: 14px;
  border-left: 3px solid var(--raf-red);
}

.brand img {
  width: 116px;
  height: auto;
  flex: 0 0 auto;
  padding: 6px;
  border-radius: 4px;
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.1;
  font-weight: 900;
}

.brand span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  outline: none;
  color: var(--white);
  background: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--raf-red);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  outline: 3px solid rgba(200, 16, 46, 0.24);
}

.button.secondary {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.button.dark {
  background: var(--ink);
}

main {
  overflow: hidden;
}

.section {
  padding: 72px 0;
}

.section.tight {
  padding: 48px 0;
}

.section.band {
  background: var(--ice);
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(0, 44, 89, 0.94), rgba(0, 44, 89, 0.68) 48%, rgba(0, 44, 89, 0.12)),
    url("https://www.raf.mod.uk/index.cfm/_api/asset/image/?filePath=%2Fraf-beta%2Fassets%2FImage%2F615260F1-A997-4417-A9872F72ADAED991-Me_pj87s.jpeg") center right / cover no-repeat;
  color: var(--white);
  padding: 64px 0;
}

.hero.slim {
  min-height: 410px;
}

.hero-content {
  width: min(680px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--raf-red);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.card.highlight .eyebrow,
.event-panel .eyebrow {
  color: var(--gold);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-content h1 + p,
.section > .container > h2 + p,
.section-head h2 + p,
.split > div > h2 + p,
.container > h2 + p {
  margin-top: 16px;
}

h1 {
  font-size: clamp(2.35rem, 7vw, 5.4rem);
}

h2 {
  font-size: clamp(1.85rem, 4vw, 3rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

.lead {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 60ch;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
  max-width: 760px;
}

.fact {
  min-height: 108px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.fact strong {
  display: block;
  font-size: 1.4rem;
}

.fact span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-head p {
  max-width: 58ch;
  color: var(--ink-soft);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0, 44, 89, 0.04);
}

.card.highlight {
  border-color: transparent;
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 10px;
}

.card:not(.activity-card) h2 {
  margin-bottom: 16px;
}

.card p,
.card li {
  color: var(--ink-soft);
}

.card.highlight p,
.card.highlight li {
  color: rgba(255, 255, 255, 0.86);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--sky);
  font-size: 0.84rem;
  font-weight: 800;
}

.tag.red {
  color: var(--white);
  background: var(--raf-red);
}

.tag.green {
  color: var(--white);
  background: var(--green);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 34px;
  align-items: center;
}

.notice {
  padding: 22px;
  border-left: 5px solid var(--raf-red);
  border-radius: var(--radius);
  background: #fff6f7;
}

.notice strong {
  display: block;
  margin-bottom: 6px;
}

.event-panel {
  padding: 26px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.event-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.event-item {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.event-item strong {
  display: block;
}

.event-item span {
  color: rgba(255, 255, 255, 0.82);
}

.timeline {
  display: grid;
  gap: 14px;
  counter-reset: steps;
}

.step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.step::before {
  counter-increment: steps;
  content: counter(steps);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--raf-red);
  font-weight: 900;
}

.activity-card {
  display: grid;
  gap: 14px;
}

.activity-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--ice);
}

.level-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
}

.level {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #586a7d;
  background: var(--ice);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.level.active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.level::before {
  content: "\2715";
  color: inherit;
  font-weight: 900;
}

.level.active::before {
  content: "\2713";
}

.form {
  display: grid;
  gap: 16px;
}

.form.card {
  align-self: start;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  grid-auto-rows: minmax(74px, auto);
}

.field {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
}

label,
legend {
  font-weight: 800;
  line-height: 1.25;
}

fieldset.field {
  min-inline-size: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 10px 12px;
  margin: 0;
  border: 2px solid #b7c4d2;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  font: inherit;
  line-height: 1.35;
  appearance: none;
  -webkit-appearance: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input[type="email"],
input[type="tel"],
input[type="text"],
input[type="date"],
select {
  line-height: normal;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 2px solid #7f90a3;
  border-radius: 3px;
  background: var(--white);
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--ink);
  cursor: pointer;
}

textarea {
  min-height: 142px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(0, 112, 185, 0.22);
  outline-offset: 0;
  border-color: var(--accent-blue);
  box-shadow: none;
}

.checkbox-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-weight: 400;
  cursor: pointer;
}

.check input {
  min-height: auto;
  margin-top: 3px;
}

.check span {
  cursor: pointer;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note,
.small {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.form-status {
  display: none;
  padding: 14px;
  border-radius: var(--radius);
  font-weight: 800;
}

.form-status.success {
  display: block;
  color: #064e3b;
  background: #dff7ed;
}

.form-status.error {
  display: block;
  color: #7f1d1d;
  background: #fde2e2;
}

.link-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 44, 89, 0.12);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.link-list a span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.link-list a:hover,
.link-list a:focus-visible {
  outline: 3px solid rgba(0, 112, 185, 0.22);
  outline-offset: 2px;
  border-color: var(--accent-blue);
  background: var(--accent-blue);
  transform: translateY(-1px);
}

.site-footer {
  color: var(--white);
  background: var(--ink);
}

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
}

.site-footer a {
  color: var(--white);
}

.site-footer h2 {
  font-size: 1.35rem;
}

.site-footer h2,
.site-footer h3 {
  margin-bottom: 14px;
}

.site-footer .small {
  color: rgba(255, 255, 255, 0.86);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 4px;
}

.footer-small {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    width: 100%;
  }

  .hero {
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(0, 44, 89, 0.94), rgba(0, 44, 89, 0.76)),
      url("https://www.raf.mod.uk/index.cfm/_api/asset/image/?filePath=%2Fraf-beta%2Fassets%2FImage%2F615260F1-A997-4417-A9872F72ADAED991-Me_pj87s.jpeg") center / cover no-repeat;
  }

  .hero-facts,
  .grid.three,
  .grid.two,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .container,
  .footer-grid {
    width: min(100% - 24px, var(--max));
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand img {
    width: 88px;
    padding: 5px;
  }

  .brand > span {
    display: none;
  }

  .section {
    padding: 54px 0;
  }

  .hero-actions,
  .actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .step {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .step::before {
    width: 40px;
    height: 40px;
  }
}
