/* cfipete.com — single stylesheet for every page. */

:root {
  --navy: #29385f;
  --navy-deep: #151c30;
  --sky: #b8c1d7;
  --ink: #2b2b2b;
  --muted: #5f6360;
  --line: #d4d4d2;
  --paper: #ffffff;
  --paper-alt: #f4f5f8;
  --link: #2f5fae;

  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Barlow Condensed", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1080px;
  --gutter: 24px;
  --radius: 6px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.65;
}

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

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--navy); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header & navigation ---------- */

.site-header {
  position: relative; /* anchors the mobile dropdown menu */
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 64px;
}
/* Logo (templates/logo.svg), inlined in the header and footer */
.brand { display: block; color: var(--navy); }
.brand svg { display: block; fill: currentColor; }
.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--sky); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }

/* Mobile menu: CSS-only checkbox toggle */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; }

@media (max-width: 760px) {
  .nav-toggle-label {
    display: block;
    margin-left: auto;
    width: 44px;
    height: 44px;
    position: relative;
    cursor: pointer;
  }
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    position: absolute;
    left: 10px;
    width: 24px;
    height: 2px;
    background: var(--navy);
    content: "";
  }
  .nav-toggle-label span { top: 21px; }
  .nav-toggle-label span::before { left: 0; top: -7px; }
  .nav-toggle-label span::after { left: 0; top: 7px; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .nav-toggle:focus-visible + .nav-toggle-label { outline: 2px solid var(--link); }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { display: block; padding: 10px 0; }
}

/* ---------- Page sections ---------- */

.section { padding: 64px 0; }
.section.alt { background: var(--paper-alt); }
.section > .wrap > :last-child { margin-bottom: 0; }

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 46rem;
}

.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.4em; }

/* Text beside an image; add .reverse to put the image on the left */
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split > * { min-width: 0; }
.split img { border-radius: var(--radius); width: 100%; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse > :first-child { order: 0; }
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy) url("/images/home/above-clouds-poster.jpg") center / cover;
  color: #fff;
  padding: 72px 0;
}
/* Looping cloud-top video behind the hero, with a navy tint so white text stays readable */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(21, 28, 48, 0.75) 0%, rgba(41, 56, 95, 0.35) 60%, rgba(41, 56, 95, 0.15) 100%);
}
.hero > .wrap { position: relative; z-index: 2; }
.hero h1, .hero .subtitle { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
.hero .split { grid-template-columns: 1fr 1.2fr; }
@media (max-width: 760px) {
  .hero { padding: 48px 0; }
  .hero .split { grid-template-columns: 1fr; }
}
.hero h1 { color: #fff; margin: 0; }
.hero .subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  color: #e4e9f4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0.2em 0 0;
}
.hero img { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }

/* ---------- Banner (full-width photo header) ---------- */

.banner {
  position: relative;
  height: clamp(220px, 38vw, 400px);
  overflow: hidden;
  background: var(--navy-deep);
}
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-title {
  position: absolute;
  inset: auto 0 0 0;
  padding: 80px 0 28px;
  background: linear-gradient(to top, rgba(21, 28, 48, 0.85), rgba(21, 28, 48, 0));
}
.banner-title h1 { color: #fff; margin: 0; }
/* Small photo credit/location line; sits in the title's bottom padding so it
   never overlaps the h1. */
.banner-caption {
  position: absolute;
  right: 14px;
  bottom: 6px;
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ---------- Gear page ---------- */

.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}
.gear-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gear-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gear-item .body { padding: 20px 22px 8px; }
.gear-item p { font-size: 1rem; }

/* ---------- Adventures page ---------- */

.adventure { padding: 48px 0; border-top: 1px solid var(--line); }
.adventure:first-of-type { border-top: 0; }
.adventure p { max-width: 46rem; }
.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.photo-pair a { display: block; }
.photo-pair img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  transition: opacity 0.15s;
}
.photo-pair a:hover img { opacity: 0.9; }
/* Landscape + portrait: column widths match the aspect ratios so both photos
   show uncropped at the same height. Default fits 3:2 + 3:4; for 3:2 + 2:3 set
   style="--cols: 9fr 4fr". */
.photo-pair.landscape-portrait { grid-template-columns: var(--cols, 2fr 1fr); }
.photo-pair.landscape-portrait img { aspect-ratio: auto; height: 100%; }
@media (max-width: 600px) {
  .photo-pair,
  .photo-pair.landscape-portrait { grid-template-columns: 1fr; }
}

/* ---------- Resources page ---------- */

.link-list { padding-left: 1.2em; }
.link-list li { margin-bottom: 0.6em; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: var(--sky);
  font-size: 0.95rem;
  padding: 28px 0;
}
.site-footer a { color: #fff; }
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  text-align: left;
}
.site-footer .brand { color: #fff; }
.site-footer .logo-knockout { fill: var(--navy-deep); }
.site-footer .sep { opacity: 0.5; margin: 0 0.4em; }
