/* Hamilton Model Flying Club
   Windsock colour scheme. */
:root {
  --blue: #0F6CB0;
  --navy: #0B3A5E;
  --orange: #F28C00;
  --orange-text: #A85400;
  --white: #fff;
  --sky: #E8F3FB;
  --line: #C3D9E8;
  --ink: #0B2A44;
  --muted: #47607a;
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Atkinson Hyperlegible", Verdana, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --page: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  text-wrap: balance;
}
h2 { font-size: clamp(2.1rem, 4.5vw, 3rem); }
h3 { font-size: 1.6rem; font-weight: 700; }
p, ul, ol, dl, figure { margin: 0; }
a { color: var(--blue); text-underline-offset: .16em; }
a:hover { color: var(--orange-text); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.wrap { width: min(100%, var(--page)); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: 66ch; }
.prose > * + * { margin-top: 1em; }
.prose > h2 + *, .prose > h3 + * { margin-top: .6em; }
.prose > * + h2, .prose > * + h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  padding: 10px 16px; background: var(--white); color: var(--navy);
}
.skip:focus { top: 8px; }

/* Header */
.masthead { background: var(--white); }
.masthead__row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 10px;
}
.brand {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  color: var(--navy); text-decoration: none;
  font: 800 clamp(1.45rem, 3.2vw, 2rem)/1 var(--display);
}
.brand img { width: 72px; height: 72px; flex: none; }
.masthead__links { display: flex; gap: 20px; font-size: 1rem; }
.menu-button {
  display: none;
  min-height: 44px; padding: 0 16px;
  border: 2px solid var(--blue); background: var(--white); color: var(--navy);
  font: 700 1.2rem var(--display); cursor: pointer;
}
.nav { background: var(--navy); }
.nav ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: 13px 18px 10px;
  border-bottom: 3px solid transparent;
  color: var(--white); text-decoration: none;
  font: 600 1.25rem/1.2 var(--display);
}
.nav li:first-child a { margin-left: -18px; }
.nav a:hover { background: var(--blue); color: var(--white); }
.nav a[aria-current="page"] { border-bottom-color: var(--orange); }
.nav :focus-visible { outline-color: var(--white); outline-offset: -3px; }

/* Home hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(460px, 74vh, 720px);
  background: var(--navy) url("../img/field-loop-poster.jpg") 30% 30% / cover;
  color: var(--white);
}
.hero video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 30% 30%;
  transform: scale(1.18); transform-origin: 30% 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgb(11 58 94 / .42);
}
.hero__text { padding-block: 48px 40px; }
.hero h1 {
  color: var(--white);
  font-size: min(7.8vw, 5.5rem);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgb(11 58 94 / .55);
}
.hero p {
  max-width: 34em; margin-top: 18px;
  font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.4;
  text-shadow: 0 1px 8px rgb(11 58 94 / .8);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 22px;
  background: var(--orange); color: var(--ink); text-decoration: none;
  font: 700 1.35rem/1.1 var(--display);
}
.button:hover { background: var(--navy); color: var(--white); }
.button--plain { background: var(--white); color: var(--navy); }
.button--plain:hover { background: var(--sky); color: var(--navy); }
.hero .button:focus-visible, .band .button:focus-visible { outline-color: var(--white); }
.hero__pause {
  position: absolute; right: var(--gutter); bottom: 16px;
  min-height: 36px; padding: 4px 12px;
  border: 1px solid var(--white); background: rgb(11 58 94 / .6); color: var(--white);
  font: 400 .95rem var(--body); cursor: pointer;
}
.hero__pause:focus-visible { outline-color: var(--white); }

/* Page heading */
.page-head { padding-block: clamp(36px, 6vw, 64px) clamp(28px, 4vw, 44px); background: var(--blue); color: var(--white); }
.page-head h1 { color: var(--white); font-size: clamp(3rem, 8vw, 5.4rem); line-height: .95; }
.page-head p { max-width: 40em; margin-top: 14px; font-size: 1.25rem; line-height: 1.4; }

/* Sections */
.section { padding-block: clamp(44px, 7vw, 76px); }
.section--sky { background: var(--sky); }
.split { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
  .split--board { grid-template-columns: 340px minmax(0, 1fr); }
  .split--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--plan { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

/* Notice board */
.board { border: 2px solid var(--navy); border-top: 10px solid var(--orange); background: var(--white); }
.board h2 { padding: 18px 20px 14px; background: var(--sky); font-size: 2.3rem; }
.board__item { padding: 16px 20px 18px; border-top: 1px solid var(--line); font-size: 1.03rem; line-height: 1.45; }
.board__item h3 { margin-bottom: 6px; font-size: 1.4rem; }
.board__item p + p { margin-top: 6px; }
.board__when { font-weight: 700; }
.board__links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }

.strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 32px; }
.strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 640px) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.film { margin-top: 36px; }
.film video { width: 100%; aspect-ratio: 16 / 9; background: var(--navy); }
figcaption { margin-top: 8px; color: var(--muted); font-size: 1rem; line-height: 1.4; }

/* Photo band */
.band { background: var(--navy); color: var(--white); }
.band__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.band__grid img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; }
.band__text { padding: clamp(32px, 5vw, 60px) var(--gutter); }
.band__text h2 { color: var(--white); }
.band__text p { max-width: 32em; margin-top: 14px; }
@media (min-width: 900px) { .band__grid { grid-template-columns: 1.25fr 1fr; } }

/* Steps: only used where order matters */
.steps { margin-top: 24px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 0 0 22px 62px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--navy); color: var(--white);
  font: 800 1.6rem/1 var(--display);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 20px; top: 50px; bottom: 6px;
  border-left: 2px dashed var(--blue);
}
.steps h3 { margin-bottom: 4px; padding-top: 6px; }

/* Directions and plan */
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 20px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.plan svg { width: 100%; height: auto; }
.plan-key { margin-top: 16px; padding: 0; list-style: none; }
.plan-key li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding-block: 7px; }
.plan-key b {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: var(--navy); color: var(--white); font: 700 1.1rem/1 var(--display);
}
.plan-key .no-fly b { background: var(--orange); color: var(--ink); }
.section--map { padding-bottom: 0; }
.map { margin-top: 16px; }
.map__button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.map__button img { width: 100%; }
.map__button:hover img { opacity: .9; }

/* Documents */
.docs { margin-top: 20px; padding: 0; list-style: none; border-top: 2px solid var(--navy); }
.docs li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 24px;
  padding-block: 14px; border-bottom: 1px solid var(--line);
}
@media (max-width: 460px) { .docs li { grid-template-columns: minmax(0, 1fr); } }
.docs h3 { font-size: 1.5rem; }
.docs p { color: var(--muted); font-size: 1rem; line-height: 1.35; }
.docs a { font-weight: 700; white-space: nowrap; }

.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px 32px; margin-top: 20px; }
.types h3 { font-size: 1.4rem; }
.types p { margin-top: 2px; font-size: 1.03rem; line-height: 1.45; }

/* Events */
.events { margin-top: 8px; padding: 0; list-style: none; border-top: 2px solid var(--navy); }
.events li {
  display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 4px 24px; align-items: baseline;
  padding: 16px 12px; border-bottom: 1px solid var(--line);
}
.events time { font: 700 1.5rem/1.1 var(--display); color: var(--navy); }
.events strong { font-weight: 700; }
.events .is-past, .events .is-past time { color: var(--muted); }
.events .is-past strong { font-weight: 400; }
.events .is-next { background: var(--sky); border-left: 8px solid var(--orange); }
.events__tag { display: block; color: var(--orange-text); font-size: 1rem; font-weight: 700; }
@media (max-width: 560px) { .events li { grid-template-columns: minmax(0, 1fr); } }

/* Award */
.result { margin-top: 20px; border: 2px solid var(--navy); border-top: 10px solid var(--orange); }
.result h2 { padding: 16px 20px 12px; background: var(--sky); font-size: 2.2rem; }
.result dl { padding: 8px 20px 14px; }
.result dt { margin-top: 10px; color: var(--muted); font-size: 1rem; }
.result dd { margin: 0; font-weight: 700; }
.result .winner { font: 800 2.1rem/1.1 var(--display); color: var(--navy); }

/* Album */
.album { margin-top: 20px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 250px), 1fr)); }
.album button { display: block; width: 100%; padding: 0; border: 0; background: var(--navy); cursor: zoom-in; }
.album img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.album button:hover img { opacity: .85; }
.album-section + .album-section { margin-top: 52px; }
.lightbox { width: min(94vw, 1406px); padding: 0; border: 0; background: var(--navy); color: var(--white); }
.lightbox::backdrop { background: rgb(11 58 94 / .86); }
.lightbox img { max-height: 78vh; margin-inline: auto; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; }
.lightbox__bar button {
  flex: none; min-height: 44px; padding: 0 16px; border: 1px solid var(--white);
  background: none; color: var(--white); font: 700 1.15rem var(--display); cursor: pointer;
}
.lightbox__bar :focus-visible { outline-color: var(--white); }

/* Footer */
.footer { border-top: 4px solid var(--orange); background: var(--navy); color: var(--white); }
.footer a { color: var(--white); }
.footer a:hover { color: var(--sky); }
.footer :focus-visible { outline-color: var(--white); }
.footer__grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); padding-block: 40px 28px; font-size: 1.03rem; }
.footer h2 { color: var(--white); font-size: 1.6rem; margin-bottom: 8px; }
.footer ul { padding: 0; list-style: none; }
.footer li + li { margin-top: 4px; }
.footer__legal { padding-block: 16px 28px; border-top: 1px solid rgb(255 255 255 / .25); font-size: .97rem; }

@media (max-width: 1040px) {
  .nav a { padding-inline: 10px; font-size: 1.15rem; }
  .nav li:first-child a { margin-left: -10px; }
}

/* Small screens */
@media (max-width: 860px) {
  .masthead__links { display: none; }
  .menu-button { display: block; flex: none; }
  .brand img { width: 56px; height: 56px; }
  .hero__pause { top: 12px; bottom: auto; right: 16px; }
  .js .nav:not(.is-open) { display: none; }
  .nav ul { display: block; padding-block: 6px; }
  .nav li:first-child a { margin-left: 0; }
  .nav a { padding: 12px 4px; border-bottom: 0; border-left: 4px solid transparent; padding-left: 12px; }
  .nav a[aria-current="page"] { border-left-color: var(--orange); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (min-width: 900px) {
  .split--award { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* Album list and album pages */
.album-list { display: grid; gap: 28px 20px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.album-list a { display: block; color: var(--navy); text-decoration: none; }
.album-list img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: center 30%; }
.album-list a:hover img { opacity: .85; }
.album-list__title { display: block; margin-top: 10px; font: 700 1.7rem/1.1 var(--display); }
.album-list a:hover .album-list__title { color: var(--orange-text); }
.album-list__count { color: var(--muted); font-size: 1rem; }
.album-back { margin-bottom: 28px; }
.album-section h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.album img { aspect-ratio: 1; object-position: center 25%; }
.album figcaption { color: var(--ink); }
.lightbox__controls { display: flex; flex: none; gap: 8px; }
.lightbox__view { overflow: auto; }
.lightbox--map .lightbox__view img { width: max(100%, 1000px); max-width: none; max-height: none; }
.result__link { padding: 0 20px 16px; }
@media (max-width: 560px) {
  .lightbox__bar { flex-direction: column; align-items: stretch; }
  .lightbox__controls button { flex: 1; }
}
