/* ADDLUX SURFACES · one-page site
   Palette taken from the real jobs (pale stone microcement) and the copper logo.
   One accent hue: copper. All corners sharp. One typeface: Outfit (self-hosted, OFL). */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-var.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #EAE9E5;          /* pale stone */
  --bg-2: #DCDAD4;        /* deeper stone band */
  --ink: #1C1D1F;         /* off-black */
  --ink-2: #4A4C50;       /* secondary text: 7:1 on --bg, 6.2:1 on --bg-2 */
  --rule: #C3C0B9;
  --copper: #894F24;      /* accent for text and fills: 5.3:1 on --bg, 4.7:1 on --bg-2 */
  --copper-line: #B06A33; /* accent for thin lines and marks only, never text */
  --paper: #F6F5F2;

  --header-h: 68px;
  --pad: clamp(16px, 4vw, 40px);
  --max: clamp(1240px, 84vw, 1800px); /* fixed up to ~1480px wide screens, then grows with the screen */
  --section: clamp(72px, 10vw, 140px);
  --label-track: 0.06em;  /* small labels echo the wide-spaced logo */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video, canvas { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--pad); top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

h2 {
  font-weight: 300;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
h3 { font-weight: 500; font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.005em; }
.meta { color: var(--ink-2); font-size: 0.95rem; letter-spacing: var(--label-track); }

.arr { display: inline-block; width: 1.15em; height: 0.7em; vertical-align: 0.05em; color: var(--copper); overflow: visible; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(234, 233, 229, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-row { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; color: var(--ink); flex-shrink: 0; }
.wordmark { width: 118px; height: 35px; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 30px; }
.nav a {
  text-decoration: none; font-size: 0.95rem; color: var(--ink-2);
  padding-block: 6px; background: linear-gradient(var(--copper-line), var(--copper-line)) 0 100% / 0 1px no-repeat;
  transition: background-size .25s ease, color .2s;
}
.nav a:hover { color: var(--ink); background-size: 100% 1px; }
.nav-cta { display: none; }

/* header CTA: hairline box that fills with copper */
.cta-header {
  flex-shrink: 0; text-decoration: none; font-size: 0.9rem; font-weight: 500;
  padding: 9px 16px; border: 1px solid var(--ink); color: var(--ink);
  transition: background-color .2s, color .2s, border-color .2s;
}
.cta-header:hover { background: var(--copper); border-color: var(--copper); color: var(--paper); }
.cta-header:active { transform: scale(0.98); }

.menu-btn {
  display: none; font: inherit; font-size: 0.95rem; color: var(--ink);
  background: none; border: 0; padding: 10px 2px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}

/* ---------- 01 hero: split, real photo right ---------- */
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px);
  align-items: end;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  padding-block: clamp(28px, 4vw, 48px);
}
.hero-copy { padding-bottom: clamp(8px, 4vh, 56px); container-type: inline-size; }
.hero h1 {
  font-weight: 300;
  font-size: min(12.5cqi, 5.5rem); /* one line: the headline is ~7.6em wide, so 12.5% of the column leaves ~5% spare */
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero-sub { margin-top: 28px; max-width: 34ch; font-size: 1.15rem; color: var(--ink-2); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }

/* hero primary: solid block, copper bar grows underneath on hover */
.cta-primary {
  position: relative; display: inline-block; text-decoration: none;
  background: var(--ink); color: var(--paper);
  font-weight: 500; padding: 16px 26px;
  transition: transform .15s;
}
.cta-primary::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 3px; width: 0;
  background: var(--copper-line); transition: width .3s ease;
}
.cta-primary:hover::after { width: 100%; }
.cta-primary:active { transform: translateY(1px); }

/* hero secondary: text with an arrow that slides */
.cta-link { text-decoration: none; font-weight: 500; color: var(--ink); padding-block: 8px; }
.cta-link .arr { margin-left: 6px; transition: transform .2s ease; }
.cta-link:hover .arr { transform: translateX(5px); }

.hero-media { align-self: stretch; max-height: calc(100vh - var(--header-h) - 56px); max-height: calc(100dvh - var(--header-h) - 56px); }
.hero-media picture { display: block; }
.hero-media picture, .hero-media img { height: 100%; width: 100%; }
.hero-media img { object-fit: cover; object-position: 50% 50%; }

/* ---------- 02 services: sticky photo + ruled list ---------- */
.services { padding-block: var(--section); }
.services-grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.services-media { position: sticky; top: calc(var(--header-h) + 32px); }
.services-body h2 { margin-bottom: clamp(28px, 4vw, 48px); }
.service-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 4vw, 56px); }
.service-list li { border-top: 1px solid var(--rule); padding: 20px 0 24px; }
.service-list p { margin-top: 6px; color: var(--ink-2); font-size: 1rem; }
.services-body { container-type: inline-size; }
/* one line wherever it fits at 15px or more: the line is ~43.5em long, so 2.2% of the column leaves ~4% spare */
.colours {
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink); color: var(--ink-2);
  font-size: max(15px, min(1.0625rem, 2.2cqi)); text-wrap: balance;
}

/* ---------- 03 why: statement band ---------- */
.why { background: var(--bg-2); padding-block: var(--section); }
/* the two stone bands (Why microcement and Contact) get a fine, seamless microcement texture laid over their colour;
   opacity sets how strong it is */
.why, .contact { position: relative; isolation: isolate; }
.why::before, .contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: #f4f4f4; /* plain fill at the old texture's average colour; the texture's source could not be named */
  mix-blend-mode: multiply; opacity: 0.35;
}
.why h2 { font-size: clamp(1.1rem, 1.6vw, 1.25rem); font-weight: 500; letter-spacing: 0; }
.statement {
  margin-top: 22px; max-width: 22ch;
  font-weight: 300; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.08; letter-spacing: -0.025em;
}
.why-points {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px clamp(20px, 3vw, 40px);
}
.why-points li { padding-top: 18px; position: relative; }
.why-points li::before { content: ""; position: absolute; top: 0; left: 0; width: 36px; height: 2px; background: var(--copper-line); }
.why-points p { margin-top: 6px; color: var(--ink-2); font-size: 1rem; max-width: 15em; text-wrap: balance; }
/* Every point on two even lines, so the short one doesn't leave a hole. Where all four fit on one line (they need
   ~1290px plus the gaps), size the columns to their text and share the space between them equally instead. */
.why .wrap { container: why / inline-size; }
@container why (min-width: 1440px) {
  .why-points { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .why-points p { max-width: none; }
}

/* ---------- 04 projects ---------- */
.projects { padding-top: var(--section); }
#projects-title { margin-bottom: clamp(20px, 2.6vw, 32px); }
.scrub-head h3, .sequence-head h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 400; letter-spacing: -0.015em; }
.scrub-head .meta, .sequence-head .meta { margin-top: 4px; }
.scrub-head > p:not(.meta), .sequence-head > p:not(.meta) { color: var(--ink-2); max-width: 46ch; }
.scrub-head > p:not(.meta) { margin-top: 18px; }
/* Project 2's text sits top right, on the title's baseline (stacked again below 960px) */
.sequence-head { display: flex; justify-content: space-between; align-items: baseline; column-gap: 48px; }

/* "Recent work" and Project 1 sit in one block. With motion (JS adds .is-motion to .scrub-pin) the block pins just
   below the header, the text left and the photo right, while scrolling plays the build; the pin's ::after is the
   scroll that plays it (--travel). Without motion it all scrolls and the still pair shows under the text.
   The photo is 55% of the screen tall (less on short screens, so the title still fits above it) unless that leaves the
   text column under 22rem. 100cqi is the width of .scrub-layout. */
.scrub-pin {
  --vh: 1vh; --travel: calc(90 * var(--vh)); --gap: clamp(32px, 4vw, 64px);
  --frame-h-max: min(55 * var(--vh), 100 * var(--vh) - 300px);
}
@supports (height: 100dvh) { .scrub-pin { --vh: 1dvh; } }
.scrub-layout { container-type: inline-size; }
.scrub-layout > * { --frame-w: min(100cqi - 22rem - var(--gap), 960px, calc(var(--frame-h-max) * 720 / 614)); }
.scrub-head { margin-bottom: clamp(20px, 3vw, 36px); }
.scrub-stage { display: none; }
.scrub-pin.is-motion::after { content: ""; display: block; height: var(--travel); }
.scrub-pin.is-motion .scrub-stick { position: sticky; top: calc(var(--header-h) + clamp(16px, 2.5vh, 32px)); }
.scrub-pin.is-motion .scrub-pair { display: none; }
.scrub-pin.is-motion .scrub-layout {
  display: grid; align-items: start; column-gap: var(--gap);
  grid-template-columns: minmax(0, 1fr) min(100% - 22rem - var(--gap), 960px, calc(var(--frame-h-max) * 720 / 614));
}
.scrub-pin.is-motion .scrub-head { margin-bottom: 0; }
.scrub-pin.is-motion .scrub-stage { display: grid; justify-items: center; gap: 14px; }
.scrub-frame { position: relative; width: var(--frame-w); aspect-ratio: 720 / 614; background: var(--bg-2); }
.scrub-poster, .scrub-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrub-canvas { opacity: 0; }
.scrub.is-live .scrub-canvas { opacity: 1; }
.scrub-controls { width: max(var(--frame-w), min(100%, 420px)); } /* never too narrow for the three labels */

.stages { display: flex; border-top: 1px solid var(--rule); padding-inline: 8px; } /* 8px = half the range thumb, so tab edges line up with the thumb centre */
.stages li {
  flex: 1 1 0; min-width: 0; padding-top: 10px; font-size: 0.9rem; color: var(--ink-2); letter-spacing: var(--label-track);
  border-top: 2px solid transparent; margin-top: -1px; transition: color .2s, border-color .2s; white-space: nowrap;
}
.stages li + li { padding-left: 10px; }
.stages li.is-on { color: var(--ink); border-top-color: var(--copper-line); font-weight: 500; }

.scrub-range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; margin: 10px 0 0;
  background: transparent; height: 28px; cursor: grab;
}
.scrub-range:active { cursor: grabbing; }
.scrub-range::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
.scrub-range::-moz-range-track { height: 1px; background: var(--ink); }
.scrub-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -7.5px;
  background: var(--copper); border: 0; border-radius: 0;
}
.scrub-range::-moz-range-thumb { width: 16px; height: 16px; background: var(--copper); border: 0; border-radius: 0; }

.scrub-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 20px); }
.scrub-pair img { width: 100%; aspect-ratio: 720 / 614; object-fit: cover; }
.scrub-pair figcaption, .sequence-row figcaption {
  margin-top: 12px; font-size: 0.95rem; color: var(--ink-2); letter-spacing: var(--label-track);
}

/* Project 2: four-step photo row */
.sequence { padding-block: clamp(48px, 7vw, 96px) var(--section); }
.sequence-row {
  margin: clamp(28px, 4vw, 48px) auto 0; max-width: var(--max); padding-inline: var(--pad);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 20px);
}
.sequence-row:focus-visible { outline-offset: -2px; }
.sequence-row img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; max-height: 23rem; } /* cap: the row doesn't grow on wide screens */

/* ---------- 05 about: centred statement + process loop (side by side; stacked on phones) ---------- */
.about { padding-block: var(--section); border-top: 1px solid var(--rule); }
.about-col { max-width: 760px; text-align: center; }
.about h2 { margin-bottom: 28px; }
.about-col > p { color: var(--ink-2); margin-inline: auto; font-size: 1.1rem; text-wrap: balance; }
.about-col > .about-line {
  margin-top: 28px; color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 400;
}
.loop { margin-top: clamp(40px, 6vw, 64px); }
.loop-frame { position: relative; width: min(100%, 1188px); margin-inline: auto; } /* 3/4 of the clip's 1584px, so it stays sharp */
.loop-video { width: 100%; object-fit: cover; background: var(--ink); }
.loop-video--wide { aspect-ratio: 9 / 2; } /* three 3:2 panels side by side */
.loop-video--tall { display: none; aspect-ratio: 9 / 16; }
.loop figcaption { margin-top: 14px; font-size: 0.95rem; color: var(--ink-2); text-align: center; }
/* pause / play: a small square button on the clip's corner */
.loop-toggle {
  position: absolute; right: 10px; bottom: 10px;
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; background: rgba(28, 29, 31, 0.6); color: var(--paper); cursor: pointer;
  transition: background-color .2s;
}
.loop-toggle:hover { background: var(--copper); }
.loop-toggle svg { width: 14px; height: 14px; }
.loop-toggle .i-play, .loop-toggle.is-paused .i-pause { display: none; }
.loop-toggle.is-paused .i-play { display: block; }

/* ---------- 06 contact: large tap rows ---------- */
.contact { background: var(--bg-2); padding-block: var(--section); }
.contact .wrap { container-type: inline-size; }
.contact h2 { font-size: min(clamp(2.4rem, 6vw, 4.8rem), 9.4cqi); } /* one line: the heading is ~10.2em wide */
.contact-sub { margin-top: 20px; color: var(--ink-2); font-size: 1.1rem; } /* one line from tablet up */
.contact-rows { margin-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--ink); }
.contact-rows li { border-bottom: 1px solid var(--rule); }
.contact-row {
  display: grid; grid-template-columns: 9rem 1fr auto; align-items: baseline; gap: 16px;
  padding: clamp(18px, 2.6vw, 28px) 0; text-decoration: none;
}
.row-label { font-size: 0.95rem; color: var(--ink-2); letter-spacing: var(--label-track); }
.row-value { font-size: clamp(1.125rem, 1.7vw, 1.5rem); font-weight: 300; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.row-arrow { width: 24px; height: 15px; transition: transform .2s ease; }
a.contact-row:hover .row-value { color: var(--copper); }
a.contact-row:hover .row-arrow { transform: translateX(6px); }
a.contact-row:active { transform: translateY(1px); }

/* ---------- footer ---------- */
.site-footer { padding-block: 40px 48px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark--footer { width: 150px; height: 45px; color: var(--ink); }
.site-footer p { font-size: 0.9rem; color: var(--ink-2); }
.ig { display: inline-block; width: 1.15em; height: 1.15em; margin-right: 0.35em; vertical-align: -0.22em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--copper); }

/* ---------- tablet ---------- */
@media (max-width: 959px) {
  /* hero: copy on top, the photo fills what is left of the first screen */
  .hero-grid {
    grid-template-columns: 1fr; grid-template-rows: auto minmax(160px, 1fr); align-items: stretch;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    gap: 24px; padding-block: 24px;
  }
  .hero-copy { padding-bottom: 0; }
  .hero h1 { font-size: min(12.5cqi, 3.8rem); }
  /* the photo fills exactly the row that is left, it never sets the row's height */
  .hero-media { min-height: 0; max-height: none; position: relative; }
  .hero-media picture { position: absolute; inset: 0; height: 100%; }
  .hero-media img { height: 100%; aspect-ratio: auto; }

  .services-grid { grid-template-columns: 1fr; }
  .services-media { position: static; max-width: 420px; }
  .services-media img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; width: 100%; } /* keeps the head and trowel in */

  .why-points { grid-template-columns: 1fr 1fr; }

  .sequence-head { display: block; }
  .sequence-head > p:not(.meta) { margin-top: 18px; }

  /* scrub: no pin, the text above the photo; the frames advance as the photo crosses the screen */
  .scrub-pin.is-motion::after { content: none; }
  .scrub-pin.is-motion .scrub-stick { position: static; }
  .scrub-pin.is-motion .scrub-layout { display: block; }
  .scrub-pin.is-motion .scrub-head { margin-bottom: clamp(20px, 3vw, 36px); }
  .scrub-layout > * { --frame-w: min(100cqi, calc((100vh - var(--header-h) - 160px) * 720 / 614)); }
  @supports (height: 100svh) {
    .scrub-layout > * { --frame-w: min(100cqi, calc((100svh - var(--header-h) - 160px) * 720 / 614)); }
  }

  .sequence-row {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    scroll-padding-inline: var(--pad); padding-bottom: 8px; scrollbar-width: thin;
  }
  .sequence-row li { flex: 0 0 min(72vw, 340px); scroll-snap-align: start; }
  .sequence-row img { max-height: none; }
}

/* ---------- phone ---------- */
@media (max-width: 719px) {
  :root { --header-h: 60px; }
  .header-row { gap: 12px; }
  .wordmark { width: 100px; height: 30px; }
  .menu-btn { display: block; margin-left: auto; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule);
    display: none; margin-left: 0;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--pad) 16px; }
  .nav a { display: block; padding: 12px 0; font-size: 1.1rem; color: var(--ink); background: none; }
  .cta-header { padding: 7px 10px; font-size: 0.82rem; flex-shrink: 1; min-width: 0; text-align: center; }

  .hero-sub { margin-top: 16px; font-size: 1.05rem; }
  .hero-actions { margin-top: 22px; column-gap: 24px; }

  .service-list { grid-template-columns: 1fr; }
  .loop-frame { width: min(300px, 72vw); }
  .loop-video--wide { display: none; }
  .loop-video--tall { display: block; }
  .stages li { font-size: 0.8rem; }
  .stages li + li { padding-left: 6px; }
  .contact-row { grid-template-columns: 1fr auto; row-gap: 2px; }
  .row-label { grid-column: 1 / -1; }
}

@media (max-width: 340px) {
  .cta-header { display: none; }
  .nav-cta { display: block; }
  .nav-cta a { color: var(--copper); }
}

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