/* Sarah Itafa — portfolio (v2: editorial layout, light + dark)
   Two themes share one stylesheet. Every colour lives in a token below:
     :root                    = LIGHT theme (the default): blush paper, navy ink, rose accent
     :root[data-theme="dark"] = DARK theme: the navy version
   script.js sets data-theme on <html> from the toggle in the header and remembers the visitor's choice.
   Fonts: Plus Jakarta Sans for text and headings, Instrument Serif for the logo, accent words and big numerals
   (both are loaded by the <link> in index.html). Everything is italic. Change colours, fonts and spacing here first. */

:root {
  /* ===== LIGHT THEME (default) ===== */
  color-scheme: light;

  /* Surfaces */
  --bg: #f8edf2;            /* main sections: hero, projects, contact, booking (the blush) */
  --bg-2: #f2e2ea;          /* alternate sections: services, about, faq, footer (a little darker) */
  --surface: #ffffff;       /* panels and hover fills */
  --surface-2: #ecdbe4;     /* raised bits inside panels */
  --line: #d3d9f0;
  --line-strong: #aab4de;
  --guide: rgba(11, 18, 48, .07);    /* faint column guides behind the sections */

  /* Text */
  --text: #0b1230;          /* headings, key text (the navy as ink) */
  --soft: #34406e;          /* body copy */
  --muted: #4f5b8a;         /* captions, labels */
  --h1: var(--text);        /* the hero heading */

  /* Accents */
  --accent: #e0457f;        /* rose for big display words, numerals and lines */
  --accent-hi: #b8235f;     /* deeper rose for small text and links (5:1 on the blush) */
  --accent-lo: #ee5f95;     /* end of the reading-progress line */
  --accent-rgb: 224, 69, 127;  /* same rose as r, g, b: used for glows and soft fills */
  --accent-soft: rgba(224, 69, 127, .1);
  --accent-line: rgba(184, 35, 95, .38);
  --ice: #3a4bc0;           /* secondary: tags */
  --ice-soft: rgba(58, 75, 192, .07);
  --ice-line: rgba(58, 75, 192, .3);
  --ice-hover: rgba(58, 75, 192, .08);

  /* Solid rose fills and the buttons that use them */
  --fill: #b8235f;          /* solid rose behind white text */
  --accent-ink: #ffffff;    /* text that sits on --fill */
  --btn-bg: linear-gradient(135deg, #c92c6b 0%, #b8235f 55%, #9e1a50 100%);
  --btn-ink: #ffffff;
  --btn-chip: #ffffff;      /* the round arrow inside a button */
  --btn-chip-ink: #b8235f;
  --btn-chip-hover: #0b1230;
  --btn-chip-hover-ink: #ffffff;

  /* Depth, washes and texture */
  --shadow: 0 30px 60px -32px rgba(11, 18, 48, .35);
  --card-shadow: 0 26px 40px -30px rgba(11, 18, 48, .55);
  --sheet-edge: rgba(255, 255, 255, .9);        /* hairline along the rounded top of each section */
  --halo: 248, 237, 242;                         /* soft halo behind the see-through nav text (r, g, b) */
  --marquee-bg: rgba(255, 255, 255, .55);
  --menu-bg: #fdf5f8;                            /* mobile menu card */
  --menu-shadow: 0 24px 40px -20px rgba(11, 18, 48, .45);
  --hover-wash: rgba(255, 255, 255, .6);
  --chip-soft: rgba(11, 18, 48, .06);
  --glow-k: .5;             /* strength of the rose glow around the hero heading */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-o: .05;

  /* ===== Shared by both themes ===== */
  --font-body: "Plus Jakarta Sans", Inter, ui-sans-serif, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: var(--font-body);
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --container: 1180px;
  --gutter: 64px;              /* total side margin around the content */
  --header-h: 72px;            /* height of the floating nav bar */
  --nav-gap: 10px;             /* space between the floating bar and the screen edges */
  --nav-radius: 10px;          /* rounded corners of the floating bar */
  --nav-bg: transparent;       /* fill of the bar. Try rgba(255, 255, 255, .5) for a light tint */
  --nav-blur: 0px;             /* frosted-glass blur behind the bar. Try 14px together with a tint */
  --nav-border: transparent;   /* outline of the bar. Try var(--line-strong) to show it */
  --nav-offset: calc(var(--header-h) + var(--nav-gap) * 2);   /* room the bar takes at the top of every section */
  --radius: 10px;              /* one corner radius for images, panels and rows */
  --radius-xl: 28px;           /* the rounded top edge of each section sheet */
  --sec-pad: clamp(40px, 6vh, 80px);   /* breathing room above and below each section's content */
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* ===== DARK THEME: the navy version ===== */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #070a1a;            /* hero, projects, contact, booking */
  --bg-2: #0b1230;          /* alternate sections: services, about, faq, footer */
  --surface: #0f1840;
  --surface-2: #17235a;
  --line: #1c2954;
  --line-strong: #2f3f78;
  --guide: rgba(47, 63, 120, .17);

  --text: #eaf0ff;
  --soft: #c8d1ef;
  --muted: #93a0cc;
  --h1: #ffffff;

  --accent: #ff7fae;
  --accent-hi: #ffa3c4;
  --accent-lo: #f2649a;
  --accent-rgb: 255, 127, 174;
  --accent-soft: rgba(255, 127, 174, .12);
  --accent-line: rgba(255, 127, 174, .42);
  --ice: #a9b8ff;
  --ice-soft: rgba(169, 184, 255, .1);
  --ice-line: rgba(169, 184, 255, .3);
  --ice-hover: rgba(169, 184, 255, .14);

  --fill: #ff7fae;
  --accent-ink: #2d0615;
  --btn-bg: linear-gradient(135deg, #ffa3c4 0%, #ff7fae 55%, #f2649a 100%);
  --btn-ink: #2d0615;
  --btn-chip: #2d0615;
  --btn-chip-ink: #ffa3c4;
  --btn-chip-hover: #ffffff;
  --btn-chip-hover-ink: #2d0615;

  --shadow: 0 30px 60px -32px rgba(0, 0, 0, .85);
  --card-shadow: 0 26px 40px -30px rgba(0, 0, 0, .7);
  --sheet-edge: rgba(255, 255, 255, .07);
  --halo: 7, 10, 26;
  --marquee-bg: rgba(11, 18, 48, .55);
  --menu-bg: #090e26;
  --menu-shadow: 0 24px 40px -18px rgba(0, 0, 0, .9);
  --hover-wash: rgba(15, 24, 64, .5);
  --chip-soft: rgba(255, 255, 255, .08);
  --glow-k: 1;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-o: .075;
}

*,*::before,*::after { box-sizing: border-box; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--soft);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--fill); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 8px; }

/* Film grain over everything: gives the flat colour some texture. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: var(--grain-o);
  background-image: var(--grain);
}
/* Reading progress: a thin rose line across the top that fills as you scroll (browsers with scroll-driven animations). */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; z-index: 201; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi));
  transform: scaleX(0); transform-origin: left;
}
@keyframes progress { to { transform: scaleX(1); } }
@supports (animation-timeline: scroll()) {
  body::before { animation: progress linear both; animation-timeline: scroll(root); }
}

.container { position: relative; z-index: 1; width: min(calc(100% - var(--gutter)), var(--container)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 999; top: -100px; left: 16px; padding: 10px 18px; border-radius: 999px; background: var(--fill); color: var(--accent-ink); font-weight: 700; }
.skip-link:focus { top: 10px; }

/* ---------- Header / navigation (floating bar) ---------- */
.site-header {
  position: fixed; z-index: 50;
  top: var(--nav-gap); left: var(--nav-gap); right: var(--nav-gap);
  width: min(calc(100% - var(--nav-gap) * 2), calc(var(--container) + 64px)); margin-inline: auto;
  height: var(--header-h);
  background: var(--nav-bg);                                /* transparent bar */
  -webkit-backdrop-filter: blur(var(--nav-blur)); backdrop-filter: blur(var(--nav-blur));
  border: 1px solid var(--nav-border); border-radius: var(--nav-radius);
  box-shadow: none;
}
/* with no fill behind them, a soft halo in the page colour keeps the brand and links readable over the content */
.brand, .main-nav > a:not(.nav-contact) { text-shadow: 0 1px 14px rgba(var(--halo), .95), 0 0 3px rgba(var(--halo), .6); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-header .container { width: min(calc(100% - var(--gutter)), var(--container)); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-serif); font-size: 31px; font-weight: 400; line-height: 1; letter-spacing: -.01em; color: var(--text); }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); background: var(--surface); }
.brand-dot { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.main-nav > a:not(.nav-contact) { position: relative; padding: 8px 14px; font-weight: 600; font-size: 14.5px; color: var(--soft); transition: color .2s; }
.main-nav > a:not(.nav-contact)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.main-nav > a:not(.nav-contact):hover { color: var(--text); }
.main-nav > a:not(.nav-contact):hover::after { transform: scaleX(1); }
.main-nav > a.is-active { color: var(--accent-hi); }
.main-nav > a.is-active::after { transform: scaleX(1); }
.menu-toggle { display: none; }

/* Light / dark switch. Shows the moon in the light theme and the sun in the dark one. script.js flips data-theme on <html>. */
.theme-toggle {
  position: relative; flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, translate .35s var(--ease);
}
.theme-toggle svg { grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s, rotate .55s var(--ease), scale .55s var(--ease); }
.theme-toggle .icon-sun { opacity: 0; rotate: -90deg; scale: .5; }
:root[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; rotate: 0deg; scale: 1; }
:root[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; rotate: 90deg; scale: .5; }
.brand, .main-nav > a { transition: color .35s; }

/* ---------- Section rail: slim dash index on the right edge (wide screens) ---------- */
.section-rail { position: fixed; right: 14px; top: 50%; z-index: 40; display: none; flex-direction: column; gap: 4px; translate: 0 -50%; }
.section-rail a { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 46px; height: 24px; }
.section-rail a::after { content: ""; width: 12px; height: 2px; border-radius: 2px; background: var(--line-strong); transition: width .35s var(--ease), background .25s; }
.section-rail a.is-active::after { width: 30px; background: var(--accent); }
.section-rail a:hover::after, .section-rail a:focus-visible::after { width: 30px; background: var(--accent-hi); }
.section-rail span {
  position: absolute; right: calc(100% + 4px); padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-2);
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text); white-space: nowrap;
  opacity: 0; translate: 8px 0; pointer-events: none; transition: opacity .25s, translate .3s var(--ease);
}
.section-rail a:hover span, .section-rail a:focus-visible span { opacity: 1; translate: 0 0; }
@media (min-width: 1300px) { .section-rail { display: flex; } }

/* ---------- Buttons: pill with a round arrow chip ---------- */
.button, .nav-contact {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 56px; padding: 8px 8px 8px 26px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; text-align: center;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), color .3s, border-color .3s, translate .35s var(--ease);
}
.button span[aria-hidden="true"], .nav-contact span[aria-hidden="true"] {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 17px; font-style: normal; line-height: 1;
  transition: transform .35s var(--ease), background .3s, color .3s;
}
.button:hover span[aria-hidden="true"], .nav-contact:hover span[aria-hidden="true"] { transform: rotate(45deg); }

.button-primary, .nav-contact {
  color: var(--btn-ink);
  background: var(--btn-bg);
  box-shadow: 0 10px 28px -12px rgba(var(--accent-rgb), .75), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.button-primary span[aria-hidden="true"], .nav-contact span[aria-hidden="true"] { background: var(--btn-chip); color: var(--btn-chip-ink); }

.button-outline-light {
  color: var(--text);
  border-color: var(--line-strong);
  background: linear-gradient(var(--fill), var(--fill)) no-repeat left center / 0% 100%;
  transition: background-size .45s var(--ease), color .3s, border-color .3s, transform .25s var(--ease), translate .35s var(--ease);
}
.button-outline-light span[aria-hidden="true"] { background: var(--chip-soft); color: var(--accent-hi); }
.button:active { transform: translateY(1px); }

.main-nav .nav-contact { margin-left: 12px; min-height: 46px; padding: 4px 4px 4px 20px; gap: 10px; font-size: 14px; }
.main-nav .nav-contact span[aria-hidden="true"] { width: 34px; height: 34px; font-size: 15px; }

/* ---------- Full-screen sections ---------- */
.hero, .section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-x: clip;
}
/* Each section is a sheet with a rounded top edge that slides over the one before it.
   The floating bar sits on top of the page, so the top padding also keeps content clear of it. */
.section {
  margin-top: calc(var(--radius-xl) * -1);
  padding: calc(var(--nav-offset) + var(--sec-pad) + var(--radius-xl)) 0 calc(var(--sec-pad) + var(--radius-xl));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: inset 0 1px 0 var(--sheet-edge);
}
#services { margin-top: 0; }   /* the first sheet sits right under the hero */

.hero, .contact-section, .section-base { background-color: var(--bg); }
.section-alt, .site-footer { background-color: var(--bg-2); }

/* faint column guides: four equal columns lined up with the content, like a printed grid */
.hero::before, .section::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; z-index: 0; pointer-events: none;
  width: min(calc(100% - var(--gutter)), var(--container)); translate: -50% 0;
  background:
    linear-gradient(to right, var(--guide) 1px, transparent 1px) 0 0 / 25% 100% repeat-x,
    linear-gradient(to left, var(--guide) 1px, transparent 1px) 100% 0 / 1px 100% no-repeat;
}

/* ---------- Shared type ---------- */
h1, h2, h3, p { margin-top: 0; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font-display); font-style: italic; font-weight: 800; line-height: 1.08; letter-spacing: -.035em; color: var(--text); text-wrap: balance; }
h2 { max-width: 780px; margin-bottom: 0; font-size: clamp(31px, 4.3vw, 56px); }
h3 { font-size: 22px; letter-spacing: -.02em; }
/* the accent words switch to the serif italic */
.heading-accent, .hero h1 em, .contact-intro h2 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 1.16em; line-height: 1; letter-spacing: -.01em; color: var(--accent);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 22px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-hi);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.eyebrow-line { display: none; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-bottom: clamp(28px, 4.5vh, 48px); }
.section-heading > div { flex: 1; min-width: 0; }
.section-lead { flex: 0 0 30%; max-width: 340px; margin: 0 0 8px; padding-left: 18px; font-size: 16px; line-height: 1.75; color: var(--soft); border-left: 2px solid var(--accent-line); }

/* headings that rise word by word (script.js wraps the words) */
.sw { display: inline-block; vertical-align: top; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
.sw-i { display: inline-block; }
.split-ready:not(.in) .sw-i { transform: translateY(112%); }
.split-ready .sw-i { transition: transform .95s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.split-ready.in .sw-i { transform: none; }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--nav-offset) + clamp(28px, 5vh, 64px)) 0 calc(clamp(32px, 5vh, 64px) + 66px); overflow: clip; }
.hero-grid {
  position: relative; z-index: 1; display: grid; align-items: end;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr);
  grid-template-areas: "eyebrow top" "title title" "desc desc" "actions actions" "note note";
}
/* the two wrappers dissolve so every piece sits directly on the page grid */
.hero-content, .hero-aside { display: contents; }
.hero .eyebrow { grid-area: eyebrow; align-self: stretch; display: flex; align-items: center; min-height: 58px; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.hero-aside-top { grid-area: top; align-self: stretch; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 58px; padding: 0 0 10px clamp(24px, 4vw, 64px); border-bottom: 1px solid var(--line-strong); }
.hero-aside-top p { margin: 0; font-size: 12px; font-weight: 700; line-height: 1.55; letter-spacing: .12em; text-transform: uppercase; color: var(--text); text-align: right; }
.hero-aside-top p span { display: inline; color: var(--accent-hi); }
/* Glowing H1: a soft rose halo that slowly breathes. --glow is animated; without @property support the glow simply stays static. */
@property --glow { syntax: "<number>"; inherits: true; initial-value: 1; }
@keyframes glow-breathe { from { --glow: .6; } to { --glow: 1.2; } }
.hero h1 {
  grid-area: title; max-width: none; margin: clamp(24px, 5vh, 52px) 0; font-size: clamp(42px, 7.4vw, 112px); font-weight: 800; line-height: 1.02; letter-spacing: -.05em; color: var(--h1);
  text-shadow:
    0 0 calc(14px * var(--glow)) rgba(255, 255, 255, calc(.22 * var(--glow))),
    0 0 calc(34px * var(--glow)) rgba(var(--accent-rgb), calc(.38 * var(--glow) * var(--glow-k))),
    0 0 calc(80px * var(--glow)) rgba(var(--accent-rgb), calc(.26 * var(--glow) * var(--glow-k)));
  animation: rise .9s var(--ease) backwards, glow-breathe 4.5s ease-in-out 1s infinite alternate;
}
.hero h1 em {
  display: block; padding-right: .04em; margin-top: .02em; font-size: 1.12em;
  text-shadow:
    0 0 calc(12px * var(--glow)) rgba(var(--accent-rgb), calc(.75 * var(--glow) * var(--glow-k))),
    0 0 calc(34px * var(--glow)) rgba(var(--accent-rgb), calc(.55 * var(--glow) * var(--glow-k))),
    0 0 calc(76px * var(--glow)) rgba(var(--accent-rgb), calc(.4 * var(--glow) * var(--glow-k)));
}
.hero-description { grid-area: desc; align-self: stretch; margin: 0; padding: 26px max(24px, calc(100% - 560px)) 26px 0; border-top: 1px solid var(--line-strong); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.7; color: var(--soft); }
.hero-actions { grid-area: actions; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.call-note { grid-area: note; margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }


/* skills ticker along the bottom edge of the hero */
.marquee { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; overflow: hidden; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); background: var(--marquee-bg); }
.marquee-track { display: flex; width: max-content; animation: marquee 84s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; flex: none; gap: 34px; padding: 15px 34px 15px 0; }
.marquee-group span { font-family: var(--font-serif); font-style: italic; font-size: clamp(24px, 2.5vw, 33px); line-height: 1; white-space: nowrap; color: var(--text); }
.marquee-group span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px rgba(var(--accent-rgb), .75); }
.marquee-group i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services: one ruled row per service ---------- */
.services-grid { border-bottom: 1px solid var(--line-strong); }
.service-card {
  position: relative; isolation: isolate;
  display: grid; align-items: center; min-width: 0;
  grid-template-columns: clamp(70px, 8vw, 110px) minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .95fr);
  column-gap: clamp(16px, 3vw, 44px);
  padding: clamp(16px, 2.4vh, 26px) 0;
  border-top: 1px solid var(--line-strong);
}
.service-card::before { content: ""; position: absolute; z-index: -1; inset: 0 -22px; border-radius: var(--radius); background: var(--surface); opacity: 0; transition: opacity .4s; }
.service-card::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.service-number { margin: 0; font-family: var(--font-serif); font-size: clamp(44px, 5vw, 72px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(var(--accent-rgb), .7); transition: color .35s, -webkit-text-stroke-color .35s; }
.service-card h3 { margin: 0; font-size: clamp(20px, 2vw, 27px); transition: translate .45s var(--ease); }
.service-card p { margin: 0; font-size: 15.5px; line-height: 1.7; color: var(--soft); }
.tag-list, .skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list { justify-content: flex-end; }
.tag-list span { padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--ice); border: 1px solid var(--ice-line); border-radius: 6px; }

/* Scroll-linked motion for the service rows: each row slides in as you scroll, the numeral drifts a little.
   Uses the individual translate property so the hover effects (transform) still work.
   Browsers without scroll-driven animations keep the normal fade-up from script.js. */
@keyframes service-in {
  from { opacity: 0; translate: -36px 48px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes service-drift { from { translate: -14px 0; } to { translate: 14px 0; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .services-grid .service-card {
      animation: service-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
    .services-grid .service-card.reveal { transform: none; }   /* cancel the one-time fade-up from script.js; the scroll animation replaces it */
    .service-number {
      animation: service-drift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}

/* ---------- Projects ---------- */
/* Four across on desktop, two on tablet, one on phones. Screens sit slightly desaturated and warm up on hover. */
.projects-grid { counter-reset: project; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 26px); align-items: start; }
.project-card { counter-increment: project; display: flex; flex-direction: column; min-width: 0; }
.project-media { position: relative; isolation: isolate; display: block; aspect-ratio: 16 / 11; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; scale: 1.03; transition: transform .8s var(--ease); }
.project-media::before { content: counter(project, decimal-leading-zero); position: absolute; left: 12px; top: 12px; z-index: 3; padding: 5px 11px 4px; font-family: var(--font-serif); font-size: 18px; line-height: 1; color: var(--text); border-radius: 999px; background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 4px 14px rgba(7, 10, 26, .12); }
.image-arrow {
  position: absolute; z-index: 3; right: 12px; bottom: 12px; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: var(--fill); color: var(--accent-ink); font-size: 18px; font-style: normal; font-weight: 700;
  opacity: 0; transform: scale(.8) rotate(-30deg); transition: opacity .25s, transform .35s var(--ease);
}
.project-media:focus-visible .image-arrow { opacity: 1; transform: none; }
.project-info { display: flex; flex-direction: column; flex: 1; padding: 18px 2px 0; }
.project-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-hi); }
.project-status { padding: 1px 8px; color: var(--ice); border: 1px solid var(--ice-line); border-radius: 6px; letter-spacing: .06em; }
.project-info h3 { width: fit-content; max-width: 100%; margin-bottom: 8px; padding-bottom: 2px; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.2; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 1px; transition: background-size .5s var(--ease); }
.project-info > p { margin-bottom: 16px; font-size: 14.5px; line-height: 1.65; color: var(--soft); }
.project-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding-top: 14px; border-top: 1px solid var(--line-strong); }
.project-bottom > span { font-size: 12px; color: var(--muted); }
.project-bottom a { font-size: 13.5px; font-weight: 700; color: var(--accent-hi); border-bottom: 1px solid var(--accent-line); transition: color .2s, border-color .2s; }
.project-bottom a:hover { color: var(--text); border-color: var(--text); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 7vw, 120px); align-items: center; }
.about-monogram {
  margin-top: 30px; font-family: var(--font-serif); font-size: clamp(130px, 17vw, 250px); font-style: italic; font-weight: 400; line-height: .9; letter-spacing: -.03em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(var(--accent-rgb), .6); user-select: none;
}
.about-monogram span { color: var(--accent); -webkit-text-stroke: 0; }
.about-copy > p { margin-bottom: 18px; font-size: 17px; line-height: 1.85; color: var(--soft); }
.about-copy > p:first-child { font-family: var(--font-serif); font-size: clamp(25px, 2.6vw, 35px); font-weight: 400; line-height: 1.3; letter-spacing: -.005em; color: var(--text); }
.skills-group { margin-top: 28px; }
.skills-group h3 { margin-bottom: 14px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-hi); }
/* tools as a numbered spec sheet instead of pill chips */
.skill-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; counter-reset: skill; }
.skill-chips span { counter-increment: skill; display: flex; align-items: baseline; gap: 12px; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--text); border-top: 1px solid var(--line-strong); transition: padding .35s var(--ease), color .25s, border-color .25s; }
.skill-chips span:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* an odd last tool takes the whole row instead of leaving a gap */
.skill-chips span::before { content: counter(skill, decimal-leading-zero); font-family: var(--font-serif); font-size: 17px; color: var(--accent); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); gap: clamp(36px, 7vw, 110px); align-items: center; }
.contact-intro h2 { max-width: 560px; margin-bottom: 22px; font-size: clamp(34px, 5vw, 66px); }
.contact-intro > p:not(.eyebrow):not(.contact-small) { max-width: 520px; margin-bottom: 32px; font-size: 18px; line-height: 1.8; color: var(--soft); }
.contact-small { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.contact-card { counter-reset: contact; }
.contact-card-header { padding-bottom: 18px; }
.contact-card-header h3 { margin-bottom: 6px; font-size: clamp(21px, 2.2vw, 26px); }
.contact-card-header p { margin: 0; font-size: 15px; color: var(--muted); }
.email-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line-strong); }
.email-row > div { min-width: 0; }
.contact-row-label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-hi); }
.email-row a { font-size: clamp(17px, 2vw, 23px); font-weight: 700; letter-spacing: -.02em; color: var(--text); overflow-wrap: anywhere; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 1px; transition: color .2s, background-size .5s var(--ease); }
.email-row a:hover { color: var(--accent-hi); background-size: 100% 1px; }
.copy-email {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; font-size: 13px; font-weight: 700; color: var(--text);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, translate .35s var(--ease);
}
.copy-email:hover { background: var(--fill); color: var(--accent-ink); border-color: var(--fill); }
.contact-link { counter-increment: contact; display: flex; align-items: center; gap: 16px; padding: 17px 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--text); border-top: 1px solid var(--line-strong); transition: padding .4s var(--ease), color .2s; }
.contact-link::before { content: counter(contact, decimal-leading-zero); flex: 0 0 34px; font-family: var(--font-serif); font-size: 21px; font-weight: 400; letter-spacing: 0; color: var(--accent); }
.contact-link span:first-child { flex: 1; }
.contact-link:last-child { border-bottom: 1px solid var(--line-strong); }
.contact-link span:last-child { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent-hi); font-size: 15px; font-style: normal; transition: background .25s, color .25s, border-color .25s, transform .35s var(--ease); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 7vw, 110px); align-items: start; }
.faq-aside { margin-top: 24px; font-size: 16px; color: var(--soft); }
.faq-aside a, .faq-list p a { font-weight: 700; color: var(--accent-hi); text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.faq-aside a:hover, .faq-list p a:hover { color: var(--text); }
.faq-list { counter-reset: faq; border-bottom: 1px solid var(--line-strong); }
.faq-list details { counter-increment: faq; position: relative; border-top: 1px solid var(--line-strong); transition: background .35s; }
.faq-list details::before { content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.faq-list details[open]::before { transform: scaleX(1); }
.faq-list summary { display: flex; align-items: center; gap: 18px; padding: 24px 0; list-style: none; cursor: pointer; font-size: clamp(16px, 1.7vw, 20px); font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.faq-list summary::before { content: counter(faq, decimal-leading-zero); flex: 0 0 30px; font-family: var(--font-serif); font-size: 21px; font-weight: 400; letter-spacing: 0; color: var(--accent); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-plus { position: relative; margin-left: auto; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; transition: background .25s, border-color .25s, transform .45s var(--ease); }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 10px; top: 15px; width: 12px; height: 2px; background: var(--accent-hi); border-radius: 2px; transition: background .25s; }
.faq-plus::after { transform: rotate(90deg); transition: transform .25s var(--ease), background .25s; }
.faq-list details[open] .faq-plus { background: var(--fill); border-color: var(--fill); transform: rotate(180deg); }
.faq-list details[open] .faq-plus::before, .faq-list details[open] .faq-plus::after { background: var(--accent-ink); }
.faq-list details[open] .faq-plus::after { transform: rotate(0); }
.faq-list details p { margin: -6px 52px 26px 48px; font-size: 16px; line-height: 1.8; color: var(--soft); }

/* ---------- Booking ---------- */
.booking-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.booking-intro h2 { margin-bottom: 20px; font-size: clamp(30px, 3.8vw, 48px); }
.booking-intro > p:not(.eyebrow):not(.booking-help) { max-width: 430px; margin-bottom: 26px; font-size: 17px; line-height: 1.8; color: var(--soft); }
.booking-detail { display: flex; align-items: center; gap: 14px; max-width: 400px; margin-bottom: 26px; padding: 16px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.booking-detail-icon { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; font-size: 21px; font-style: normal; color: var(--accent-hi); border: 1px solid var(--accent-line); border-radius: 50%; }
.booking-detail div { display: grid; gap: 1px; }
.booking-detail strong { font-size: 15px; color: var(--text); }
.booking-detail div span { font-size: 13.5px; color: var(--muted); }
.booking-open { white-space: normal; }
.booking-help { max-width: 400px; margin: 18px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.booking-calendar-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.booking-calendar-top { display: flex; align-items: center; gap: 12px; padding: 14px 22px; background: var(--surface); border-bottom: 1px solid var(--line-strong); }
.booking-calendar-dot { flex-shrink: 0; width: 9px; height: 9px; background: #4ade9f; border-radius: 50%; box-shadow: 0 0 0 4px rgba(74, 222, 159, .15); }
.booking-calendar-top div { display: grid; }
.booking-calendar-top strong { font-size: 14.5px; color: var(--text); }
.booking-calendar-top span:not(.booking-calendar-dot) { font-size: 12px; color: var(--muted); }
.booking-calendar-card iframe { display: block; width: 100%; height: clamp(560px, 82vh, 720px); border: 0; background: #fff; }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: calc(var(--radius-xl) * -1); padding-top: var(--radius-xl); overflow: hidden; color: var(--muted); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: inset 0 1px 0 var(--sheet-edge); }
.footer-mark { padding: clamp(28px, 5vw, 56px) 0 0; font-family: var(--font-serif); font-size: clamp(64px, 16.5vw, 260px); font-style: italic; font-weight: 400; line-height: .82; letter-spacing: -.03em; text-align: center; white-space: nowrap; color: transparent; -webkit-text-stroke: 1.5px rgba(var(--accent-rgb), .4); user-select: none; }
.footer-mark span { color: var(--accent); -webkit-text-stroke: 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; min-height: 84px; padding: 20px 0; font-size: 13.5px; }
.footer-inner a { color: var(--text); font-weight: 600; }
.footer-inner a:hover { color: var(--accent-hi); }
.copy-status { position: fixed; left: 50%; bottom: 24px; z-index: 300; padding: 12px 22px; font-size: 14px; font-weight: 700; color: var(--accent-ink); background: var(--fill); border-radius: 999px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transform: translate(-50%, 24px); transition: transform .3s var(--ease), opacity .3s; }
.copy-status.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Cursor ring (desktop with a mouse; script.js adds it) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 300; display: grid; place-items: center; pointer-events: none; opacity: 0;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid rgba(var(--accent-rgb), .75); border-radius: 50%;
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink);
  transition: opacity .3s, width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .3s, border-color .3s;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-link { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(var(--accent-rgb), .14); }
.cursor.is-view { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--fill); border-color: var(--fill); }
.cursor span { opacity: 0; transition: opacity .2s; }
.cursor.is-view span { opacity: 1; }
.has-cursor .image-arrow { display: none; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.hero .eyebrow, .hero-aside-top, .hero-description, .hero-actions, .call-note { animation: rise .9s var(--ease) backwards; }
.hero-aside-top { animation-delay: .06s; }
.hero-description { animation-delay: .26s; }
.hero-actions { animation-delay: .34s; }
.call-note { animation-delay: .42s; }
.marquee { animation: rise 1s var(--ease) .5s backwards; }
/* script.js adds .reveal to below-the-fold blocks, then swaps it for .revealed */
.reveal { opacity: 0; transform: translateY(24px); }
.revealed { animation: rise .8s var(--ease) var(--d, 0s) backwards; }

/* ----- more motion ----- */
/* page load: the bar drops in, the heading arrives out of a blur */
@keyframes nav-in { from { opacity: 0; translate: 0 -14px; } }
@keyframes hero-in { from { opacity: 0; transform: translateY(46px); filter: blur(14px); } }
.site-header { animation: nav-in .9s var(--ease) .15s backwards; }
.hero h1 { animation: hero-in 1.25s var(--ease) .1s backwards, glow-breathe 4.5s ease-in-out 1.4s infinite alternate; }

/* groups that arrive one item after another (script.js numbers the items and adds .in) */
.stagger-ready:not(.in) > * { opacity: 0; }
.stagger-ready.in > * { animation: rise .85s var(--ease) calc(var(--i, 0) * 80ms) backwards; }

/* project images wipe open from the bottom edge */
@keyframes curtain { from { clip-path: inset(100% 0 0 0 round var(--radius)); } to { clip-path: inset(0 0 0 0 round var(--radius)); } }
.project-card.reveal .project-media { clip-path: inset(100% 0 0 0 round var(--radius)); }
.project-card.revealed .project-media { animation: curtain 1.1s var(--ease) calc(var(--d, 0s) + .12s) backwards; }

/* Scroll-linked motion (browsers with scroll-driven animations; everything stays put elsewhere) */
@keyframes lag-lg { to { translate: 0 80px; } }
@keyframes line-draw { from { transform: scaleX(0); } }
@keyframes img-drift { from { translate: 0 -1.2%; } to { translate: 0 1.2%; } }
@keyframes mono-scroll { from { translate: 0 70px; color: transparent; } 50% { color: rgba(var(--accent-rgb), .16); } to { translate: 0 -50px; color: transparent; } }
@keyframes mark-rise { from { translate: 0 48%; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* the hero heading trails behind the page a little as you scroll away */
    .hero h1 { animation: hero-in 1.25s var(--ease) .1s backwards, glow-breathe 4.5s ease-in-out 1.4s infinite alternate, lag-lg linear both; animation-timeline: auto, auto, scroll(root); animation-range: normal, normal, 0px 100vh; }
    /* the little rule before each label draws itself as the label arrives */
    .eyebrow::before { transform-origin: left; animation: line-draw linear both; animation-timeline: view(); animation-range: entry 10% entry 100%; }
    /* project screens drift inside their frames (the frame is the timeline, since an overflow:hidden parent would stall it) */
    .project-media { view-timeline: --frame block; }
    .project-media img { animation: img-drift linear both; animation-timeline: --frame; animation-range: cover 0% cover 100%; }
    /* the outlined monogram floats upward and fills with a wash of rose as it crosses the screen */
    .about-monogram { animation: mono-scroll linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    /* the footer wordmark rises into place */
    .site-footer { view-timeline: --foot block; }
    .footer-mark { animation: mark-rise linear both; animation-timeline: --foot; animation-range: entry 0% entry 100%; }
  }
}

/* FAQ answers open and close smoothly (newer browsers; others simply snap) */
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    .faq-list details::details-content { block-size: 0; overflow: clip; transition: block-size .5s var(--ease), content-visibility .5s allow-discrete; }
    .faq-list details[open]::details-content { block-size: auto; }
  }
}

@media (hover: hover) and (pointer: fine) {
  .button-primary:hover, .nav-contact:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -14px rgba(var(--accent-rgb), .85), inset 0 1px 0 rgba(255, 255, 255, .5); }
  .button-primary:hover span[aria-hidden="true"], .nav-contact:hover span[aria-hidden="true"] { background: var(--btn-chip-hover); color: var(--btn-chip-hover-ink); }
  .button-outline-light:hover { background-size: 100% 100%; color: var(--accent-ink); border-color: var(--fill); transform: translateY(-3px); }
  .button-outline-light:hover span[aria-hidden="true"] { background: var(--btn-chip); color: var(--btn-chip-ink); }
  .service-card:hover::before { opacity: 1; }
  .service-card:hover::after { transform: scaleX(1); }
  .service-card:hover .service-number { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
  .service-card:hover h3 { translate: 12px 0; }
  .project-card:hover .project-media img { transform: scale(1.04); }
  .project-card:hover .image-arrow { opacity: 1; transform: none; }
  .project-card:hover h3 { background-size: 100% 1px; }
  .theme-toggle:hover { background: var(--fill); border-color: var(--fill); color: var(--accent-ink); }
  .skill-chips span:hover { padding-left: 12px; color: var(--accent-hi); border-color: var(--accent); }
  .contact-link:hover { padding-left: 12px; color: var(--text); }
  .contact-link:hover span:last-child { background: var(--fill); border-color: var(--fill); color: var(--accent-ink); transform: rotate(45deg); }
  .faq-list details:hover { background: var(--hover-wash); }
  .tag-list span { transition: background .2s, border-color .2s; }
  .tag-list span:hover { background: var(--ice-hover); border-color: var(--ice); }
}
@media (hover: none) { .image-arrow { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (min-width: 1100px) {
  /* every second project sits a little lower, so the row reads as a collage rather than a table */
  .project-card:nth-child(even) { margin-top: clamp(24px, 4.5vh, 44px); }
  .skill-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 22px; }
  .skill-chips span:last-child:nth-child(odd) { grid-column: auto; }
  .skill-chips span:last-child:nth-child(4n + 3) { grid-column: span 2; }
}

@media (max-width: 1100px) {
  :root { --gutter: 48px; }
}

@media (max-width: 1099px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin-inline: auto; }
}

@media (max-width: 980px) {
  .booking-grid { grid-template-columns: 1fr; }
  .booking-intro > p:not(.eyebrow):not(.booking-help), .booking-help { max-width: 640px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { max-width: 620px; }
  .service-card { grid-template-columns: clamp(64px, 9vw, 90px) minmax(0, 1fr) minmax(0, 1.3fr); grid-template-areas: "n t p" "n tags tags"; row-gap: 12px; }
  .service-number { grid-area: n; align-self: start; }
  .service-card h3 { grid-area: t; }
  .service-card p { grid-area: p; }
  .tag-list { grid-area: tags; justify-content: flex-start; }
}

@media (max-width: 860px) {
  :root { --header-h: 66px; --gutter: 40px; }
  .brand { font-size: 28px; }
  .brand img { width: 36px; height: 36px; }
  .header-inner { gap: 10px; }
  .main-nav { margin-left: 0; }
  .theme-toggle { width: 46px; height: 46px; margin-left: auto; }

  .menu-toggle {
    position: relative; z-index: 52; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    width: 46px; height: 46px; background: transparent; border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
  }
  .menu-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 4px; transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
  /* while the menu is open the bar gets a solid fill so it joins the dropdown card */
  .site-header:has(.main-nav.open) { background: var(--menu-bg); border-color: var(--line-strong); }
  /* the menu drops down as its own floating card under the bar */
  .main-nav {
    position: absolute; top: calc(100% + var(--nav-gap)); left: -1px; right: -1px; display: none; flex-direction: column; align-items: stretch; gap: 2px;
    max-height: calc(100svh - var(--nav-offset) - var(--nav-gap)); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px 20px 24px; background: var(--menu-bg);
    border: 1px solid var(--line-strong); border-radius: var(--nav-radius); box-shadow: var(--menu-shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav > a:not(.nav-contact) { padding: 14px 8px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .main-nav > a:not(.nav-contact)::after { display: none; }
  .main-nav .nav-contact { margin: 14px 0 0; min-height: 54px; padding: 6px 6px 6px 24px; justify-content: space-between; font-size: 16px; }
  .main-nav .nav-contact span[aria-hidden="true"] { width: 40px; height: 40px; }

  /* hero stacks into one column */
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "eyebrow" "top" "title" "desc" "actions" "note"; }
  .hero .eyebrow { padding-bottom: 14px; border-bottom: 0; }
  .hero-aside-top { justify-content: flex-start; padding: 14px 0 14px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
  .hero-aside-top p { text-align: left; align-self: center; }
  .hero h1 { margin: 28px 0; }
  .hero-description { padding: 0 0 26px; border-top: 0; }
  .about-grid, .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-monogram { display: none; }
}

@media (max-width: 760px) {
  .section-heading { display: block; }
  .section-lead { max-width: 560px; margin-top: 18px; font-size: 16px; }
}

@media (max-width: 699px) {
  body { font-size: 16px; }
  .hero::before, .section::before { display: none; }
  .service-card { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "n t" ". p" ". tags"; column-gap: 14px; }
  .service-card p { font-size: 15px; }
  .service-card::before { inset: 0 -12px; }
  .skill-chips { grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .faq-list details p { margin: -6px 0 24px 48px; }
}

@media (max-width: 599px) {
  .projects-grid { grid-template-columns: 1fr; max-width: 440px; }
  .project-media { aspect-ratio: 16 / 10; }
}

@media (max-width: 860px) {
}

@media (max-width: 560px) {
  :root { --gutter: 32px; }
  :root { --radius-xl: 22px; }
  .section { padding: calc(var(--nav-offset) + 32px + var(--radius-xl)) 0 calc(44px + var(--radius-xl)); }
  .hero { padding: calc(var(--nav-offset) + 20px) 0 calc(44px + 74px); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; justify-content: space-between; white-space: normal; }
  .booking-open { width: 100%; justify-content: space-between; }
  .contact-intro .button { width: 100%; justify-content: space-between; white-space: normal; }
  .email-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .contact-link { font-size: 17px; }
  .faq-list summary { gap: 14px; padding: 20px 0; }
  .footer-inner { justify-content: center; text-align: center; }
  .booking-calendar-card iframe { height: 600px; }
}

@media (max-width: 380px) {
  :root { --gutter: 28px; }
  .brand { font-size: 25px; }
  .hero h1 { font-size: 38px; }
  .button { padding-left: 20px; font-size: 14.5px; }
}

/* Short laptop screens: keep the hero inside one screen */
@media (min-width: 861px) and (max-height: 780px) {
  .hero { padding-bottom: calc(24px + 66px); }
  .hero h1 { font-size: clamp(36px, 5.4vw, 78px); margin: 20px 0; }
  .hero-description { padding-block: 16px; font-size: 17px; line-height: 1.6; }
  .call-note { margin-top: 12px; }
}

/* Switching theme: the new theme spreads out from the switch like a ripple (browsers with View Transitions).
   Everywhere else the colours simply fade for a moment. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease, stroke .4s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  body::before { transform: none; display: none; }
}
