/* Tokens from DESIGN.md */
:root {
  --black: #141414;
  --white: #FFFFFF;
  --index-white: rgba(255, 255, 255, 0.85);
  --scrim: rgba(10, 10, 10, 0.6);
  --shade: rgba(10, 10, 10, 0.55);
  --clear: rgba(10, 10, 10, 0);
  --track: rgba(255, 255, 255, 0.35);
  --surface: #202020;              /* cards and placeholders, a step up from the page */
  --placeholder: #1C1C1C;
  --hover-fill: #E8E8E8;
  --ink-soft: #A3A3A3;             /* body copy on black: true gray, softer than white */
  --rule: rgba(255, 255, 255, 0.14); /* hairlines */
  --rule-dark: rgba(255, 255, 255, 0.14);
  --radius-card: 20px;
  --accent: #1E40AF;        /* semi-dark blue: the one UI color, for fills */
  --accent-strong: #172F8A; /* hover on blue fills */
  --accent-text: #7B96FF;   /* the same blue lifted for text and icons on black */
  --glow: rgba(30, 64, 175, 0.35);

  --font-display: 'Oxanium', 'Geist', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, sans-serif;

  --margin: max(1rem, 4vw);
  --grid-margin: max(4px, 1.2vw);
  --gutter: 16px;
  --section-space: clamp(3rem, 8vw, 6rem);
  --topbar-h: 40px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; text-wrap: pretty; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Big headings: heavier, and white running into the blue at the end */
.display {
  font-weight: 600;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--white) 30%, var(--accent-text) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  color: var(--black);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 15px 26px;
  font: 700 0.8125rem/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 250ms var(--ease), background-color 200ms var(--ease);
}
.btn:active { transform: scale(0.98); }

.btn--pill { border-radius: 9999px; background: var(--accent); color: var(--white); }
.btn--pill:hover { background: var(--accent-strong); }

.btn--keyline { border: 2px solid var(--white); border-radius: 5px; background: var(--black); color: var(--white); }
.btn--keyline:hover { background: #1F1F1F; }

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.icon-button svg { width: 24px; height: 24px; }

/* Top bar: phone and email, above the header */
.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  height: var(--topbar-h);
  padding: 0 var(--margin);
  background: var(--black);
  color: var(--index-white);
  border-bottom: 1px solid var(--rule-dark);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  height: 100%;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 200ms var(--ease);
}
.topbar a:hover,
.topbar a:focus-visible { color: var(--white); text-decoration: underline; }
.topbar a:focus-visible { outline-offset: -4px; }
.topbar svg { flex: none; width: 13px; height: 13px; }
.topbar__sep { width: 1px; height: 10px; background: var(--rule-dark); }
.topbar__emails { display: flex; align-items: center; gap: 1.5rem; height: 100%; }

/* Header: sits over the hero, under the top bar */
.site-header {
  position: absolute;
  inset: var(--topbar-h) 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem var(--margin) 0;
  color: var(--white);
}

.socials { display: flex; gap: 10px; }

.social-chip {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: var(--white);
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 250ms var(--ease);
}
.social-chip:hover { border-color: var(--white); background: var(--white); color: var(--black); }
.social-chip:active { transform: scale(0.94); }
.social-chip svg { width: 16px; height: 16px; }

.brand { display: grid; justify-items: center; gap: 0.9rem; }
.wordmark--stuck { display: none; }

/* Once the top of the page scrolls away (script.js adds .is-stuck), the
   header becomes a slim frosted bar fixed to the top of the window */
.site-header.is-stuck {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  padding: 0.6rem var(--margin);
  border-bottom: 1px solid var(--rule);
  background: rgba(20, 20, 20, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  animation: nav-in 400ms var(--ease) both;
}
.site-header.is-stuck .brand { grid-auto-flow: column; align-items: center; gap: 2.5rem; }
.site-header.is-stuck .wordmark { display: block; font-size: 1.125rem; }
.site-header.is-stuck .social-chip { width: 36px; height: 36px; }
.site-header.is-stuck .social-chip svg { width: 14px; height: 14px; }
.site-header.is-stuck .btn { min-height: 40px; padding: 11px 20px; }
/* On inner pages the header is in the page flow, so the content below keeps
   its place when the header lifts out (script.js sets --header-h) */
html.has-stuck .page-inner main { padding-top: var(--header-h, 0px); }

.wordmark {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.wordmark--small { font-size: 1rem; letter-spacing: 0; }

.site-nav { display: flex; gap: clamp(1.5rem, 3vw, 2.5rem); }
.site-nav a {
  position: relative;
  padding: 0.75rem 0 4px;
  font-family: var(--font-display); /* the same face as the wordmark, so they read as one */
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  margin-right: 0.1em; /* matches the tracking after the last letter */
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease);
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current='page']::after { transform: scaleX(1); }

.header-cta { justify-self: end; }

.menu-toggle {
  display: none;
  gap: 8px;
  place-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 34px; height: 1px; background: var(--white); }

/* Mobile menu */
.menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 1.5rem var(--margin) 2rem;
  border: 0;
  background: var(--black);
  color: var(--white);
}
.menu[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
  animation: fade-in 300ms var(--ease);
}
.menu::backdrop { background: var(--black); }

.menu__top { display: flex; align-items: center; justify-content: space-between; }
.menu__close { margin-right: -10px; }

.menu__nav { display: grid; align-content: center; }
.menu__nav a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 2.5rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.menu__nav a::before { content: '_'; }
.menu__nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.menu__bottom { display: grid; justify-items: start; gap: 1.5rem; }

/* Inner pages (Behind the Lens, Book a shoot) have no hero photo, so the
   top bar and header sit in the page, on the black band of the page head */
.page-inner .topbar,
.page-inner .site-header { position: relative; inset: auto; }
.page-inner .site-header { background: var(--black); padding-top: 1.5rem; }
.page-inner .site-header.is-stuck { position: fixed; inset: 0 0 auto; padding-top: 0.6rem; background: rgba(20, 20, 20, 0.72); }

.page-head {
  display: grid;
  justify-items: center;
  gap: 1rem;
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) var(--margin) clamp(3.5rem, 7vw, 6rem);
  color: var(--white);
  text-align: center;
}
/* A soft blue glow behind the title, so the head isn't a flat black slab */
.page-head::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 80% at 50% 30%, var(--glow), transparent 70%);
  pointer-events: none;
}
.page-head { isolation: isolate; }

.page-head h1 {
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  line-height: 1;
}

/* Small uppercase label above a heading */
.eyebrow {
  font: 700 0.75rem/1 var(--font-body);
  color: var(--accent-text);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.page-head p { max-width: 52ch; color: rgba(255, 255, 255, 0.7); }

/* Hero: a carousel of key photos */
.hero {
  --hero-bottom: clamp(1.5rem, 4vh, 2.5rem);
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  touch-action: pan-y;
}

/* Name and tagline, centered across the photos and a little above the
   middle, so it clears the faces in the key photos. It lets clicks and
   swipes through to the carousel underneath */
.hero__title {
  position: absolute;
  top: max(36%, 14rem); /* the minimum keeps it clear of the header on short screens */
  left: 50%;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(0.6rem, 1.2vw, 1rem);
  width: max-content;
  max-width: calc(100% - 2 * var(--margin));
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero__name, .hero__tagline { animation: rise-in 1100ms var(--ease) both; }
.hero__tagline { animation-delay: 180ms; }
.site-header, .slide figcaption, .carousel-controls { animation: fade-in 900ms var(--ease) 400ms both; }

/* A soft shade behind the title keeps it readable on bright photos */
.hero__title::before {
  content: '';
  position: absolute;
  inset: -55% -30%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--shade) 50%, var(--clear));
}

.hero__name {
  font-weight: 600;
  font-size: clamp(3.5rem, 10vw, 9rem);
  line-height: 0.9;
  white-space: nowrap;
}

.hero__tagline {
  padding-left: 0.32em; /* evens out the spacing after the last letter */
  font: 700 clamp(0.875rem, 1.2vw, 1.125rem)/1.2 var(--font-body);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.slides,
.slide {
  position: absolute;
  inset: 0;
  margin: 0;
}
/* script.js moves the photos a little slower than the page on scroll */
.slides { transform: translate3d(0, var(--parallax, 0px), 0); will-change: transform; }

.slide {
  opacity: 0;
  transition: opacity 1200ms var(--ease);
}
.slide.is-active { opacity: 1; }

/* Each photo eases out of a slight zoom while it's showing */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 8s linear;
}
.slide.is-active img { transform: none; }

/* Fades at the top and bottom keep the header and caption readable */
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  /* The top fade starts under the top bar, so the header keeps its contrast */
  background: linear-gradient(to bottom, var(--scrim) calc(var(--topbar-h) + 6%), var(--clear) calc(var(--topbar-h) + 36%), var(--clear) 55%, var(--scrim) 100%);
  pointer-events: none;
}

.slide figcaption {
  position: absolute;
  bottom: var(--hero-bottom);
  left: var(--margin);
  z-index: 1;
}

.slide__caption {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.875rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
}
.slide__caption svg {
  width: 0.6em;
  height: 0.6em;
  margin-left: 0.4em;
  transition: transform 300ms var(--ease);
}
.slide__caption:hover svg { transform: translateX(0.2em); }

.carousel-controls {
  position: absolute;
  right: var(--margin);
  bottom: var(--hero-bottom);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dots { display: flex; }

/* A thin bar inside a 44px-tall button; the active one fills as it plays */
.dot {
  display: grid;
  align-items: center;
  width: 48px;
  height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  cursor: pointer;
}
.dot span {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: var(--track);
}
.dot span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
}
.dot.is-active span::after { transform: none; }
.hero.is-playing .dot.is-active span::after { animation: dot-fill var(--slide-ms, 6500ms) linear both; }

.carousel-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}
.carousel-toggle svg { width: 18px; height: 18px; }
.carousel-toggle .icon-play,
.carousel-toggle.is-paused .icon-pause { display: none; }
.carousel-toggle.is-paused .icon-play { display: block; }

/* Portfolio: one cover photo per category */
.portfolio { padding: var(--section-space) var(--grid-margin) 0; }

.categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gutter);
}

.category {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  isolation: isolate;
}
.category img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease), opacity 500ms var(--ease);
}
.category::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.78) 0%, rgba(10, 10, 10, 0.25) 45%, var(--clear) 70%);
}
.category:hover img, .category:focus-visible img { transform: scale(1.05); }

.category__body {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem;
}
.category__name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.category__name::before { content: '_'; }
/* A short blue bar under the name draws in on hover */
.category__name::after {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  margin-top: 0.5rem;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms var(--ease);
}
.category:hover .category__name::after,
.category:focus-visible .category__name::after { transform: none; }
.category__text {
  max-height: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0;
  transition: max-height 500ms var(--ease), opacity 400ms var(--ease);
}
.category:hover .category__text,
.category:focus-visible .category__text { max-height: 6rem; opacity: 1; }

/* Contact card: the photo CTA style, opened up into a short list */
.contact-card {
  width: 100%;
  margin-top: 0.75rem;
  padding: 1.75rem 2.25rem 1.25rem;
  border-radius: var(--radius-card);
  background: var(--accent);
  color: var(--white);
}

/* Under the category tiles: the label on the left, the links in a row */
.contact-card--band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem 3rem;
  margin: var(--gutter) 0 0;
  padding: 1.5rem 2.25rem;
}
.contact-card--band .contact-card__title { margin: 0; }
.contact-card--band .contact-card__list {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 0 1.5rem;
}
.contact-card--band .contact-card__list li + li { border-top: 0; }

.contact-card__title {
  margin: 0 0 0.75rem;
  font: 700 0.75rem/1 var(--font-body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.contact-card__list li + li { border-top: 1px solid rgba(255, 255, 255, 0.2); }

.contact-card__list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  font-size: 1rem;
  text-decoration: none;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  transition: opacity 200ms var(--ease);
}
.contact-card__list a:hover { opacity: 0.7; }
.contact-card__list svg { flex: none; width: 18px; height: 18px; opacity: 0.7; }

/* Selected work */
.work { padding: var(--section-space) var(--grid-margin) 0; }

/* Heading row above a section: title left, a small link right */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin: 0 calc(var(--margin) - var(--grid-margin)) clamp(1.5rem, 3vw, 2.25rem);
}
.section-head { position: relative; isolation: isolate; }
.section-head::before {
  content: '';
  position: absolute;
  inset: -80% auto -80% -8%;
  z-index: -1;
  width: min(60%, 640px);
  background: radial-gradient(50% 50% at 30% 50%, var(--glow), transparent 70%);
  pointer-events: none;
}
.section-head h2 {
  display: grid;
  gap: 0.75rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
}
.section-head h2 .display { padding-bottom: 0.08em; } /* room for descenders inside the clip */
.section-head .eyebrow { font-family: var(--font-body); letter-spacing: 0.2em; }
.section-head__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  font: 700 0.75rem/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.section-head__link { color: var(--accent-text); }
.section-head__link svg { width: 14px; height: 14px; transition: transform 300ms var(--ease); }
.section-head__text { max-width: 38ch; color: var(--ink-soft); font-size: 1rem; }
.section-head__link:hover svg { transform: translateX(0.2rem); }

/* Mixed-size mosaic: six columns of near-square cells; items span them */
.mosaic {
  --cell: calc((100vw - 2 * var(--grid-margin) - 5 * var(--gutter)) / 6);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: calc(var(--cell) * 1.1);
  grid-auto-flow: dense;
  gap: var(--gutter);
}
.mosaic__item--big { grid-column: span 2; grid-row: span 2; }
.mosaic__item--wide { grid-column: span 2; }
.mosaic__item--tall { grid-row: span 2; }

.tile {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--placeholder);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease), opacity 500ms var(--ease);
}
.tile:hover img { transform: scale(1.04); }

/* A soft light follows the pointer over a photo tile, with a blue edge on
   the tile it's over (script.js sets --mx and --my) */
@media (hover: hover) {
  .tile, .category { position: relative; }
  .tile::before, .category::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 60%);
    box-shadow: inset 0 0 0 1px rgba(123, 150, 255, 0.55);
    opacity: 0;
    transition: opacity 350ms var(--ease);
    pointer-events: none;
  }
  .tile:hover::before, .category:hover::before { opacity: 1; }
}


/* Gallery pages (portraits/, sports/, ...): photos flow down three columns
   at their own proportions, nothing cropped */
.gallery-section { padding: 0 var(--grid-margin); }
.gallery {
  columns: 3;
  column-gap: var(--gutter);
  max-width: 1600px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.gallery__item { break-inside: avoid; margin-bottom: var(--gutter); }
.gallery__item .tile { display: block; }
.gallery__item img { width: 100%; height: auto; aspect-ratio: auto; display: block; }

/* About */
.about {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--section-space) var(--margin) 0;
}

.about__portrait {
  width: clamp(180px, 26vw, 330px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: var(--placeholder);
}

.about__text { display: grid; gap: 1.25rem; max-width: 60ch; color: var(--ink-soft); font-size: 1.125rem; }

/* Booking: Google Calendar's booking page, embedded */
.booking {
  display: grid;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--margin) 0;
}

/* Google switches to a taller one-column layout below about 600px wide,
   so the frame's height follows its own width */
.booking__frame {
  container-type: inline-size;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--white);
}
.booking__frame iframe {
  display: block;
  width: 100%;
  height: 690px;
  border: 0;
}
@container (max-width: 599px) {
  .booking__frame iframe { height: 1150px; }
}

/* Google centers its calendar, so the link and card under it are centered too */
.booking__alt { justify-self: center; margin-top: -0.75rem; font-size: 1rem; }
.booking__alt a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 4px;
}
.booking__alt a:hover { color: var(--accent-text); }

.booking .contact-card { justify-self: center; max-width: 560px; margin-top: 0; }

/* Links to the other pages, at the end of each page */
.page-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--section-space) var(--margin);
}

.page-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
  padding: 1.75rem 0;
  border-block: 1px solid var(--rule);
  text-decoration: none;
}

.page-link__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}
.page-link:hover .page-link__title { color: var(--accent-text); }

.page-link__text { grid-column: 1; margin-top: 0.35rem; color: var(--ink-soft); font-size: 0.9375rem; }

.page-link svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 300ms var(--ease);
}
.page-link:hover svg { color: var(--accent-text); transform: translateX(0.3rem); }

/* Footer */
.site-footer {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin: 0 var(--margin);
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.socials--footer { gap: 0; }
.socials--footer a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transition: opacity 200ms var(--ease);
}
.socials--footer a:hover { color: var(--accent-text); }
.socials--footer a { color: var(--white); }
.socials--footer svg { width: 20px; height: 20px; }

/* Lightbox */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden; /* the peeking photos hang past the edges; arrow keys must not scroll them into view */
  border: 0;
  background: var(--black);
  color: var(--white);
}
.lightbox[open] {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) 5rem;
  align-items: center;
  animation: lightbox-in 300ms var(--ease);
}
.lightbox::backdrop { background: var(--black); }

.lightbox__stage {
  display: grid;
  place-items: center;
  height: 100dvh;
  margin: 0;
  touch-action: pan-y;
}

.lightbox__img {
  max-height: calc(100dvh - 8rem);
  object-fit: contain;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 400ms var(--ease), transform 500ms var(--ease);
  user-select: none;
}
.lightbox__img.is-loaded { opacity: 1; transform: none; }

/* The previous and next photos peek in from the edges, dimmed; a click steps */
.lightbox__peek {
  position: absolute;
  top: 50%;
  width: 16vw;
  max-width: 260px;
  height: 56vh;
  object-fit: cover;
  border-radius: var(--radius-card);
  opacity: 0;
  filter: brightness(0.45);
  cursor: pointer;
  transition: opacity 400ms var(--ease), transform 500ms var(--ease), filter 300ms var(--ease);
}
.lightbox__peek--prev { left: 0; transform: translate(-55%, -50%); }
.lightbox__peek--next { right: 0; transform: translate(55%, -50%); }
.lightbox__peek[src] { opacity: 1; }
.lightbox__peek:hover { filter: brightness(0.7); }
.lightbox__peek--prev:hover { transform: translate(-48%, -50%); }
.lightbox__peek--next:hover { transform: translate(48%, -50%); }
.lightbox.is-single .lightbox__peek { display: none; }

/* A thin blue bar shows where you are in the gallery */
.lightbox__progress {
  position: absolute;
  bottom: 3.5rem;
  left: 50%;
  width: min(240px, 40vw);
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--rule);
  transform: translateX(-50%);
}
.lightbox__progress span {
  display: block;
  height: 100%;
  background: var(--accent-text);
  transform-origin: left;
  transition: transform 400ms var(--ease);
}
.lightbox.is-single .lightbox__progress { display: none; }

.lightbox__count {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  color: var(--index-white);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}

.lightbox__close { position: absolute; top: 1rem; right: 1rem; z-index: 1; }
.lightbox__prev, .lightbox__next {
  position: relative; /* above the peeking photos */
  z-index: 2;
  justify-self: center;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.6);
}
.lightbox.is-single .lightbox__prev,
.lightbox.is-single .lightbox__next { visibility: hidden; }

/* Reveal on scroll (classes added by script.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.is-in { opacity: 1; transform: none; }

.fade { opacity: 0; transition: opacity 500ms var(--ease); }
.fade.is-loaded { opacity: 1; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(28px); } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-100%); } }
@keyframes dot-fill { from { transform: scaleX(0); } to { transform: none; } }
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.98); } }

/* Tablet */
@media (max-width: 1023px) {
  .categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-card--band { grid-template-columns: minmax(0, 1fr); }
  .contact-card--band .contact-card__list { grid-template-columns: repeat(2, auto); justify-content: start; gap: 0 2rem; }
  .mosaic { --cell: calc((100vw - 2 * var(--grid-margin) - 3 * var(--gutter)) / 4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery { columns: 2; }
}

/* Phone */
@media (max-width: 767px) {
  :root { --topbar-h: 44px; }

  .site-header { grid-template-columns: 1fr auto; padding-top: 1.5rem; }
  .site-header > .socials,
  .site-nav,
  .header-cta { display: none; }
  .brand { justify-items: start; }
  .site-header .wordmark { font-size: 1rem; letter-spacing: 0; }
  .menu-toggle { display: grid; margin-right: -5px; }

  /* Caption sits above the controls, both on the left */
  .hero { --hero-bottom: 1.25rem; }
  .hero__title { top: max(36%, 10.75rem); }
  .slide figcaption { bottom: calc(var(--hero-bottom) + 48px); }
  .carousel-controls { right: auto; left: calc(var(--margin) - 4px); gap: 0.25rem; }
  .dot { width: 40px; }

  :root { --radius-card: 14px; }
  .contact-card { padding: 1.5rem 1.25rem 1rem; }

  .portfolio, .work { padding: var(--section-space) 8px 0; }
  .section-head { margin-inline: calc(var(--margin) - 8px); }
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .category__body { padding: 0.9rem; }
  .category__text { display: none; }
  .contact-card--band { margin-top: 8px; padding: 1.25rem; }
  .contact-card--band .contact-card__list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contact-card--band .contact-card__list li + li { border-top: 1px solid rgba(255, 255, 255, 0.2); }
  .mosaic { --cell: calc((100vw - 16px - 8px) / 2); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mosaic__item--big { grid-column: span 2; grid-row: span 2; }
  .mosaic__item--wide { grid-column: span 2; grid-row: span 1; }
  .gallery-section { padding: 0 8px; }
  .gallery { columns: 2; column-gap: 8px; }
  .gallery__item { margin-bottom: 8px; }

  .about { grid-template-columns: minmax(0, 1fr); justify-items: center; }

  .page-links { grid-template-columns: minmax(0, 1fr); }
  .page-link + .page-link { border-top: 0; }

  .lightbox[open] { grid-template-columns: minmax(0, 1fr); }
  .lightbox__stage { grid-row: 1; grid-column: 1; }
  .lightbox__img { max-height: calc(100dvh - 9rem); }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: 0.75rem; }
  .lightbox__peek { display: none; }
  .lightbox__progress { bottom: 4rem; }
  .lightbox__prev { left: 0.5rem; }
  .lightbox__next { right: 0.5rem; }
}

/* Narrow phones: the top bar puts the phone number on one line and both
   emails on the next, and the carousel title moves down to clear it */
@media (max-width: 559px) {
  :root { --topbar-h: 80px; }
  .topbar { flex-wrap: wrap; align-content: center; row-gap: 0; }
  .topbar > .topbar__sep { display: none; }
  .topbar > a,
  .topbar__emails { height: 40px; }
  .topbar__emails { flex-basis: 100%; justify-content: center; gap: 0.75rem; }
  .hero__title { top: max(36%, 12.75rem); }
}

/* Very narrow phones: each email gets a line of its own too */
@media (max-width: 359px) {
  :root { --topbar-h: 120px; }
  .topbar__emails { flex-wrap: wrap; align-content: center; row-gap: 0; height: 80px; }
  .topbar__emails > .topbar__sep { display: none; }
  .topbar__emails > a { flex-basis: 100%; justify-content: center; height: 40px; }
  .hero__title { top: max(36%, 15.25rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}
