/* Liam Biggs Studio. All colours, fonts and spacing are set in this first block. */
:root {
  /* A soft charcoal rather than black: still dark, easier on the eyes, and photos sit well on it */
  --bg: #161618;
  --bg-rgb: 22, 22, 24;
  --surface: #1f1f22;
  /* Frosted glass, only for things that float over photos and content */
  --glass: rgba(var(--bg-rgb), .52);
  --glass-strong: rgba(var(--bg-rgb), .72);
  --glass-edge: rgba(243, 240, 234, .12);
  --glass-blur: blur(18px) saturate(150%);
  --text: #f3f0ea;
  --muted: #a3a09a;
  --line: rgba(243, 240, 234, .16);
  --accent: #d41f27;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(72px, 11vw, 160px);
  --row: clamp(150px, 21vw, 340px); /* Gallery row height */
  --card-row: clamp(170px, 22vw, 300px); /* Portfolio card row height (300px, as on the old site) */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
/* Photos are wrapped in <picture> to offer an AVIF copy; the wrapper itself takes no space */
picture { display: contents; }
picture > source { display: none; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.wrap { padding-inline: var(--gutter); max-width: 1680px; margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

.display, h1 {
  font-stretch: 125%;
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 7.2vw, 6.5rem); overflow-wrap: anywhere; }
h2 { font-stretch: 125%; font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 3rem); line-height: 1.05; letter-spacing: -.015em; text-transform: uppercase; }
.eyebrow {
  display: block;
  font-size: .75rem;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: clamp(1.25rem, 2.3vw, 2rem); line-height: 1.32; font-weight: 300; max-width: 30em; text-wrap: pretty; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 1em 1.6em;
  background: var(--text);
  color: var(--bg);
  border: 0;
  font: 600 .8125rem/1 var(--font);
  font-stretch: 112%;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.btn::after { content: "\2192"; transition: transform .3s var(--ease); }
.btn:hover { background: var(--accent); color: #fff; }
.btn:hover::after { transform: translateX(4px); }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  transition: background .3s, transform .35s var(--ease);
}
/* The glass sits on a layer behind the header's contents, so the menu inside it can be frosted too
   (glass inside glass can't blur the page otherwise) */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; border-bottom: 1px solid var(--glass-edge);
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.logo { font-size: .9375rem; font-weight: 700; font-stretch: 125%; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.logo span { font-weight: 300; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 38px); }
.nav a { font-size: .8125rem; font-weight: 500; letter-spacing: .05em; text-decoration: none; padding: 6px 0; }
.nav > a, .nav__top { border-bottom: 1px solid transparent; }
.nav > a:hover, .nav__top:hover, .nav a[aria-current="page"] { border-bottom-color: var(--text); }
.nav__group { position: relative; display: flex; }
.nav__sub {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 210px;
  padding: 12px 18px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav__group:hover .nav__sub, .nav__group:focus-within .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub a { display: block; padding: 7px 0; color: var(--muted); }
.nav__sub a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; color: inherit; font: 500 .8125rem var(--font); letter-spacing: .05em; cursor: pointer; padding: 8px 0; }

/* Home hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; display: flex; align-items: flex-end; }
/* Each photo slowly zooms out while it's shown. The zoom lasts longer than the photo is on screen
   (6 s, plus the 1.4 s fade), so it never visibly stops; it eases in gently, and the photo keeps
   moving as it fades out ("is-leaving"), then resets once it's invisible. */
.hero__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 0s; will-change: transform, opacity; }
.hero__slide.is-active, .hero__slide.is-leaving { transform: scale(1); transition: opacity 1.4s ease, transform 10s cubic-bezier(.25, .1, .35, 1); }
.hero__slide.is-active { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(var(--bg-rgb), .85) 12%, rgba(var(--bg-rgb), .2) 52%, rgba(var(--bg-rgb), .5) 100%); } /* the bottom is exactly the page colour, so the photo has no edge */
.hero__text { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(36px, 6vw, 80px); }
.hero h1 { font-size: clamp(2.5rem, 9.6vw, 10rem); margin: 14px 0 28px; }
.hero .eyebrow { color: var(--text); }

/* Sections */
.section { padding-block: var(--section); }
.intro { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 7vw, 120px); align-items: end; }
.intro img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.intro__text .eyebrow { margin-bottom: 24px; }
.intro__text .btn { margin-top: 36px; }

.panels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.panel { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; text-decoration: none; background: var(--surface); }
.panel img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 1s var(--ease); }
.panel:hover img { transform: scale(1.04); }
.panel h2 {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; margin: 0;
  padding: 18px 24px 16px; font-size: clamp(1.25rem, 2.3vw, 2.1rem);
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-edge);
  transition: background .4s var(--ease);
}
.panel:hover h2 { background: var(--glass-strong); }

.strip { display: flex; gap: 3px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.strip img { flex: none; height: clamp(240px, 34vw, 480px); width: auto; max-width: none; scroll-snap-align: start; } /* never squeezed to the screen's width */

.cta { text-align: center; }
.cta .eyebrow { margin-bottom: 18px; }
.cta .display { font-size: clamp(2.4rem, 8vw, 7.5rem); margin-bottom: 36px; }

/* Listing pages */
.page-head { padding-top: calc(76px + clamp(48px, 7vw, 104px)); padding-bottom: clamp(32px, 4vw, 56px); }
.page-head .eyebrow { margin-bottom: 16px; }
.page-head .lede { margin-top: 24px; }
.filters {
  display: flex; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 28px;
  position: sticky; top: 76px; z-index: 30;
  margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter);
  transition: transform .35s var(--ease), background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
/* Frosted once it's floating over the photos (set by the page script) */
.filters.is-stuck { background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-bottom-color: var(--glass-edge); }
/* When the menu bar slides away, the filter bar slides up with exactly the same movement, so no gap opens */
body:has(.site-header.is-hidden) .filters.is-stuck { transform: translateY(-76px); }
.gallery-section { margin-top: 3px; padding-inline: 0; }
.filters--gallery { margin: 0 0 3px; padding: 24px var(--gutter) 14px; }
.filters--gallery.is-stuck { padding-top: 12px; }
.filters button {
  background: none; border: 0; border-bottom: 1px solid transparent;
  color: var(--muted); padding: 6px 0; cursor: pointer;
  font: 500 .8125rem var(--font); letter-spacing: .05em;
}
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* Justified rows: every card shares a row height and keeps its photo's own shape */
.cards { display: flex; flex-wrap: wrap; gap: 32px 4px; }
.cards::after { content: ""; flex-grow: 100000; }
.cards.is-justified { justify-content: center; }
.cards.is-justified::after { display: none; }
.card {
  display: block; text-decoration: none; min-width: 0;
  flex-grow: calc(var(--r, 1.5) * 100);
  flex-basis: calc(var(--r, 1.5) * var(--card-row));
  max-width: 100%;
}
.card__img { overflow: hidden; aspect-ratio: var(--r, 1.5); background: var(--surface); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover img { transform: scale(1.04); }
.card__meta { padding: 12px 2px 0; }
.card h3 { overflow-wrap: break-word; }
.card__meta .eyebrow { font-size: .6875rem; margin-bottom: 3px; }
.card h3 { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; }
[hidden] { display: none !important; }

/* Project pages */
.project-cover { width: 100%; max-height: 86svh; object-fit: cover; }
.project-count { margin-top: 18px; color: var(--muted); font-size: .9375rem; }
.project-text { margin-top: 22px; max-width: 64ch; color: var(--muted); font-size: 1.0625rem; line-height: 1.6; }
.project-films { display: grid; gap: 3px; margin-top: 3px; padding-inline: 0; }
.film { position: relative; aspect-ratio: 16 / 9; background: #000; }
.film iframe, .film video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.project-count a { color: var(--text); }
.tour { aspect-ratio: 16 / 9; width: 100%; border: 0; display: block; background: var(--surface); }
.gallery { display: flex; flex-wrap: wrap; gap: 3px; }
.gallery::after { content: ""; flex-grow: 100000; }
.g {
  display: block;
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * var(--row));
  aspect-ratio: var(--r);
  max-width: 100%;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.g img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.g:hover img { opacity: .86; }
.project-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin-top: var(--section); }
.project-nav a { padding: clamp(28px, 4vw, 56px) var(--gutter); text-decoration: none; }
.project-nav a + a { text-align: right; border-left: 1px solid var(--line); }
.project-nav strong { display: block; margin-top: 6px; font-size: clamp(1rem, 2.2vw, 1.75rem); font-weight: 600; font-stretch: 112%; line-height: 1.15; }
.project-nav a:hover strong { color: var(--muted); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(var(--bg-rgb), .96); color: var(--text); }
.lightbox::backdrop { background: rgba(var(--bg-rgb), .96); }
.lightbox img { position: absolute; inset: 56px clamp(8px, 6vw, 88px); width: calc(100% - 2 * clamp(8px, 6vw, 88px)); height: calc(100% - 112px); object-fit: contain; }
.lightbox button {
  position: absolute; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border-radius: 50%; border: 1px solid var(--glass-edge); color: inherit; cursor: pointer;
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  font: 300 1.5rem/1 var(--font); transition: background .2s;
}
.lightbox button:hover { background: var(--glass-strong); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px;
  font-size: .8125rem; color: var(--text); background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge);
}

/* About and contact */
.split { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 7vw, 120px); align-items: start; }
.split img { width: 100%; }
.prose > * + * { margin-top: 1.2em; }
.prose { max-width: 36em; }
.prose h2 { font-size: 1.25rem; margin-top: 2.2em; }
.prose a { text-underline-offset: 3px; }
.available { font-weight: 500; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 760px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .8125rem; color: var(--muted); letter-spacing: .03em; }
.field input, .field textarea {
  width: 100%; padding: 12px 0; background: none; color: var(--text);
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  font: inherit;
}
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--text); }
.field textarea { min-height: 150px; resize: vertical; }
.form .btn { justify-self: start; }
.form-status { grid-column: 1 / -1; min-height: 1.6em; color: var(--muted); }
.form-status.is-ok { color: var(--text); }
.form-status.is-error { color: #ff8a8f; }
.field-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .btn[disabled] { opacity: .6; cursor: progress; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px; margin-top: var(--section); font-size: .875rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Scroll reveal: only hides content once JavaScript is confirmed running */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto; height: calc(100dvh - 76px);
    flex-direction: column; align-items: flex-start; gap: 6px;
    padding: 24px var(--gutter); background: rgba(var(--bg-rgb), .86); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav a { font-size: 1.25rem; }
  .nav__sub { position: static; opacity: 1; visibility: visible; transform: none; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; padding: 0 0 0 16px; }
  .nav__sub a { font-size: 1rem; }
  .site-header:has(.nav.is-open)::before { opacity: 1; background: rgba(var(--bg-rgb), .86); }
  .nav__group { flex-direction: column; }
  .intro, .split { grid-template-columns: 1fr; }
  .panels { grid-auto-flow: row; grid-template-columns: 1fr; }
  .panel { aspect-ratio: 3 / 2; }
  .panel img { object-position: var(--pos-m, 50% 50%); }
}
@media (max-width: 560px) {
  .card h3 { font-size: .9375rem; }
  .form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Brands: a honeycomb of round badges (Admin > Portfolio > Homepage brands) ---------- */
.brands { padding-block: var(--section); }
.brands__head { text-align: center; max-width: 640px; margin: 0 auto clamp(24px, 4vw, 48px); }
.brands__head h2 { margin: 12px 0 14px; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.05; text-transform: uppercase; font-stretch: 125%; font-weight: 600; }
.brands__head p { margin: 0; color: var(--muted); }
.comb { position: relative; list-style: none; margin: 0; padding: 0; min-height: 200px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
/* Before the script places them (or without it), the badges simply wrap in centred rows */
.comb:not(.is-placed) { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; --d: 120px; }
.comb.is-placed .brand { position: absolute; left: 0; top: 0; margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2); will-change: transform; }
.brand { width: var(--d); height: var(--d); }
.brand__badge { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; padding: 18%; text-align: center; background: #f3f0ea; color: #161618; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: box-shadow .4s; }
.brand__badge img { max-width: 100%; max-height: 62%; width: auto; height: auto; object-fit: contain; }
.brand__badge b { font-size: calc(var(--d) * .115); line-height: 1.05; font-weight: 700; }
.brand--dark .brand__badge { background: #29292d; color: var(--text); }
.brand--agency .brand__badge { box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 0 3px var(--bg), 0 0 0 4px rgba(243, 240, 234, .45); }
.brand:hover .brand__badge, .brand:focus-visible .brand__badge { box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 2px rgba(243, 240, 234, .55); }
.brand:focus-visible { outline: none; }
.comb__tip { min-height: 1.5em; margin: 10px 0 0; text-align: center; font-size: .9rem; }
.comb__key { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; font-size: .8rem; color: var(--muted); }
.comb__key span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; background: #f3f0ea; }
.comb__key .is-agency::before { background: transparent; box-shadow: 0 0 0 1px rgba(243, 240, 234, .6); }

/* ---------- Cookie banner (only when the Google tag is switched on in the portal) ---------- */
.cookies { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-inline: auto; padding: 18px 20px; display: grid; gap: 14px;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 14px;
  font-size: .9rem; color: var(--text); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.cookies p { margin: 0; line-height: 1.5; }
.cookies a { color: var(--text); }
.cookies__acts { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.cookies .btn { padding: 10px 18px; }
.cookies .btn::after { content: none; }
.cookies .btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.cookies .btn--ghost:hover { background: rgba(243, 240, 234, .08); color: var(--text); }

/* Photos: no long-press "Save image" on phones and no dragging them out (see main.js) */
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

/* reCAPTCHA: Google's floating badge is hidden; the form says it's used instead, as Google allows */
.grecaptcha-badge { visibility: hidden; }
.form-note { grid-column: 1 / -1; margin: 0; font-size: .8125rem; color: var(--muted); }
.form-note a { color: inherit; }
