/* ==========================================================================
   EICH — Portfolio
   Palette: Forest. Typeface: Jost (Google Fonts).
   ========================================================================== */

:root {
  --bg: #EEEBE3;        /* page background */
  --ink: #1F2A22;       /* text, rules, dark tiles */
  --forest: #34443A;    /* accent */
  --sage: #D3D6C9;      /* light tiles */
  --on-forest: #F1EEE4; /* text on the accent */
  --muted: #56615A;     /* secondary text */

  --gutter: clamp(16px, 4vw, 56px);
  --hero-space: clamp(40px, 7vw, 112px); /* space above and below the giant EICH */
  --band-peek: 14px; /* how much of the green band shows at the bottom of the first screen */
  --section-space: clamp(56px, 7vw, 88px); /* equal space above and below each divider-bounded section */
  --rule: 1.5px solid var(--ink);
  --font: "Jost", "Helvetica Neue", Arial, sans-serif;
}

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

/* Anchor scrolling is animated in js/main.js; this is the no-JavaScript fallback. */
html { scroll-behavior: smooth; }
html.js-scroll { scroll-behavior: auto; }

/* Leave a little breathing room above a section when a nav link lands on it. */
section[id] { scroll-margin-top: 24px; }
/* Sections receive focus after a nav jump; don't draw an outline around the whole section. */
section[tabindex="-1"]:focus { outline: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, ul { margin: 0; }
ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

.wrap { padding-inline: var(--gutter); }

.label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--forest);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--on-forest);
  padding: 10px 16px; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 22px;
}
.site-header nav ul { display: flex; gap: 24px; flex-wrap: wrap; }
.site-header nav a {
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.site-header nav a:hover { color: var(--forest); }

/* Login button, top right */
.login-btn {
  margin-left: auto; /* stays on the right even when the header wraps on phones */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.login-btn:hover { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }

/* ---------- Giant wordmark ---------- */
/* Oversized wordmark: cropped at the left and right screen edges only.
   Extra space in the SVG viewBox keeps the tops and bottoms of the letters whole. */
.giant { overflow: hidden; overflow-x: clip; overflow-y: visible; padding-top: var(--hero-space); } /* "hidden" is the fallback for older browsers */
.giant-mark {
  display: block;
  width: 104vw;
  max-width: none;
  height: auto;
  margin-left: -2vw;
  /* The viewBox has 4 units of breathing room above and below the letters.
     These negative margins cancel that space so the letters sit exactly where they did originally. */
  margin-block: -1.621vw;
  overflow: visible;
  color: var(--ink);
}

/* ---------- Studio overview (forest band) ---------- */
.descriptor { background: var(--forest); color: var(--on-forest); }

/* First screen: nav + giant wordmark fill the window, with just a thin strip of the
   green band showing along the bottom edge like a border. Scroll to reveal the rest.
   --header-h is measured by js/main.js; 80px is the fallback. */
/* ---------- Hero intro: the wordmark draws itself, then the depth layers fade in ----------
   js/main.js adds .go to .hero when the page loads; --px/--py come from the mouse (-1..1). */
.hero .giant { position: relative; isolation: isolate; --px: 0; --py: 0; }
.giant-mark { position: relative; z-index: 1; pointer-events: none; } /* clicks pass through to the pieces behind */
.hero {
  --ease-draw: cubic-bezier(.76, 0, .24, 1);   /* strokes: slow start, fast middle, gentle settle */
  --ease-c: cubic-bezier(.45, 0, .1, 1);       /* the C: soft start, long gliding finish */
  --ease-soft: cubic-bezier(.16, 1, .3, 1);    /* layers fading in */
  --layers-at: 1.9s;                           /* when the layers start: just as the drawing is settling */
}
/* drawing */
.giant-mark .dv, .giant-mark .dh { transform-box: fill-box; }
.giant-mark .dv { transform-origin: 50% 0; transform: scaleY(0); }
.giant-mark .dh { transform-origin: 0 50%; transform: scaleX(0); }
.giant-mark .cmask { stroke-dasharray: 1; stroke-dashoffset: 1; }
.giant-mark path[mask] { transform-box: fill-box; transform-origin: 50% 50%; }
.hero.go .giant-mark .dv, .hero.go .giant-mark .dh { animation: draw-grow 1.6s var(--ease-draw) calc(.2s + var(--k) * .12s) forwards; }
.hero.go .giant-mark .cmask { animation: draw-stroke 2.3s var(--ease-c) .6s forwards; }
.hero.go .giant-mark path[mask] { animation: draw-settle 3.2s cubic-bezier(.22, 1, .36, 1) .6s both; }
@keyframes draw-grow { to { transform: none; } }
@keyframes draw-stroke { to { stroke-dashoffset: 0; } }
@keyframes draw-settle { from { transform: scale(1.035) rotate(-2deg); } to { transform: none; } }
/* depth layers */
.hero-layers {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden; /* nothing spills outside the hero, even while the layers move with the mouse */
  /* fade the pieces into the page background at the top and bottom of the hero */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.hero-layers .layer {
  position: absolute; opacity: var(--o); filter: blur(var(--blur));
  transform: translate(calc(var(--px) * var(--z) * var(--move-x, 60px)), calc(var(--py) * var(--z) * var(--move-y, 40px)));
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.hero-layers .appear { opacity: 0; transform: translateY(24px) scale(.97); filter: blur(10px); }
.hero.go .hero-layers .appear { animation: layer-in 1.8s var(--ease-soft) calc(var(--layers-at) + var(--n) * .08s) forwards; } /* more pieces now, so a shorter stagger */
@keyframes layer-in { to { opacity: 1; transform: none; filter: blur(0); } }
.hl { position: relative; overflow: hidden; animation: layer-float var(--f, 14s) ease-in-out infinite alternate; }
.hl img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.hl--forest { background: var(--forest); } .hl--ink { background: var(--ink); } .hl--sage { background: var(--sage); }
.hl--wide { aspect-ratio: 400 / 260; } .hl--square { aspect-ratio: 1; } .hl--portrait { aspect-ratio: 3 / 4; }
.hl--round { aspect-ratio: 1; border-radius: 24%; }
.hl--circle { aspect-ratio: 1; border-radius: 50%; } .hl--circle img { inset: 20%; width: 60%; height: 60%; }
/* pieces are buttons: hovering brings one up out of the haze */
button.hl { display: block; width: 100%; padding: 0; border: 0; cursor: pointer; pointer-events: auto; font: inherit; }
.hero-layers .layer { transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .35s ease, filter .35s ease; }
.hero-layers .layer:hover, .hero-layers .layer:focus-within { opacity: min(1, calc(var(--o) + .45)); filter: blur(0); z-index: 20 !important; }
button.hl:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* detail view: just the artwork, large and centred, with a caption in its corner */
.piece-dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; overflow: visible; color: var(--on-forest); }
.piece-dialog::backdrop { background: rgba(238, 235, 227, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pd-art {
  --tone: var(--forest); --text: var(--on-forest);
  position: relative; overflow: hidden;
  width: min(84vw, 980px, calc(78dvh * 400 / 260)); aspect-ratio: 400 / 260;
  background: var(--tone); color: var(--text);
  box-shadow: 0 30px 80px rgba(31, 42, 34, .25);
}
.pd-art--ink { --tone: var(--ink); }
.pd-art--sage { --tone: var(--sage); --text: var(--ink); }
.pd-art img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; display: block; }
.pd-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; justify-items: start; gap: 6px;
  padding: clamp(40px, 7%, 72px) clamp(16px, 3.5%, 32px) clamp(14px, 3%, 28px);
  /* soft fade of the tile colour behind the text so it stays readable over the artwork */
  background: linear-gradient(to top, var(--tone) 45%, transparent);
}
.pd-caption h2 { font-weight: 500; font-size: clamp(22px, 3vw, 38px); line-height: 1.05; letter-spacing: -.01em; }
.pd-sub { font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.pd-more {
  margin-top: 8px; font: 500 12px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  padding: 13px 18px; background: var(--text); color: var(--tone); transition: opacity .2s;
}
.pd-more:hover { opacity: .85; }
.pd-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; cursor: pointer;
  background: var(--text); color: var(--tone); font-size: 24px; line-height: 1;
}
.pd-close:hover { opacity: .85; }
.pd-fly { position: fixed; z-index: 5; margin: 0; pointer-events: none; }
/* caption and × stay hidden until the image has fully arrived (js adds .ready) */
.pd-art .pd-caption, .pd-art .pd-close { opacity: 0; visibility: hidden; transition: opacity .45s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1), visibility 0s .45s; }
.pd-art .pd-caption { transform: translateY(10px); }
.pd-art.ready .pd-caption, .pd-art.ready .pd-close { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (max-width: 560px) { .pd-art { width: calc(100vw - 24px); } .pd-caption { padding-top: 32px; } }

@keyframes layer-float { from { transform: translateY(-8px); } to { transform: translateY(8px); } }
@media (max-width: 700px) { .hero-layers .layer { --o: .13 !important; --move-x: 20px; --move-y: 14px; } }
@media (prefers-reduced-motion: reduce) {
  .giant-mark .dv, .giant-mark .dh { transform: none; } .giant-mark .cmask { stroke-dashoffset: 0; }
  .hero-layers .appear { opacity: 1; transform: none; filter: none; }
  .hero.go .giant-mark *, .hero.go .hero-layers .appear, .hl { animation: none !important; }
  .hero-layers .layer { transition: none; }
}
@media (prefers-reduced-motion: reduce) { .reel-track, .reel-card { animation: none; } }

.hero .giant {
  min-height: calc(100vh - var(--header-h, 80px) - var(--band-peek));
  min-height: calc(100svh - var(--header-h, 80px) - var(--band-peek));
  display: flex;
  flex-direction: column;
  justify-content: center; /* wordmark sits in the middle of the screen */
  padding-block: clamp(20px, 4vh, var(--hero-space));
}
.desc-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.desc-grid > div { position: relative; display: grid; gap: 4px; align-content: start; padding: 32px 28px 36px; }
/* Column dividers are inset from the top so the strip of green peeking into the first screen stays solid. */
.desc-grid > div + div::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 28px; border-left: 1px solid rgba(241, 238, 228, .28); }
.desc-grid > div:first-child { padding-left: 0; }
.desc-k { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; opacity: .7; margin-bottom: 6px; }
.desc-grid strong { font-weight: 500; font-size: clamp(30px, 4vw, 56px); line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; margin-bottom: 6px; }
.desc-v { font-size: 14px; opacity: .85; }

/* ---------- Section heading ---------- */
/* Section titles are hidden (kept for screen readers); only the dividing rule shows. */
.section-head {
  border-top: var(--rule);
  margin-bottom: var(--section-space);
}

/* ---------- Work ---------- */
.work { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.work-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 32px 20px; }
.project { grid-column: span 3; display: grid; gap: 10px; align-content: start; }
/* Row rhythm: 4+2, 2+4, 3+3 */
.project:nth-child(1), .project:nth-child(4) { grid-column: span 4; }
.project:nth-child(2), .project:nth-child(3) { grid-column: span 2; }

.project .tile {
  background: var(--forest);
  padding: 18px;
  height: clamp(220px, 26vw, 400px);
}
.project:nth-child(2) .tile, .project:nth-child(4) .tile { background: var(--ink); }
.project:nth-child(3) .tile, .project:nth-child(6) .tile { background: var(--sage); }
.project .tile img { width: 100%; height: 100%; object-fit: contain; }

.project .meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project h3 { font-weight: 500; font-size: 22px; line-height: 1.2; }
.project p { font-size: 14.5px; color: var(--muted); max-width: 52ch; }
.project a { text-decoration: none; }
.project a:hover h3 { color: var(--forest); }

/* ---------- Services ---------- */
.services { padding-bottom: var(--section-space); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 56px; }
.service { position: relative; display: grid; gap: 12px; align-content: start; }
/* Divider lines sit in the middle of the gap, so all three columns are exactly the same width. */
.service + .service::before { content: ""; position: absolute; left: -28px; top: 0; bottom: 0; border-left: var(--rule); }
.service-art { margin: 0 0 12px; padding: 18px; height: clamp(180px, 17vw, 260px); }
.service-art img { width: 100%; height: 100%; object-fit: contain; }
.service-art--design { background: var(--ink); }
.service-art--web { background: var(--sage); }
.service-art--software { background: var(--forest); }
.service h3 { font-weight: 500; font-size: 24px; line-height: 1.1; }
.service p { color: var(--muted); font-size: 15px; }
.service li { padding-block: 9px; border-top: 1px solid rgba(31, 42, 34, .18); font-size: 14px; }
.service li:last-child { padding-bottom: 0; }

/* ---------- Contact ---------- */
.contact { padding-block: var(--section-space); }
.contact h2 { font-weight: 500; line-height: 1.02; letter-spacing: -.02em; margin-top: 16px; }
.contact-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.copy-btn {
  font: 500 11px/1 var(--font);
  letter-spacing: .2em;
  text-transform: uppercase;
  border: 0;
  padding: 11px 16px;
  cursor: pointer;
}

/* Shared form layout */
/* Six-column form grid: Name + Email share a row, Company + Budget + Timeline share the next. */
.contact-form { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px 24px; }
.contact-form .field { grid-column: span 3; }
.contact-form .field--third { grid-column: span 2; }
.contact-form .field { display: grid; gap: 8px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.contact-form .field--full, .contact-form .form-foot { grid-column: 1 / -1; }
.contact-form label, .contact-form legend {
  font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; padding: 0;
}
.contact-form legend { margin-bottom: 10px; }
.contact-form .opt { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .7; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea {
  width: 100%; font: 400 16px/1.4 var(--font); color: inherit; border-radius: 0; -webkit-appearance: none; appearance: none;
}
.contact-form textarea { resize: vertical; min-height: 96px; }
.contact-form select { cursor: pointer; background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; font-size: 14px !important; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; transition: background-color .15s, color .15s, border-color .15s; }
.field-error { min-height: 0; font-size: 13px; margin: 0; }
.field-error:empty { display: none; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.send-btn { font: 500 12px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; border: 0; padding: 17px 26px; cursor: pointer; transition: background-color .2s, color .2s; }
.form-status { font-size: 14px; margin: 0; max-width: 48ch; }

/* Design A: split layout on the forest band */
.contact--a { background: var(--forest); color: var(--on-forest); }
.contact--a .label { color: var(--on-forest); opacity: .75; }
/* Both columns stretch to the same height; the email row sits at the bottom of the left column so it isn't left empty. */
.contact-a-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: stretch; }
.contact-intro { display: flex; flex-direction: column; }
.contact--a h2 { font-size: clamp(44px, 6.2vw, 100px); }
.contact-intro p { margin-top: 24px; max-width: 34ch; font-size: 17px; opacity: .9; }
.contact--a .contact-row { margin-top: auto; padding-top: 32px; }
.contact--a .contact-row a { font-size: clamp(17px, 1.6vw, 21px); text-decoration: none; border-bottom: 1.5px solid currentColor; }
.contact--a .copy-btn, .contact-details .copy-btn { background: var(--on-forest); color: var(--forest); }
.contact--a .copy-btn:hover { background: #FFFFFF; }
.contact--a input[type="text"], .contact--a input[type="email"], .contact--a select, .contact--a textarea {
  background-color: transparent; border: 0; border-bottom: 1.5px solid rgba(241, 238, 228, .5); padding: 10px 0;
}
.contact--a textarea { border: 1.5px solid rgba(241, 238, 228, .5); padding: 12px; }
.contact--a select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23F1EEE4' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right 2px center; }
.contact--a select option { color: var(--ink); }
.contact--a input:focus, .contact--a select:focus, .contact--a textarea:focus { outline: none; border-color: var(--on-forest); box-shadow: 0 1.5px 0 var(--on-forest); }
.contact--a textarea:focus { box-shadow: inset 0 0 0 1px var(--on-forest); }
.contact--a .chip span { border: 1.5px solid rgba(241, 238, 228, .55); }
.contact--a .chip:hover span { border-color: var(--on-forest); }
.contact--a .chip input:checked + span { background: var(--on-forest); color: var(--forest); border-color: var(--on-forest); }
.contact--a .chip input:focus-visible + span { outline: 2px solid var(--on-forest); outline-offset: 3px; }
.contact--a .send-btn { background: var(--on-forest); color: var(--forest); }
.contact--a .send-btn:hover { background: #FFFFFF; }
.contact--a .field-error { color: #F4C9BD; }
.contact--a :focus-visible { outline-color: var(--on-forest); }

/* Design B: form card and details column on the page background */
.contact--b { background: var(--bg); color: var(--ink); border-top: var(--rule); }
.contact-b-head { margin-bottom: clamp(32px, 4vw, 56px); }
.contact-b-head h2 { margin-top: 0; } /* no label above it any more */
.contact--b h2 { font-size: clamp(40px, 6.6vw, 104px); }
.contact-b-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.card-form { background: #FBF8F4; border: var(--rule); padding: clamp(20px, 3vw, 40px); }
.contact--b input[type="text"], .contact--b input[type="email"], .contact--b select, .contact--b textarea {
  background-color: #FFFFFF; border: 1.5px solid var(--ink); padding: 12px 14px;
}
.contact--b select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231F2A22' stroke-width='1.5'/%3E%3C/svg%3E"); }
.contact--b input:focus, .contact--b select:focus, .contact--b textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(52, 68, 58, .2); }
.contact--b .chip span { border: 1.5px solid var(--ink); background: #FFFFFF; }
.contact--b .chip:hover span { border-color: var(--forest); }
.contact--b .chip input:checked + span { background: var(--forest); color: var(--on-forest); border-color: var(--forest); }
.contact--b .chip input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 3px; }
.contact--b .send-btn { background: var(--forest); color: var(--on-forest); }
.contact--b .send-btn:hover { background: var(--ink); }
.contact--b .field-error { color: #8A2E1F; }
.contact-details dl { margin: 0; border-top: var(--rule); }
.contact-details dl > div { display: grid; gap: 4px; padding-block: 16px; border-bottom: 1px solid rgba(31, 42, 34, .2); }
.contact-details dt { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--forest); }
.contact-details dd { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 16px; }
.contact-details dd a { text-decoration: none; border-bottom: 1.5px solid var(--forest); word-break: break-all; }
.contact-details .copy-btn { background: var(--ink); color: var(--on-forest); padding: 8px 12px; }
.contact-details p { margin-top: 20px; font-size: 15px; color: var(--muted); max-width: 32ch; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 3px rgba(52, 68, 58, .2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-forest); }
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 28px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.site-footer .logo { width: 84px; height: auto; display: block; }
.footer-brand { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; } /* logo + copyright on the left, social icons on the right */
.site-footer ul { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-footer a { text-decoration: none; opacity: .8; transition: opacity .2s; }
.site-footer a:hover, .site-footer a:focus-visible { opacity: 1; }
.site-footer ul a { display: grid; place-items: center; width: 36px; height: 36px; } /* comfortable tap target around each icon */
.social-icon { width: 20px; height: 20px; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .contact-a-grid, .contact-b-grid { grid-template-columns: 1fr; }
  .desc-grid { grid-template-columns: 1fr; }
  .desc-grid > div { border-left: 0; padding: 24px 0; border-top: 1px solid rgba(241, 238, 228, .28); }
  .desc-grid > div:first-child { border-top: 0; }
  .desc-grid > div + div::before { display: none; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .project, .project:nth-child(n) { grid-column: span 1; }
  .project .tile { height: clamp(180px, 34vw, 300px); }
  .service-grid { grid-template-columns: 1fr; gap: 28px; }
  .service { border-left: 0; padding: 20px 0 0; border-top: var(--rule); }
  .service:first-child { border-top: 0; padding-top: 0; } /* the section divider already sits above it */
  .service + .service::before { display: none; }
}
@media (max-width: 560px) {
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .field, .contact-form .field--third { grid-column: 1 / -1; }
  .work-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Custom cursor (mouse and trackpad only; touch screens keep the normal behaviour) ----------
   A small dot follows the pointer exactly and a thin ring trails behind it. White + "difference" blending
   makes them show as dark on the light page and light on the dark sections automatically. */
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: auto !important; } /* keep the normal text cursor in form fields */
.cursor-dot, .cursor-ring {
  position: fixed; left: 0; top: 0; z-index: 2147483647; pointer-events: none;
  mix-blend-mode: difference; opacity: 0; transition: opacity .25s ease;
}
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid #fff;
  display: grid; place-items: center;
  transition: opacity .25s ease, width .35s cubic-bezier(.16, 1, .3, 1), height .35s cubic-bezier(.16, 1, .3, 1),
              margin .35s cubic-bezier(.16, 1, .3, 1), background-color .3s ease, border-width .3s ease;
}
.cursor-label { font: 500 10px/1 var(--font); letter-spacing: .22em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity .2s ease; }
html.cursor-visible .cursor-dot, html.cursor-visible .cursor-ring { opacity: 1; }
/* over links and buttons: the ring opens up */
html.cursor-link .cursor-ring { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
/* over a piece in the hero: a filled disc that says "View" */
html.cursor-view .cursor-ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: #fff; border-width: 0; }
html.cursor-view .cursor-label { opacity: 1; color: #000; }
html.cursor-view .cursor-dot { opacity: 0; }
/* pressing: the ring tightens */
html.cursor-down .cursor-ring { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
/* in form fields the custom cursor steps aside for the normal text cursor */
html.cursor-text .cursor-dot, html.cursor-text .cursor-ring { opacity: 0 !important; }
