/*
 * Corkwall theme — the one file for the look.
 * Colours, fonts and spacing are the variables right below. The accent colour comes from
 * Admin → Settings (written into each page as --accent), so you rarely need to touch this.
 * Two layouts share it: html.l-grid and html.l-editorial.
 */

@font-face { font-family: 'Instrument Sans'; src: url(/assets/fonts/instrument-sans-latin.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(/assets/fonts/instrument-serif-400-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(/assets/fonts/instrument-serif-400-italic-latin.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url(/assets/fonts/ibm-plex-mono-400-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --accent: #c2410c;
  --bg: #f6f4ef;
  --surface: #ecE8df;
  --ink: #161513;
  --muted: #6b665d;
  --line: #d9d4c8;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: var(--sans);
  --display: var(--sans);
  --meta-font: var(--mono);
  --gap: 12px;
  --pad: clamp(16px, 3.2vw, 40px);
  --max: 1680px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

.l-editorial {
  --bg: #f3eee4;
  --surface: #e9e2d4;
  --line: #d3cab8;
  --display: var(--serif);
  --meta-font: var(--sans);
  --gap: 20px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; background-size: cover; background-position: center; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--pad); top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; }
.skip:focus { top: 10px; color: var(--bg); }
.ic { display: inline-block; vertical-align: -.15em; flex: none; }
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.meta { font: 400 12px/1.4 var(--meta-font); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.l-editorial .meta { font-size: 13px; letter-spacing: .02em; text-transform: none; }
.h1 { font: 600 clamp(32px, 4.6vw, 64px)/1.02 var(--display); letter-spacing: -.025em; }
.h2 { font: 600 clamp(20px, 2vw, 26px)/1.15 var(--display); letter-spacing: -.015em; }
.display { font: 400 clamp(46px, 8.4vw, 132px)/.95 var(--serif); letter-spacing: -.02em; }
.l-editorial .h2 { font: 400 clamp(30px, 3.4vw, 46px)/1.05 var(--serif); letter-spacing: -.01em; }
.lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; max-width: 38em; }
.intro { color: var(--muted); max-width: 36em; margin-top: 14px; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--ink); color: var(--bg); text-decoration: none; font: 500 15px/1 var(--body); border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; transition: background .2s, border-color .2s; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn .ic { transition: transform .25s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn-line { background: transparent; color: var(--ink); }
.more { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; }
.more:hover .ic { transform: translateX(3px); }
.more .ic { transition: transform .25s var(--ease); }
.more-row { margin-top: 20px; }

/* ---------- header / footer ---------- */
.hd { max-width: var(--max); margin: 0 auto; padding: 22px var(--pad); display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.brand { font: 600 17px/1 var(--body); letter-spacing: -.01em; text-decoration: none; }
.l-editorial .brand { font: 400 26px/1 var(--serif); letter-spacing: 0; }
.nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.nav a { text-decoration: none; font-size: 15px; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: currentColor; }

.ft { max-width: var(--max); margin: clamp(64px, 10vw, 140px) auto 0; padding: 0 var(--pad) 28px; }
.ft-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--ink); }
.ft-big { font: 600 clamp(28px, 4vw, 54px)/1.02 var(--display); letter-spacing: -.025em; }
.l-editorial .ft-big { font: 400 clamp(38px, 5.4vw, 80px)/1 var(--serif); letter-spacing: -.01em; }
.ft-row { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.ft-row a { text-decoration: none; }

/* ---------- sections ---------- */
.sec { margin-top: clamp(56px, 8vw, 112px); }
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-hd { padding: clamp(28px, 6vw, 80px) 0 0; }

.hero { padding: clamp(36px, 8vw, 120px) 0 clamp(32px, 5vw, 64px); max-width: 1100px; }
.hero h1 { font: 600 clamp(18px, 1.6vw, 20px)/1 var(--body); margin-bottom: 18px; }
.hero-line { font: 600 clamp(34px, 5.4vw, 76px)/1.02 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.hero-intro { margin-top: 18px; color: var(--muted); max-width: 34em; }
.hero-ed { max-width: none; padding-bottom: clamp(40px, 6vw, 88px); }
.hero-ed h1.display { font: 400 clamp(46px, 7.4vw, 120px)/.95 var(--serif); letter-spacing: -.02em; max-width: 20ch; text-wrap: balance; margin-bottom: 26px; }

/* ---------- tiles (grid layout) ---------- */
.tiles { display: grid; gap: var(--gap); grid-template-columns: repeat(12, 1fr); }
.tile { grid-column: span 4; text-decoration: none; display: block; }
.tiles-home .tile { grid-column: span 3; }
.tiles-home .tile-big { grid-column: span 6; }
.tile-img { display: block; overflow: hidden; background: var(--surface); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .6s var(--ease); }
.tile:hover .tile-img img { transform: scale(1.025); }
.tile-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0 18px; }
.tile-t { font-weight: 500; font-size: 15px; }
.tile:hover .tile-t { color: var(--accent); }
.tile[hidden], .ix-row[hidden] { display: none; }

.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter a { text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; transition: border-color .2s, background .2s; }
.filter a:hover { border-color: var(--ink); color: var(--ink); }
.filter a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter sup { font: 400 10px/1 var(--mono); opacity: .7; vertical-align: super; margin-left: 2px; }
.empty { color: var(--muted); padding: 30px 0; }

/* ---------- index list (editorial layout) ---------- */
.ix { border-top: 1px solid var(--ink); }
.ix-row { position: relative; border-bottom: 1px solid var(--line); }
.ix-link { display: grid; grid-template-columns: 3.2em 1fr 9em 4em; align-items: baseline; gap: 16px; padding: 18px 0; text-decoration: none; }
.ix-t { font: 400 clamp(28px, 3.6vw, 52px)/1.05 var(--serif); letter-spacing: -.01em; transition: transform .35s var(--ease), color .2s; }
.ix-y { text-align: right; }
.ix-link:hover .ix-t { color: var(--accent); transform: translateX(10px); }
.ix-pv { display: none; }
.ix-go { display: none; }
@media (hover: hover) and (min-width: 900px) {
  .ix-pv { display: block; position: absolute; z-index: 3; right: 16%; top: 50%; width: min(26vw, 380px); transform: translateY(-50%) scale(.96); opacity: 0; pointer-events: none; transition: opacity .25s, transform .4s var(--ease); background: var(--surface); box-shadow: 0 18px 50px -20px rgba(0,0,0,.35); }
  .ix-pv img { width: 100%; height: 100%; object-fit: cover; }
  .ix-row:hover .ix-pv { opacity: 1; transform: translateY(-50%) scale(1); }
}
@media (hover: none), (max-width: 899px) {
  .ix-row.open .ix-pv { display: block; margin: 0 0 12px; }
  .ix-row.open .ix-pv img { width: 100%; height: 100%; object-fit: cover; }
  .ix-row.open .ix-go { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-weight: 500; text-decoration: none; }
}

/* ---------- quotes, services, clients ---------- */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.quote blockquote p { font: 500 clamp(19px, 1.9vw, 26px)/1.35 var(--display); letter-spacing: -.01em; text-wrap: pretty; }
.l-editorial .quote blockquote p { font: italic 400 clamp(24px, 2.4vw, 34px)/1.25 var(--serif); letter-spacing: 0; }
.quote blockquote p::before { content: '“'; } .quote blockquote p::after { content: '”'; }
.quote figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.quote figcaption strong { color: var(--ink); font-weight: 600; }
.quote figcaption a { text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }

.svc { border-top: 1px solid var(--ink); }
.svc li { display: grid; grid-template-columns: minmax(10em, 1fr) 2fr 8em; gap: 8px 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.svc-n { font-weight: 600; font-size: 18px; }
.l-editorial .svc-n { font: 400 28px/1.1 var(--serif); }
.svc-l { color: var(--muted); }
.svc-p { white-space: nowrap; color: var(--ink); text-align: right; }
.svc-strip li { grid-template-columns: 1fr auto; }
.svc-strip .svc-l { display: none; }
.clients { columns: 3 220px; column-gap: 32px; }
.clients li { padding: 9px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }

.cta-band { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: clamp(56px, 8vw, 112px); padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--ink); }
.cta-band p { font: 600 clamp(24px, 3vw, 40px)/1.05 var(--display); letter-spacing: -.02em; }
.l-editorial .cta-band p { font: 400 clamp(32px, 4vw, 60px)/1 var(--serif); }

/* ---------- project page ---------- */
.p-hd { padding: clamp(28px, 6vw, 80px) 0 clamp(24px, 3vw, 40px); max-width: 1100px; }
.p-hd .meta { margin-bottom: 14px; }
.p-hd .lede { margin-top: 18px; color: var(--muted); }
.p-cover { background: var(--surface); overflow: hidden; }
.p-cover img { width: 100%; height: 100%; object-fit: cover; }
.p-body { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: clamp(24px, 6vw, 96px); margin-top: clamp(36px, 5vw, 72px); }
.facts { display: grid; gap: 14px; align-content: start; position: sticky; top: 24px; }
.facts div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.facts dt { font: 400 12px/1.4 var(--meta-font); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.l-editorial .facts dt { text-transform: none; font-size: 13px; letter-spacing: 0; }
.facts dd { margin-top: 4px; }
.facts a { text-decoration: none; }
.prose { max-width: 40em; font-size: 17px; line-height: 1.65; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font: 600 20px/1.2 var(--display); margin-top: 1.8em; letter-spacing: -.01em; }
.l-editorial .prose h2 { font: 400 30px/1.1 var(--serif); }
.prose h3 { font-size: 17px; margin-top: 1.5em; }
.prose ul { list-style: disc; padding-left: 1.2em; } .prose ol { list-style: decimal; padding-left: 1.2em; }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: 1em; color: var(--muted); }
.prose a { color: var(--accent); }
.gallery { columns: 2; column-gap: var(--gap); margin-top: clamp(48px, 7vw, 96px); }
.g-item { display: block; break-inside: avoid; margin-bottom: var(--gap); overflow: hidden; background: var(--surface); cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .6s var(--ease); }
.g-item:hover img { transform: scale(1.02); }
.next { margin-top: clamp(56px, 8vw, 112px); border-top: 1px solid var(--line); }
.next a { display: flex; flex-direction: column; gap: 8px; padding: 28px 0 0; text-decoration: none; }
.next-t { font: 600 clamp(28px, 4vw, 54px)/1.02 var(--display); letter-spacing: -.025em; display: inline-flex; align-items: center; gap: 14px; }
.l-editorial .next-t { font: 400 clamp(38px, 5.4vw, 80px)/1 var(--serif); }
.next a:hover .ic { transform: translateX(6px); }
.next .ic { transition: transform .3s var(--ease); }
.p-quote { max-width: 900px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); padding-top: clamp(28px, 6vw, 80px); align-items: start; }
.about-img { background: var(--surface); overflow: hidden; position: sticky; top: 24px; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-txt .lede { margin-top: 20px; }
.about-txt .prose { margin-top: 24px; }
.about-txt .btn { margin-top: 32px; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); padding-top: clamp(28px, 6vw, 80px); align-items: start; }
.contact-txt .lede { margin-top: 18px; color: var(--muted); }
.contact-list { margin-top: 32px; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: center; }
.contact-list a { text-decoration: none; }
.enq { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.fld { display: grid; gap: 6px; }
.fld-wide { grid-column: 1 / -1; }
.fld label { font-size: 14px; font-weight: 500; }
.opt { color: var(--muted); font-weight: 400; }
.fld input, .fld select, .fld textarea { width: 100%; font: 400 16px/1.4 var(--body); color: var(--ink); background: #fffdf9; border: 1px solid var(--line); border-radius: 6px; padding: 12px 13px; transition: border-color .2s, box-shadow .2s; }
.fld select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b665d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }
.fld textarea { resize: vertical; min-height: 140px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.fld [aria-invalid="true"] { border-color: #b42318; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-err { grid-column: 1 / -1; color: #b42318; font-size: 15px; min-height: 0; }
.form-err:empty { display: none; }
.enq button[disabled] { opacity: .6; cursor: progress; }
.thanks { padding: 32px; background: var(--surface); border-radius: 8px; }
.thanks p { margin-top: 12px; }
.thanks:focus { outline: none; }

/* ---------- notes ---------- */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px var(--gap); }
.notes a { display: grid; gap: 10px; text-decoration: none; }
.notes-img { display: block; overflow: hidden; background: var(--surface); }
.notes-img img { width: 100%; height: 100%; object-fit: cover; }
.notes-t { font: 600 20px/1.2 var(--display); }
.l-editorial .notes-t { font: 400 30px/1.1 var(--serif); }
.prose-note { margin: clamp(32px, 5vw, 64px) auto 0; }
.note .p-hd { margin: 0 auto; max-width: 40em; }
.note .more-row { max-width: 40em; margin: 40px auto 0; }

/* ---------- 404 ---------- */
.nf { padding: clamp(56px, 12vw, 160px) 0; max-width: 760px; }
.nf .meta { margin-bottom: 16px; }
.nf .lede { margin: 18px 0 32px; color: var(--muted); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(18, 17, 15, .96); display: flex; align-items: center; justify-content: center; border: 0; padding: 0; width: 100%; height: 100%; max-width: none; max-height: none; color: #f6f4ef; }
.lb:not([open]) { display: none; }
.lb::backdrop { background: transparent; }
.lb img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; background: none; }
.lb button { position: absolute; background: none; border: 0; color: inherit; cursor: pointer; padding: 14px; display: grid; place-items: center; border-radius: 999px; }
.lb button:hover { background: rgba(255, 255, 255, .08); }
.lb-x { top: 12px; right: 12px; } .lb-p { left: 8px; top: 50%; transform: translateY(-50%); } .lb-n { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-c { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font: 400 12px/1 var(--mono); letter-spacing: .06em; opacity: .7; }

/* ---------- motion ---------- */
html.js img.fade:not(.in) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  html.js img.fade:not(.in) { opacity: 1; }
}

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .tile { grid-column: span 6; }
  .tiles-home .tile { grid-column: span 6; }
  .tiles-home .tile-big { grid-column: span 12; }
}
@media (max-width: 760px) {
  .quotes { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .hd { padding-top: 18px; padding-bottom: 18px; }
  .nav { gap: 16px; }
  .nav a { font-size: 15px; }
  .tile, .tiles-home .tile, .tiles-home .tile-big { grid-column: span 12; }
  .tile-cap { padding-bottom: 14px; }
  .ix-link { grid-template-columns: 2.2em 1fr auto; gap: 10px; padding: 14px 0; }
  .ix-c { display: none; }
  .p-body, .about, .contact { grid-template-columns: 1fr; }
  .facts, .about-img { position: static; }
  .facts { grid-template-columns: 1fr 1fr; }
  .gallery { columns: 1; }
  .enq { grid-template-columns: 1fr; }
  .svc li { grid-template-columns: 1fr auto; }
  .svc-l { grid-column: 1 / -1; grid-row: 2; }
  .svc-strip .svc-l { display: none; }
}
@media (max-width: 420px) {
  .brand { font-size: 15px; }
  .l-editorial .brand { font-size: 22px; }
  .nav { gap: 12px; }
  .nav a { font-size: 14px; }
}
