/* lastlight.uk */
@import url("/fonts/poppins.css");

:root {
  --orange: #faa954;
  --purple: #3c2959;
  --lavender: #8e8db0;
  --ink: #000;
  --paper: #fff;

  --font: "Poppins", system-ui, sans-serif;
  --edge: clamp(16px, 2.2vw, 36px);      /* page margin, shared by the logo, photos and text */
  --gap: clamp(6px, .7vw, 12px);         /* space between photos */
  --band: clamp(36px, 5vw, 80px);        /* vertical padding of text sections */
  --header-h: 76px;
  --logo-h: 48px;
}
@media (max-width: 699px) {
  :root { --header-h: 64px; --logo-h: 40px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--orange);
  color: var(--ink);
  font: 300 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

h1, h2, h3 { font-weight: 500; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 4.25rem); line-height: 1.04; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.5rem); line-height: 1.12; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; line-height: 1.35; }
p { margin: 0 0 1em; }
b, strong { font-weight: 600; }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.45rem); font-weight: 400; line-height: 1.45; }
.small { font-size: .95rem; }
.rte > :last-child { margin-bottom: 0; }
.rte a { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.rte a.btn { text-decoration: none; }
.visually-hidden:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.visually-hidden:focus { position: fixed; top: 8px; left: 8px; z-index: 200; background: var(--paper); padding: .5em 1em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--orange);
  transition: transform .3s ease, background-color .3s ease, color .3s ease;
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { height: 100%; padding: 0 var(--edge); display: flex; align-items: center; }
.logo img { height: var(--logo-h); width: auto; }
.nav { margin-left: auto; display: flex; gap: 1.5em; font-weight: 400; }
.nav a { text-decoration: none; padding: .2em 0; }
.nav a[aria-current="page"], .nav a:hover { box-shadow: inset 0 -1px 0 currentColor; }
.social { display: flex; gap: 16px; margin-left: 2em; }
.social a { display: inline-flex; width: 19px; height: 19px; }
.social svg { width: 100%; height: 100%; fill: currentColor; }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 14px 0 14px 14px; cursor: pointer; color: inherit; }
.burger span { display: block; width: 28px; height: 1.5px; background: currentColor; transition: transform .25s ease; }
.burger span + span { margin-top: 7px; }
.menu-open .burger span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--orange);
  padding: calc(var(--header-h) + 3vh) var(--edge) 5vh;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.menu-open { overflow: hidden; }
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu nav { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .3em; font-size: clamp(2.2rem, 10vw, 3.5rem); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.mobile-menu nav a { text-decoration: none; }
.mobile-menu nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.mobile-menu .social { margin: 0; gap: 24px; }
.mobile-menu .social a { width: 22px; height: 22px; }
@media (max-width: 799px), (pointer: coarse) and (max-width: 1024px) {
  .nav, .header-inner > .social { display: none; }
  .burger { display: block; }
}

/* Home: the header floats over the photo until the page scrolls */
.has-cover .site-header { position: fixed; inset: 0 0 auto 0; background: transparent; color: var(--paper); }
.has-cover .site-header::before { content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; background: linear-gradient(rgba(0,0,0,.45), transparent); transition: opacity .3s ease; }
.has-cover .site-header.scrolled, .has-cover.menu-open .site-header { background: var(--orange); color: var(--ink); }
.has-cover .site-header.scrolled::before, .has-cover.menu-open .site-header::before { opacity: 0; }

/* ---------- home: rotating photos of every project ---------- */
.cover { position: relative; height: 100vh; height: 100svh; min-height: 420px; background: var(--ink); overflow: hidden; color: var(--paper); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s linear 1.2s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.2s ease; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to top, rgba(0,0,0,.5), transparent); pointer-events: none; }
.cover-caption {
  position: absolute; z-index: 1; left: var(--edge); bottom: var(--edge); margin: 0;
  font-weight: 500; font-size: 1rem; text-decoration: none;
  text-shadow: 0 1px 12px rgba(0,0,0,.6);
}
.cover-caption:hover { text-decoration: underline; text-underline-offset: .2em; }
.ss-controls { position: absolute; z-index: 2; right: calc(var(--edge) - 14px); bottom: calc(var(--edge) - 14px); display: flex; }
.ss-controls button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; filter: drop-shadow(0 1px 6px rgba(0,0,0,.5)); }
.ss-controls svg { width: 9px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ss-pause span { width: 10px; height: 13px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.ss-pause.paused span { width: 0; height: 0; border: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.ss-controls button:focus-visible, .cover-caption:focus-visible { outline-color: var(--paper); }

/* ---------- projects page ---------- */
.statement { padding: clamp(12px, 2vw, 28px) var(--edge) clamp(24px, 3vw, 44px); }
.statement p:first-child { font-size: clamp(1.3rem, 2.3vw, 2.05rem); font-weight: 400; line-height: 1.28; letter-spacing: -.01em; max-width: 40ch; margin-bottom: .5em; }

.wall {
  display: grid; grid-template-columns: 1fr;
  gap: calc(var(--gap) * 2.4) var(--gap);
  padding: 0 var(--edge) var(--band);
}
@media (min-width: 700px) { .wall { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .wall { grid-template-columns: repeat(6, 1fr); }
  .wall .tile { grid-column: span var(--span, 2); }
}
.tile { display: block; text-decoration: none; min-width: 0; }
.tile-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--purple); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.tile:hover .tile-img img { transform: scale(1.025); }
.tile-title { display: flex; align-items: center; gap: .45em; padding-top: .5em; font-weight: 500; font-size: .95rem; line-height: 1.3; }
.tile:hover .tile-title { text-decoration: underline; text-underline-offset: .2em; }
.tile-title svg { flex: none; width: .5em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- project page ---------- */
.p-hero { position: relative; height: max(380px, min(80vh, 62vw)); background: var(--ink); color: var(--orange); overflow: hidden; }
.p-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0) 62%), rgba(0,0,0,var(--overlay, .15));
}
.p-title { position: absolute; z-index: 1; left: var(--edge); right: var(--edge); bottom: clamp(20px, 3.2vw, 48px); }
.p-title h1 { margin: 0; max-width: 18ch; }
.p-sub { margin: .2em 0 0; font-size: clamp(1.2rem, 2.4vw, 2.1rem); font-weight: 400; line-height: 1.2; letter-spacing: -.01em; }
.p-meta { margin: .7em 0 0; color: rgba(255,255,255,.9); font-size: .95rem; line-height: 1.5; }
.p-meta + .p-meta { margin-top: .1em; }
.p-hero.no-photo { height: auto; background: none; color: var(--ink); }
.p-hero.no-photo::after { content: none; }
.p-hero.no-photo .p-title { position: static; padding: clamp(16px, 3vw, 40px) var(--edge) clamp(16px, 2vw, 28px); }
.p-hero.no-photo .p-meta { color: inherit; }

/* Photos in justified rows at their own shape: each grows in proportion to its width/height (--r) */
.gallery { --row-h: clamp(180px, 19vw, 380px); display: flex; flex-wrap: wrap; gap: var(--gap); padding: var(--gap) var(--edge) 0; }
.gallery::after { content: ""; flex: 1000000 1 0; }
.gallery a { flex: var(--r) 1 calc(var(--r) * var(--row-h)); background: var(--purple); cursor: zoom-in; }
.gallery img { width: 100%; height: auto; }
@media (max-width: 699px) {
  .gallery { --row-h: 52vw; }
  .gallery::after { content: none; }  /* on phones the last photo fills the width too */
}

.more { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: var(--band) var(--edge); }
.more .next { grid-column: 2; }
.more .next .tile-title { justify-content: flex-end; text-align: right; }
@media (max-width: 699px) {
  .more { grid-template-columns: 1fr; gap: calc(var(--gap) * 2.4); }
  .more .next { grid-column: auto; }
}

/* ---------- text sections ---------- */
.band { padding: var(--band) var(--edge); }
.theme-light { background: var(--lavender); }
.split, .contact { display: grid; gap: clamp(28px, 5vw, 96px); }
@media (min-width: 900px) { .split, .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.split .col > .rte, .contact .col > .rte { max-width: 36rem; }
.services h3 { margin: 0 0 .3em; padding-top: .9em; border-top: 1px solid currentColor; }
.services p { margin-bottom: 1.4em; }
@media (min-width: 900px) { .split .services { padding-top: .6em; } }
.map { display: block; width: 100%; max-width: 36rem; height: clamp(200px, 20vw, 280px); margin-top: 1.6rem; border: 0; }

.prose .rte { max-width: 68ch; }
.prose h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); margin: 1.8em 0 .5em; }
.prose h3 { margin: 1.8em 0 .4em; }

/* Photo with text over it (Hire pages) */
.banner { position: relative; display: flex; align-items: flex-end; min-height: clamp(260px, 44vh, 480px); background: var(--ink); color: var(--orange); overflow: hidden; }
.banner.tall { min-height: calc(100svh - var(--header-h)); }
.banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0) 70%), linear-gradient(to right, rgba(0,0,0,.6), rgba(0,0,0,0) 75%), rgba(0,0,0,var(--overlay, .2)); }
.banner-text { position: relative; z-index: 1; padding: clamp(28px, 4vw, 56px) var(--edge); max-width: 52rem; }
.banner-text .lead { max-width: 40ch; color: rgba(255,255,255,.92); }
.banner .btn { background: var(--orange); color: var(--ink); }
@media (hover: hover) { .banner .btn:hover { background: var(--paper); } }

/* ---------- hire catalogue (filled in by site.js) ---------- */
.cat-list:empty { display: none; }
.cat-group + .cat-group { margin-top: clamp(32px, 4vw, 56px); }
.cat-group h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); margin-bottom: .8em; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(20px, 2.4vw, 36px) var(--gap); }
.cat-item { display: flex; flex-direction: column; }
.cat-img { position: relative; aspect-ratio: 4 / 3; background: var(--paper); margin-bottom: .8em; }
.cat-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.cat-item h3 { margin: 0 0 .15em; }
.cat-item h3 a { color: inherit; text-decoration: none; }
.cat-item h3 a:hover { text-decoration: underline; text-underline-offset: .2em; }
a.cat-img { display: block; }

/* Product pages (/hire-catalogue/<product>) */
.crumbs { font-size: .9rem; margin: 0 0 clamp(20px, 3vw, 36px); }
.crumbs a { color: inherit; }
.product-main { display: grid; gap: clamp(24px, 4vw, 64px); align-items: start; }
@media (min-width: 900px) { .product-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.product-img { position: relative; aspect-ratio: 4 / 3; background: var(--paper); }
.product-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.product-text { max-width: 34rem; }
.product-text h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.08; margin: 0 0 .35em; }
.product-text .cat-price { font-size: 1.2rem; margin-bottom: 1em; }
.product-text .btns { margin: 1.6em 0 1.2em; }
.product-how { font-size: .95rem; padding-top: 1em; border-top: 1px solid currentColor; }
.product-more { background: var(--lavender); }
.product-more h2 { margin-top: 0; }
.product-more > p { margin: 2em 0 0; }
.cat-price { font-weight: 500; margin: 0 0 .5em; }
.cat-desc { font-size: .92rem; line-height: 1.55; margin: 0 0 1em; }
.cat-item .btn { margin-top: auto; align-self: flex-start; min-height: 40px; padding: 0 1.2em; font-size: .88rem; }
.catalogue.has-items .cat-fallback { display: none; }
.cat-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-bottom: clamp(28px, 3.4vw, 48px); }
.cat-search { flex: 1 1 18rem; max-width: 26rem; }
.cat-search input {
  display: block; width: 100%; min-height: 44px;
  font: 300 1rem/1.4 var(--font); color: var(--ink);
  padding: .55em .8em; background: var(--paper);
  border: 1px solid var(--ink); border-radius: 4px;
}
.cat-search input:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
.cat-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-filters button {
  display: inline-flex; align-items: center; gap: .55em; min-height: 40px; padding: 0 1em;
  font: 500 .88rem/1 var(--font); color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 4px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.cat-filters button:hover { background: var(--orange); }
.cat-filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.cat-filters .n { font-weight: 300; opacity: .7; font-variant-numeric: tabular-nums; }
.cat-group[hidden], .cat-item[hidden], .cat-empty[hidden] { display: none; }
.cat-empty { padding: clamp(24px, 3vw, 40px) 0; }
.cat-empty p { max-width: 40ch; margin: 0 0 .6em; }
.catalogue:not(.has-items) .cat-tools { display: none; }

/* ---------- buttons and forms ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.5em 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.6em;
  background: var(--ink); color: var(--paper);
  font: 500 .95rem/1 var(--font); text-decoration: none;
  border: 0; border-radius: 4px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
@media (hover: hover) { .btn:hover { background: var(--purple); } }
.btn:disabled { opacity: .6; cursor: default; }
.btn-outline { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
@media (hover: hover) { .btn-outline:hover { background: var(--ink); color: var(--paper); } }
.banner .btn-outline { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px rgba(255,255,255,.75); }
.banner .btn-outline:hover { background: var(--paper); color: var(--ink); }

.form .fields { display: grid; gap: 14px; }
.col > .rte + .form { margin-top: 1.4em; }
.form .name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .field { display: block; }
.form .title { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 4px; }
.form input, .form textarea {
  display: block; width: 100%;
  font: 300 1rem/1.4 var(--font); color: var(--ink);
  padding: .7em .8em; background: var(--paper);
  border: 1px solid var(--ink); border-radius: 2px;
}
.form textarea { resize: vertical; min-height: 7.5em; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
.form .btn { justify-self: start; }
.form .hp { position: absolute; left: -9999px; }
.form-status { margin: .8em 0 0; }
.form-status:empty { display: none; }
.form.sent .fields { display: none; }
.form.sent .form-status { margin: 0; font-size: 1.15rem; font-weight: 400; }

/* Quote pop-up (hire catalogue "Ask for a quote") */
.quote-dialog { width: min(36rem, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0;
  background: var(--orange); color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.45); overflow: auto; }
.quote-dialog::backdrop { background: rgba(0,0,0,.6); }
.quote-form { position: relative; padding: clamp(22px, 4vw, 36px); }
.quote-form h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; padding-right: 2em; }
.quote-item { margin: .25em 0 1.2em; font-weight: 500; font-size: 1.05rem; }
.quote-close { position: absolute; z-index: 1; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: none;
  font: 300 2rem/1 var(--font); color: inherit; cursor: pointer; }
.quote-close:hover { color: var(--purple); }
.quote-form .opt { font-weight: 300; }
.quote-form textarea { min-height: 5em; }
.form .choice { border: 0; padding: 0; margin: 0; }
.form .choice legend { padding: 0; }
.form .choice label, .form .check { display: flex; gap: .6em; align-items: center; font-size: .95rem; padding: .25em 0; }
.form .choice input, .form .check input { display: inline-block; width: 1.15em; height: 1.15em; margin: 0; padding: 0;
  flex: none; accent-color: var(--ink); }
.quote-alt { margin: 0; font-size: .9rem; }
.quote-done { display: none; padding: clamp(36px, 6vw, 56px) clamp(22px, 4vw, 36px) clamp(28px, 5vw, 44px); }
.quote-dialog.is-sent .quote-form { display: none; }
.quote-dialog.is-sent .quote-done { display: block; }
.quote-tick { display: block; width: 48px; height: 48px; margin-bottom: 18px; }
.quote-tick circle { fill: var(--ink); }
.quote-tick path { fill: none; stroke: var(--orange); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.quote-done h2 { margin: 0 0 .45em; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; outline: none; }
.quote-done-msg { margin: 0 0 .6em; font-size: 1.05rem; max-width: 30em; }
.quote-done-alt { margin: 0 0 1.6em; font-size: .9rem; }
.quote-done-alt a { color: inherit; }
.quote-alt a { color: inherit; }
.quote-form .btn { margin-top: 4px; }
@media (max-width: 520px) { .quote-form .name-row { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--purple); color: var(--orange); padding: clamp(28px, 3.5vw, 48px) var(--edge) clamp(24px, 3vw, 40px); font-size: .9rem; line-height: 1.6; }
.foot-cols { display: grid; gap: 1.2em 4em; }
@media (min-width: 700px) { .foot-cols { grid-template-columns: repeat(3, max-content); } }
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.site-footer strong { font-weight: 500; }
.foot-legal { margin-top: 1.8em !important; font-size: .78rem; opacity: .8; }

/* ---------- photo viewer ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb img { max-width: calc(100vw - 2 * var(--edge)); max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); width: auto; height: auto; object-fit: contain; }
.lb button { position: absolute; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: none; border: 0; color: var(--paper); cursor: pointer; }
.lb button svg { width: 18px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lb .lb-close { top: 8px; right: 8px; font: 300 2.4rem/1 var(--font); }
.lb .lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb .lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb .lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.75); font-size: .85rem; margin: 0; }
.lb button:focus-visible { outline-color: var(--paper); }
.lb-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
