/*
 * Medium XL - shared styles for every page.
 * Built on the Medium XL design system: navy and yellow, Encode Sans throughout (bold headings, regular body copy),
 * golden-ratio spacing and type, pill buttons with a soft sheen, hand-drawn icons.
 */

/* ---- Fonts (self-hosted) ---- */
@font-face {
    font-family: 'Encode Sans';
    font-style: normal;
    font-weight: 400 800;   /* one adjustable file covers regular body text through to bold headings */
    font-display: swap;
    src: url('../fonts/encode-sans-latin.woff2') format('woff2');
}

:root {
    /* Colour */
    --brand-navy: #1d1f4d;
    --brand-yellow: #f1ba0c;
    --grey-medium: #aaaaaa;
    --grey-light: #d7d7d7;
    --white: #ffffff;
    --off-white: #f6f6f6;
    --surface: var(--white);
    --ink: var(--brand-navy);
    --ink-muted: rgba(29, 31, 77, 0.72);
    --on-inverse: var(--white);
    --on-accent: var(--brand-navy);
    --border: var(--grey-medium);
    --focus-ring: var(--brand-navy);
    --button-primary-top: #2c2f6b;
    --button-primary-bottom: var(--brand-navy);
    --button-primary-border: rgba(255, 255, 255, 0.14);
    --button-secondary-top: #f8f8f8;
    --button-secondary-bottom: #ececec;
    --button-secondary-border: rgba(29, 31, 77, 0.10);
    --button-accent-top: #f7c93a;
    --button-accent-bottom: var(--brand-yellow);
    --status-green: #1a9e4b;   /* Not a brand colour: only the "accepting jobs" light */

    /* Spacing: golden-ratio scale on a 16px base */
    --space-2xs: 4px;
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 16px;
    --space-lg: 26px;
    --space-xl: 42px;
    --space-2xl: 68px;
    --space-3xl: 110px;

    /* Type scale: 16px stepped by √φ (≈1.272), so every second step is ×φ.
       Line heights: headings take the next step up, body text two steps up (×φ). */
    --text-13: 13px;
    --text-16: 16px;
    --text-20: 20px;
    --text-26: 26px;
    --text-33: 33px;
    --text-42: 42px;
    --text-53: 53px;
    --text-68: 68px;

    /* Corners */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-button: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 1px 2px rgba(0, 0, 0, 0.20);
    --shadow-button-pressed: inset 0 2px 4px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 1px 2px rgba(29, 31, 77, .08), 0 6px 18px rgba(29, 31, 77, .08);
    --shadow-tile: 0 1px 2px rgba(29, 31, 77, .1);
    --shadow-tile-hover: 0 3px 8px rgba(29, 31, 77, .1);

    /* Every navy surface uses the main button's gradient */
    --navy-gradient: linear-gradient(to bottom, var(--button-primary-top), var(--button-primary-bottom));
    /* Every brand-yellow surface uses the yellow button's gradient */
    --yellow-gradient: linear-gradient(to bottom, var(--button-accent-top), var(--button-accent-bottom));
    --font-heading: 'Encode Sans', system-ui, sans-serif;   /* Headings and UI labels */
    --font-body: 'Encode Sans', system-ui, sans-serif;      /* Body copy, in the regular weight */
    --header-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Smooth scrolling for in-page links (Back to top, Get a free quote, How it works) */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--space-md)); }
body { background: var(--off-white); color: var(--ink); font: 400 var(--text-16)/26px var(--font-body); }
h1, h2, h3 { font-family: var(--font-heading); text-wrap: balance; }
input, textarea { font-family: var(--font-body); }
button { font-family: var(--font-heading); }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--space-lg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Keyboard users can jump past the menu: hidden until it gets focus */
.skip-link {
    position: absolute; top: var(--space-sm); left: var(--space-sm); z-index: 100;
    padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm);
    background: var(--brand-yellow); color: var(--ink); font: 700 var(--text-16)/20px var(--font-heading); text-decoration: none;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
main:focus { outline: none; }   /* the skip link moves focus here; no ring around the whole page */
/* Small arrows after link text. Drawn as SVG and hidden from screen readers */
.arrow { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Focus: 2px navy ring, yellow on navy surfaces */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.site-header :focus-visible, .site-footer :focus-visible, .quote :focus-visible, .mobile-cta :focus-visible { outline-color: var(--brand-yellow); }

/* ---- Buttons: pills with a soft top-to-bottom sheen ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
    min-height: 48px; padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-pill); white-space: nowrap;
    font: 600 var(--text-16)/26px var(--font-heading); text-decoration: none; cursor: pointer;
    color: var(--on-inverse);
    border: 1px solid var(--button-primary-border);
    background: var(--navy-gradient);
    box-shadow: var(--shadow-button);
    transition: transform .12s ease-out, filter .15s;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); filter: none; box-shadow: var(--shadow-button-pressed); transition-duration: .05s; }
.btn:disabled { opacity: .7; cursor: wait; transform: none; }
.btn-secondary {
    color: var(--ink); border-color: var(--button-secondary-border);
    background: linear-gradient(to bottom, var(--button-secondary-top), var(--button-secondary-bottom));
}
.btn-secondary:hover { filter: brightness(1.02); }
/* Accent: yellow, one per view at most */
.btn-accent {
    color: var(--on-accent); border-color: rgba(29, 31, 77, 0.10);
    background: linear-gradient(to bottom, var(--button-accent-top), var(--button-accent-bottom));
}
.btn-accent:hover { filter: brightness(1.04); }
.btn-block { width: 100%; }
.text-link { font: 600 var(--text-16)/26px var(--font-heading); color: var(--ink); text-decoration: underline 2px var(--brand-yellow); text-underline-offset: var(--space-xs); }

/* ---- Header: navy bar with a sheen and a shadow onto the page ---- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: var(--navy-gradient);
    border-bottom: 1px solid rgba(0, 0, 0, .35);
    box-shadow: inset 0 1px 0 var(--button-primary-border), 0 4px 14px rgba(0, 0, 0, .25);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); height: var(--header-h); transition: height .25s ease-out; }
.site-header.is-scrolled { --header-h: 58px; }
.logo { display: block; }
.logo img { display: block; height: 30px; width: auto; min-width: 120px; }
/* Header logo: a glint of light sweeps across it twice, then stops (moving things must stop within 5 seconds) */
.site-header .logo { position: relative; }
.site-header .logo img { height: 36px; animation: logo-glow 3s ease-in-out 1.36 .5s; }
.site-header .logo::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 34%, rgba(255,255,255,.8) 44%, #fff 50%, rgba(255,255,255,.8) 56%, transparent 66%) no-repeat;
    background-size: 300% 100%; background-position: 100% 0;
    -webkit-mask: url('../img/logo-reversed.svg') center / contain no-repeat;
    mask: url('../img/logo-reversed.svg') center / contain no-repeat;
    animation: shimmer 3s ease-in-out 1.36 .5s;   /* ends at 4.6s, just after the second sweep */
}
@keyframes shimmer { 0% { background-position: 100% 0; } 36%, 100% { background-position: 0 0; } }
@keyframes logo-glow {
    0%, 36%, 100% { filter: brightness(1) drop-shadow(0 0 0 rgba(241, 186, 12, 0)); }
    18% { filter: brightness(1.2) drop-shadow(0 0 10px rgba(241, 186, 12, .95)); }
}

.nav { display: flex; align-items: center; gap: var(--space-2xs); list-style: none; }
.nav a:not(.btn) {
    display: block; padding: var(--space-sm) var(--space-md); white-space: nowrap;
    color: var(--on-inverse); font-family: var(--font-heading); font-weight: 600; font-size: var(--text-16);
    text-decoration: underline 2px transparent; text-underline-offset: var(--space-xs);
    transition: text-decoration-color .15s, color .15s;
}
.nav a:not(.btn):hover { text-decoration-color: var(--brand-yellow); }
.nav a[aria-current] { color: var(--brand-yellow); text-decoration-color: var(--brand-yellow); }
.nav .btn { margin-left: var(--space-sm); min-height: 44px; }

.menu-toggle {
    display: none; width: 46px; height: 46px; border-radius: var(--radius-sm); cursor: pointer; place-items: center;
    border: 1px solid var(--button-primary-border);
    background: linear-gradient(to bottom, #383b80, var(--button-primary-top));
    box-shadow: var(--shadow-button);
}
.menu-toggle:active, .menu-toggle[aria-expanded="true"] { box-shadow: var(--shadow-button-pressed); }
.menu-toggle img { display: block; width: 28px; height: 28px; }

/* ---- Hero: brand yellow band, copy on the left, a hand-drawn icon on the right ---- */
.hero { background: var(--brand-yellow) var(--yellow-gradient); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-xl); align-items: center; }
.hero-art { display: block; width: 300px; height: 300px; margin-right: var(--space-xl); transform-origin: 50% 85%; animation: hero-tilt 3s ease-in-out 1.5; }
/* The hero icon rocks gently from side to side */
/* Rocks side to side and comes to rest upright after 4.5s */
@keyframes hero-tilt { 0%, 50%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.hero-inner { padding-top: var(--space-2xl); padding-bottom: var(--space-xl); }
/* Hero headlines sit tighter than the scale's line heights, so big two-line titles hold together */
.hero h1 { font-size: var(--text-68); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; max-width: 14ch; margin-bottom: var(--space-md); }
.hero .lead { max-width: 54ch; font: 400 var(--text-20)/33px var(--font-body); margin-bottom: var(--space-lg); }
.hero .row { display: flex; gap: var(--space-md); flex-wrap: wrap; align-items: center; }
.hero-price { font: 700 var(--text-20)/26px var(--font-heading); margin-bottom: var(--space-lg); }
.reasons { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-md); margin-top: var(--space-lg); font: 600 var(--text-16)/26px var(--font-heading); }
.reasons li { display: flex; align-items: center; gap: var(--space-xs); }
.reasons img { width: 24px; height: 24px; flex-shrink: 0; }
.status {
    display: inline-flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-lg);
    padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-sm); border-radius: var(--radius-pill);
    font-family: var(--font-heading); font-weight: 600; font-size: var(--text-13);
    background: rgba(29, 31, 77, .08); box-shadow: inset 0 1px 3px rgba(29, 31, 77, .22), 0 1px 0 rgba(255,255,255,.45);
}
.led {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
    background: radial-gradient(circle at 35% 30%, #a8f7c1, var(--status-green) 55%, #0d6b31);
    box-shadow: 0 0 6px #2bd46a;
    position: relative;
}
/* A ring that pulses out from the light */
.led::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: var(--status-green);
    animation: led-pulse 2s ease-out 2 forwards;
}
@keyframes led-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.8); opacity: 0; } }

/* Client logos: static, flat on the page, two even rows. Under the hero on the home page, above the contact card elsewhere. */
.clients { padding: var(--space-lg) 0; text-align: center; }
.content > .clients:first-child { padding-top: 0; }   /* straight under the hero on the home page: the page's own top spacing is enough */
.eyebrow { font: 700 var(--text-13)/16px var(--font-heading); letter-spacing: .08em; text-transform: uppercase; }
.clients .eyebrow { margin-bottom: var(--space-md); }
.client-logos { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg) var(--space-xl); align-items: center; justify-items: center; max-width: 860px; margin: 0 auto; }
.client-logos img { display: block; }

/* ---- Content: one column of cards on the off-white page ---- */
.content { padding-top: var(--space-xl); padding-bottom: var(--space-3xl); display: grid; gap: var(--space-lg); }

.panel { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-xl); box-shadow: var(--shadow-card); }
.panel h2 { font: 700 var(--text-26)/33px var(--font-heading); margin-bottom: var(--space-lg); }
.panel h3 { font: 700 var(--text-20)/26px var(--font-heading); margin-bottom: var(--space-2xs); }
.panel p, .steps li { color: var(--ink-muted); }
.panel p a, .ticks a { color: var(--ink); font-weight: 700; text-decoration-color: var(--brand-yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.panel p a:hover, .ticks a:hover { text-decoration-color: currentColor; }
.panel-intro { margin: calc(-1 * var(--space-md)) 0 var(--space-lg); }
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.panel-heading h2 { margin-bottom: 0; }

/* Hand-drawn icons, shown large so the texture reads */
.icon { display: block; width: 72px; height: 72px; margin-bottom: var(--space-sm); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl) var(--space-lg); }

/* Ticked lists: a title and a line of detail per point, with a large hand-drawn tick beside both */
.ticks { list-style: none; display: grid; gap: var(--space-lg); }
.ticks-2 { grid-template-columns: 1fr 1fr; column-gap: var(--space-xl); }
.ticks li { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-md); align-items: center; color: var(--ink-muted); }
.ticks li::before { content: ''; width: 44px; height: 44px; background: url('../img/icons/tick-hand.svg') center/contain no-repeat; }
.ticks strong { display: block; color: var(--ink); font: 700 var(--text-20)/26px var(--font-heading); }

/* Why me and How it works share a row on wider screens */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }

/* Steps: numbers on hand-drawn yellow badges, joined by a line down the left */
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--space-lg); position: relative; }
.steps li { counter-increment: step; position: relative; display: grid; grid-template-columns: 52px 1fr; gap: var(--space-md); align-items: start; }
.steps li::before {
    content: counter(step); display: grid; place-items: center; width: 52px; height: 52px;   /* the height of a title plus one line */
    border-radius: 50%; background: var(--surface) url('../img/icons/circle-hand.svg') center/contain no-repeat;
    font: 800 var(--text-20)/1 var(--font-heading); color: var(--on-accent);
    box-shadow: 0 0 0 var(--space-xs) var(--surface);   /* gap where the line meets the dot */
}
.steps strong { display: block; color: var(--ink); font: 700 var(--text-20)/26px var(--font-heading); }
/* Line from each dot down to the next one */
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 25px; top: 52px; bottom: calc(-1 * var(--space-lg)); width: 2px; background: var(--border); }

/* Testimonial: one relevant review per page, with the client's photo */
.quote {
    display: grid; grid-template-columns: auto 1fr; gap: var(--space-xl); align-items: center;
    background: var(--navy-gradient); color: var(--on-inverse);
}
.quote-photo {
    width: 220px; height: 220px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    box-shadow: 0 0 0 var(--space-xs) rgba(255, 255, 255, .12);
}
.quote-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Until a client photo is supplied, their initials stand in */
.initials { display: grid; place-items: center; width: 100%; height: 100%; background: var(--brand-yellow); color: var(--on-accent); font: 800 var(--text-53)/1 var(--font-heading); }
.quote-mark { display: block; height: var(--space-xl); font: 800 var(--text-68)/1 var(--font-heading); color: var(--brand-yellow); }
.quote blockquote p { color: var(--on-inverse); font: italic 400 var(--text-20)/33px var(--font-body); max-width: 54ch; margin-bottom: var(--space-lg); }
.quote .quote-name { font: 700 var(--text-20)/26px var(--font-heading); color: var(--on-inverse); }
.quote .quote-company { font: 500 var(--text-16)/26px var(--font-heading); color: var(--grey-medium); }

/* FAQ: full-width white cards; an open one turns off-white */
.faq { display: grid; gap: var(--space-sm); }
.faq details {
    border-radius: var(--radius-sm); border: 1px solid rgba(29, 31, 77, .12);
    background: var(--surface);
    box-shadow: var(--shadow-tile);
    transition: box-shadow .12s ease-out, background-color .12s;
}
.faq details:not([open]):hover { box-shadow: var(--shadow-tile-hover); }
.faq details[open] { background: var(--off-white); box-shadow: inset 0 2px 4px rgba(29, 31, 77, .08); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg); cursor: pointer; list-style: none; font: 600 var(--text-16)/26px var(--font-heading); -webkit-tap-highlight-color: transparent; }
.faq summary::-webkit-details-marker { display: none; }
.knob { flex-shrink: 0; width: 32px; height: 32px; background: url('../img/icons/plus-hand.svg') center/contain no-repeat; transition: transform .2s ease-out; }
details[open] .knob { transform: rotate(45deg); }
.faq details p { padding: 0 var(--space-lg) var(--space-md); }

/* Contact: brand yellow so it stands out as the place to act; intro on the left, form on the right */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-xl); align-items: start; background: var(--brand-yellow) var(--yellow-gradient); }
.contact p { color: var(--ink); }   /* full navy on yellow for comfortable contrast */
.contact .field { background: var(--surface); border-color: rgba(29, 31, 77, .25); }
.contact .form-success { background: var(--surface); }
.contact .lead { font: 400 var(--text-20)/33px var(--font-body); margin-bottom: var(--space-lg); }
.contact .reply { font-family: var(--font-heading); display: flex; align-items: center; gap: var(--space-sm); font-weight: 600; color: var(--ink); margin-bottom: var(--space-sm); }
.reply img { width: 40px; height: 40px; flex-shrink: 0; }
.contact-options { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-md); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid[hidden] { display: none; }
label { display: block; font: 600 var(--text-13)/20px var(--font-heading); margin-bottom: var(--space-xs); }
.field {
    width: 100%; padding: var(--space-sm) var(--space-md); min-height: 48px; margin-bottom: var(--space-md);
    border: 1px solid rgba(29, 31, 77, .18); border-radius: var(--radius-sm);
    background: var(--off-white); color: var(--ink); font-size: var(--text-16);
    box-shadow: inset 0 2px 3px rgba(29, 31, 77, .08);
    transition: background-color .15s, border-color .15s;
}
.field::placeholder { color: var(--ink-muted); font-weight: 400; }
.field:focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; background: var(--surface); border-color: var(--brand-navy); }
textarea.field { min-height: 130px; resize: vertical; }
/* Honeypot: hidden from people, filled in by bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin-bottom: var(--space-md); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); background: #fdecea; color: #8a1c13 !important; font: 600 var(--text-16)/26px var(--font-heading); }
.form-error[hidden] { display: none; }
.form-required { font: 500 var(--text-13)/20px var(--font-heading); margin-bottom: var(--space-md); }
.field[aria-invalid="true"] { border: 2px solid #b3261e; }   /* the field the server rejected */
.note { display: flex; gap: var(--space-xs); font: 500 var(--text-13)/20px var(--font-heading); margin-top: var(--space-md); }
.note img { width: 20px; height: 20px; flex-shrink: 0; margin-top: -1px; }
.form-success { text-align: center; padding: var(--space-xl) var(--space-lg); border-radius: var(--radius-sm); background: var(--off-white); }
.form-success[hidden] { display: none; }
.form-success img { width: 68px; height: 68px; margin: 0 auto var(--space-sm); display: block; }
.form-success h3 { font: 700 var(--text-26)/33px var(--font-heading); margin-bottom: var(--space-xs); }
.form-success:focus { outline: none; }
#turnstile-widget:empty { display: none; }

/* Tiles: white cards you can press (Other services, homepage services) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.tile {
    display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-lg); border-radius: var(--radius-sm); text-decoration: none;
    border: 1px solid rgba(29, 31, 77, .12);
    background: var(--surface);
    box-shadow: var(--shadow-tile);
    transition: transform .12s ease-out, box-shadow .12s ease-out;
}
a.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-tile-hover); }
a.tile:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(29, 31, 77, .15); }
.tile .icon { width: 56px; height: 56px; margin-bottom: var(--space-sm); }
.tile strong { font: 700 var(--text-20)/26px var(--font-heading); }
.tile span { font-size: var(--text-16); line-height: 26px; color: var(--ink-muted); }
.tile em { font-family: var(--font-heading); margin-top: auto; padding-top: var(--space-sm); font-style: normal; font-weight: 600; font-size: var(--text-13); }
.tile .price-tag { font: 700 var(--text-13)/20px var(--font-heading); color: var(--ink); }

/* ---- Homepage ---- */
.about { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xl); align-items: center; }
/* Hand-drawn portrait in navy ink, shown whole so the artwork isn't cropped */
.about-photo { display: block; width: 220px; height: auto; }
.about-text p + p { margin-top: var(--space-md); }
/* Text-heavy panels, e.g. the accessibility statement */
.prose p + p { margin-top: var(--space-md); }
.prose .updated { font: 500 var(--text-13)/20px var(--font-heading); }
.about .regions { font-size: var(--text-13); line-height: 20px; }

/* Selected work */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.work-tile { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-lg); border-radius: var(--radius-sm); border: 1px solid rgba(29, 31, 77, .12); box-shadow: var(--shadow-tile); }
.work-visual { display: grid; place-items: center; height: 110px; margin-bottom: var(--space-sm); border-radius: var(--radius-sm); background: var(--off-white); overflow: hidden; }
.work-visual img { max-height: 80px; max-width: 80%; width: auto; }
.work-visual img.work-photo { max-height: none; width: 100%; height: 100%; object-fit: cover; }
.name-mark { font: 800 var(--text-20)/26px var(--font-heading); text-align: center; padding: 0 var(--space-md); }

/* Category tags: flat labels, not buttons */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.tags li { padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-sm); background: rgba(241, 186, 12, .22); font: 600 var(--text-13)/20px var(--font-heading); }
.tags a { text-decoration: none; }
.tags-lg li { padding: var(--space-xs) var(--space-md); font-size: var(--text-16); line-height: 26px; }

/* ---- Portfolio ---- */
.project { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-xl); align-items: start; }
.project .work-visual { height: 160px; margin: 0; }
.project .work-visual img { max-height: 120px; }
.project h2 { margin-bottom: var(--space-sm); }
.project .tags { margin-bottom: var(--space-md); }
.project blockquote { margin-top: var(--space-md); padding-left: var(--space-md); border-left: 3px solid var(--brand-yellow); font-style: italic; }
.project blockquote footer { margin-top: var(--space-xs); font: 600 var(--text-13)/20px var(--font-heading); font-style: normal; }
.project-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); margin-top: var(--space-md); }
.project-images img { width: 100%; border-radius: var(--radius-sm); }

/* ---- Footer: navy, with a brand yellow pinstripe along the top ---- */
.site-footer {
    background: var(--navy-gradient);
    color: var(--on-inverse);
    border-top: 3px solid var(--brand-yellow);
    box-shadow: inset 0 1px 0 rgba(0,0,0,.4), inset 0 10px 18px -8px rgba(0,0,0,.45);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: var(--space-xl); padding-top: var(--space-2xl); padding-bottom: var(--space-xl); }
.site-footer .logo { margin-bottom: var(--space-md); }
.site-footer h2 { font: 700 var(--text-13)/16px var(--font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-yellow); margin-bottom: var(--space-md); }
.site-footer ul { font-family: var(--font-heading); list-style: none; display: grid; gap: var(--space-sm); font-size: var(--text-16); line-height: 26px; }
.site-footer ul a { display: inline-block; text-decoration: none; }
.site-footer a:not(.btn):hover { color: var(--brand-yellow); }
.site-footer p { font-size: var(--text-16); line-height: 26px; margin-bottom: var(--space-lg); }
.footer-phone a { font-family: var(--font-heading); font-weight: 600; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: var(--space-md); padding-top: var(--space-md); padding-bottom: var(--space-md); font: 500 var(--text-13)/20px var(--font-heading); color: var(--grey-medium); }
.footer-bottom a { text-decoration: none; }

.mobile-cta { display: none; }

/* ---- Tablet ---- */
@media (max-width: 1060px) {
    .nav li:not(:last-child) { display: none; }
    .menu-toggle { display: grid; }
    .site-header .wrap { justify-content: flex-start; }
    .site-header .logo { margin-right: auto; }
    .drawer {
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--navy-gradient);
        box-shadow: inset 0 4px 8px rgba(0,0,0,.35), 0 10px 20px rgba(0,0,0,.3);
        padding: var(--space-sm) var(--space-lg) var(--space-lg); display: grid; gap: var(--space-xs);
        opacity: 0; visibility: hidden; transform: translateY(-6px);
        transition: transform .2s ease-out, opacity .2s ease-out, visibility 0s .2s;
    }
    .drawer.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
    .drawer a:not(.btn) {
        display: flex; align-items: center; min-height: 48px; padding: 0 var(--space-md); border-radius: var(--radius-sm);
        color: var(--on-inverse); text-decoration: none; font-family: var(--font-heading); font-weight: 600; background: rgba(255,255,255,.05);
    }
    .drawer a[aria-current] { color: var(--brand-yellow); background: rgba(0,0,0,.25); box-shadow: var(--shadow-button-pressed); }
    .drawer a.btn { margin-top: var(--space-sm); }
    .features { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: var(--text-53); }
    .work { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1061px) { .drawer { display: none; } }

@media (max-width: 900px) {
    .quote { grid-template-columns: 1fr; gap: var(--space-lg); }
    .quote-photo { width: 160px; height: 160px; }
    .quote-photo .initials { font-size: var(--text-42); }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .pair { grid-template-columns: 1fr; }
    .contact { grid-template-columns: 1fr; gap: var(--space-lg); }
    .tiles { grid-template-columns: 1fr; }
    .tile { flex-direction: row; align-items: center; gap: var(--space-md); }
    .tile .icon { margin: 0; flex-shrink: 0; width: 48px; height: 48px; }
    .tile span, .tile em { display: none; }
    .ticks-2 { grid-template-columns: 1fr; }
    .about { grid-template-columns: 1fr; gap: var(--space-md); }
    .about-photo { width: 180px; }
    .project { grid-template-columns: 1fr; gap: var(--space-lg); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl) var(--space-lg); }
    .footer-brand { grid-column: 1 / -1; }
}

/* ---- Phone ---- */
@media (max-width: 600px) {
    :root { --header-h: 58px; }
    .wrap { padding-left: var(--space-md); padding-right: var(--space-md); }   /* sides only, so sections keep their top and bottom spacing */
    .nav { display: none; }
    .hero h1 { font-size: var(--text-42); }
    .hero-inner { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
    .hero .row .btn { flex: 1 1 0; padding: var(--space-sm) var(--space-md); }
    .client-logos { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
    .client-logos img { zoom: .85; }
    .content { padding-top: var(--space-lg); padding-bottom: var(--space-2xl); gap: var(--space-md); }
    .panel { padding: var(--space-lg); border-radius: var(--radius-sm); }
    .pair { gap: var(--space-md); }
    .features, .form-grid, .work { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    body { padding-bottom: var(--space-2xl); }   /* room for the action bar: 10 + 48 + 10 */
    .mobile-cta {
        display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
        padding: var(--space-sm) var(--space-md) calc(var(--space-sm) + env(safe-area-inset-bottom));
        background: var(--navy-gradient);
        box-shadow: inset 0 1px 0 var(--button-primary-border), 0 -4px 14px rgba(0,0,0,.25);
        transition: transform .25s ease-out, visibility 0s;
    }
    /* visibility keeps the hidden button out of the keyboard's tab order, once it has slid away */
    .mobile-cta.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform .25s ease-out, visibility 0s .25s; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
