/* W Goode Photography — site styles
   Hand-written, no build step. Matches the flybyradio-site approach.
   Dark ground on purpose: these pages are 90% photograph, and dark
   surrounds make a photo read brighter without touching the file. */

:root {
  --bg:        #0c0c0e;
  --bg-raised: #141418;
  --bg-hover:  #1c1c22;
  --line:      #26262e;
  --text:      #f2f2f4;
  --text-dim:  #a0a0ac;
  --text-faint:#8a8a95;   /* 5.72:1 on --bg — passes WCAG AA for small text (was #6b6b78 at 3.72:1, which failed) */
  --accent:    #c9a227;   /* TCHS-ish gold; reads warm against the dark */
  --accent-dim:#8f7419;
  --danger:    #e0574a;
  --ok:        #4ea87a;

  --wrap: 1240px;
  --gap: clamp(0.75rem, 2vw, 1.25rem);
  --radius: 3px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Focus ring is deliberately loud. Parents navigate these galleries on
   phones and tablets with every assistive setting under the sun. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #000;
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 14, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.nav a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-toggle { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* 48px min height — thumb-sized. Most of this site is used one-handed
     in a stadium, not two-handed at a desk. */
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #000;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.08s var(--ease);
}
.btn:hover { background: #dcb32c; border-color: #dcb32c; }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--text-faint); }

/* ---------- hero carousel (home) ---------- */

.hero {
  position: relative;
  height: clamp(420px, 82vh, 860px);
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
}
.hero-slide.is-active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

/* Two scrims, not one. The vertical pass seats the nav and the bottom edge;
   the horizontal pass darkens the left third so the headline has something
   to sit on. Without the second one the type lands straight across whoever
   is mid-jump in the middle of the frame, and every slide crops differently
   so there's no safe spot to hand-place it. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(0,0,0,0.78) 0%,
      rgba(0,0,0,0.55) 26%,
      rgba(0,0,0,0.12) 52%,
      rgba(0,0,0,0) 72%
    ),
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.5) 0%,
      rgba(0,0,0,0.05) 34%,
      rgba(0,0,0,0.45) 100%
    );
  pointer-events: none;
}

/* On phones the frame is too narrow for a side scrim to spare the subject,
   so go bottom-weighted instead and let the copy sit under them. */
@media (max-width: 720px) {
  .hero::after {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.5) 0%,
      rgba(0,0,0,0.08) 28%,
      rgba(0,0,0,0.72) 72%,
      rgba(0,0,0,0.85) 100%
    );
  }
}

.hero-copy {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}

.hero-copy p {
  margin: 0 0 1.75rem;
  max-width: 40ch;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #e4e4e8;
  text-shadow: 0 1px 12px rgba(0,0,0,0.7);
}

.hero-dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 1rem;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.hero-dots button {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.32);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.hero-dots button[aria-current="true"] {
  background: var(--accent);
  transform: scale(1.5);
}

/* Respect the OS setting. An auto-advancing carousel is exactly the kind
   of motion that makes some people ill — freeze on slide 1 instead. */
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section-alt { background: var(--bg-raised); }

.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-dim);
}

/* ---------- photo grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--gap);
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-raised);
  aspect-ratio: 3 / 2;
  cursor: zoom-in;
  border: 0;
  padding: 0;
}
.tile.portrait { aspect-ratio: 2 / 3; }
.tile.square   { aspect-ratio: 1 / 1; }

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}
.tile:hover img { transform: scale(1.04); }

/* Fades a tile in once its image actually decodes, so a slow gallery
   fills in gracefully instead of popping. */
.tile img[data-loading] { opacity: 0; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 8, 0.96);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  max-width: 100%;
  max-height: 100%;
}
.lightbox-figure img {
  max-width: 100%;
  /* Leave room for the caption; 100vh here would push it off-screen. */
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  border-radius: 2px;
}
.lightbox-figure figcaption {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255,255,255,0.16); }

.lightbox-close { top: clamp(0.75rem, 2vw, 1.5rem); right: clamp(0.75rem, 2vw, 1.5rem); font-size: 2rem; }
.lightbox-prev  { left: clamp(0.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: clamp(0.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lightbox-nav[hidden] { display: none; }

/* Gallery tiles are buttons — strip the UA chrome without losing the
   focus ring, which keyboard users need more than ever inside a lightbox. */
.gallery .tile {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: var(--bg-raised);
  font: inherit;
  color: inherit;
}

/* Masonry via CSS columns rather than grid.
   Grid rows size to their tallest cell, so one portrait frame next to two
   landscapes leaves a chunk of dead space under each landscape. Columns let
   every photo keep its own height and just stack. The tradeoff is reading
   order goes down-then-across instead of across-then-down — fine for a
   gallery, where there's no narrative sequence to preserve.
   Overrides .grid, which this element also carries. */
.gallery {
  display: block;
  column-count: 3;
  column-gap: var(--gap);
}
.gallery .tile,
.gallery .tile.portrait,
.gallery .tile.square {
  /* Let each image's own dimensions set the height. */
  aspect-ratio: auto;
  width: 100%;
  margin: 0 0 var(--gap);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}
.gallery .tile img {
  height: auto;
  object-fit: fill;
}

@media (max-width: 1000px) { .gallery { column-count: 2; } }
@media (max-width: 560px)  { .gallery { column-count: 1; } }

/* ---------- gated galleries ---------- */

.gate-card {
  max-width: 30rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.shoot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--gap);
}

.shoot-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.5rem;
  text-align: left;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.12s var(--ease);
}
.shoot-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.shoot-date  { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.shoot-title { font-size: 0.9rem; color: var(--accent); }
.shoot-count { font-size: 0.8rem; color: var(--text-faint); }

.lightbox-download {
  position: absolute;
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  white-space: nowrap;
}
.lightbox-download[hidden] { display: none; }

/* The download button lives where the caption would sit, so give the caption
   somewhere else to be on the gated pages. */
.lightbox-download ~ .lightbox-figure figcaption { margin-bottom: 3.25rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.5rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.social {
  display: flex;
  gap: 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about-h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.15rem; color: var(--text-dim); }
.prose strong { color: var(--text); font-weight: 600; }

.prose .lead-para {
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  line-height: 1.55;
  color: var(--text);
}

.prose h2 {
  margin: 2.5rem 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

/* Sticks the family photo alongside the copy on wide screens — it's the
   evidence for everything the text is claiming, so it shouldn't scroll away. */
.about-photo {
  position: sticky;
  top: calc(68px + 2rem);
}
.about-photo img {
  width: 100%;
  border-radius: var(--radius);
}
.photo-caption {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-faint);
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  /* Photo first on mobile: the face does more work than the headline when
     someone's deciding whether to trust you. */
  .about-photo { position: static; order: -1; }
}

/* ---------- forms ---------- */

.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  /* 16px min, or iOS Safari zooms the whole page on focus. */
  font-size: 16px;
  transition: border-color 0.18s var(--ease);
}
.field input:focus,
.field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { min-height: 150px; resize: vertical; }

.form-note { font-size: 0.85rem; color: var(--text-faint); }
.field .opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-faint); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-form { max-width: 34rem; }

.contact-side h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.contact-side a { color: var(--text-dim); }
.contact-side a:hover { color: var(--text); }

/* Spelled out, not hidden behind "Email me". The last version of this site
   had a typo in the address and nobody could see it to catch it. */
.contact-email {
  font-size: 1rem;
  color: var(--text) !important;
  word-break: break-all;
}

.form-status { margin-top: 1rem; font-size: 0.9rem; min-height: 1.4em; }
.form-status.is-ok    { color: var(--ok); }
.form-status.is-error { color: var(--danger); }

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

/* ---------- utility ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ---------- mobile nav ---------- */

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    margin-right: -0.5rem;
    background: none;
    border: 0;
    color: var(--text);
    cursor: pointer;
  }
  .nav-toggle svg { width: 22px; height: 22px; }

  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a {
    padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
    border-bottom: 0;
    font-size: 0.95rem;
  }
  .nav a[aria-current="page"] {
    border-left: 2px solid var(--accent);
    background: var(--bg-raised);
  }
}
