/* ==========================================================================
   Portfolio — main stylesheet
   1. Tokens
   2. Reset & base
   3. Layout
   4. Header & nav
   5. Components
   6. Home (Figma: Homepage 28:2 — 1440px canvas)
   7. About
   8. Case study
   9. Project page (Figma: Project Page — Y Ese Flow? 29:231 — 1440px canvas)
   10. Services
   11. Footer
   12. Responsive
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */

:root {
  /* Brand palette — Who Knows You */
  /* The three accent names are kept so existing rules keep resolving, but they
     are now one red; --color-accent is the one to reach for in new code. */
  --warm-ivory: #FAFAF8;
  --navy: #1A1A1A;
  --vivid-pink: #CC1A1A;
  --sunset-orange: #CC1A1A;
  --electric-yellow: #CC1A1A;

  /* Semantic roles */
  --color-bg: var(--warm-ivory);
  --color-surface: #FFFDF7;
  --color-text: var(--navy);
  --color-muted: #4A5A6B;          /* navy, lightened — 6.5:1 on ivory */
  --color-line: #E6E6E3;           /* ivory, deepened */
  --color-accent: var(--vivid-pink);
  --color-accent-secondary: var(--sunset-orange);
  --color-highlight: var(--electric-yellow);
  /* Ivory, not navy: navy on the accent red is only 3.09:1. */
  --color-on-accent: var(--warm-ivory);

  /* Warm neutrals from the Figma homepage, kept as RGB triplets for rgba() */
  --ink: 26, 24, 20;               /* #1A1814 — used at 15% / 40% / 70% */
  --footer-ivory: 255, 253, 245;   /* #FFFDF5 — used at 50% / 70% on navy */

  --font-sans: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Syne", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --weight-light: 300;
  --weight-semibold: 700;          /* Outfit Bold — sits below --weight-bold (800) */
  --weight-bold: 800;
  --weight-display: 700;

  /* Homepage canvas — the Figma frame is 1440px wide with 80px gutters. */
  --canvas: 1440px;
  --canvas-gutter: 80px;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.25rem);
  --step-3: clamp(2.2rem, 1.7rem + 2.4vw, 4rem);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  --container: 68rem;
  --radius: 4px;
  --transition: 200ms ease;
}

/* 2. Reset & base ------------------------------------------------------- */

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

body,
h1, h2, h3, h4,
p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: var(--weight-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

strong, b {
  font-weight: var(--weight-bold);
}

h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

::selection {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--space-sm);
  top: var(--space-sm);
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
}

/* 3. Layout ------------------------------------------------------------- */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-lg);
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.lede {
  font-size: var(--step-1);
  color: var(--color-muted);
  max-width: 42ch;
}

.section-title {
  margin-bottom: var(--space-md);
}

/* 4. Header & nav ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-sm);
}

.logo {
  font-family: var(--font-display);
  font-size: var(--step-1);
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  gap: var(--space-md);
}

.site-nav a {
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  transition: color var(--transition);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-text);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.1rem;
  height: 1px;
  margin-inline: auto;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: relative;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* 5. Components --------------------------------------------------------- */

.button {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 0.7rem 1.6rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: var(--weight-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.button:hover {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-block: var(--space-sm) var(--space-md);
}

.tag-list li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: var(--step--1);
  color: var(--color-muted);
}

/* Add `data-reveal` to an element to fade it in on scroll (see js/main.js). */
[data-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* 6. Home (Figma: Homepage 28:2 — 1440px canvas) ------------------------- */
/* The px values below are the Figma frame's own measurements, so the layout
   is exact at 1440px and relaxes at the breakpoints in section 10. Type is
   left at `line-height: normal` because that is what the frame specifies. */

/* --- Nav (29:237, 1440x82) --- */

.home-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);      /* #1A1A1A */
  border-bottom: 0.5px solid var(--navy);
}

.home-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: var(--canvas);
  margin-inline: auto;
  padding-inline: 36px;
}

.home-mark {
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--navy);
  text-decoration: none;
}

/* Who Knows You logo in the nav: the "?WKY" nav logo (a ~4:1 wordmark) on
   desktop, the red question-mark submark under 768px (swapped via
   <picture>). */
.home-mark,
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand-logo,
.brand-logo img {
  display: block;
}

.brand-logo img {
  height: 32px;
  width: auto;
}

/* The square submark needs more height than the wide wordmark to read. */
@media (max-width: 767px) {
  .brand-logo img {
    height: 40px;
  }
}

/* One "Work     About     Contact" text layer in Figma; the 22px gap matches
   the rendered width of its separating spaces. */
.home-nav-links {
  display: flex;
  gap: 22px;
}

.home-nav-links a {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--weight-display);
  color: var(--warm-ivory);     /* #FAFAF8 */
  text-decoration: none;
  transition: color var(--transition);
}

.home-nav-links a:hover {
  color: var(--vivid-pink);     /* #CC1A1A */
}

/* --- Hero (29:106 + 29:110) --- */

.home-hero {
  /* The 22px bottom was the gap under the sun; with the sun gone the hero
     needs its own breathing room before the project index. */
  padding: 38px var(--canvas-gutter) 88px;   /* nav 82 -> name 120 */
  text-align: center;
}

/* Animated WKY logo in place of the old text wordmark. The <h1> stays in the
   markup (visually hidden) so the page keeps its heading. */
/* The 1000x1000 export has blank canvas above and below the artwork, so the
   frame is cropped to the band from 11% to 86% of its height (a 4:3 box):
   - top 11%: the question mark peaks at ~14% mid-bounce and settles at 17%,
     so this clears it with a little room to spare;
   - bottom 14%: leaves a small margin under "WHO KNOWS YOU.".
   object-position is 11 / (11 + 14) = 44% of the 25% that's cropped. */
.home-hero-video {
  display: block;
  width: 400px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 44%;
  margin-inline: auto;
}

.home-hero-video + .home-hero-copy {
  margin-top: 16px;
}

/* The hero is centred, so the statement is held to a short measure to keep it
   readable at the canvas width. */
/* The copy is centred, so text-wrap: balance evens every line of a paragraph
   to a similar length instead of leaving a short last line (browsers without
   it just wrap normally). */
.home-hero-copy {
  max-width: 800px;
  margin: 32px auto 0;
  text-wrap: balance;
  font-size: 18px;
  font-weight: var(--weight-light);
  line-height: 1.6;
  color: rgba(var(--ink), 0.7);
}

.home-hero-copy p + p {
  margin-top: 1em;
}
.home-hero .button {
  margin-top: 28px;
}

/* --- Project index (29:113, 1440x680) --- */

.project-index {
  min-height: 680px;
  background: var(--warm-ivory);
}

.project-index-inner {
  max-width: var(--canvas);
  margin-inline: auto;
  /* Bottom padding so the second row of cards doesn't butt into the
     spotlights below (the old single row was held off by min-height). */
  padding: 40px var(--canvas-gutter) 80px;
}

.index-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: var(--weight-display);
  line-height: 15px;
  letter-spacing: normal;
  color: var(--navy);
}

/* Also one text layer in Figma; 19px reproduces its space runs across 310px. */
.index-filters {
  display: flex;
  gap: 19px;
  margin-top: 15px;
  font-size: 13px;
  font-weight: var(--weight-light);
  line-height: 15px;
  color: rgba(var(--ink), 0.4);
}

.index-filter {
  padding: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.index-filter:hover {
  color: rgba(var(--ink), 0.75);
}

.index-filter[aria-pressed="true"] {
  color: rgb(var(--ink));
  font-weight: 500;
  border-bottom-color: currentColor;
}

.index-filter:focus-visible {
  outline: 2px solid rgb(var(--ink));
  outline-offset: 3px;
}

.index-card[hidden] {
  display: none;
}

/* Two cards per row across the 1280px canvas: 2 x 620px with a 40px gutter. */
.index-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 36px;
}

.index-card {
  height: 500px;
}

.index-card > a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
}

.index-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 29:132 sits 0.28deg off-axis with its fill cropped out of frame. The angle
   lives in --card-rot so the hover wiggle rocks around it, not back to 0. */
.index-card > a {
  --card-rot: 0deg;
  transform: rotate(var(--card-rot));
  cursor: pointer;
}

.index-card--tilt > a {
  --card-rot: 0.28deg;
}

/* Hover: a quick, gentle rock left and right, then settle. */
@keyframes card-wiggle {
  0%, 100% { transform: rotate(var(--card-rot)); }
  20%      { transform: rotate(calc(var(--card-rot) - 1.5deg)); }
  40%      { transform: rotate(calc(var(--card-rot) + 1.25deg)); }
  60%      { transform: rotate(calc(var(--card-rot) - 0.75deg)); }
  80%      { transform: rotate(calc(var(--card-rot) + 0.4deg)); }
}

.index-card > a:hover,
.index-card > a:focus-visible {
  animation: card-wiggle 0.5s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .index-card > a:hover,
  .index-card > a:focus-visible {
    animation: none;
  }
}

.index-card-crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* The original crop offsets were sized for a 400x500 card and stretch the
   photo in a wider one; cover keeps its proportions at any card width while
   framing the same centre of the image. */
.index-card-crop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.index-card-title {
  position: absolute;
  top: 10%;                   /* 50px into the 500px card */
  left: 0;
  right: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: var(--weight-bold);
  line-height: normal;
  letter-spacing: normal;
  color: #000;
  text-align: center;
}

.index-card-title--light {
  color: var(--warm-ivory);
}

/* For busy card images (ColorStack): the photo starts below the title, and
   the strip above it is filled with the photo's own grey, so the title sits
   on plain background like the other cards. */
.index-card-img--below-title {
  top: 96px;
  height: calc(100% - 96px);
}

.index-card > a:has(.index-card-img--below-title) {
  background: #CACACA;          /* sampled from colorstack-card.jpg */
}

/* --- Project spotlights (29:189 / 29:197 / 29:205, 1440x800 each) --- */

.spotlight {
  position: relative;
  height: 800px;
  overflow: hidden;
}

.spotlight-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 29:205 overflows its frame by 35% and is nudged up 3.75%. */
.spotlight-crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.spotlight-crop img {
  position: absolute;
  top: -3.75%;
  left: 0;
  width: 100%;
  height: 135%;
  max-width: none;
  object-fit: cover;
}

.spotlight-inner {
  position: relative;
  height: 100%;
  max-width: var(--canvas);
  margin-inline: auto;
}

.spotlight-label {
  position: absolute;
  top: 40px;
  left: var(--canvas-gutter);
}

.spotlight-title {
  position: absolute;
  bottom: 28px;               /* frame padding-bottom; title top lands at 681 */
  left: 52px;
  font-family: var(--font-sans);
  font-size: 72px;
  font-weight: var(--weight-bold);
  line-height: normal;
  letter-spacing: normal;
  color: var(--navy);
}

.spotlight-title--light {
  color: var(--warm-ivory);
}

/* Whole spotlight is a link. The <a> itself isn't positioned, so the image,
   crop and inner layer still lay out against .spotlight exactly as before. */
.spotlight-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.spotlight-img,
.spotlight-crop {
  z-index: 0;
}

.spotlight-img,
.spotlight-crop img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Darkening overlay — sits above the photo, below the title and CTA. */
.spotlight-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(var(--ink), 0);
  transition: background-color 0.4s ease;
  pointer-events: none;
}

.spotlight-inner {
  z-index: 2;
}

.spotlight-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--warm-ivory);
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(var(--ink), 0.35);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 12px));
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.spotlight-link:hover .spotlight-img,
.spotlight-link:hover .spotlight-crop img,
.spotlight-link:focus-visible .spotlight-img,
.spotlight-link:focus-visible .spotlight-crop img {
  transform: scale(1.03);
}

.spotlight-link:hover::before,
.spotlight-link:focus-visible::before {
  background: rgba(var(--ink), 0.25);
}

.spotlight-link:hover .spotlight-cta,
.spotlight-link:focus-visible .spotlight-cta {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.spotlight-link:focus-visible {
  outline: 3px solid var(--warm-ivory);
  outline-offset: -6px;
}

@media (prefers-reduced-motion: reduce) {
  .spotlight-img,
  .spotlight-crop img,
  .spotlight-cta {
    transition: opacity 0.2s ease;
  }

  .spotlight-link:hover .spotlight-img,
  .spotlight-link:hover .spotlight-crop img,
  .spotlight-link:focus-visible .spotlight-img,
  .spotlight-link:focus-visible .spotlight-crop img {
    transform: none;
  }

  .spotlight-cta,
  .spotlight-link:hover .spotlight-cta,
  .spotlight-link:focus-visible .spotlight-cta {
    transform: translate(-50%, -50%);
  }
}

/* --- About band (29:216, 1440x400) --- */

.about-band {
  min-height: 400px;
  background: var(--warm-ivory);
  border-top: 0.5px solid rgba(var(--ink), 0.15);
}

.about-band-inner {
  position: relative;
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 38px var(--canvas-gutter) 0;
}

.about-band-title {
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: var(--weight-bold);
  line-height: normal;
  letter-spacing: normal;
  color: var(--navy);
}

.about-band-body {
  max-width: 699px;
  margin-top: 48px;
  font-size: 24px;
  font-weight: var(--weight-light);
  line-height: normal;
  color: rgba(var(--ink), 0.7);
}

.about-band-body strong {
  font-weight: var(--weight-semibold);
}

.about-band-photo {
  position: absolute;
  top: 86px;
  right: 27px;
  width: 400px;
  height: 300px;
  object-fit: cover;
  border: 1px solid rgba(var(--ink), 0.15);
  border-radius: 4px;
}

/* --- Footer (29:223, 1440x400) --- */

.home-footer {
  min-height: 400px;
  background: var(--navy);
}

.home-footer-inner {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 136px 56px 33px;
  text-align: center;
}

.home-footer-name {
  font-size: 64px;
  font-weight: var(--weight-bold);
  line-height: normal;
  color: var(--warm-ivory);
}

.home-footer-byline {
  margin-top: 4px;
  font-size: 18px;
  font-weight: var(--weight-light);
  line-height: normal;
  color: rgba(var(--footer-ivory), 0.7);
}

.home-footer-tagline {
  margin-top: 17px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--weight-display);
  line-height: normal;
  color: var(--color-accent);   /* #CC1A1A */
}

.home-footer-cols {
  display: flex;
  justify-content: space-between;
  margin-top: 69px;
  text-align: left;
}

.home-footer-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--weight-bold);
  line-height: 16px;
  letter-spacing: normal;
  color: rgba(var(--footer-ivory), 0.5);
}

.home-footer-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: var(--weight-light);
  line-height: 16px;
  color: rgba(var(--footer-ivory), 0.7);
}

a.home-footer-link {
  text-decoration: underline;
  transition: color var(--transition);
}

a.home-footer-link:hover {
  color: var(--warm-ivory);
}

/* 7. About -------------------------------------------------------------- */

/* Uses the services page shell (.services-hero, .services-section,
   .services-cta); only the bio and photo grid are specific to this page. */

/* --- Bio: copy left, portrait right --- */

.about-bio {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 0 var(--canvas-gutter) 96px;
  background: var(--warm-ivory);
}

.about-bio-text p {
  font-size: 18px;
  font-weight: var(--weight-light);
  line-height: 1.6;
  color: rgba(var(--ink), 0.7);
}

.about-bio-text p + p {
  margin-top: 1.2em;
}

/* Bolded phrases step up to Outfit Bold in full navy, so they stand out
   from the light, softened body copy. */
.about-bio-text strong {
  font-weight: var(--weight-semibold);
  color: var(--navy);
}

/* The opening line leads in at full weight and colour. */
.about-bio-text p:first-child {
  font-size: 24px;
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  color: var(--navy);
}

.about-bio-photo {
  position: sticky;
  top: 112px;                   /* clears the 80px sticky nav */
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(var(--ink), 0.15);
  border-radius: 4px;
}

/* --- Beyond the Work: six photos, 3x2 (2x3 on phones) --- */

.about-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* The figure clips the caption bar, so it can sit below the frame until
   hover and slide up into it. */
.about-photo {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--ink), 0.15);
  border-radius: 4px;
}

/* Mixed portrait and landscape shots, cropped to one 4:5 frame so the grid
   lines up. */
.about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--color-line);
}

/* Moved out of view rather than hidden, so screen readers still announce
   it. White on 75% navy is well over 4.5:1 against any photo. */
.about-photo figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 12px 16px;
  background: rgba(26, 26, 26, 0.75);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: var(--weight-display);
  line-height: 1.35;
  letter-spacing: 0.4px;
  color: #fff;
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.about-photo:hover figcaption,
.about-photo:focus-within figcaption {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .about-photo figcaption {
    transition: none;
  }
}

/* 8. Case study --------------------------------------------------------- */

.case-header h1 {
  margin-bottom: var(--space-sm);
}

.case-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line);
}

.case-facts dt {
  font-size: var(--step--1);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-secondary);
  margin-bottom: 0.2rem;
}

.case-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-line);
}

.case-section {
  padding-block: var(--space-md);
}

.case-section p {
  max-width: 62ch;
  color: var(--color-muted);
  margin-top: var(--space-sm);
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  padding-block: var(--space-md);
}

.case-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-line);
  border-radius: var(--radius);
}

.case-gallery .full-bleed {
  grid-column: 1 / -1;
}

.case-gallery .full-bleed img {
  aspect-ratio: 16 / 9;
}

.case-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  border-top: 1px solid var(--color-line);
  font-size: var(--step--1);
}

.case-nav a {
  text-decoration: none;
  color: var(--color-muted);
  transition: color var(--transition);
}

.case-nav a:hover {
  color: var(--color-text);
}

/* 9. Project page (Figma: Project Page — Y Ese Flow? 29:231 — 1440px canvas) */
/* Same convention as the homepage: the px values below are the Figma frame's
   own measurements, so the layout is exact at 1440px and relaxes at the
   breakpoints in section 11. The nav (29:232) and footer (29:91) are the same
   components as the homepage, so they reuse .home-nav / .home-footer. */

.project-page {
  /* The frame sets the metadata row at 8px. Raised to 12px so it stays
     readable on screen — set this back to 8px to match the frame exactly. */
  --meta-size: 12px;
  background: var(--warm-ivory);
}

/* --- Spotlight (29:289, 1440x791) --- */

.project-spotlight {
  height: 791px;
  overflow: hidden;
}

.project-spotlight img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Masthead (29:290 title, 29:245 category tags) --- */
/* The frame lays the title over the last 85px of the spotlight; stacking the
   two keeps the navy title legible whatever the hero photo ends on. */

.project-masthead {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 28px var(--canvas-gutter) 0;
}

.project-masthead h1 {
  font-family: var(--font-sans);
  font-size: 72px;
  font-weight: var(--weight-bold);
  line-height: normal;
  letter-spacing: normal;
  color: var(--navy);
}

.project-tags {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: var(--weight-display);
  line-height: normal;
  color: var(--vivid-pink);
}

/* --- Summary (30:367, 1440x320) --- */

/* The top padding is kept short so the category tags read as a kicker on the
   lede rather than as a separate block. */
.project-summary {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 20px var(--canvas-gutter) 56px;
}

.project-lede {
  max-width: 900px;             /* 29:300 spans 5.83% -> 68.33% of the canvas */
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: var(--weight-light);
  line-height: 1.25;
  color: #000;
}

/* 30:366 — one row of label/value pairs running across the canvas. */
.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-top: 24px;
  font-size: var(--meta-size);
  line-height: normal;
}

/* Syne and Outfit have different vertical metrics, so the label and value in
   each pair have to be baseline-aligned rather than box-aligned. */
.project-meta > div {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}

.project-meta dt {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  text-transform: uppercase;
  color: rgba(var(--ink), 0.35);
}

.project-meta dd {
  font-weight: var(--weight-bold);
  color: #1A1814;
}

/* 29:347 — the "Featured" pair is called out in the accent red. */
.project-meta .is-featured dt { color: rgba(204, 26, 26, 0.35); }
.project-meta .is-featured dd { color: var(--vivid-pink); }

/* --- Section labels (29:305 / 31:587 / 31:606) --- */

/* The frame sets these at 12px / 1.2px tracking; both are raised here so the
   eyebrows carry more weight on the page. */
.project-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: var(--weight-display);
  line-height: normal;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(var(--ink), 0.35);
}

.project-label--accent {
  color: var(--vivid-pink);
}

/* The accent red only reaches 3.09:1 on navy, so on the dark bands the eyebrow
   runs ivory instead. Scoped to the navy containers on purpose: the same class
   sits on ivory in .project-summary, .project-band--flip and .project-trio,
   where the red reads at 5.39:1 and should stay. */
.project-band--dark .project-label--accent,
.project-pair .project-label--accent,
.project-feature:not(.project-feature--light) .project-label--accent {
  color: var(--warm-ivory);
}

/* Rule under the metadata row, splitting the summary block from the copy. */
.project-summary .project-label {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 0.5px solid rgba(var(--ink), 0.15);
}

.project-copy {
  max-width: 800px;             /* 29:301 spans 5.63% -> 61.18% */
  margin-top: 8px;
  font-size: 16px;
  font-weight: var(--weight-light);
  line-height: normal;
  color: var(--navy);
}

/* Multi-paragraph copy, e.g. Trenton's Design Direction (48:70). */
.project-copy + .project-copy {
  margin-top: 1em;
}

.project-copy a {
  color: inherit;
  text-decoration: underline;
  transition: color var(--transition);
}

.project-copy a:hover {
  color: var(--vivid-pink);
}

/* On the navy bands .project-copy is already ivory, so an ivory hover alone
   would be invisible. The resting link is dimmed instead and brightens to full
   ivory on hover — 8.85:1 and 16.65:1, and the underline carries both states. */
.project-band--dark .project-copy a,
.project-feature:not(.project-feature--light) .project-copy a {
  color: rgba(var(--footer-ivory), 0.7);
}

.project-band--dark .project-copy a:hover,
.project-feature:not(.project-feature--light) .project-copy a:hover {
  color: var(--warm-ivory);
}

/* --- Content bands (30:566 / 30:570, 1440x600) --- */

.project-band {
  display: grid;
  grid-template-columns: 53.89% minmax(0, 1fr);   /* 776px image column */
  min-height: 600px;
  background: var(--warm-ivory);
}

.project-band--dark {
  background: var(--navy);
}

.project-band--flip {
  grid-template-columns: minmax(0, 1fr) 53.89%;
}

.project-band-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 48:69 backs the Trenton wordmark with white so the logo keeps its own
   ground inside the navy band. */
.project-band-img--plate {
  background: #FFF;
}

.project-band-body {
  align-self: center;
  padding: 48px 27px 48px 22px;   /* image edge -> 55.42%, text ends at 98.12% */
}

.project-band--flip .project-band-body {
  padding-inline: 25px 24px;
}

.project-band-body .project-copy {
  max-width: 615px;
  margin-top: 6px;
}

.project-band--dark .project-copy {
  color: var(--warm-ivory);
}

/* --- Spread pair (30:574, 1440x600) --- */
/* The navy band runs full bleed, but the pair itself sits inside the page
   gutter, so the eyebrows line up with the labels in the rest of the page and
   only a small gutter separates the two columns. */

.project-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 16px;               /* row gap only applies once the pair stacks */
  align-items: start;
  padding: 40px var(--canvas-gutter);
  background: var(--navy);
}

.project-pair .project-label {
  margin-bottom: 10px;
}

.project-pair img {
  width: 100%;
}

/* One eyebrow for the whole pair, e.g. Trenton's Visual Identity (72:83),
   rather than one per image. */
.project-pair-label {
  grid-column: 1 / -1;
}

/* --- Audience trio (68:69 / 68:75 / 68:70, three 440px images in a row) --- */

.project-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 20px;               /* row gap only applies once the trio stacks */
  align-items: start;
  padding: 40px var(--canvas-gutter);
}

.project-trio img {
  width: 100%;
}

/* ColorStack's Secured The Bag series is Instagram story format, so the trio
   holds the 9:16 frame and stays a row at every width rather than stacking. */
.project-trio--story img {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

/* ColorStack's event flyers are a mix of 1:1 and 4:5 exports; cropping from
   the top squares them up so the row reads as an Instagram grid. */
.project-trio--square img {
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
}

/* --- Ivory content section --- */
/* A standalone ivory section (ColorStack's Social Media Strategy and Giving
   Day) gets the same 56px breathing room as the summary block, so its label
   doesn't sit flush against the band above it. */

.project-section {
  padding-top: 56px;
}

.project-section > .project-feature-intro:last-child {
  padding-bottom: 56px;
}

/* ColorStack's Community and Giving Day run as navy sections. */
.project-section--dark {
  background: var(--navy);
}

.project-section--dark .project-copy {
  color: var(--warm-ivory);
}

/* ColorStack's text-only sections run the copy across the full canvas. */
.project-copy--wide {
  max-width: none;
}

/* The closing button stands alone, so it drops its usual top margin. */
.project-section--cta .button {
  margin-top: 0;
}

/* --- Media gallery: labelled groups of images and video --- */
/* ColorStack's Social Media Strategy runs several labelled rows under one
   block of copy, so each group carries its own eyebrow inside the gutter. */

.project-gallery {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 0 var(--canvas-gutter) 56px;
}

.project-gallery > .project-label {
  margin-bottom: 12px;
}

.project-gallery .project-trio {
  padding: 0;
}

.project-gallery img,
.project-gallery video {
  display: block;
  width: 100%;
}

/* Two 9:16 ads, held to the width of two Secured The Bag columns so the
   videos don't tower over the rows around them. */
.project-gallery--narrow {
  max-width: calc(900px + 2 * var(--canvas-gutter));
}

.project-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-duo video {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--navy);
}

/* Photo (4:3), vertical recap (9:16) and landscape recap (16:9) in one row.
   Each column's fr is its aspect ratio, so all three land at the same height. */
.project-strip {
  display: grid;
  grid-template-columns: 1.3333fr 0.5625fr 1.7778fr;
  gap: 20px;
  align-items: start;
}

.project-strip > * {
  aspect-ratio: var(--ratio);
  object-fit: cover;
  background: var(--navy);
}

/* --- Feature band: eyebrow + copy over a full-bleed image --- */
/* Y Ese Flow's Exhibition (30:578) and Trenton's Brand Implementation (48:73)
   are the same band, so they share these rules. */

.project-feature {
  background: var(--navy);
  padding-top: 25px;
}

.project-feature-intro {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 0 var(--canvas-gutter) 40px;
}

.project-feature .project-copy {
  max-width: 615px;
  color: var(--warm-ivory);
}

.project-feature > img {
  width: 100%;
}

/* Trenton's Brand Implementation (48:73) runs the band on ivory rather than
   navy, so its label and copy invert to navy. */
.project-feature--light {
  background: var(--warm-ivory);
}

.project-feature--light .project-label,
.project-feature--light .project-copy {
  color: var(--navy);
}

/* Y Ese Flow only: the show photo sits on ivory rather than the band's navy,
   so the gallery shot reads as a print on the wall, not as a bleed. */
.project-feature-photo {
  padding: 48px var(--canvas-gutter);
  background: var(--warm-ivory);
}

.project-feature-photo img {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
}

/* --- Instagram embeds (ColorStack) --- */
/* Instagram's embed.js swaps each blockquote for an iframe that caps itself at
   326–540px wide; the grid just centres those in each cell. */

.project-social {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 56px var(--canvas-gutter);
  border-top: 0.5px solid rgba(var(--ink), 0.15);
}

.project-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
  justify-items: center;
  align-items: start;
  margin-top: 40px;
}

.project-social-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.project-social-grid .instagram-media,
.project-social-grid iframe {
  width: 100% !important;
  max-width: 540px !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Fallback before the script loads, or if it's blocked. */
.project-social-grid blockquote.instagram-media {
  padding: 24px;
  background: #fff;
  border: 0.5px solid rgba(var(--ink), 0.15);
  border-radius: 3px;
  font-size: 14px;
  text-align: center;
}

.project-social-grid blockquote.instagram-media a {
  color: var(--navy);
}

/* Bare Lúx social posts as screenshots: three equal ~400px columns in one
   row, centred, stacking only at the 56rem breakpoint. */
.project-social-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 400px));
  justify-content: center;
  gap: 24px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

/* Instagram's 4:5 portrait post frame, so all three line up. */
.project-social-shots img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: rgba(var(--footer-ivory), 0.1);
  border-radius: 4px;
}

/* Each screenshot links to its post. A slight lift on hover signals that
   it's clickable. */
.project-social-shot {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.project-social-shot img {
  transition: transform 300ms ease, filter 300ms ease;
}

.project-social-shot:hover img,
.project-social-shot:focus-visible img {
  transform: scale(1.03);
  filter: brightness(0.92);
}

.project-social-shot:focus-visible {
  outline: 2px solid var(--warm-ivory);
  outline-offset: 3px;
}

/* Play button marking the Reel: a soft dark disc with an ivory triangle,
   centred on the image. */
.project-social-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.55);
  border: 1px solid rgba(var(--footer-ivory), 0.6);
  color: var(--warm-ivory);
  transform: translate(-50%, -50%);
  transition: background 300ms ease, transform 300ms ease;
  pointer-events: none;
}

.project-social-play svg {
  margin-left: 3px;             /* optical centring for the triangle */
}

.project-social-shot--reel:hover .project-social-play,
.project-social-shot--reel:focus-visible .project-social-play {
  background: rgba(26, 26, 26, 0.75);
  transform: translate(-50%, -50%) scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .project-social-shot img,
  .project-social-play {
    transition: none;
  }

  .project-social-shot:hover img,
  .project-social-shot:focus-visible img {
    transform: none;
  }

  .project-social-shot--reel:hover .project-social-play,
  .project-social-shot--reel:focus-visible .project-social-play {
    transform: translate(-50%, -50%);
  }
}

.project-social-more {
  margin-top: 24px;
  text-align: center;
}

/* Dimmed ivory at rest, full ivory on hover — the same treatment as links
   on the other navy bands. */
.project-social-more a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: var(--weight-display);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(var(--footer-ivory), 0.7);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--transition);
}

.project-social-more a:hover {
  color: var(--warm-ivory);
}

/* Text for screen readers only. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Full-bleed navy band around a .project-social block (Bare Lúx). */
.project-social-band {
  background: var(--navy);
}

.project-social-band .project-social {
  border-top: 0;
}

.project-social-band .project-label--accent,
.project-social-band .project-copy {
  color: var(--warm-ivory);
}

/* Opt-in: keep the accent red on a navy band instead of the ivory swap above
   (Bare Lúx). Note #CC1A1A on navy is ~3.1:1, below AA for 13px text. */
.project-label.project-label--red {
  color: var(--color-accent);   /* #CC1A1A */
}

/* --- Band with an image row instead of a single image (Bare Lúx) --- */

/* The images run to the right edge of the band, like the single spreads on
   Y Ese Flow? and Trenton. The band sizes to its content instead of the
   600px minimum, so a short row of images doesn't float in empty space. */
.project-band--media {
  min-height: 0;
}

.project-band-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  align-items: start;
  padding: 48px 0;
  list-style: none;
  margin: 0;
}

.project-band-media img {
  display: block;
  width: 100%;
}

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

/* The three brand kit slides are all ~16:9 but a few pixels apart; one
   shared frame keeps them exactly the same size. */
.project-band-media--three img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Stacked band: copy on top, a full-width row of images below (Bare Lúx
   brand kit). Both sit in the 1440px canvas, so across the 1280px content
   width three slides come out ~410px wide each. */
.project-band--stacked {
  grid-template-columns: minmax(0, var(--canvas));
  justify-content: center;
}

.project-band--stacked .project-band-body {
  padding: 56px var(--canvas-gutter) 32px;
}

.project-band--stacked .project-band-media {
  gap: 24px;
  padding: 0 var(--canvas-gutter) 64px;
}

.project-band--media .project-band-body {
  padding-left: var(--canvas-gutter);
}

@media (max-width: 56rem) {
  .project-social {
    padding-block: 40px;
  }

  .project-social-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-social-shots {
    grid-template-columns: minmax(0, 400px);
  }

  .project-band-media {
    padding: 0 var(--canvas-gutter) 40px;
  }

  .project-band--stacked .project-band-body {
    padding: 28px var(--canvas-gutter) 24px;
  }

  .project-band--stacked .project-band-media {
    padding-bottom: 40px;
  }

  /* Three slides in a row are too small to read on a phone. */
  .project-band-media--three {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

/* --- Next / previous --- */

.project-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 28px var(--canvas-gutter);
  border-top: 0.5px solid rgba(var(--ink), 0.15);
  font-size: 13px;
  font-weight: var(--weight-bold);
}

.project-next a {
  color: rgba(var(--ink), 0.5);
  text-decoration: none;
  transition: color var(--transition);
}

.project-next a:hover {
  color: var(--navy);
}

/* 10. Services ---------------------------------------------------------- */
/* Same 1440px canvas and gutter as the homepage and project pages, so the
   headings line up with the rest of the site. The accordions are native
   <details> elements — no script, and each group is exclusive via `name`. */

.services-page {
  background: var(--warm-ivory);
}

/* --- Hero --- */

.services-hero {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 88px var(--canvas-gutter) 64px;
}

.services-hero h1 {
  font-family: var(--font-sans);
  font-size: 72px;
  font-weight: var(--weight-bold);
  line-height: normal;
  letter-spacing: normal;
  color: var(--navy);
}

.services-intro {
  max-width: 760px;
  margin-top: 24px;
  font-size: 24px;
  font-weight: var(--weight-light);
  line-height: 1.35;
  color: rgba(var(--ink), 0.7);
}

/* --- Contact page: Tally form, aligned with the hero text --- */

.contact-form {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 0 var(--canvas-gutter) 96px;
}

.contact-form iframe {
  display: block;
  max-width: 760px;
  border: 0;
}

/* --- Section shell --- */

.services-section {
  max-width: var(--canvas);
  margin-inline: auto;
  padding: 64px var(--canvas-gutter);
}

/* Full-bleed navy band wrapping a .services-section. */
.services-band-dark {
  background: var(--navy);
}

.services-section-title {
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: var(--weight-bold);
  line-height: normal;
  letter-spacing: normal;
  color: var(--navy);
}

.services-band-dark .services-section-title {
  color: var(--warm-ivory);
}

/* --- Accordions --- */

.accordion {
  margin-top: 36px;
  border-top: 0.5px solid rgba(var(--ink), 0.15);
}

.accordion-item {
  border-bottom: 0.5px solid rgba(var(--ink), 0.15);
}

.accordion-item > summary {
  position: relative;
  padding: 24px 40px 24px 0;
  cursor: pointer;
  list-style: none;
}

.accordion-item > summary::-webkit-details-marker {
  display: none;
}

.accordion-title {
  display: block;
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: var(--weight-bold);
  line-height: 1.2;
  color: var(--navy);
  transition: color var(--transition);
}

.accordion-item > summary:hover .accordion-title,
.accordion-item[open] > summary .accordion-title {
  color: var(--vivid-pink);
}

/* Two crossed bars make a plus; opening the panel swings the upright bar flat
   onto the other one, so the marker settles as a minus. */
.accordion-item > summary::before,
.accordion-item > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 16px;
  height: 1.5px;
  background: var(--navy);
  transition: transform var(--transition), background var(--transition);
}

.accordion-item > summary::before {
  transform: translateY(-50%);
}

.accordion-item > summary::after {
  transform: translateY(-50%) rotate(90deg);
}

.accordion-item[open] > summary::after {
  transform: translateY(-50%) rotate(0deg);
}

.accordion-item > summary:hover::before,
.accordion-item > summary:hover::after,
.accordion-item[open] > summary::before,
.accordion-item[open] > summary::after {
  background: var(--vivid-pink);
}

.accordion-panel {
  max-width: 760px;
  padding-bottom: 32px;
}

/* --- Service panel contents --- */

.service-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding-bottom: 24px;
}

.service-facts > div {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}

.service-facts dt {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: var(--weight-display);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(var(--ink), 0.35);
}

.service-facts dd {
  font-size: 18px;
  font-weight: var(--weight-bold);
  color: var(--vivid-pink);
}

.service-sub {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: var(--weight-display);
  line-height: normal;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(var(--ink), 0.35);
}

.service-deliverables {
  margin-top: 12px;
  font-size: 16px;
  font-weight: var(--weight-light);
  color: var(--navy);
}

.service-deliverables li {
  position: relative;
  padding-left: 22px;
  padding-block: 4px;
}

.service-deliverables li::before {
  content: "";
  position: absolute;
  top: 0.85em;
  left: 0;
  width: 10px;
  height: 1.5px;
  background: var(--vivid-pink);
}

.accordion-answer {
  font-size: 16px;
  font-weight: var(--weight-light);
  line-height: 1.6;
  color: rgba(var(--ink), 0.7);
}

/* --- Client process --- */

.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
  margin-top: 40px;
}

.process-step {
  padding-top: 20px;
  border-top: 0.5px solid rgba(var(--footer-ivory), 0.3);
}

.process-step-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: var(--weight-display);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--color-accent);   /* #CC1A1A */
}

.process-step-title {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: var(--weight-bold);
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--warm-ivory);
}

.process-step-note {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--weight-display);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(var(--footer-ivory), 0.5);
}

.process-step-body {
  margin-top: 12px;
  font-size: 15px;
  font-weight: var(--weight-light);
  line-height: 1.6;
  color: rgba(var(--footer-ivory), 0.7);
}

/* --- Closing call to action --- */

.services-cta {
  padding: 96px var(--canvas-gutter);
  background: var(--vivid-pink);
  text-align: center;
}

.services-cta-title {
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: var(--weight-bold);
  line-height: normal;
  letter-spacing: normal;
  color: var(--color-on-accent);
}

.services-cta-body {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 18px;
  font-weight: var(--weight-light);
  line-height: 1.5;
  /* Full ivory, not a fade: any opacity over the red drops this under 4.5:1. */
  color: var(--color-on-accent);
}

/* The default .button is navy on ivory; inverted it keeps its contrast when
   it sits on the red band. */
.button--invert {
  background: var(--warm-ivory);
  color: var(--navy);
}

.button--invert:hover {
  background: var(--navy);
  color: var(--warm-ivory);
}

/* Red button for dark backgrounds (404 page). Ivory on red is 5.39:1. */
.button--accent {
  background: var(--vivid-pink);
  color: var(--color-on-accent);
}

.button--accent:hover {
  background: var(--warm-ivory);
  color: var(--navy);
}

/* --- 404 page --- */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 96px var(--canvas-gutter);
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.not-found-code {
  font-family: var(--font-sans);
  font-size: clamp(120px, 24vw, 280px);
  font-weight: 900;             /* Outfit Black */
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: #fff;
}

.not-found-text {
  margin-top: 24px;
  font-size: 24px;
  font-weight: var(--weight-light);
  line-height: 1.35;
  color: #fff;
}

/* Navy page above a navy footer: a hairline keeps them apart. */
.not-found + .home-footer {
  border-top: 0.5px solid rgba(var(--footer-ivory), 0.3);
}

/* Keeps a short phrase together on one line. */
.nowrap {
  white-space: nowrap;
}

/* 11. Footer ------------------------------------------------------------ */

.site-footer {
  background: var(--navy);
  padding-block: var(--space-md);
  font-size: var(--step--1);
  color: color-mix(in srgb, var(--warm-ivory) 75%, transparent);
}

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

.site-footer a:hover {
  color: var(--warm-ivory);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  align-items: center;
}

.social-links {
  display: flex;
  gap: var(--space-sm);
}

/* 12. Responsive -------------------------------------------------------- */

/* Below the 1440px Figma canvas the homepage keeps its proportions but lets
   the card row and the About Me pair share the narrower gutter box. */
@media (max-width: 1440px) {
  .index-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
  }

  .about-band-photo {
    right: var(--canvas-gutter);
  }

  .about-band-body {
    max-width: calc(100% - 460px);
  }
}

@media (max-width: 56rem) {
  :root {
    --canvas-gutter: 24px;
  }

  .home-nav-inner {
    height: 64px;
    padding-inline: 24px;
  }

  .home-nav-links {
    gap: 16px;
  }

  .home-nav-links a {
    font-size: 14px;
  }

  .home-hero {
    padding-block: 32px 56px;
  }

  .home-hero-video {
    width: min(300px, 80vw);
  }

  .home-hero-copy {
    margin-top: 24px;
    font-size: 16px;
  }

  .project-index,
  .about-band {
    min-height: 0;
  }

  .project-index-inner,
  .about-band-inner {
    padding-bottom: 56px;
  }

  .index-filters {
    flex-wrap: wrap;
    gap: 12px 19px;
  }

  .index-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .index-card {
    height: 380px;
  }

  .spotlight {
    height: 60vh;
    min-height: 360px;
  }

  .spotlight-label {
    top: 24px;
  }

  .spotlight-title {
    left: var(--canvas-gutter);
    font-size: clamp(2rem, 8vw, 4.5rem);
  }

  .about-band-title {
    font-size: 32px;
  }

  .about-band-body {
    max-width: none;
    margin-top: 24px;
    font-size: 18px;
  }

  .about-band-photo {
    position: static;
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 4 / 3;
    margin-top: 32px;
  }

  .home-footer-inner {
    padding: 64px 24px 48px;
  }

  .home-footer-name {
    font-size: clamp(2rem, 8vw, 4rem);
  }

  .home-footer-tagline {
    margin-top: 12px;
  }

  .home-footer-cols {
    gap: 24px;
    margin-top: 40px;
  }

  .project-spotlight {
    height: 60vh;
    min-height: 320px;
  }

  .project-masthead {
    padding-top: 24px;
  }

  .project-masthead h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
  }

  .project-summary {
    padding-block: 16px 40px;
  }

  .project-band,
  .project-band--flip,
  .project-pair {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .project-band-img {
    height: auto;
  }

  .project-band-body,
  .project-band--flip .project-band-body {
    padding: 28px var(--canvas-gutter) 40px;
  }

  .project-feature-intro {
    padding-bottom: 28px;
  }

  .project-trio {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-trio--story {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .project-duo {
    gap: 8px;
  }

  .project-section {
    padding-top: 40px;
  }

  .project-section > .project-feature-intro:last-child {
    padding-bottom: 40px;
  }

  .project-gallery {
    padding-bottom: 40px;
  }

  .project-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .project-strip > .is-vertical {
    justify-self: center;
    width: min(100%, 320px);
  }

  .project-next {
    font-size: 12px;
  }

  .services-hero {
    padding-block: 48px 40px;
  }

  .services-hero h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
  }

  .services-intro {
    margin-top: 16px;
    font-size: 18px;
  }

  .services-section {
    padding-block: 48px;
  }

  .services-section-title,
  .services-cta-title {
    font-size: 32px;
  }

  .accordion {
    margin-top: 24px;
  }

  .accordion-title {
    font-size: 19px;
  }

  .process-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  /* About: portrait drops under the bio. */
  .about-bio {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 64px;
  }

  .about-bio-photo {
    position: static;
    max-width: 480px;
  }

  .services-cta {
    padding-block: 64px;
  }

  .services-cta-body {
    font-size: 16px;
  }
}

/* Between the full canvas and the stacked layout the four process steps read
   better as a 2x2 grid than as four narrow columns. */
@media (max-width: 72rem) and (min-width: 56.01rem) {
  .process-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: var(--space-sm) 1.25rem var(--space-md);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
  }

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

  .site-nav ul {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .about-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .case-gallery {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
