/* =============================================================================
   Riggidy Ruben — Ruben Illegems, Character TD / 3D Rigger
   style.css

   BUILD PHASE 1 — design system, shared header/footer, video components,
   homepage layout, motion.

   CONTRAST AUDIT — turquoise banner, white page.
   Ratios computed with the WCAG 2.x relative-luminance formula; AA needs 4.5:1
   for body text and 3:1 for large text (>=24px, or >=18.66px bold).

     INSIDE THE BANNER (--banner #60E0E3)
       --banner-text (white)    1.58:1   FAILS AA at every size. This is a
                                         DELIBERATE CLIENT DECISION, taken with
                                         the measurement in front of him: he
                                         wants white lettering on his turquoise.
                                         --banner-shadow softens it — see the
                                         note in the custom properties below —
                                         but the measured ratio is unchanged,
                                         and an audit tool will report 1.58:1.
                                         The compliant alternative, near-black
                                         lettering, measures 11.81:1.
       hover pill: white on --banner-pill (#0F2B46, dark blue)
                               14.44:1   AAA   the pill's label. Every hover and
                                               focus state in the band, and the
                                               current page's nav link, is
                                               therefore fully legible.
       hover pill vs banner     9.12:1         the pill itself is unmistakable
                                               against the turquoise
       the rule under the name  1.19:1         decorative separator, not a UI
                                               boundary, so 3:1 does not apply.
                                               White at 0.4 alpha is a soft
                                               line; the near-black rule it
                                               replaced measured 1.68:1.

     ON --bg (#F1F6F6) — the off-white page, every area below the banner
       --text                 17.14:1   AAA   body copy, headings
       --text-muted            6.77:1   AAA   section labels, captions, footer
       --accent                4.96:1   AA    links, focus rings
       --danger                8.58:1   AAA   form validation errors
       --turquoise, rejected   1.45:1   FAIL  which is why the turquoise is not
                                              an accent anywhere on the page

     ON --bg-elev (#FFFFFF) — cards, the contact block, the breakdowns band
       --text                 18.70:1   AAA   card titles, form values
       --text-muted            7.38:1   AAA
       --accent                5.41:1   AAA   hovered card title and border
       --danger                9.35:1   AAA   invalid field border sits here

     --accent was darkened from #0B7F82 to #0A7679 when the page moved from
     #F6FAFA to #F1F6F6: on the darker off-white the old teal measured 4.40:1
     and fell under AA for body-size links. Every pair above now clears the
     body-text threshold on both surfaces, with 4.96:1 the thinnest margin.

     FILLS — white type on a dark block
       --text-invert on --text fill    18.70:1   AAA   primary CTA, skip link
       --text-invert on --banner-pill  18.70:1   AAA   the banner hover pill
       --text-invert on --accent        4.80:1   AA    play button on hover

     THE TURQUOISE, in the only two places it survives
       banner band                     — see the banner section above
       play button fill, --text icon  11.81:1   the disc sits on video imagery,
                                                not on the page, so its 1.58:1
                                                against white does not apply

     NON-TEXT SEPARATION — a light page needs its edges drawn
       --bg-elev vs --bg                1.05:1   a card against the page. The
                                                fill difference is a whisper, so
                                                every card, video frame and the
                                                breakdowns band relies on its
                                                border, not its surface.
       --border hairline on --bg        1.62:1   video and card frames, raised
       --border hairline on --bg-elev   1.63:1   from 0.12 to 0.22 alpha for
                                                exactly that reason. It also
                                                keeps the light cyan clip
                                                backdrops (~1.17:1 against the
                                                page) from bleeding out. 0.28
                                                alpha would give 1.88:1 if it
                                                still reads faint on his screen.
       contact block, 2px --text edge  18.70:1   drawn rather than hinted, so
                                                the block reads as a card
                                                instead of fading into the
                                                section around it.

   ONE RULE FOR THE WHOLE SITE NOW. The page is white, so text is --text and
   anything filled goes dark with white type. The only light-on-dark type is
   inside a fill or the banner pill. No dark surface exists anywhere below the
   band.

   --danger is used for form validation only, always alongside the wording and
   aria-invalid, so colour reinforces the message and never carries it alone.
   --text-muted is never used below 14px, so every pair above is judged at the
   stricter 4.5:1 body-text threshold rather than the 3:1 large-text one.

   TABLE OF CONTENTS
     1. Custom properties
     2. Reset and base
     3. Typography
     4. Layout — container, sections, grid helpers
     5. Accessibility utilities — skip link, focus, visually hidden
     6. Header and navigation
     7. Buttons and links
     8. Video components (6a facade / 6b card loop / 6c breakdown)
     9. Hero
    10. About
    11. Featured work
    12. Contact
    13. Footer
    14. Inner pages — rigs, privacy, thanks, 404
    15. Motion — scroll reveals
   ========================================================================== */


/* =============================================================================
   1. CUSTOM PROPERTIES
   Every colour, space and type value used in this file is declared here.
   No hardcoded hex values appear in any rule below.
   ========================================================================== */

/* =============================================================================
   SELF-HOSTED WEBFONTS
   Downloaded once and served from this site, so no visitor IP address is sent
   to a third party on page load. Licences: assets/fonts/LICENSE-*.txt
   Paths are relative to this stylesheet, hence ../assets/.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext-500.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-ext-500.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  /* ---- Colour ----
     A turquoise banner with white lettering, and everything below it white
     with dark lettering. There is no dark surface anywhere on the site. */
  --bg: #F1F6F6;                        /* off-white page, a trace of the
                                           banner's hue so pure white does not
                                           sit harshly against the band       */
  --bg-elev: #FFFFFF;                   /* cards and elevated surfaces, above
                                           the page rather than below it      */
  --text: #0B131B;                      /* primary text                      */
  --text-muted: #4A585D;                /* secondary text, captions          */
  /* Deep teal — links, eyebrow labels, hover, focus rings. Darkened from
     #0B7F82 when the page went to #F1F6F6: on the darker off-white the old
     value measured 4.40:1 and fell under AA for body-size links. */
  --accent: #0A7679;
  /* One step darker than --text-muted and --accent respectively — closer to
     full --text / --accent-weight without taking it on, for small or quiet
     type that needs to read more clearly than --text-muted allows: the
     small uppercase section labels (PORTFOLIO, PROJECTS, BREAKDOWNS & TOOLS,
     the About role line) and the footer text. */
  --text-muted-dark: #38424A;
  --label-accent: #085E61;
  --danger: #93000A;                    /* form validation errors only       */
  /* Card and page differ by only 1.05:1 now that the relationship is inverted,
     so the hairline carries all of the separation on its own — hence 0.28
     rather than the 0.12 that was enough when cards were the darker surface.
     1.88:1 against the page: visible against the pale skies in the clips, and
     still a hairline rather than a frame. The contact block is the one drawn
     edge on the site (2px --text) and keeps that weight to itself. */
  --border: rgba(11, 19, 27, 0.28);     /* hairline borders and media frames  */

  /* White, for type on a dark fill: buttons, the skip link, the banner pill. */
  --text-invert: #FFFFFF;

  /* ---- The client's turquoise ----
     It survives in exactly two places: the banner band, and the video play
     buttons, which sit on video imagery rather than on the page. It cannot be
     an accent on white — #60E0E3 on #FFFFFF is 1.58:1. */
  --turquoise: #60E0E3;

  --banner: var(--turquoise);           /* the band itself                   */

  /* ===========================================================================
     WHITE BANNER LETTERING — a deliberate client decision, recorded here.

     White on --banner (#60E0E3) measures 1.58:1, against the 4.5:1 AA needs
     for body text and 3:1 for large text. The client has chosen this look
     knowing the measurement, softened with --banner-shadow below.

     What the shadow does and does not do: it sharpens the edge of each glyph
     against the turquoise, which helps real legibility. It does not change the
     measured ratio — WCAG's formula reads two flat colours and knows nothing
     about shadows, so this band still reports 1.58:1 in any audit tool.

     The keyboard focus ring inside the band draws in --banner-text too
     (.header :focus-visible), so it is white on turquoise at the same ratio.

     IF THE DECISION IS EVER REVERSED, three lines restore a compliant band:
         --banner-text: #0B131B;              (11.81:1, passes AAA)
         --banner-rule: rgba(11, 19, 27, 0.25);
         --banner-shadow: none;
     ======================================================================== */
  --banner-text: #FFFFFF;               /* 1.58:1 — accepted by the client    */
  --banner-rule: rgba(255, 255, 255, 0.4);

  /* The hover/active pill inside the band: a dark blue block with white type.
     Pinned rather than inherited from --bg, so the pill keeps its value even
     if the page colour moves. White on it is 14.44:1, and the pill itself
     reads 9.12:1 against the turquoise. */
  --banner-pill: #0F2B46;
  --banner-pill-text: #FFFFFF;

  /* A soft dark shadow behind the white lettering. It sharpens the edges of
     the glyphs against the turquoise without altering either colour — see the
     note in the contrast audit above about what it does and does not do. */
  --banner-shadow: 0 1px 2px rgba(11, 19, 27, 0.35);

  /* Accent at low alpha, for tinted hover fills. */
  --accent-faint: rgba(11, 127, 130, 0.10);
  /* A light-page lift for hovered cards. The old 45% black was sized for a
     dark page and reads as a smear on white. */
  --shadow-lift: rgba(11, 19, 27, 0.12);

  /* ---- Type ----
     These families resolve to the self-hosted woff2 faces declared in the
     @font-face block at the top of this file, served from assets/fonts/.
     Nothing is fetched from a third party at page load. */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Fluid type scale. Each step interpolates between 360px and 1440px. */
  --step-000: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);  /* micro labels  */
  --step-00: clamp(0.8125rem, 0.78rem + 0.17vw, 0.875rem);  /* captions      */
  --step-0: clamp(1rem, 0.96rem + 0.19vw, 1.0625rem);       /* body          */
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);    /* lead          */
  --step-2: clamp(1.375rem, 1.2rem + 0.75vw, 1.75rem);      /* h3            */
  --step-3: clamp(1.75rem, 1.45rem + 1.3vw, 2.5rem);        /* h2            */
  --step-4: clamp(2.25rem, 1.6rem + 2.8vw, 4rem);           /* h1            */
  --step-5: clamp(2.75rem, 1.7rem + 4.6vw, 5.5rem);         /* display        */

  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-body: 1.6;
  --tracking-tight: -0.02em;
  --tracking-wide: 0.12em;
  --measure: 68ch;                      /* paragraph max-width               */

  /* ---- Space ---- */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Section rhythm: ~43px mobile, ~75px desktop — scaled down by a third from
     the previous clamp(4rem, 2.5rem + 5vw, 7rem). This is the space ONE
     section contributes; where two meet they each give up half, so the gap
     between them is --section-y in total rather than double it. */
  --section-y: clamp(2.67rem, 1.67rem + 3.33vw, 4.67rem);

  /* ---- Layout ----
     ONE column width for the whole site. Every section on every page, and the
     hero video, share these edges — change this single value and they all move
     together. Nothing else may declare its own max-width. */
  --col-max: 1100px;
  --gutter: clamp(1.5rem, 0.9rem + 2.7vw, 3rem);  /* 24px mobile → 48px+ up  */
  --form-max: 640px;               /* the contact card, narrower than the column */

  /* The sticky nav row's height. Trimmed along with the name so the whole
     band reads as a letterhead. */
  --header-h: clamp(3.5rem, 3.1rem + 1.2vw, 4.5rem);

  /* The bar's REAL rendered height — what #about's scroll-margin-top actually
     needs. --header-h alone understates it: header__inner is a min-height,
     not a height, and below ~1533px wide its two 44px tap targets plus their
     padding (var(--space-sm) top and bottom) need more room than --header-h
     provides, so that combination is what actually governs. The 1px is the
     bar's own border-top. */
  --bar-h: calc(max(var(--header-h), 44px + var(--space-sm) * 2) + 1px);

  /* .brand's real rendered height, the same way: its 44px link floor or its
     own font-size clamp, whichever is taller (line-height:1, so the glyphs'
     box is exactly the font-size), plus its two padding-block clamps. Used
     below to pull .header up by exactly this much once scrolled past it, so
     the bar stops where the name ends instead of being bounded by .header's
     own short box. */
  --brand-h: calc(
    max(44px, clamp(1.5rem, 0.7rem + 3.6vw, 3.5rem))
    + clamp(0.875rem, 0.5rem + 1.5vw, 1.5rem)
    + clamp(0.5rem, 0.3rem + 0.8vw, 0.875rem)
  );

  /* The nav row's type size — links, email and social icons all read from this
     one value, so the whole row scales together. ~14px on a phone, 16px on the
     desktop, two steps up from where it was. */
  --nav-size: clamp(0.875rem, 0.78rem + 0.42vw, 1rem);

  /* Hero top padding. Tight on purpose: the label and then the reel should be
     the first substantial things under the band, not a screenful of air. */
  --hero-pad-top: clamp(1.25rem, 0.9rem + 1vw, 1.75rem);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --dur: 200ms;                    /* hover states — nothing over 300ms       */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-reveal: 450ms;             /* scroll reveal, a one-off entrance       */

  /* ---- Depth ---- */
  --z-header: 100;
  --z-menu: 90;
}


/* =============================================================================
   2. RESET AND BASE
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Reserve the scrollbar's width on short pages too, so the shared column
     does not jump sideways between a long page and thanks.html or 404.html. */
  scrollbar-gutter: stable;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  /* One step up from --step-0 ("body") to --step-1 ("lead") — every element
     that sets its own font-size (headings, .lead, captions, labels) keeps its
     own value, so the scale above body is unaffected and the hierarchy holds;
     only inherited body copy (plain <p> text, site-wide, privacy.html's
     .prose included) grows. */
  font-size: var(--step-1);
  font-weight: 400;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Belt and braces against a single element pushing the page sideways. */
  overflow-x: hidden;
}

h1, h2, h3, h4,
p, figure, blockquote, dl, dd {
  margin: 0;
}

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

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

img,
video {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* The hidden attribute must beat the layout displays set further down, or a
   [hidden] flex container stays visible. */
[hidden] {
  display: none !important;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--accent);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}


/* =============================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4,
.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

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

p {
  max-width: var(--measure);
}

.lead {
  font-size: var(--step-1);
  color: var(--text-muted);
  line-height: var(--leading-snug);
}

.muted {
  color: var(--text-muted);
}

/* Small uppercase label above a section heading. */
.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-00);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--label-accent);       /* teal, not turquoise: 1.58:1 on white */
  margin-bottom: var(--space-xs);   /* tight to the heading it introduces */
}


/* =============================================================================
   4. LAYOUT
   ========================================================================== */

/* The gutters sit outside the column, so --col-max is the width of the content
   itself — the same edges the hero video sits on. */
.container {
  width: 100%;
  max-width: calc(var(--col-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Where two blocks meet, each gives up half its padding, so the space between
   them is one section's worth rather than two stacked on top of each other.
   :has() is what lets the *preceding* section know it has a neighbour; without
   it (older browsers) the gap falls back to the roomier doubled value, which
   degrades gracefully. */
.section + .section,
.hero + .section,
.page-head + .section {
  padding-top: calc(var(--section-y) / 2);
}

.section:has(+ .section) {
  padding-bottom: calc(var(--section-y) / 2);
}

/* A hairline between stacked sections, rather than a heavy box. */
.section + .section {
  border-top: 1px solid var(--border);
}

/* ---- Deliberate variation in rhythm ----------------------------------------
   Not every section wants the same amount of air. These two modifiers are
   declared after the adjacency rules above so they win on source order. */

/* About is a paragraph of text, not a gallery — it does not need gallery-sized
   breathing room around it. */
.section.section--tight {
  padding-block: calc(var(--section-y) * 0.6);
}

/* The breakdowns band is the opposite case: give it more room than its
   neighbours, so the change of register is carried by the space around it as
   well as by the change of background. */
.section.band {
  padding-block: calc(var(--section-y) * 1.35);
}

/* A section head is a label above its content, not a title with nothing under
   it, so the space goes below it and stays small.
   Centred, like everything else on the site bar the About section. */
.section__head {
  margin-bottom: var(--space-md);
  text-align: center;
}

/* The label itself. It stays an <h2> for document structure — only the styling
   is demoted. Same voice as .eyebrow, so every label on the site reads alike.
   The About heading is deliberately not a .section__head: it is Ruben's name,
   and it keeps full heading weight. */
.section__head h2 {
  font-family: var(--font-display);
  font-size: var(--step-00);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted-dark);
}

.section__head p {
  margin-top: var(--space-sm);
  margin-inline: auto;        /* the 68ch measure, centred in the column */
}

/* In the hero the label sits directly above the reel, as that video's caption. */
.hero .section__head {
  margin-bottom: var(--space-sm);
}

/* ---- Centred by default ----------------------------------------------------
   The client's direction is a centred page. About is the one exception and it
   opts out below, because it is a two-column text block the client likes as
   it is. */
.page-head,
.page-narrow {
  text-align: center;
}

.page-head__intro,
.page-narrow p {
  margin-inline: auto;
}

.page-narrow__actions {
  justify-content: center;
}

/* About keeps its left-aligned, two-column layout untouched. */
.about__grid,
.about__body,
.about__body p {
  text-align: left;
}

.stack > * + * {
  margin-top: var(--space-md);
}


/* =============================================================================
   5. ACCESSIBILITY UTILITIES
   ========================================================================== */

/* Skip link — offscreen until it takes focus. */
.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: calc(var(--z-header) + 10);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  background-color: var(--text);
  color: var(--text-invert);   /* white on a --text fill: 18.7:1 */
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

/* :focus as well as :focus-visible — the skip link is keyboard-only anyway, and
   programmatic focus does not always match :focus-visible. */
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--text-invert);
}

/* <main> takes focus from the skip link but must not show a ring on click. */
#main:focus {
  outline: none;
}

/* Focus ring: --accent at 2px with a 2px offset, on every interactive element.
   Outlines are replaced here, never removed. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Inside the banner the ring switches to the lettering colour — --accent on
   the turquoise is too close in value to be seen. */
.header :focus-visible {
  outline-color: var(--banner-text);
}

/* Screen-reader-only text that still counts for the accessibility tree. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* =============================================================================
   6. HEADER AND NAVIGATION
   Sticky, identical on every page.
   ========================================================================== */

/* The whole band is the client's turquoise, in two rows: the name scrolls away
   with the page, the nav row beneath it sticks. Nothing inside the band is
   white — white on this turquoise is 1.58:1.

   The sticky positioning lives here, on .header, rather than on .header__bar
   itself: a stickily positioned box is bounded by its own containing block,
   and .header__bar's containing block is .header — a box only as tall as
   the name plus the bar. Past that height (roughly 135px on a phone) a sticky
   .header__bar would simply run out of room to stick in and scroll away with
   the rest of the page. Pulling .header itself up by the name's own height
   as soon as we scroll past it keeps the bar flush at the top for the rest
   of the page instead, with .header now sticking against the one ancestor
   above it with no such ceiling: the page itself. */
.header {
  position: sticky;
  top: calc(-1 * var(--brand-h));
  z-index: var(--z-header);
  background-color: var(--banner);
  color: var(--banner-text);
  /* Landscape notch clearance for the sticky banner — see the matching
     comment on .footer. */
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

/* The soft dark shadow behind every piece of white lettering in the band. The
   icons take the equivalent as a drop-shadow filter, since text-shadow does
   not reach SVG fills — without it they would be the one flat element in an
   otherwise consistent row. */
.brand__link,
.header__email,
.nav__link {
  text-shadow: var(--banner-shadow);
}

.header .socials__link svg {
  filter: drop-shadow(var(--banner-shadow));
}

/* On the dark pill the icon needs no lift either. */
.header .socials__link:hover svg,
.header .socials__link:focus-visible svg {
  filter: none;
}

/* Row 1 — "RIGGIDY RUBEN", the site's name and logo mark. A letterhead, not a
   splash screen: the name is still the largest type on the site, and the band
   is sized to it rather than the other way round. */
.brand {
  margin: 0;
  /* The link inside carries the size; without this the <h1> on index.html
     keeps an h1-sized line box that nothing renders in. */
  font-size: inherit;
  line-height: 1;
  /* The brand is an <h1> on index.html but a <p> on the other four pages, and a
     <p> otherwise inherits the 68ch reading measure — which would centre the
     name inside a 729px box pinned to the left edge instead of across the
     page. Opting out here is what keeps the banner identical on all five. */
  max-width: none;
  padding-block: clamp(0.875rem, 0.5rem + 1.5vw, 1.5rem) clamp(0.5rem, 0.3rem + 0.8vw, 0.875rem);
  text-align: center;
}

.brand__link {
  display: inline-flex;
  align-items: center;
  /* 44px floor for the touch target; the text itself only needs this at the
     smallest clamp size — above that the glyphs alone already clear it. */
  min-height: 44px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 0.7rem + 3.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  color: var(--banner-text);
  text-decoration: none;
  transition: color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

/* The name is a link, so it needs an affordance. It does not take the dark
   pill — at this size the pill would be a slab — an underline instead. */
.brand__link:hover,
.brand__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.08em;
}

/* Row 2 — the sticky nav row, still inside the turquoise band and separated
   from the name by a thin rule drawn in the lettering colour. */
.header__bar {
  /* Stickiness now lives on .header (see its comment) — this row just needs
     its own visual treatment. */
  background-color: var(--banner);
  border-top: 1px solid var(--banner-rule);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-h);
  padding-block: var(--space-sm);
}

/* ---- The dark hover pill ---------------------------------------------------
   Every clickable thing in the band shares one treatment: hovering or focusing
   it drops a solid --bg pill behind it and flips the label to --text. That is
   15.1:1, against 11.8:1 for the resting state — the hover is the readable one,
   which is the right way round. */
.header__email,
.nav__link,
.socials__link {
  border-radius: var(--radius-sm);
  transition: color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

/* :hover only, gated to real pointers: on a touch device a tap simulates
   :hover with nothing to clear it afterward (no mouseout), so the pill would
   otherwise stick on whichever link was last tapped — including Home or
   About after the in-page jump — making it read as current when it is not. */
@media (hover: hover) {
  .header__email:hover,
  .nav__link:hover,
  .socials__link:hover {
    background-color: var(--banner-pill);
    color: var(--banner-pill-text);
    text-shadow: none;
  }
}

.header__email:focus-visible,
.nav__link:focus-visible,
.nav__link[aria-current="page"],
.socials__link:focus-visible {
  background-color: var(--banner-pill);
  color: var(--banner-pill-text);
  /* On the dark pill the lettering carries itself at 18.7:1 — the shadow has
     nothing to do and would only muddy the glyph edges. */
  text-shadow: none;
}

/* Left — email address. Sized from --nav-size so the whole row scales as one. */
.header__email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--nav-size);
  color: var(--banner-text);
  text-decoration: none;
  white-space: nowrap;
  padding: var(--space-2xs) var(--space-xs);
}

/* Centre — primary links. */
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: var(--nav-size);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--banner-text);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
}

/* Right — social icons. */
.socials {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Icons are sized in em from --nav-size, so they grow with the row. The
   min-width/min-height floor keeps the tappable box at 44px even where
   --nav-size is small enough that 2.25em would fall under it; the icon
   graphic itself (.socials__link svg, below) stays a fixed 1.25em either way. */
.socials__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25em;
  height: 2.25em;
  min-width: 44px;
  min-height: 44px;
  font-size: var(--nav-size);
  color: var(--banner-text);
}

.socials__link svg {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
}

/* In the footer the icons sit on the dark page, not on the banner, so they
   keep the page's own treatment. */
.footer .socials__link {
  color: var(--text-muted);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer .socials__link:hover,
.footer .socials__link:focus-visible {
  background-color: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---- Mobile navigation, below 768px ---------------------------------------
   No hamburger any more — with only Home and About left after rigs.html was
   unpublished, hiding them behind a toggle cost a tap for nothing. HOME/ABOUT
   sit inline, centred in the space left over once the icons take theirs;
   the email address drops out here (it is the longest item, and already
   appears in the contact section and the footer) and comes back at 768px. */
@media (max-width: 767.98px) {
  .header__email {
    display: none;
  }

  .nav__panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    width: 100%;
  }

  .nav {
    flex: 1;
    min-width: 0;
  }

  .nav__list {
    justify-content: center;
    /* Tighter than the desktop --space-xl: at these widths the two links plus
       the icon row's 44px-floor tap targets don't both fit otherwise. */
    gap: var(--space-md);
  }

  /* One step up from --nav-size — against the icons' 44px tap boxes, the
     links were reading small. The icon graphic shrinks slightly below to
     balance it back out (its own tap box stays 44px either way). */
  .nav__link {
    padding-inline: var(--space-xs);
    font-size: var(--step-0);
  }

  /* Edge to edge: three icons at arm's length from one another read as
     separate items rather than one cluster, and together they were
     outweighing HOME/ABOUT. The glyph stays the size set below; only the tap
     box shrinks, from the 44px used everywhere else down to 36px — still
     comfortably clear of the 24px WCAG AA minimum, but enough narrower across
     three icons to fix the balance. Scoped to the banner: the footer's icons
     keep the full 44px. */
  .header .socials {
    gap: 0;
  }

  .header .socials__link {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .socials__link svg {
    width: 0.85em;
    height: 0.85em;
  }

  /* Below this, HOME/ABOUT and the icons no longer fit comfortably on one
     line — stack them as two centred rows instead of letting either wrap or
     overflow. */
  @media (max-width: 359px) {
    .nav__panel {
      flex-direction: column;
      gap: var(--space-sm);
    }

    .nav__list {
      justify-content: center;
      width: 100%;
    }

    .socials {
      justify-content: center;
      width: 100%;
    }
  }
}

/* ---- Desktop navigation, 768px and up -------------------------------------
   Three tracks: email left, nav links optically centred, socials right.
   .nav__panel is an unsemantic wrapper that only exists to group the links
   and the icons below 768px, so display:contents safely dissolves it here
   and lets its children become grid items in their own right. The <nav>
   itself keeps its box and its landmark role. */
@media (min-width: 768px) {
  .header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-lg);
  }

  .nav__toggle {
    display: none;
  }

  .nav__panel {
    display: contents;
  }

  /* Keep each item's hit area the size of its content, not of its 1fr track. */
  .header__email {
    justify-self: start;
  }

  .socials {
    justify-self: end;
  }
}


/* =============================================================================
   7. BUTTONS, BADGES AND LINKS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--step-00);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: none;
  color: var(--text);
  transition: color var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

/* Primary CTA — a --text fill with white type, the same treatment as the
   Submit button in the client's own mockup. 18.7:1. */
.btn--primary {
  background-color: var(--text);
  border-color: var(--text);
  color: var(--text-invert);
}

.btn--primary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--text-invert);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-faint);
}


/* =============================================================================
   8. VIDEO COMPONENTS
   Three deliberately different treatments — see brief section 6.
   ========================================================================== */

/* ---- 8a. Click-to-load facade for Vimeo / YouTube (brief 6a) --------------
   No third-party iframe exists in the DOM until the visitor clicks, so no
   third-party cookie can be set before that — which is why this site needs
   no cookie banner. */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-elev);  /* holds the box if the thumb is missing */
}

.video__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* One of the two places the turquoise survives. It sits on video imagery
     rather than on the page, so the 1.58:1 it would measure against white does
     not apply here. The triangle is --text on the fill: 11.81:1. */
  background-color: var(--turquoise);
  color: var(--text);
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

/* On hover the disc goes teal, so the triangle flips to white to stay legible
   — white on --accent is 4.8:1, --text on it would be 3.9:1. */
.video__play:hover {
  background-color: var(--accent);
  color: var(--text-invert);
}

.video__play svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  margin-left: 3px;                  /* optically centre the triangle */
}

.video__play:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.video__play:focus-visible {
  outline-offset: 4px;
}

/* The iframe injected by main.js on click. */
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The way out, injected alongside the iframe. Top right, clear of Vimeo's and
   YouTube's own control bar at the bottom of the frame. A dark circle rather
   than the turquoise fill — this is chrome for escaping the player, not part
   of its own controls, and needs to read as separate from both of them on
   any thumbnail behind it. */
.video__close {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(11, 19, 27, 0.6);
  color: var(--text-invert);
  transition: background-color var(--dur) var(--ease);
}

.video__close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.video__close:hover,
.video__close:focus-visible {
  background-color: rgba(11, 19, 27, 0.85);
}

.video__close:focus-visible {
  outline-offset: 2px;
}

/* ---- 8b. Self-hosted looping card clips (brief 6b) ---- */
.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--bg-elev);
}

.card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}

/* ---- 8c. Long self-hosted breakdowns, native controls (brief 6c) ----------
   Never autoplays, never loops, downloads nothing until play is pressed.
   Used on rigs.html in phase 2; the component is defined here with the rest
   of the video system. */
.breakdown__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  /* Native controls, minimally styled — no custom player. */
}


/* =============================================================================
   9. HERO
   ========================================================================== */

/* The bottom padding is half a section, not a whole one: the section below
   brings its own half, and the two together make a single gap. */
.hero {
  padding-block: var(--hero-pad-top) calc(var(--section-y) / 2);
}

/* No max-width and no auto margin of its own: the reel fills the shared column,
   so its left and right edges are the same edges as the heading and the text. */
.hero__video {
  width: 100%;
}

/* The row of three smaller facades. It used to sit under the reel in the hero;
   it now has its own section near the foot of the homepage, so the demo reel
   is the only video competing for attention at the top. One column on mobile,
   three across from 640px. */
.embed-row {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .embed-row {
    grid-template-columns: repeat(3, 1fr);
    /* Tighter than the single-column gap above: a wide gap on three narrow
       columns eats too much of the width that should go to the cards
       themselves (see the gap on .grid-cards, widened the other way). */
    gap: var(--space-sm);
  }
}

/* Smaller play buttons, so the row reads as secondary to the reel. */
.embed-row .video__play {
  width: 48px;
  height: 48px;
}

.embed-row .video__play svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}


/* =============================================================================
   10. ABOUT
   ========================================================================== */

/* The nav's About link is a same-page deep link (index.html#about) — clear
   the sticky bar by exactly its own real height (--bar-h), so the section
   starts flush beneath it rather than landing partway under it or short of
   it. */
#about {
  scroll-margin-top: var(--bar-h);
}

/* About reads as a panel: the same 1px --border frame and radius as the video
   and card frames, on --bg-elev, with inner padding so nothing touches the
   edge. Deliberately the same weight as the media frames — the point is a
   visible edge, not a heavy box. */
.about__grid {
  display: grid;
  gap: var(--space-2xl);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background-color: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: 40fr 60fr;
    gap: clamp(2rem, 1rem + 4vw, 5rem);
    align-items: start;
  }
}

.about__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-elev);  /* holds the box while the file is missing */
}

/* Below 768px the photo would otherwise take the full column width and grow
   to near-fullscreen height. Capped and centred instead, same aspect ratio
   and frame, so the text sits just under it without a long scroll. Desktop
   (>=768px) is untouched — there the photo already shares a column with the
   text rather than stacking above it.

   The cap is not a flat number: it is the exact formula that produces the
   hero video's own rendered height (container width, minus the gutter on
   each side, at its 16:9 ratio), so the portrait can never end up taller
   than the demo reel above it at any width in this range, not just at the
   widths this was checked against. */
@media (max-width: 767.98px) {
  .about__photo {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc((100vw - 2 * var(--gutter)) * 9 / 16);
    margin-inline: auto;
  }
}

.about__figure {
  margin: 0;
}

/* The role line takes the same treatment as the section labels — same font,
   size, weight, uppercase and letter-spacing — but stays in --accent so it is
   distinct from the grey labels elsewhere. It also replaces the "About"
   eyebrow that used to sit above the name. */
.about__role {
  margin-top: var(--space-2xs);
  margin-bottom: var(--space-md);
  font-family: var(--font-display);
  font-size: var(--step-00);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--label-accent);
}

.about__body p + p {
  margin-top: var(--space-md);
}


/* =============================================================================
   11. FEATURED WORK
   ========================================================================== */

/* Single column by default; two up from 768px makes the four cards a clean
   2x2 block instead of a row of three with one stray on its own row.
   margin-block gives the grid its own breathing room, separate from the
   section padding and the section__head spacing other sections also use. */
.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  /* Scaled down by the same third as --section-y, so the air above and below
     the grid stays in step with the rest of the page's rhythm. */
  margin-block: calc(var(--space-xl) * 2 / 3);
}

@media (min-width: 768px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
    /* A wider gap than the single-column gap above — the column width comes
       out of this, not the container, so the cards sit narrower while the
       grid's overall width stays exactly aligned with the block above. Also
       keeps the project cards from dwarfing the breakdown cards below: with
       three narrower columns there, this is what brings the two grids'
       card widths to a comparable scale instead of a far wider gap between
       them. Pulled in slightly from 1.5x so the cards gain a little width
       back without losing that effect. */
    gap: calc(var(--space-3xl) * 1.25);
    margin-block: calc(var(--space-2xl) * 2 / 3);
  }
}

/* Not a link any more — the rigs page it pointed at is unpublished. The visual
   treatment is unchanged, but the lift, the accent border and the focus ring
   are gone with it: they promised a destination that no longer exists. The
   clip still plays on hover, which is a property of the video, not of a link. */
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-elev);
  color: var(--text);
}

.card__body {
  padding: var(--space-lg);
  text-align: center;
}

.card__title {
  font-size: var(--step-2);
}



/* =============================================================================
   12. CONTACT
   Structure and styling. The Netlify wiring and the fetch progressive
   enhancement live in js/main.js.
   ========================================================================== */

/* One centred white card, headed "Contact me". Narrower than the shared column
   because a four-field form at 1100px would be unusable — the width comes from
   --form-max in :root, so it is still a single value, not a stray max-width. */
.contact__card {
  width: 100%;
  max-width: var(--form-max);
  margin-inline: auto;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  /* Smaller than the other three sides: the status line and the privacy note
     below the button already carry their own gap and line-height, so the
     full padding on top of that read as a lot of empty space below the
     button. This brings it back toward the distance above the first field. */
  padding-bottom: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
  background-color: var(--bg-elev);
  /* A drawn 2px edge rather than a hairline: the white fill is nearly the same
     value as the page, so without it the block fades into the section. */
  border: 2px solid var(--text);
  border-radius: var(--radius-md);
  text-align: center;
}

.contact__title {
  margin-bottom: var(--space-sm);
}

/* A short alternative to the form, not a repeat of the footer's address —
   quiet enough to read as secondary to the form itself. */
.contact__email {
  margin-bottom: var(--space-lg);
  color: var(--text-muted);
  font-size: var(--step-00);
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Everything the visitor fills in, grouped so the success state can hide it
   in one move and leave the confirmation standing. */
.form__fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Fields read left-aligned even though the card around them is centred — a
   label sitting centred above its input is hard to scan. */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: left;
}

/* The Send button sits to the right, as in the client's mockup. */
.form__actions {
  display: flex;
  justify-content: flex-end;
}

.field__label {
  font-family: var(--font-display);
  font-size: var(--step-00);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.field__input,
.field__textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  /* The page colour, not --bg-elev: the fields sit inside the white contact
     card, so taking the card's own white would leave them invisible. Recessed
     against it instead, with the hairline doing most of the defining. */
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--step-0);
  transition: border-color var(--dur) var(--ease);
}

.field__input:hover,
.field__textarea:hover {
  border-color: var(--accent);
}

.field__textarea {
  min-height: 9rem;
  resize: vertical;
}

/* Honeypot wrapper — moved offscreen rather than display:none on the input,
   so bots still see a fillable field (brief section 9). */
.hidden-field {
  position: absolute;
  left: -9999px;
}

.form__note {
  font-size: var(--step-00);
  color: var(--text-muted);
}

/* .form__status is empty almost all the time (idle state), but the form's
   flex gap still opens a full gap on both sides of it regardless — the
   result reads as one oversized gap between the button and this note. Pull
   the note back up by most of one gap when there is no status message to
   separate it from. Skipped once status has real content: an error or
   success line still gets its full gap on both sides. */
.form__status:empty + .form__note {
  margin-top: calc(var(--space-lg) * -1 + var(--space-xs));
}

/* Validation and submission messages. Announced through aria-live, so colour
   is never the only signal — the wording carries the meaning on its own. */
.form__status {
  font-size: var(--step-00);
  color: var(--accent);
  min-height: 1.5rem;
}

.form__status:empty {
  min-height: 0;
}

.form__status.is-error {
  color: var(--danger);
  font-weight: 500;
}

.form__status:focus-visible {
  outline-offset: 4px;
}

/* A field the JS validation has rejected. The border is a second, redundant
   signal — the message above it still says what is wrong in words. */
.field__input[aria-invalid="true"],
.field__textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field__input[aria-invalid="true"]:hover,
.field__textarea[aria-invalid="true"]:hover {
  border-color: var(--danger);
}


/* =============================================================================
   13. FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-2xl);
  /* Landscape notch/home-indicator clearance. Zero on every device without
     one — env() resolves to 0 unless the viewport meta opts in with
     viewport-fit=cover, which every page's <head> sets. */
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
  padding-bottom: env(safe-area-inset-bottom);
}

/* Three groups: copyright/company number/privacy left (stacked tightly), the
   build credit centred, the social icons right. Below 768px they stack and
   centre in the same order. */
.footer__inner {
  display: grid;
  gap: var(--space-lg);
  justify-items: center;
  text-align: center;
}

.footer__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--step-0);
  color: var(--text-muted-dark);
}

@media (min-width: 768px) {
  /* minmax(0, 1fr) on the side tracks rather than a bare 1fr: the two sides
     then split the leftover space evenly whatever they contain, so the centre
     column is geometrically centred and does not drift when the copyright line
     or the icon row changes width. align-items: start keeps all three groups
     pinned to the same top line instead of centring on whichever is tallest. */
  .footer__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    text-align: left;
  }

  .footer__meta {
    align-items: flex-start;
    justify-self: start;
  }

  .footer__credit {
    justify-self: center;
  }

  .footer .socials {
    justify-self: end;
    /* Optical alignment. Each tap target is 44px tall — taller than a 27.2px
       line of text — so with the boxes top-aligned the glyphs hang below the
       first text line by half the difference, 8.4px. Give the row the height
       of exactly one text line and let the targets overflow it symmetrically:
       because .socials centres its items, the glyph centres then land on the
       centre of the first line in the left group and on the credit. The tap
       targets keep their full 44px — only the box they sit in changes. */
    height: calc(var(--step-0) * var(--leading-body));
  }
}

/* Build credit — the centre column of the footer row. Same size and colour as
   the rest of the footer text, so it reads as one row rather than an addendum.
   max-width is reset because a <p> would otherwise inherit the 68ch reading
   measure and refuse to shrink to its content inside the auto track. */
.footer__credit {
  max-width: none;
  font-size: var(--step-0);
  color: var(--text-muted-dark);
  text-align: center;
}

/* The link carries --accent and keeps its underline, so it reads as the one
   clickable thing in an otherwise muted line. 4.96:1 against the footer
   background. The padding/negative-margin pair grows the tap target to 44px
   tall without shifting the visible line — same trick on the Privacy policy
   link below. */
.footer__credit a {
  display: inline-block;
  padding-block: 9px;
  margin-block: -9px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer__meta a {
  display: inline-block;
  padding-block: 9px;
  margin-block: -9px;
}

/* Hover goes darker rather than brighter — --accent is already the resting
   colour, so it has to move somewhere with more contrast, not less. */
.footer__credit a:hover,
.footer__credit a:focus-visible {
  color: var(--text);
}


/* =============================================================================
   14. INNER PAGES — rigs, privacy, thanks, 404
   ========================================================================== */

/* ---- Page head: h1 plus one intro line, on every page but the homepage ---- */
.page-head {
  padding-block: clamp(3rem, 1.5rem + 6vw, 5rem) 0;
}

.page-head__intro {
  margin-top: var(--space-md);
}

/* ---- Tinted full-width band, used to set the breakdowns apart from the
        showcase on rigs.html. The eye should catch the change of section
        before it reads a word. ---- */
.band {
  background-color: var(--bg-elev);
  border-block: 1px solid var(--border);
}

/* ---- Showcase entries (rigs.html #showcase) — 6b looping clips ---- */
.work-list {
  display: grid;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .work-list {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  }
}

/* Deep links from the homepage cards land here — keep the heading clear of
   the sticky header. */
.work,
.breakdown {
  scroll-margin-top: calc(var(--header-h) + var(--space-lg));
}

.work__media {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Centred, matching the rest of the site. */
.work,
.breakdown {
  text-align: center;
}

.work__title,
.breakdown__title {
  margin-top: var(--space-md);
}

.work__desc,
.breakdown__desc {
  margin-top: var(--space-xs);
  margin-inline: auto;
  color: var(--text-muted);
  font-size: var(--step-00);
}

/* ---- Breakdown entries (rigs.html #breakdowns) — 6a facades and 6c clips ---- */
.breakdown-list {
  display: grid;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .breakdown-list {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  }
}

/* A caption under a breakdown clip: runtime, narration, that sort of detail. */
.breakdown__meta {
  display: inline-block;
  margin-top: var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--step-000);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- Long-form text: privacy policy ---- */
/* The block is centred in the column; the text inside stays left-aligned,
   because centred body copy at this length is genuinely hard to read. */
.prose {
  max-width: var(--measure);
  margin-inline: auto;
}

.prose h2 {
  text-align: center;
}

.prose > * + * {
  margin-top: var(--space-md);
}

.prose h2 {
  font-size: var(--step-2);
  margin-top: var(--space-2xl);
}

.prose h2 + p {
  margin-top: var(--space-sm);
}

.prose ul {
  list-style: disc;
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: var(--space-2xs);
}

/* <address> is the right element for the controller's and the business's
   contact details, but browsers italicise it by default. Reset that and give
   the lines a little more air than body copy, since each one is a field. */
.prose address {
  font-style: normal;
  line-height: 1.8;
}

.prose dt {
  font-weight: 500;
}

.prose dd {
  color: var(--text-muted);
  margin-top: var(--space-2xs);
}

/* ---- Short centred pages: thanks, 404 ---- */
.page-narrow {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* dvh accounts for the iOS Safari toolbar; vh is the fallback for browsers
     that do not support the dynamic unit yet. */
  min-height: 60vh;
  min-height: 60dvh;
  padding-block: var(--section-y);
}

.page-narrow__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}


/* =============================================================================
   15. MOTION
   Scroll reveals only — the custom cursor was removed at the client's request.

   Nothing here is load-bearing. The reveal's hiding class is added by
   JavaScript, never by this stylesheet, so if the script fails or the observer
   never runs the content simply stays visible — it can never be stranded at
   opacity 0. The native cursor is used everywhere, untouched.
   ========================================================================== */

/* ---- Scroll reveals ---------------------------------------------------------
   main.js adds .reveal on load and .is-visible when the element crosses the
   viewport. Both classes are JS-applied; this file only describes the two
   states. ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-reveal) var(--ease),
              transform var(--dur-reveal) var(--ease);
}

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


/* ---- Reduced motion ---------------------------------------------------------
   The whole of section 15 is off. main.js also refuses to hide anything for the
   reveal, so this block is the belt to that braces. ---- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Hover transitions elsewhere in the file go too. */
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
