/* Aflah Group website styles */

/* Archivo (SIL Open Font License, see fonts/OFL-LICENSE.txt), self-hosted with its width and weight axes */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Layout: a 12-column, left-aligned grid with square corners and no shadows.
     Colours come straight from the Aflah Group logo: deep navy and line gold. */
  --navy: #012032;          /* logo background */
  --navy-deep: #00182A;     /* footer */
  --navy-raised: #0A2B42;   /* panels on navy */
  --gold: #CFBB86;          /* logo lines */
  --gold-glint: #FFF3D2;    /* light running along the gold */
  --gold-ink: #7E6A39;      /* gold dark enough to read on white */
  --mist: #F2F4F6;          /* light sections */
  --paper: #FFFFFF;
  --ink: #012032;           /* text on light */
  --muted: #4E6274;         /* secondary text on light */
  --line: #D3DAE0;          /* hairlines on light */
  --on-dark: #E9EEF2;
  --on-dark-muted: #9FB1C0;
  --line-dark: rgba(233, 238, 242, .14);

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --gap: clamp(16px, 2.2vw, 32px);
  --section: clamp(80px, 10vw, 150px);
  --header-h: 80px;
  --ease: cubic-bezier(.22, .8, .16, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); background: var(--navy); }
html.lock { overflow: hidden; }
body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 620; line-height: 1.06; letter-spacing: -.018em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 1.2rem + 2.5vw, 3.4rem); font-stretch: 116%; letter-spacing: -.026em; }
h3 { font-size: 1.25rem; font-stretch: 108%; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--navy); padding: 10px 14px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 26px;
  background: var(--navy); color: #fff; border: 0; border-radius: 0; cursor: pointer;
  font: 600 1rem/1.2 var(--font); font-stretch: 108%; text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}
.btn:hover { background: var(--gold); color: var(--navy); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-glint); color: var(--navy); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--navy); color: #fff; }
.text-link {
  font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--gold-ink); text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.text-link:hover { text-decoration-color: currentColor; }
.on-dark .text-link, .text-link.on-dark { text-decoration-color: var(--gold); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--navy); color: var(--on-dark);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.brand-mark { width: 38px; height: auto; overflow: visible; }
.brand-mark path { fill: none; stroke: var(--gold); stroke-width: 12.4; stroke-linejoin: miter; stroke-miterlimit: 10; stroke-linecap: round; }
.brand-word { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.1vw, 34px); }
.nav a { font-size: .95rem; font-weight: 500; text-decoration: none; color: var(--on-dark); }
.nav a:not(.nav-phone):hover { color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.nav-phone { font-weight: 600 !important; font-stretch: 106%; padding: 10px 16px; color: var(--gold) !important; box-shadow: inset 0 0 0 1.5px var(--gold); font-variant-numeric: tabular-nums; transition: background-color .25s ease, color .25s ease; }
.nav-phone:hover { background: var(--gold); color: var(--navy) !important; }
.menu-btn { display: none; }

/* Hero */
.hero {
  --slope: .12;
  --d: calc(100vw * var(--slope));
  --band: clamp(88px, 10vw, 156px);
  --seam: clamp(5px, .6vw, 9px);
  --lip: clamp(3px, .32vw, 5px);
  padding-top: clamp(36px, 6vw, 92px);
  overflow: hidden;
  background: var(--navy); color: var(--on-dark);
}
.hero-grid { align-items: end; }
.hero h1 {
  grid-column: 1 / 9;
  color: #fff;
  font-size: clamp(2.7rem, .55rem + 5.2vw, 6rem);
  font-stretch: 125%;
  font-weight: 640;
  line-height: .96;
  letter-spacing: -.038em;
}
.hero-side {
  grid-column: 9 / 13;
  display: grid; gap: 26px; justify-items: start;
  margin-bottom: calc(var(--d) * -.62);
}
.lead { font-size: clamp(1.0625rem, .95rem + .4vw, 1.25rem); line-height: 1.55; max-width: 34ch; color: var(--on-dark-muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.hero-actions .text-link { color: #fff; text-decoration-color: var(--gold); }

.strata {
  position: relative;
  height: calc(3 * var(--band) + 2 * var(--seam) + var(--d));
  margin-top: clamp(28px, 3.4vw, 52px);
}
.stratum { position: absolute; left: 0; right: 0; height: calc(var(--band) + var(--d)); }
.stratum:nth-child(2) { top: calc(var(--band) + var(--seam)); }
.stratum:nth-child(3) { top: calc(2 * (var(--band) + var(--seam))); }
/* the gold line along the top of each band */
.stratum::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, var(--gold) 0 42%, var(--gold-glint) 50%, var(--gold) 58% 100%) 100% 0 / 300% 100% no-repeat;
  clip-path: polygon(0 0, 100% var(--d), 100% calc(var(--d) + var(--lip)), 0 var(--lip));
}
.slides {
  position: absolute; inset: 0; overflow: hidden; background: var(--navy-raised);
  clip-path: polygon(0 var(--lip), 100% calc(var(--d) + var(--lip)), 100% 100%, 0 calc(100% - var(--d)));
}
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.07) translateX(1.05%); }
.slides img + img { opacity: 0; transform: scale(1.07) translateX(1.8%); }

/* Motion: the bands lay in once, then keep cycling photos, drifting, and catching light */
@media (prefers-reduced-motion: no-preference) {
  .stratum { animation: lay 1.05s var(--ease) both; }
  .stratum:nth-child(3) { animation-delay: .1s; }
  .stratum:nth-child(2) { animation-delay: .32s; }
  .stratum:nth-child(1) { animation-delay: .54s; }

  .stratum::before { animation: glint 7s ease-in-out infinite; }
  .stratum:nth-child(3)::before { animation-delay: 1.6s; }
  .stratum:nth-child(2)::before { animation-delay: 2.1s; }
  .stratum:nth-child(1)::before { animation-delay: 2.6s; }

  .bands-live .slides img { animation: cycle 18s linear infinite; }
  .bands-live .slides img:nth-child(1) { animation-delay: calc(var(--o) - 1.5s); }
  .bands-live .slides img:nth-child(2) { animation-delay: calc(var(--o) + 4.5s); }
  .bands-live .slides img:nth-child(3) { animation-delay: calc(var(--o) + 10.5s); }
  .bands-live .stratum:nth-child(3) .slides { --o: 0s; }
  .bands-live .stratum:nth-child(2) .slides { --o: 2s; }
  .bands-live .stratum:nth-child(1) .slides { --o: 4s; }
}
@keyframes lay { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes glint { 0% { background-position: 100% 0; } 38%, 100% { background-position: 0% 0; } }
@keyframes cycle {
  0% { opacity: 0; transform: scale(1.07) translateX(1.8%); }
  6% { opacity: 1; }
  33% { opacity: 1; }
  40% { opacity: 0; transform: scale(1.07) translateX(-1.8%); }
  100% { opacity: 0; transform: scale(1.07) translateX(-1.8%); }
}

/* Ticker of what we build, always moving */
.ticker { position: relative; overflow: hidden; padding-block: clamp(26px, 3.4vw, 46px); border-top: 1px solid var(--line-dark); margin-top: clamp(28px, 3.5vw, 52px); }
.ticker-track { display: flex; width: max-content; }
.ticker-list { display: flex; align-items: center; gap: clamp(22px, 2.6vw, 44px); padding-right: clamp(22px, 2.6vw, 44px); margin: 0; list-style: none; }
.ticker-list li { display: flex; align-items: center; gap: clamp(22px, 2.6vw, 44px); white-space: nowrap; font-size: clamp(1.5rem, .9rem + 2.2vw, 3rem); font-stretch: 125%; font-weight: 600; letter-spacing: -.02em; color: var(--on-dark); line-height: 1; }
.ticker-list li:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--gold); }
.ticker-list li::after { content: ""; width: .62em; height: .72em; flex: none; background: url("../img/logo-mark.svg") center / contain no-repeat; }
@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker 48s linear infinite; }
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* Reveal on scroll (only when the script is running, so nothing hides without it) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal="wipe"] { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease); }
  .js [data-reveal="rise"] { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .9s var(--ease); }
  .js [data-reveal].is-in { clip-path: inset(0 0 0 0); opacity: 1; transform: none; }
}

/* About */
.about { padding-block: var(--section); background: var(--mist); }
.about-grid { row-gap: clamp(36px, 4.5vw, 64px); }
.about h2 { grid-column: 1 / 11; }
.about-copy { grid-column: 1 / 7; display: grid; gap: 1.1em; font-size: 1.125rem; align-content: start; }
.about-copy p { max-width: 58ch; }
.about-media { grid-column: 8 / 13; grid-row: 2 / 4; position: relative; margin: 0; padding-bottom: 22%; }
.about-main { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-inset {
  position: absolute; left: -18%; bottom: 0; width: 48%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 8px solid var(--mist);
}
figcaption { margin-top: 12px; font-size: .9rem; color: var(--muted); }
.builds { grid-column: 1 / 7; }
.builds h3 { margin-bottom: 18px; }
.build-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.build-list li { display: grid; grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr); gap: 6px 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.build-list b { font-weight: 620; font-stretch: 108%; font-size: 1.06rem; }
.build-list span { color: var(--muted); }

/* Process */
.process { padding-block: var(--section); background: var(--paper); }
.process-head { row-gap: 20px; margin-bottom: clamp(44px, 5.5vw, 80px); }
.process-head h2 { grid-column: 1 / 8; }
.process-head p { grid-column: 8 / 13; align-self: end; color: var(--muted); max-width: 40ch; }
.process-grid { align-items: start; }
.process-frame {
  grid-column: 1 / 7; position: sticky; top: calc(var(--header-h) + 28px);
  height: min(74vh, 720px); overflow: hidden; background: var(--navy);
}
.process-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.process-frame img.is-active { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .process-frame img.is-active { animation: breathe 14s ease-in-out infinite alternate; }
}
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.08); } }
.frame-cap {
  position: absolute; left: 0; bottom: 0; z-index: 1; max-width: calc(100% - 40px);
  padding: 11px 16px; background: rgba(1, 32, 50, .86); color: var(--on-dark); font-size: .9rem;
  border-left: 3px solid var(--gold);
}
.stages { grid-column: 8 / 13; list-style: none; margin: 0; padding: 0; }
.stage { min-height: min(56vh, 540px); display: flex; flex-direction: column; justify-content: center; padding-block: 44px; border-top: 1px solid var(--line); }
.stage:first-child { border-top: 0; padding-top: 0; justify-content: flex-start; }
.stage-photo { display: none; }
.stage-num {
  font-size: clamp(3.6rem, 2rem + 4vw, 6.2rem); font-stretch: 62%; font-weight: 260; line-height: .9;
  color: #B9C5CF; font-variant-numeric: tabular-nums; transition: color .4s ease;
}
.stage.is-active .stage-num { color: var(--gold-ink); }
.stage h3 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2.05rem); font-stretch: 114%; margin: 14px 0 12px; }
.stage p { max-width: 44ch; color: var(--ink); }
.stage .text-link { margin-top: 22px; align-self: flex-start; }

/* On site clips */
.onsite { padding-block: var(--section); background: var(--navy); color: var(--on-dark); }
.onsite h2 { color: #fff; }
.onsite-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 40px; margin-bottom: clamp(32px, 4vw, 56px); }
.onsite-head p { color: var(--on-dark-muted); max-width: 38ch; }
.clips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.clip { margin: 0; }
.clip-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--navy-raised); }
.clip-media video { width: 100%; height: 100%; object-fit: cover; }
.clip-toggle {
  position: absolute; left: 12px; bottom: 12px; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 0; background: rgba(1, 32, 50, .8); color: var(--gold); cursor: pointer;
}
.clip-toggle svg { width: 16px; height: 16px; }
.clip-toggle .i-play { display: none; }
.clip-toggle[aria-pressed="false"] .i-play { display: block; }
.clip-toggle[aria-pressed="false"] .i-pause { display: none; }
.clip figcaption { color: var(--on-dark-muted); font-size: .95rem; }

/* Current project */
.project { padding-block: var(--section); background: var(--mist); }
.project-grid { row-gap: 18px; align-items: start; }
.project-media { grid-column: 1 / 8; display: grid; gap: 12px; }
.project-main { overflow: hidden; }
.project-main img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .project-main img { animation: breathe 16s ease-in-out infinite alternate; }
}
.project-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.project-thumbs button { padding: 0; border: 0; background: var(--line); cursor: zoom-in; overflow: hidden; }
.project-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .6s var(--ease); }
.project-thumbs button:hover img { transform: scale(1.06); }
.project-info { grid-column: 9 / 13; }
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; }
.status::before { content: ""; width: 10px; height: 10px; background: var(--gold); box-shadow: 0 0 0 4px rgba(207, 187, 134, .28); }
@media (prefers-reduced-motion: no-preference) {
  .status::before { animation: pulse 2.4s ease-in-out infinite; }
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(207, 187, 134, 0); } }
.project-info h2 { font-size: clamp(1.9rem, 1.2rem + 1.9vw, 2.9rem); margin-top: 16px; }
.specs { margin: 28px 0 24px; border-top: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); font-size: .95rem; }
.specs dd { margin: 0; font-weight: 550; }
.progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.progress li { display: flex; align-items: center; gap: 10px; }
.progress li::before { content: ""; flex: none; width: 9px; height: 9px; box-shadow: inset 0 0 0 1.5px var(--muted); }
.progress .done::before { background: var(--navy); box-shadow: none; }
.progress .now::before { background: var(--gold); box-shadow: none; }
.progress .now span { color: var(--muted); font-weight: 400; }
.project-info > p { color: var(--muted); margin-bottom: 28px; }

/* Photos */
.photos { padding-block: var(--section); background: var(--paper); }
.photos-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 22px 40px; margin-bottom: 30px; }
.filters { display: flex; flex-wrap: wrap; gap: 2px 24px; }
.filters button {
  font: inherit; font-size: .98rem; font-weight: 550; color: var(--muted);
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 0; cursor: pointer;
}
.filters button span { font-weight: 400; font-variant-numeric: tabular-nums; margin-left: 3px; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--gold-ink); }
/* Justified rows: site.js sets each tile's width and height so every row fills the width */
.gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.photo {
  flex: none; width: calc(var(--ar) * 200px); height: 200px; position: relative;
  padding: 0; border: 0; background: var(--line); cursor: zoom-in; overflow: hidden; display: block;
}
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 0 var(--gold); transition: box-shadow .3s ease; }
.photo:hover img { transform: scale(1.05); }
.photo:hover::after { box-shadow: inset 0 0 0 3px var(--gold); }
@media (prefers-reduced-motion: no-preference) {
  .js .photo.is-new { animation: tileIn .7s var(--ease) both; animation-delay: calc(var(--n, 0) * 40ms); }
}
@keyframes tileIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.more { margin-top: 32px; }
.more[hidden] { display: none; }

/* Lightbox */
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(1, 24, 38, .97); color: var(--on-dark);
}
.lightbox::backdrop { background: rgba(1, 24, 38, .9); }
.lb-figure { height: 100%; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; padding: 64px 76px 22px; }
.lb-figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-figure figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 14px 0 0; color: var(--on-dark); font-size: .98rem; text-align: center; }
.lb-count { color: var(--gold); font-variant-numeric: tabular-nums; }
.lb-btn {
  position: fixed; width: 48px; height: 48px; display: grid; place-items: center;
  background: rgba(233, 238, 242, .08); color: #fff; border: 0; border-radius: 0; cursor: pointer;
}
.lb-btn:hover { background: var(--gold); color: var(--navy); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-close { top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(14px, env(safe-area-inset-left, 0px)); top: 50%; translate: 0 -50%; }
.lb-next { right: max(14px, env(safe-area-inset-right, 0px)); top: 50%; translate: 0 -50%; }

/* Contact */
.contact { padding-block: var(--section); background: var(--navy); color: var(--on-dark); }
.contact h2 { color: #fff; }
.contact-grid { row-gap: 48px; align-items: start; }
.contact-copy { grid-column: 1 / 6; }
.contact-copy > p { color: var(--on-dark-muted); margin-top: 20px; max-width: 40ch; }
.lines { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line-dark); }
.lines li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line-dark); }
.lines .k { color: var(--on-dark-muted); font-size: .95rem; }
.lines a { color: #fff; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.lines a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lines .big { color: var(--gold); font-size: clamp(1.35rem, 1rem + 1.1vw, 1.9rem); font-stretch: 112%; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.enquiry {
  grid-column: 7 / 13; background: var(--paper); color: var(--ink);
  padding: clamp(24px, 3.4vw, 48px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px;
  border-top: 4px solid var(--gold);
}
.enquiry h3 { grid-column: 1 / -1; font-size: 1.5rem; font-stretch: 114%; margin-bottom: 4px; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .92rem; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid #A9B5C0; border-radius: 0;
  background: var(--paper); color: var(--ink); font: 400 1rem/1.4 var(--font);
}
.field textarea { resize: vertical; min-height: 104px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23012032' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--navy); }
.enquiry .btn { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
.hp { position: absolute; left: -9999px; }
.form-note { grid-column: 1 / -1; margin: 0; padding: 12px 16px; background: var(--mist); border-left: 3px solid var(--gold); color: var(--ink); font-size: .95rem; }

/* Footer */
.site-footer { position: relative; overflow: hidden; background: var(--navy-deep); color: var(--on-dark-muted); padding-top: clamp(56px, 7vw, 96px); font-size: .95rem; }
.footer-grid { position: relative; z-index: 1; row-gap: 32px; }
.footer-brand { grid-column: 1 / 6; display: grid; gap: 18px; justify-items: start; }
.footer-logo { width: 150px; height: auto; }
.footer-col { grid-column: span 3; }
.footer-col h3 { font-size: .95rem; font-stretch: 100%; font-weight: 600; color: #fff; margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.footer-base { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: clamp(40px, 5vw, 64px); padding-block: 26px 28px; border-top: 1px solid var(--line-dark); font-size: .88rem; }
.footer-line { height: 3px; background: var(--gold); }
/* the logo's line drawing, large and faint, with light travelling along it */
.footer-art { position: absolute; top: 36px; bottom: 30px; right: max(var(--gutter), env(safe-area-inset-right, 0px)); height: calc(100% - 66px); width: auto; aspect-ratio: 276 / 320; pointer-events: none; }
.footer-art path { fill: none; stroke-linejoin: miter; stroke-miterlimit: 10; stroke-linecap: round; }
.footer-art .base path { stroke: var(--gold); stroke-opacity: .12; stroke-width: 4; }
.footer-art .trace path { stroke: var(--gold); stroke-width: 4; stroke-dasharray: 70 1820; stroke-dashoffset: 0; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .footer-art .trace path { opacity: .7; animation: trace 9s linear infinite; }
  .footer-art .trace path:nth-child(2) { animation-delay: -3s; }
  .footer-art .trace path:nth-child(3) { animation-delay: -6s; }
}
@keyframes trace { to { stroke-dashoffset: -1890; } }

/* Header logo draws itself once on load */
@media (prefers-reduced-motion: no-preference) {
  .brand-mark path { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.6s .15s var(--ease) forwards; }
  .brand-mark path:nth-child(2) { animation-delay: .3s; }
  .brand-mark path:nth-child(3) { animation-delay: .45s; }
  .brand-word { animation: fadeIn .9s .5s ease both; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Quick actions bar (phones) */
.quick-bar { display: none; }

/* Simple pages (thank you, 404) */
body.note { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding-bottom: 0; background: var(--navy); color: var(--on-dark); }
body.note main { flex: 1; }
.note-page { min-height: 62vh; display: grid; align-content: center; padding-block: var(--section); }
.note-page h1 { font-size: clamp(2.4rem, 1rem + 4vw, 4.4rem); font-stretch: 125%; font-weight: 640; letter-spacing: -.035em; line-height: 1; color: #fff; }
.note-page p { margin: 22px 0 34px; max-width: 46ch; font-size: 1.125rem; color: var(--on-dark-muted); }
.note-page .text-link { color: #fff; text-decoration-color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero h1 { grid-column: 1 / 13; }
  .hero-side { grid-column: 1 / 13; margin: 28px 0 0; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 40px; }
  .lead { max-width: 46ch; }
  .about h2 { grid-column: 1 / 13; }
  .about-copy, .builds { grid-column: 1 / 8; }
  .about-media { grid-column: 9 / 13; }
  .project-media, .project-info { grid-column: 1 / 13; }
  .project-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap); align-items: start; }
  .project-info > .status, .project-info > h2, .project-info > p, .project-info > .btn { grid-column: 1 / -1; }
  .project-info > .btn { justify-self: start; }
  .project-info h2 { margin-top: 12px; }
  .specs { grid-column: 1 / -1; }
  .contact-copy { grid-column: 1 / 13; }
  .enquiry { grid-column: 1 / 13; }
  .contact-copy > p { max-width: 52ch; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .brand-mark { width: 32px; }
  .brand-word { width: 124px; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 0 10px 12px;
    background: none; border: 0; color: #fff; font: 600 .98rem var(--font); cursor: pointer;
  }
  .menu-btn i { position: relative; width: 22px; height: 2px; background: currentColor; transition: background-color .2s; }
  .menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; transition: transform .25s ease; }
  .menu-btn i::before { top: -7px; }
  .menu-btn i::after { top: 7px; }
  .menu-open .menu-btn i { background: transparent; }
  .menu-open .menu-btn i::before { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-btn i::after { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px max(var(--gutter), env(safe-area-inset-right, 0px)) 32px max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--navy); border-top: 1px solid var(--line-dark);
    visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s;
    overflow-y: auto;
  }
  .menu-open .nav { visibility: visible; opacity: 1; transition: opacity .2s ease; }
  .nav a { font-size: 1.5rem; font-stretch: 112%; font-weight: 600; padding: 16px 0; border-bottom: 1px solid var(--line-dark); color: #fff; }
  .nav-phone { margin-top: 24px; box-shadow: none; padding: 0; border: 0 !important; }

  .process-head h2, .process-head p { grid-column: 1 / 13; }
  .process-frame { display: none; }
  .stages { grid-column: 1 / 13; display: grid; gap: clamp(40px, 7vw, 64px); }
  .stage { min-height: 0; padding: 0; border: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
  .stage:first-child { padding: 0; }
  .stage-photo { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 20px; }
  .stage-num { font-size: 3.4rem; color: var(--gold-ink); }
  .stage .text-link { justify-self: start; }

  .filters { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; white-space: nowrap; }
  .photos-head { display: grid; gap: 18px; }

  .clips { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(220px, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
  .clip { scroll-snap-align: start; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .hero { --slope: .16; --band: 86px; }
  .hero-side { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .about-copy, .builds, .about-media { grid-column: 1 / 13; }
  .about-media { grid-row: auto; padding-bottom: 26%; }
  .about-main { width: 84%; margin-left: auto; aspect-ratio: 4 / 4.4; }
  .about-inset { left: 0; width: 46%; }
  .build-list li { grid-template-columns: minmax(0, 1fr); }
  .project-info { display: block; }
  .project-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .enquiry { grid-template-columns: minmax(0, 1fr); }
  .gallery { gap: 6px; }
  .footer-brand, .footer-col { grid-column: 1 / 13; }
  .footer-art { display: none; }
  .lb-figure { padding: 64px 10px 84px; }
  .lb-prev, .lb-next { top: auto; bottom: max(16px, env(safe-area-inset-bottom, 0px)); translate: none; }
  .quick-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    background: var(--navy); border-top: 1px solid var(--line-dark);
  }
  .quick-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
    font-weight: 600; font-stretch: 108%; text-decoration: none; color: var(--navy); background: var(--gold);
  }
  .quick-bar a + a { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px var(--gold); }
  .quick-bar svg { width: 18px; height: 18px; }
}

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