/* Exe File, redesign v3 (motion pass v4).
   Brand from the original ef-portfolio theme: Raleway, dark red #22181c, paragraph #55474d, gold #8e793e, light #f0f2ef.
   v3 keeps that and modernises the rhythm: one 12-column grid, a fluid type scale, 1px rules instead of boxes,
   sentence case headings. Corners: interactive elements 2px, media square. One light theme for every page.
   Motion: load animations here (keyed on html.motion, set before first paint), scroll motion in site.js (GSAP).
   Everything is visible without either. Hover motion is gated on a fine pointer and no reduced-motion preference;
   the plain colour changes outside those queries are the fallback. */

@font-face { font-family: "Raleway"; src: url("../fonts/raleway-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("../fonts/raleway-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("../fonts/raleway-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("../fonts/raleway-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "icomoon"; src: url("../fonts/icomoon.woff") format("woff"), url("../fonts/icomoon.ttf") format("truetype"); font-weight: normal; font-style: normal; font-display: block; }

:root {
  --ink: #22181c;        /* $dark_red: titles, primary button */
  --sub: #2c2125;        /* $subtitle: lead text */
  --text: #55474d;       /* $paragraph */
  --gold: #8e793e;       /* $gold: accent for rules and icons */
  --gold-ink: #7f6c37;   /* same hue, one step darker so small text and white-on-gold pass AA */
  --light: #f0f2ef;      /* $light: header, page heads, footer */
  --white: #fff;
  --rule: #e0dfda;       /* 1px rules on white */
  --rule-2: #d3d4cf;     /* 1px rules on the light band */
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 76px;
  --radius: 2px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); scrollbar-color: #c9c5bf var(--light); }
body {
  margin: 0; background: var(--white); color: var(--ink); caret-color: var(--gold-ink);
  font-family: "Raleway", system-ui, sans-serif; font-weight: 400; font-size: 17px; line-height: 1.65;
  font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
p { margin: 0 0 1em; color: var(--text); max-width: 65ch; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.25; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--white); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 1px; }
.icon { width: 1em; height: 1em; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* icomoon glyphs from the original theme */
.glyph { font-family: "icomoon" !important; font-style: normal; font-weight: normal; line-height: 1; speak: never; -webkit-font-smoothing: antialiased; }
.glyph-toolbox::before { content: "\e903"; }
.glyph-tools::before { content: "\e904"; }
.glyph-heart::before { content: "\e900"; }
.glyph-family::before { content: "\e906"; }
.glyph-facebook::before { content: "\e907"; }
.glyph-camera::before { content: "\e902"; }
.glyph-envelope::before { content: "\e901"; }

/* ---------- type scale ---------- */
.display { font-size: clamp(46px, 5.6vw, 80px); font-weight: 500; line-height: 1.02; letter-spacing: -0.025em; }
.h1 { font-size: clamp(40px, 4.6vw, 64px); font-weight: 500; line-height: 1.06; letter-spacing: -0.02em; }
.h2 { font-size: clamp(32px, 3.2vw, 46px); font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; margin-bottom: 20px; }
.h3 { font-size: clamp(24px, 2vw, 28px); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: clamp(19px, 1.5vw, 22px); line-height: 1.55; color: var(--sub); max-width: 44ch; }
.link { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-ink); font-weight: 600; font-size: 16px; }
.link:hover { color: var(--ink); }
.link .icon { transition: transform .25s var(--ease-out); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 600 15px/1 "Raleway", system-ui, sans-serif; letter-spacing: .01em;
  padding: 16px 24px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--white);
  position: relative; isolation: isolate; overflow: hidden;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .16s var(--ease-out);
}
.btn:hover { background: var(--gold-ink); border-color: var(--gold-ink); color: var(--white); }
.btn .icon { transition: transform .25s var(--ease-out); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); }
.btn-sm { padding: 11px 18px; font-size: 14px; }

/* hover and press motion only for a fine pointer and no reduced-motion preference */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn:active { transform: scale(.97); }
  .btn:hover .icon, .link:hover .icon { transform: translateX(4px); }
  .link-back:hover .icon { transform: translateX(-4px); }
  /* fill: the hover colour sweeps in from the left on a layer under the label instead of switching at once */
  .btn::before {
    content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold-ink);
    transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out);
  }
  .btn:hover { background: var(--ink); }
  .btn:hover::before { transform: scaleX(1); }
  .btn-ghost::before { background: var(--ink); }
  .btn-ghost:hover { background: transparent; }
}

/* ---------- header: sticky, light; white with a soft shadow once the page scrolls ---------- */
.header-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; }
.site-header {
  position: sticky; top: 0; z-index: 30; background: var(--light);
  transition: background-color .24s ease, box-shadow .24s ease, transform .3s var(--ease-out);
}
.site-header.is-scrolled { background: var(--white); box-shadow: 0 1px 0 var(--rule), 0 10px 24px -14px rgba(34, 24, 28, .22); }
/* site.js hides the header while scrolling down past 400px and brings it back on any scroll up;
   it never stays hidden while something in it has keyboard focus */
.site-header.is-hidden { transform: translateY(-100%); box-shadow: none; }
.site-header.is-hidden:focus-within { transform: none; }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { flex: none; }
.brand img { height: 36px; width: auto; }
.main-nav { margin-left: auto; position: relative; }
.main-nav ul { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  position: relative; display: block; padding: 10px 14px;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--ink);
}
.main-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .24s var(--ease-out);
}
.main-nav a:hover { color: var(--gold-ink); }
.main-nav a:hover::after, .main-nav a[aria-current]::after { transform: scaleX(1); }
/* with site.js: one underline that slides to the hovered item; the current item keeps its own */
.main-nav.has-ind a:not([aria-current]):hover::after { transform: scaleX(0); }
.nav-ind {
  position: absolute; left: 0; top: 0; width: 1px; height: 1px; background: var(--gold); pointer-events: none;
  transform-origin: left; opacity: 0; transition: transform .3s var(--ease-out), opacity .25s ease;
}
.nav-ind.is-on { opacity: 1; }
.header-end { display: flex; align-items: center; gap: 22px; }
.langs { display: flex; align-items: center; }
.langs a { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text); padding: 4px 8px; }
.langs a + a { border-left: 1px solid var(--rule-2); }
.langs a[aria-current] { color: var(--ink); }
.langs a:hover { color: var(--gold-ink); }

.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); width: 44px; height: 44px; padding: 8px; cursor: pointer; }
.menu-btn .icon { width: 28px; height: 28px; }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 25; background: var(--white); border-top: 1px solid var(--rule);
  padding: 16px var(--gutter) 48px; overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu:focus { outline: none; } /* focus target when the menu opens by touch or mouse (site.js) */
.mobile-menu li a { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 26px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.mobile-menu li a[aria-current] { color: var(--gold-ink); }
.mobile-menu .btn { margin-top: 32px; }
.mobile-langs { margin-top: 24px; }
.mobile-langs a { font-weight: 600; color: var(--gold-ink); }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { background: var(--white); }

@media (max-width: 932px) {
  .main-nav, .header-end { display: none; }
  .menu-btn { display: block; }
}

/* ---------- home hero: text left, photo right running to the viewport edge ---------- */
.hero { background: var(--light); overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.hero-text { padding: 24px 0 72px; }
.hero-sub { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--sub); max-width: 30ch; margin: 24px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 40px 0 0; max-width: none; }
.hero-media {
  height: clamp(440px, calc(100vh - var(--header-h) - 56px), 720px);
  margin-right: calc(-1 * max(var(--gutter), (100vw - var(--wrap)) / 2));
  background: var(--rule-2);
}
.hero-media img { object-position: 58% 50%; }
/* 8px of side slack for the pointer parallax in site.js (desktop, fine pointer) */
@media (min-width: 933px) and (pointer: fine) { .motion .hero-media > img { left: -8px; width: calc(100% + 16px); max-width: none; } }

/* parallax frames: the photo is 10% taller than its frame; site.js moves it within that slack */
.px-frame { position: relative; overflow: hidden; }
.px-frame > img, .px-frame > video { position: absolute; left: 0; top: -5%; width: 100%; height: 110%; object-fit: cover; }
/* project scroll-through video over the page-head photo; with reduced motion the photo shows instead */
/* .is-still: site.js gave up on the video and on its animated WebP fallback (.head-anim), so the photo shows */
.px-frame > .head-video.is-still { display: none; }
@media (prefers-reduced-motion: reduce) { .px-frame > .head-video { display: none; } }

/* ---------- inner page head: title on the light band, photo straddling the band edge ---------- */
.page-head { position: relative; isolation: isolate; padding-top: clamp(48px, 7vw, 104px); }
.page-head::before { content: ""; position: absolute; inset: 0; background: var(--light); z-index: -1; }
.page-head.has-photo::before { bottom: clamp(80px, 12vw, 200px); }
.page-head-text { padding-bottom: clamp(40px, 5vw, 72px); }
.page-sub { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--sub); max-width: 46ch; margin: 20px 0 0; }
.crumb { margin: 0 0 28px; }
.page-photo { height: clamp(260px, 36vw, 480px); background: var(--rule-2); }

/* ---------- sections ---------- */
.section { padding: clamp(88px, 11vw, 152px) 0; }
.section-flush { padding-top: clamp(56px, 7vw, 96px); }
.section-light { background: var(--light); }
.intro { margin-bottom: clamp(48px, 6vw, 80px); }
.intro .lead { margin: 0; }
.intro-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; }
.intro-row > p { margin: 0 0 4px; }

/* about: the four theme icons in a row of ruled columns */
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px clamp(24px, 3vw, 40px); }
.col { position: relative; padding-top: 29px; }
/* the top rule is an element (not a border) so it can draw in from the left */
.col .rule { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rule); transform-origin: left; }
.col .glyph { display: block; font-size: 40px; color: var(--gold); margin-bottom: 28px; }
.col h3 { font-size: 20px; margin-bottom: 10px; }
.col p { font-size: 16px; margin: 0; }

/* photo band */
.band { min-height: clamp(380px, 46vw, 620px); display: flex; align-items: flex-end; isolation: isolate; background: var(--ink); }
.band > img { z-index: -2; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(34, 24, 28, .5) 0%, rgba(34, 24, 28, 0) 60%), linear-gradient(90deg, rgba(34, 24, 28, .55) 0%, rgba(34, 24, 28, .2) 50%, rgba(34, 24, 28, 0) 78%); }
.band .wrap { padding-block: clamp(56px, 7vw, 96px); }
.band-text { margin: 0; max-width: none; }
.band-text span { display: block; color: var(--light); font-weight: 500; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.08; letter-spacing: -.02em; }

/* services on home: sticky intro left, ruled two-column list right */
.svc-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 112px); align-items: start; }
.svc-intro { position: sticky; top: calc(var(--header-h) + 48px); }
.svc-intro .lead { margin-bottom: 28px; }
.svc-intro p:last-child { margin: 0; }
.svc-list li { position: relative; padding-top: 1px; }
.svc-list li:last-child { padding-bottom: 1px; }
.svc-list .rule { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rule-2); transform-origin: left; }
.svc-list .rule-b { top: auto; bottom: 0; }
.svc-list a { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 12px 40px; padding: 32px 0; align-items: baseline; }
.svc-list h3 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; transition: color .2s ease; }
.svc-list p { margin: 0; font-size: 16px; }
.svc-list .icon { width: 20px; height: 20px; align-self: center; color: var(--text); transition: color .2s ease, transform .25s var(--ease-out); }
.svc-list a:hover h3, .svc-list a:hover .icon { color: var(--gold-ink); }
@media (hover: hover) and (pointer: fine) {
  /* the hovered row lifts to white: a layer a little wider than the row (never past the page gutter), opacity only */
  .svc-list a::before {
    content: ""; position: absolute; z-index: -1; inset: 0 calc(-1 * min(24px, var(--gutter)));
    background: var(--white); box-shadow: 0 10px 28px -20px rgba(34, 24, 28, .3); opacity: 0; transition: opacity .25s ease;
  }
  .svc-list a:hover::before { opacity: 1; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .svc-list a:hover .icon { transform: translateX(6px); }
}

/* project tiles: two sizes in alternating pairs (7 + 5 columns, then 5 + 7); an odd last tile runs full width */
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(48px, 5vw, 72px) clamp(20px, 2.4vw, 32px); }
.tile[data-size="l"] { grid-column: span 7; }
.tile[data-size="s"] { grid-column: span 5; }
.tile[data-size="w"] { grid-column: span 12; }
.tile[hidden] { display: none; }
.tile a { display: block; }
.tile-img { position: relative; display: block; overflow: hidden; height: clamp(300px, 36vw, 540px); background: var(--light); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.tile-meta { display: flex; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; padding-top: 20px; }
.tile-name { position: relative; font-size: 20px; font-weight: 600; color: var(--ink); transition: color .2s ease; }
.tile-type { font-size: 15px; color: var(--text); }
.tile-meta .icon { margin-left: auto; width: 20px; height: 20px; align-self: center; color: var(--text); transition: color .2s ease, transform .24s var(--ease-out); }
.tile a:hover .tile-name, .tile a:hover .icon { color: var(--gold-ink); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tile a:hover .tile-img img { transform: scale(1.03); }
  .tile a:hover .tile-meta .icon { transform: translate(3px, -3px); }
  .tile-name::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
  }
  .tile a:hover .tile-name::after { transform: scaleX(1); }
}

/* portfolio filter: text tabs on a 1px rule */
.tags { display: flex; flex-wrap: wrap; gap: 0 32px; margin-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--rule); }
.tag {
  font: inherit; font-size: 16px; font-weight: 500; color: var(--text); background: none; cursor: pointer;
  border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 14px 0;
  transition: color .2s ease, border-color .2s ease;
}
.tag:hover { color: var(--ink); }
.tag[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--gold); }

/* services page: one ruled row per service, photo left, text right */
.svc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--rule); }
.svc:first-child { border-top: 0; padding-top: 0; }
.svc:last-child { padding-bottom: 0; }
.svc-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.svc-text .h3 { margin-bottom: 20px; }
.svc-text p { max-width: 60ch; }
.q { margin-top: 28px; padding-left: 20px; border-left: 1px solid var(--gold); }
.q p { color: var(--sub); font-weight: 500; margin-bottom: .4em; }

/* project page */
.project-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: start; margin-bottom: clamp(56px, 7vw, 96px); }
.project-intro .lead { margin: 0; max-width: 40ch; }
/* outbound "Visit website" link under the type/tags list: plain text, underline and gold only on hover */
.visit { margin: 20px 0 0; }
.visit a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none; text-underline-offset: 4px; }
.visit a:hover { color: var(--gold); text-decoration: underline; }
.visit .icon-ext { width: 16px; height: 16px; flex: none; }
.meta { margin: 0; }
.meta div { border-top: 1px solid var(--rule); padding: 14px 0; }
.meta div:last-child { border-bottom: 1px solid var(--rule); }
.meta dt { font-weight: 600; color: var(--ink); font-size: 14px; }
.meta dd { margin: 4px 0 0; color: var(--text); font-size: 16px; }
.gallery { display: grid; gap: clamp(32px, 4vw, 56px); }
.gallery figure { margin: 0; background: var(--light); }
.gallery img { width: 100%; }
.next { margin: clamp(72px, 9vw, 128px) 0 0; padding-top: 32px; border-top: 1px solid var(--rule); max-width: none; }
.next a { display: inline-flex; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; color: var(--ink); }
.next span { color: var(--text); font-size: 16px; }
.next strong { font-size: clamp(26px, 3vw, 40px); font-weight: 500; letter-spacing: -.015em; transition: color .2s ease; }
.next .icon { width: 28px; height: 28px; align-self: center; transition: color .2s ease, transform .24s var(--ease-out); }
.next a:hover strong, .next a:hover .icon { color: var(--gold-ink); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .next a:hover .icon { transform: translateX(4px); }
}

/* contact: details left, map right, both starting on the light band */
.contact-head { padding-bottom: clamp(72px, 9vw, 120px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-list { margin-top: 40px; }
.contact-list li { border-top: 1px solid var(--rule-2); }
.contact-list li:last-child { border-bottom: 1px solid var(--rule-2); }
.contact-list a { display: flex; align-items: center; gap: 16px; padding: 18px 0; color: var(--ink); font-weight: 500; }
.contact-list a:hover { color: var(--gold-ink); }
.contact-list .glyph, .contact-list .icon { width: 20px; font-size: 18px; text-align: center; color: var(--gold); }
.contact-map { position: relative; height: clamp(360px, 42vw, 560px); background: #dcdcdc; }
/* static map (build.py map_static) at natural size and centred, so Leaflet's tiles land exactly on it; #map stays see-through */
.map-static, .map-static img { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-static img { object-fit: none; object-position: 50% 50%; }
#map { position: relative; width: 100%; height: 100%; }
#map.leaflet-container { background: transparent; }
#map .leaflet-tile-pane { filter: grayscale(1) contrast(.9) brightness(1.03); }

/* ---------- footer: logo, nav and social on one row, address and legal line under a rule ---------- */
.site-footer { background: var(--light); border-top: 1px solid var(--rule-2); padding: clamp(56px, 7vw, 88px) 0 32px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid var(--rule-2); }
.foot-logo img { height: 32px; width: auto; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.foot-nav a { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--ink); }
.foot-nav a:hover { color: var(--gold-ink); }
.foot-nav a, .foot-base a { position: relative; }
.foot-social { display: flex; gap: 12px; margin: 0; }
.foot-social a { display: inline-flex; color: var(--ink); padding: 6px; border-radius: 4px; }
.foot-social a:hover, .foot-social a:focus-visible { color: var(--gold); }
.foot-social .brand { width: 20px; height: 20px; display: block; }
.foot-base { display: flex; justify-content: space-between; gap: 8px 32px; flex-wrap: wrap; padding-top: 24px; }
.foot-base p { margin: 0; font-size: 14px; }
.foot-base a { color: var(--gold-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.foot-base a:hover { color: var(--ink); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .foot-nav a::after, .foot-base a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out);
  }
  .foot-nav a::after { right: .14em; } /* skip the trailing letter-spacing */
  .foot-nav a:hover::after, .foot-base a:hover::after { transform: scaleX(1); }
  .foot-base a:hover { text-decoration-color: transparent; }
  .foot-social a { transition: color .2s ease, transform .25s var(--ease-out); }
  .foot-social a:hover, .foot-social a:focus-visible { transform: translateY(-2px); }
}

/* scroll progress (home): 2px gold line above everything, created and scrubbed by site.js */
.progress { position: fixed; left: 0; right: 0; top: 0; z-index: 40; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* ---------- load animations (html.motion): text rises, the lead photo opens ---------- */
@media (prefers-reduced-motion: no-preference) {
  .motion .page-head-text > *, .motion .contact-info > * { animation: rise .7s var(--ease-out) both; }
  .motion .page-head-text > :nth-child(2), .motion .contact-info > :nth-child(2) { animation-delay: 70ms; }
  .motion .page-head-text > :nth-child(3), .motion .contact-info > :nth-child(3) { animation-delay: 140ms; }
  /* home heading: each line rises 12px, 80ms after the one above (--l is the line number); then subline and buttons */
  .motion .hero-h .hw { display: inline-block; animation: rise-12 .65s var(--ease-out) both; animation-delay: calc(var(--l, 0) * 80ms); }
  .motion .hero-sub { animation: rise-12 .65s var(--ease-out) 220ms both; }
  .motion .hero-cta { animation: rise-12 .65s var(--ease-out) 300ms both; }
  @keyframes rise-12 { from { opacity: 0; transform: translateY(12px); } }
  .motion .hero-media { animation: unveil-side 1.1s var(--ease-in-out) 80ms both; }
  .motion .page-photo { animation: unveil-mid 1s var(--ease-in-out) 120ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes unveil-side { from { clip-path: inset(0 0 0 16%); } to { clip-path: inset(0 0 0 0); } }
  @keyframes unveil-mid { from { clip-path: inset(0 5% 0 5%); } to { clip-path: inset(0 0 0 0); } }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 932px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-text { padding: 40px 0 48px; }
  .hero-media { height: auto; aspect-ratio: 4 / 3; margin-inline: calc(-1 * var(--gutter)); }
  .motion .hero-media { animation-name: unveil-mid; }
}
@media (max-width: 850px) {
  .svc-layout, .svc, .project-intro, .contact-grid { grid-template-columns: 1fr; }
  .svc-intro { position: static; }
  .svc { gap: 28px; }
  .contact-head { padding-bottom: 0; }
  .contact-map { margin-inline: calc(-1 * var(--gutter)); height: 380px; }
}
@media (max-width: 768px) {
  .tile[data-size] { grid-column: span 12; }
  .tile-img { height: auto; aspect-ratio: 4 / 3; }
  .svc-list a { grid-template-columns: minmax(0, 1fr) auto; padding: 26px 0; }
  .svc-list p { grid-column: 1; grid-row: 2; }
  .svc-list .icon { grid-column: 2; grid-row: 1; }
  .intro-row { align-items: flex-start; flex-direction: column; }
  .page-photo { margin-inline: calc(-1 * var(--gutter)); height: auto; aspect-ratio: 3 / 2; }
  .page-head.has-photo::before { bottom: 30%; }
  .foot-row { flex-direction: column; align-items: flex-start; }
  .foot-base { flex-direction: column; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .cols { grid-template-columns: 1fr; gap: 40px; }
  .brand img { height: 30px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}
