/* ==========================================================================
   Canalside Collective / The Studio
   All visual styling for the site lives here.

   The design tokens in :root below are the only place colours, fonts and
   spacing are defined - change a value there and it updates everywhere.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colour - a warm, lamp-lit dark palette pulled from the studio itself:
     brick and wood browns, amber bulb glow, terracotta rug.
     All text pairs below are checked against WCAG AA (4.5:1) or better. */
  --c-bg:            #17130F;  /* deepest brown-black - page background     */
  --c-surface:       #211A15;  /* cards, form fields                        */
  --c-surface-raised:#2A211A;  /* hovered cards, nested panels              */

  --c-text:          #F4EDE4;  /* warm off-white - 15.9:1 on --c-bg         */
  --c-text-muted:    #B9AA9A;  /* secondary copy - 8.2:1 on --c-bg          */

  --c-accent:        #E8A33D;  /* amber lamp glow - primary accent, 8.6:1   */
  --c-accent-soft:   #F0BE72;  /* lighter amber for hover states            */
  --c-terracotta:    #C4703F;  /* rug/brick tone - secondary accent, 5.1:1  */
  --c-moss:          #7E8C6A;  /* the plants - used sparingly               */

  --c-line:          #3D3128;  /* decorative hairlines and card outlines    */
  --c-line-control:  #8A7765;  /* form control borders - 4:1, meets AA
                                  non-text contrast for UI boundaries       */

  --c-error:         #F0846B;  /* 7.2:1 on --c-bg                           */
  --c-success:       #9CC17A;  /* 8.4:1 on --c-surface                      */

  --c-on-accent:     #17130F;  /* text sitting on an amber button, 8.6:1    */

  /* Typography - Lora (organic serif) for headings, Raleway for body.
     Chosen for a calm / natural / unhurried feel rather than a techy one. */
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body:    'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid type scale. clamp() means it grows with the viewport instead of
     jumping at breakpoints. Body never drops below 16px (iOS zoom trigger). */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.40vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.80rem, 1.50rem + 1.50vw, 2.75rem);
  --step-4:  clamp(2.20rem, 1.60rem + 3.00vw, 4.25rem);

  /* Spacing - an 8px rhythm, so every gap is a multiple of the same unit. */
  --space-2xs: 0.25rem;  /*  4px */
  --space-xs:  0.5rem;   /*  8px */
  --space-sm:  1rem;     /* 16px */
  --space-md:  1.5rem;   /* 24px */
  --space-lg:  2.5rem;   /* 40px */
  --space-xl:  4rem;     /* 64px */
  --space-2xl: 6rem;     /* 96px */

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-soft:  0 2px 14px rgba(0, 0, 0, 0.35);
  --shadow-lift:  0 12px 34px rgba(0, 0, 0, 0.48);

  --width-page:  72rem;   /* max page width  */
  --width-prose: 38rem;   /* ~65-70 chars per line for readable paragraphs */

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);  /* deceleration - settles softly */

  /* Layered z-index scale, so nothing has to guess a number. */
  --z-base: 0;
  --z-sticky: 40;
  --z-nav: 60;
  --z-skip: 100;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keeps anchor targets clear of the sticky header. */
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* A faint amber wash top-left, like a lamp just out of frame. */
  background-image:
    radial-gradient(60rem 40rem at 12% -8%, rgba(232, 163, 61, 0.10), transparent 60%),
    radial-gradient(45rem 35rem at 92% 8%, rgba(196, 112, 63, 0.07), transparent 65%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
  /* Avoids a lone word dangling on the last line of a heading. */
  text-wrap: balance;
}

h1 { font-size: var(--step-4); letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); }

p { margin: 0 0 var(--space-sm); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-accent-soft); }

/* Long URLs / IDs reflow instead of blowing out the layout. */
.break-anywhere { overflow-wrap: anywhere; }

/* One consistent, always-visible focus ring across the whole site. */
:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Screen-reader-only: present for assistive tech, invisible on screen. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Keyboard users get a "skip to content" link as the very first tab stop. */
.skip-link {
  position: absolute; left: var(--space-sm); top: -100%;
  z-index: var(--z-skip);
  background: var(--c-accent); color: var(--c-on-accent);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-sm); }

/* --------------------------------------------------------------------------
   3. LAYOUT HELPERS
   -------------------------------------------------------------------------- */
.wrap {
  width: min(100% - var(--space-md) * 2, var(--width-page));
  margin-inline: auto;
}
@media (min-width: 48rem) {
  .wrap { width: min(100% - var(--space-xl) * 2, var(--width-page)); }
}

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.prose { max-width: var(--width-prose); }

/* Small uppercase label that sits above a section heading. */
.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-terracotta);
  margin-bottom: var(--space-xs);
}

.section-head { max-width: var(--width-prose); margin-bottom: var(--space-lg); }
.section-head p { color: var(--c-text-muted); }

.lede { font-size: var(--step-1); color: var(--c-text-muted); line-height: 1.55; }

.rule { border: 0; border-top: 1px solid var(--c-line); margin: 0; }

/* --------------------------------------------------------------------------
   4. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(23, 19, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
}
/* Fallback for browsers without backdrop-filter - stay opaque so the nav
   never becomes unreadable over scrolling content. */
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--c-bg); }
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;                        /* nav drops to its own row instead
                                              of hiding behind a menu button
                                              once the wordmark + links no
                                              longer fit on one line */
  gap: var(--space-md); row-gap: var(--space-xs);
  min-height: 4.5rem;
  padding-block: var(--space-xs);
}

/* Wordmark */
.brand {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 44px;                       /* comfortable target on touch */
  text-decoration: none; color: var(--c-text);
}
.brand:hover { color: var(--c-text); }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600; line-height: 1.1;
  letter-spacing: 0.01em;
}
.brand__sub {
  font-size: 0.68rem; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--c-text-muted);
}

.nav__list {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--space-xs); row-gap: var(--space-xs);
  list-style: none; margin: 0; padding: 0;
}
.nav__link {
  display: block;
  padding: 0.7rem var(--space-sm);        /* keeps the tap target >=44px tall */
  color: var(--c-text-muted);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500; letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.nav__link:hover { color: var(--c-text); background: var(--c-surface); }

/* The page you're currently on is marked with aria-current in the HTML,
   so the highlight is announced to screen readers, not just seen. */
.nav__link[aria-current="page"] { color: var(--c-accent); }
.nav__link[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 3px;
  background: var(--c-accent); border-radius: 2px;
}

/* The nav links are always visible, side by side, at every viewport width -
   no hamburger menu. flex-wrap above handles the rare case where the
   wordmark and links can't both fit on one line: the nav row drops below
   the wordmark rather than anything being hidden. justify-content:
   space-between on .site-header__inner naturally left-aligns that second
   row, since a line with only one flex item has nothing to space against. */

/* On phones the full-size wordmark plus three links need ~345px but only
   ~327px is available, so the wrap above triggered and stacked the header
   into three rows - about 180px, over a fifth of the screen before any
   content showed. Shrinking the type and dropping the decorative second
   wordmark line gets everything back onto a single row. */
@media (max-width: 30rem) {
  .site-header__inner {
    flex-wrap: nowrap;
    gap: var(--space-xs);
    min-height: 0;
  }

  /* "Canalside Collective" is the widest single item in the header and is
     purely decorative here - it still appears in the footer of every page,
     and the <title> and page copy both carry the business name. */
  .brand__sub { display: none; }
  /* nowrap + no shrink: without these the wordmark is the first thing flex
     squeezes, and "The Studio" breaks onto two lines. */
  .brand__name { font-size: 1rem; white-space: nowrap; }
  .brand { min-height: 40px; flex-shrink: 0; }

  .nav__list { flex-wrap: nowrap; gap: 2px; }

  /* Tighter than the desktop targets but still well clear of the 24px
     WCAG 2.2 minimum for pointer targets. */
  .nav__link {
    padding: 0.5rem 0.4rem;
    font-size: 0.8rem;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .nav__list .btn {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    min-height: 40px;
    white-space: nowrap;
  }
}

/* Narrowest phones (iPhone SE and similar, ~320px). Tighter type still
   isn't enough room for the wordmark and all three nav items on one row -
   "Book a session" was overflowing past the edge of the screen. Rather than
   let it clip, drop the nav onto its own full-width row below the wordmark,
   the same escape hatch .site-header__inner already uses at wider widths
   when things don't fit on one line. */
@media (max-width: 22.5rem) {
  .site-header .wrap { width: calc(100% - var(--space-sm) * 2); }
  .site-header__inner { flex-wrap: wrap; }
  .brand__name { font-size: 0.92rem; }
  .nav__list { flex-basis: 100%; }
  .nav__link { padding: 0.45rem 0.28rem; font-size: 0.72rem; }
  .nav__list .btn { padding: 0.45rem 0.55rem; font-size: 0.72rem; }
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;                        /* comfortable on touch */
  padding: 0.8rem 1.6rem;
  font-family: var(--font-body);
  font-size: var(--step-0); font-weight: 600; letter-spacing: 0.01em;
  border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  /* Removes the 300ms tap delay on touch without disabling pinch-zoom. */
  touch-action: manipulation;
  transition: background-color 220ms var(--ease),
              border-color 220ms var(--ease),
              color 220ms var(--ease),
              transform 220ms var(--ease);
}
/* Scale only - never animates width/height, so nothing around it reflows. */
.btn:active { transform: scale(0.97); }

.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { background: var(--c-accent-soft); color: var(--c-on-accent); }

.btn--ghost { background: transparent; color: var(--c-text); border-color: var(--c-line-control); }
.btn--ghost:hover { background: var(--c-surface); color: var(--c-text); border-color: var(--c-accent); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; transform: none;
}

.btn__icon { width: 1.15em; height: 1.15em; flex: none; }

/* Text link with a small arrow, used on cards and inline CTAs. */
/* These read as standalone calls-to-action rather than links inside a
   sentence, so they get a proper target height instead of relying on the
   inline-text exception. */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px; padding-block: var(--space-xs);
  font-weight: 600; font-size: var(--step--1);
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; color: var(--c-accent);
  touch-action: manipulation;
}
.link-arrow svg { width: 1em; height: 1em; transition: transform 220ms var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--space-xl) var(--space-2xl); }

.hero__grid {
  display: grid; gap: var(--space-lg); align-items: center;
}
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: var(--space-xl); }
}

.hero__title { margin-bottom: var(--space-md); }
.hero__title em {
  font-style: italic; color: var(--c-accent); font-weight: 400;
}
.hero__text { max-width: 34rem; }
.hero__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.hero__media { position: relative; }
.hero__media img {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--c-line);
}

/* Small "open for bookings" chip that sits on the hero image. */
.hero__badge {
  position: absolute; left: var(--space-sm); bottom: var(--space-sm);
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(23, 19, 15, 0.90);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--c-line-control);
  border-radius: 999px;
  font-size: var(--step--1); font-weight: 600;
  color: var(--c-text);
}
.hero__badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-moss); flex: none;
}

/* Trust strip under the hero: three short credibility stats. */
.stats {
  display: grid; gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  padding-block: var(--space-lg);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  list-style: none; margin: 0; padding-inline: 0;
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2); color: var(--c-accent); line-height: 1.1;
  /* Tabular figures stop numbers from jittering as they change. */
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: var(--step--1); color: var(--c-text-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   7. FEATURED PLAYER
   -------------------------------------------------------------------------- */
.featured {
  display: grid; gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
}
@media (min-width: 52rem) {
  .featured { grid-template-columns: 1fr 1.2fr; align-items: center; }
}

/* Holds the Spotify/SoundCloud iframe once one is pasted in.
   The fixed min-height reserves space so the page doesn't jump when the
   embed finishes loading. */
.player-slot {
  min-height: 152px;
  display: grid; place-items: center;
  padding: var(--space-md);
  background: var(--c-bg);
  border: 1px dashed var(--c-line-control);
  border-radius: var(--radius-md);
  color: var(--c-text-muted);
  text-align: center; font-size: var(--step--1);
}
.player-slot iframe { width: 100%; border: 0; border-radius: var(--radius-md); }

/* Add this alongside .player-slot once a real embed replaces the
   placeholder text, so the dashed border and centred placeholder styling
   drop away and the embed sits flush instead of looking unfinished. */
.player-slot--filled {
  min-height: 0;
  display: block;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
}

/* --------------------------------------------------------------------------
   8. WORK GRID
   -------------------------------------------------------------------------- */
.work-grid {
  /* Flexbox, not grid: grid shares one column-track set across every row,
     so a lone leftover card on the last row inherits that column's
     position instead of centring on its own — noticeable whenever the
     card count isn't a clean multiple of however many fit per row (which
     changes as cards are added or removed). Flex-wrap centres each row
     independently, so this holds at any card count and any width. */
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--space-md);
  list-style: none; margin: 0; padding: 0;
}

.work-card {
  position: relative;
  display: flex; flex-direction: column;
  flex: 1 1 15rem; max-width: 20rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 260ms var(--ease),
              background-color 260ms var(--ease),
              transform 260ms var(--ease);
}
.work-card:hover {
  background: var(--c-surface-raised);
  border-color: var(--c-line-control);
  transform: translateY(-3px);
}
/* Focusing the link inside the card rings the whole card. */
.work-card:focus-within { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.work-card:focus-within .work-card__link:focus-visible { outline: none; }

.work-card__art { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; }
.work-card__body { padding: var(--space-sm) var(--space-sm) var(--space-md); }

.work-card__role {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--c-terracotta);
}
.work-card__title {
  font-size: var(--step-0); font-weight: 600;
  margin: var(--space-2xs) 0 0.15rem; font-family: var(--font-body);
}
.work-card__artist { font-size: var(--step--1); color: var(--c-text-muted); margin: 0; }

/* Stretches the link across the whole card so the entire tile is clickable,
   while the accessible name stays on the real link text. */
.work-card__link { text-decoration: none; color: inherit; }
.work-card__link::after { content: ""; position: absolute; inset: 0; }

/* --------------------------------------------------------------------------
   9. GALLERY
   -------------------------------------------------------------------------- */
.gallery {
  display: grid; gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.gallery li { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-line);
}
/* Let the first tile run wide on larger screens for a less uniform grid. */
@media (min-width: 60rem) {
  .gallery li:first-child { grid-column: span 2; }
  .gallery li:first-child img { aspect-ratio: 16 / 9; }
}

/* --------------------------------------------------------------------------
   10. TESTIMONIALS
   -------------------------------------------------------------------------- */
.quotes {
  display: grid; gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.quote {
  display: flex; flex-direction: column; gap: var(--space-md);
  padding: var(--space-md);
  margin: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
}
.quote blockquote {
  margin: 0; font-family: var(--font-display);
  font-size: var(--step-1); line-height: 1.45; font-style: italic;
}
.quote figcaption {
  display: flex; align-items: center; gap: var(--space-xs);
  margin-top: auto;
}
.quote img {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex: none; border: 1px solid var(--c-line);
}
.quote__name { display: block; font-weight: 600; font-size: var(--step--1); }
.quote__role { display: block; font-size: var(--step--1); color: var(--c-text-muted); }

/* --------------------------------------------------------------------------
   11. FEATURE / DETAIL LISTS
   -------------------------------------------------------------------------- */
.feature-list {
  display: grid; gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.feature {
  padding: var(--space-md);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
}
.feature__icon {
  width: 26px; height: 26px; color: var(--c-accent);
  margin-bottom: var(--space-xs);
}
.feature h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 600; }
.feature p { color: var(--c-text-muted); font-size: var(--step--1); margin: 0; }

/* Two-column text + image block, used on the studio page. */
.split { display: grid; gap: var(--space-lg); align-items: center; }
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
  .split--reverse > :first-child { order: 2; }
}
.split img { border-radius: var(--radius-lg); border: 1px solid var(--c-line); }

/* --------------------------------------------------------------------------
   12. RATE CARD
   -------------------------------------------------------------------------- */
.rates {
  display: grid; gap: var(--space-md);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none; margin: 0; padding: 0;
}
@media (max-width: 55.99rem) {
  .rates { grid-template-columns: 1fr; }
}
.rate {
  display: flex; flex-direction: column; gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
}
.rate--featured { border-color: var(--c-accent); }
.rate__name { font-family: var(--font-display); font-size: var(--step-1); }
.rate__price {
  font-family: var(--font-display); font-size: var(--step-2);
  color: var(--c-accent); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.rate__price span {
  font-family: var(--font-body); font-size: var(--step--1);
  color: var(--c-text-muted); font-weight: 500;
}
.rate__detail { font-size: var(--step--1); color: var(--c-text-muted); margin: 0; }

/* --------------------------------------------------------------------------
   13. FORMS
   -------------------------------------------------------------------------- */
.form { max-width: 40rem; }

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

/* Side-by-side fields on wider screens, stacked on mobile. */
.form__pair { display: grid; gap: var(--space-md); }
@media (min-width: 40rem) { .form__pair { grid-template-columns: 1fr 1fr; } }

/* Groups related fields (e.g. "About you") with a real legend for
   screen readers, without the default fieldset chrome. */
.form__group { border: 0; padding: 0; margin: 0 0 var(--space-lg); }
.form__legend {
  padding: 0; margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--c-terracotta);
}

.field__label {
  display: block; margin-bottom: var(--space-2xs);
  font-weight: 600; font-size: var(--step--1); letter-spacing: 0.02em;
}
.field__required { color: var(--c-terracotta); margin-left: 2px; }

/* Persistent helper text, rather than a placeholder that vanishes on typing. */
.field__hint {
  display: block; margin: 0 0 var(--space-2xs);
  font-size: var(--step--1); color: var(--c-text-muted); font-weight: 400;
}

.field__input,
.field__select,
.field__textarea {
  width: 100%;
  min-height: 48px;                       /* comfortable touch target */
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;                        /* 16px - stops iOS zooming on focus */
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-line-control);
  border-radius: var(--radius-sm);
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}
.field__textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }

.field__input::placeholder, .field__textarea::placeholder { color: #8A7765; }

.field__input:hover, .field__select:hover, .field__textarea:hover {
  border-color: var(--c-accent-soft);
}
.field__input:focus-visible,
.field__select:focus-visible,
.field__textarea:focus-visible {
  border-color: var(--c-accent);
  background: var(--c-surface-raised);
}

/* Native select arrow is inconsistent across browsers, so draw our own. */
.field__select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23B9AA9A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1.15rem;
  padding-right: 2.8rem;
}

/* Invalid state - marked by main.js, never by :invalid alone (which would
   flag empty fields before the visitor has even typed). */
.field__input[aria-invalid="true"],
.field__select[aria-invalid="true"],
.field__textarea[aria-invalid="true"] {
  border-color: var(--c-error);
  /* A second visual cue so the error isn't communicated by colour alone. */
  box-shadow: inset 3px 0 0 var(--c-error);
}

.field__error {
  display: flex; align-items: flex-start; gap: 0.35rem;
  margin: var(--space-2xs) 0 0;
  font-size: var(--step--1); font-weight: 500; color: var(--c-error);
}
.field__error svg { width: 1em; height: 1em; flex: none; margin-top: 0.25em; }
.field__error[hidden] { display: none; }

/* Error summary at the top of the form after a failed submit. */
.error-summary {
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-error);
  border-left-width: 4px;
  border-radius: var(--radius-md);
}
.error-summary[hidden] { display: none; }
.error-summary h2 {
  font-size: var(--step-1); color: var(--c-error); margin-bottom: var(--space-xs);
}
.error-summary ul { margin: 0; padding-left: var(--space-md); }
.error-summary a { color: var(--c-error); font-weight: 600; }

/* Honeypot - invisible to people, catches bots that fill every field.
   Kept out of the tab order and the accessibility tree. */
.honeypot {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.form__footer {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-md); margin-top: var(--space-lg);
}
.form__note { font-size: var(--step--1); color: var(--c-text-muted); margin: 0; }

/* Spinner shown inside the submit button while the form posts. */
.btn__spinner {
  width: 1.1em; height: 1.1em; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.btn__spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   14. CONTACT PANEL
   -------------------------------------------------------------------------- */
.contact-panel {
  padding: var(--space-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-md); }
.contact-list__item { display: flex; gap: var(--space-sm); align-items: flex-start; }
.contact-list__icon { width: 20px; height: 20px; color: var(--c-accent); flex: none; margin-top: 0.3rem; }
.contact-list__label {
  display: block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-text-muted);
}
.contact-list__value { font-size: var(--step-0); }

/* --------------------------------------------------------------------------
   15. CTA BAND
   -------------------------------------------------------------------------- */
.cta-band {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
}
.cta-band .prose { margin-inline: auto; }
.cta-band .btn { margin-top: var(--space-md); }

/* --------------------------------------------------------------------------
   16. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--space-2xl);
  padding-block: var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--c-line);
  background: rgba(0, 0, 0, 0.22);
}
.site-footer__grid {
  display: grid; gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin-bottom: var(--space-lg);
}
.site-footer h2 {
  font-family: var(--font-body); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-text-muted);
  margin-bottom: var(--space-sm);
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.footer-links a {
  display: inline-block; padding: 0.35rem 0;
  color: var(--c-text); text-decoration: none; font-size: var(--step--1);
}
.footer-links a:hover { color: var(--c-accent); text-decoration: underline; }

.social { display: flex; gap: var(--space-xs); list-style: none; margin: 0; padding: 0; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;              /* icon-only, so keep the tap target big */
  border: 1px solid var(--c-line);
  border-radius: 50%; color: var(--c-text);
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.social a:hover { color: var(--c-accent); border-color: var(--c-accent); }
.social svg { width: 19px; height: 19px; }

.site-footer__base {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  justify-content: space-between; align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--c-line);
  font-size: var(--step--1); color: var(--c-text-muted);
}
.site-footer__base p { margin: 0; }

/* --------------------------------------------------------------------------
   17. SCROLL REVEAL
   Elements start slightly down and transparent; main.js adds .is-visible
   as they scroll into view. The rule only applies when <html> has the
   .js class, so with JavaScript off nothing is ever hidden.
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

/* --------------------------------------------------------------------------
   18. REDUCED MOTION
   Anyone who has asked their OS to reduce motion gets the final state
   immediately, with no movement at all.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .btn:active { transform: none; }
  .work-card:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   19. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .btn { display: none !important; }
  body { background: #fff; color: #000; background-image: none; }
  .js .reveal { opacity: 1; transform: none; }
}
