/* ============================================================
   THE UPPER LAYER
   A charcoal gallery wall with one warm light, cream type and gold.
   Words and the piece never overlap on wide screens.
   ============================================================ */
:root {
  color-scheme: dark;
  --wall: #242223;
  --wall-2: #2c2a2a;
  --stone: #1c1815;
  --gold: #be9668;
  --gold-hi: #d8b080;
  --cream: #f1e7d5;
  --cream-2: rgba(241, 231, 213, 0.76);
  --line: rgba(241, 231, 213, 0.14);
  --paper: #f5ecdf;
  --ink: #231c17;
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page: 1280px;
  --gutter: 40px;
  --head: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font: 400 16px/1.6 var(--sans); color: var(--cream); background: var(--wall); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ol, ul { list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; text-wrap: balance; font-variant-numeric: lining-nums; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
section { scroll-margin-top: var(--head); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.wrap { width: 100%; max-width: calc(var(--page) + var(--gutter) * 2); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)); }
.display { font-size: clamp(48px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.02em; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 30; background: var(--wall); border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease); }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: var(--head); gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font: 600 22px/1 var(--serif); letter-spacing: 0.04em; color: var(--gold-hi); }
.brand img { width: 36px; height: 36px; border-radius: 6px; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav-link { font-size: 15px; color: var(--cream-2); transition: color 160ms var(--ease); }
.nav-link:hover { color: var(--cream); }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--cream); }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; border-radius: 4px; border: 1px solid transparent; font: 600 15px/1 var(--sans); cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold); color: #1a1109; }
.btn-gold:hover { background: var(--gold-hi); }
.btn-line { border-color: rgba(241, 231, 213, 0.38); }
.btn-line:hover { border-color: var(--cream); }
.btn-dark { background: var(--stone); color: var(--cream); }
.btn-dark:hover { background: #000; }
.btn-secondary { background: var(--stone); color: var(--cream); }
.btn-small { height: 40px; padding: 0 18px; font-size: 14px; }
.text-link { border-bottom: 1px solid var(--gold); padding-bottom: 2px; transition: color 160ms var(--ease); }
.text-link:hover { color: var(--gold-hi); }

/* Story: the stage holds still, the words change beside the piece */
.story { position: relative; }
.story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; cursor: grab; background: var(--wall); }
.story-stage:active { cursor: grabbing; }
.story-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.chapter { position: relative; z-index: 1; display: flex; align-items: center; height: 100vh; height: 100svh; min-height: 620px; padding-top: var(--head); pointer-events: none; }
.chapter.hero { margin-top: -100vh; margin-top: -100svh; }
@media (max-height: 620px) { .chapter.hero { margin-top: -620px; } }
.chapter .words { max-width: min(30rem, 40%); text-shadow: 0 1px 24px rgba(20, 18, 19, 0.7); }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: block; }
.chapter h1 { font-size: clamp(52px, 6.8vw, 104px); line-height: 0.96; letter-spacing: -0.025em; white-space: nowrap; }
.chapter h2 { font-size: clamp(48px, 6vw, 92px); line-height: 0.98; letter-spacing: -0.02em; white-space: nowrap; }
.chapter p { margin-top: 24px; font-size: 17px; line-height: 1.65; color: var(--cream-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.actions .btn { pointer-events: auto; text-shadow: none; }
.no-webgl .story-stage { background: var(--wall-2); }


/* For companies: a paper band */
.companies { background: var(--paper); color: var(--ink); padding-block: 112px; }
.companies-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: end; }
.companies-head p { font-size: 18px; margin-bottom: 28px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 72px; }
.steps li { border-top: 2px solid var(--ink); padding-top: 20px; }
.steps span { display: block; font: 500 56px/1 var(--serif); font-variant-numeric: lining-nums; color: #8a6236; }
.steps h3 { margin: 14px 0 10px; font-size: 28px; line-height: 1.1; }
.steps p { font-size: 15px; color: #4a3f36; }

/* Enquiry */
.enquiry { background: var(--wall); padding-block: 112px; }
.enquiry-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: start; }
.enquiry-head h2 { font-size: clamp(44px, 5.2vw, 76px); }
.enquiry-head > p { margin-top: 24px; font-size: 18px; color: var(--cream-2); max-width: 28rem; }
.contact-list { margin-top: 40px; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.contact-list span { color: var(--gold); }
.enquiry-form { color-scheme: light; display: grid; gap: 20px; padding: 40px; background: var(--paper); color: var(--ink); border-radius: 8px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; background: #fffaf2; border: 1px solid rgba(35, 28, 23, 0.28); border-radius: 4px; outline: none; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8a6236; box-shadow: 0 0 0 3px rgba(190, 150, 104, 0.3); }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.row-3 { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 20px; }
.form-ok { display: none; padding: 16px; border: 1px solid rgba(35, 28, 23, 0.3); border-radius: 4px; font-size: 14px; }
.form-ok.show { display: block; }
.form-ok p { margin-bottom: 12px; }
.form-ok textarea { width: 100%; margin-bottom: 12px; padding: 12px; background: #fffaf2; border: 1px solid rgba(35, 28, 23, 0.25); border-radius: 4px; font: 400 13px/20px ui-monospace, Menlo, Consolas, monospace; resize: vertical; }

/* Footer */
.site-footer { background: var(--stone); padding-block: 64px 32px; overflow: hidden; }
.giant { font: 600 clamp(48px, 13.5vw, 196px)/0.95 var(--serif); letter-spacing: -0.015em; color: var(--gold); white-space: nowrap; text-align: center; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--cream-2); }
.footer-base a:hover { color: var(--cream); }

@media (max-width: 1100px) {
  .companies-head, .enquiry-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Tall screens: the piece sits high, the words sit in a solid panel below it */
@media (max-aspect-ratio: 23/20) {
  .chapter { align-items: flex-end; padding-top: 0; }
  .chapter .wrap { padding: 0; }
  .chapter .words { max-width: none; padding: 24px max(var(--gutter), env(safe-area-inset-left, 0px)) 28px; background: rgba(28, 26, 27, 0.94); border-top: 1px solid var(--line); text-shadow: none; }
  .chapter h1 { font-size: clamp(40px, 11vw, 80px); white-space: normal; }
  .chapter h1 .line { display: inline; overflow: visible; }
  .chapter h1 .line > span { display: inline; }
  .chapter h2 { font-size: clamp(40px, 10vw, 72px); white-space: normal; }
  .chapter h2 .line { display: inline; overflow: visible; }
  .chapter h2 .line > span { display: inline; }
  .chapter p { margin-top: 12px; font-size: 15px; line-height: 1.55; }
  .actions { margin-top: 18px; }
  .actions .btn { flex: 1 1 140px; height: 46px; padding: 0 14px; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; top: var(--head); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--wall); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav .nav-link { padding: 14px 0; }
  .companies, .enquiry { padding-block: 72px; }
  .steps { grid-template-columns: minmax(0, 1fr); margin-top: 48px; }
  .row-2, .row-3 { grid-template-columns: minmax(0, 1fr); }
  .enquiry-form { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (max-aspect-ratio: 23/20) {
  /* keep a space between headline lines when they run together on a phone */
  .chapter h1 .line::after, .chapter h2 .line::after { content: " "; }
  .chapter h1 .line, .chapter h2 .line { padding: 0; margin: 0; }
  .chapter h1 .line > span, .chapter h2 .line > span { white-space: normal; }
}
.chapter .words { width: fit-content; }
@media (max-aspect-ratio: 23/20) { .chapter .words { width: auto; } }

/* ---------- Sizes: one still wall, choose a size to come closer ---------- */
.sizes { background: var(--wall); scroll-margin-top: 0; }
.size-story { position: relative; }
.size-pin { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; }
.size-stage { position: absolute; inset: 0; }
.size-stage canvas, .size-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.size-stage canvas { cursor: grab; }
.size-stage svg { pointer-events: none; }
.size-ui { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); grid-template-rows: 1fr auto auto auto 1fr; column-gap: 32px; padding-top: calc(var(--head) + 16px); padding-bottom: 24px; pointer-events: none; }
.size-intro { grid-area: 2 / 1; text-shadow: 0 1px 24px rgba(20, 18, 19, 0.8); }
.size-intro h2 { font-size: clamp(44px, 5vw, 76px); white-space: nowrap; }
.size-intro p { margin-top: 16px; font-size: 16px; color: var(--cream-2); }
.size-view { grid-area: 1 / 2 / -1 / 3; min-height: 0; }
.size-picker { grid-area: 3 / 1; display: grid; gap: 8px; margin-top: 28px; pointer-events: auto; }
.size-picker button { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 64px; padding: 8px 16px; text-align: left; background: rgba(26, 23, 22, 0.72); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; transition: background-color 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease); }
.size-picker button:hover { border-color: rgba(241, 231, 213, 0.4); }
.size-picker button[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); transform: translateX(8px); }
.size-picker strong { font: 600 30px/1 var(--serif); font-variant-numeric: lining-nums; color: var(--gold-hi); }
.size-picker button[aria-pressed="true"] strong { color: var(--ink); }
.size-picker span { font-size: 14px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.size-picker small { display: block; font-size: 13px; opacity: 0.72; }
.size-spec { display: none; }
.size-act { grid-area: 4 / 1; margin-top: 20px; pointer-events: auto; }
.size-stage text { text-anchor: middle; fill: #f1e7d5; font-family: var(--serif); font-variant-numeric: lining-nums; paint-order: stroke; stroke: rgba(20, 17, 18, 0.55); stroke-width: 3px; }
.size-stage .dim { fill: none; stroke: rgba(241, 231, 213, 0.85); stroke-width: 1; }
.size-stage .dim.head { fill: #f1e7d5; stroke: none; }
.size-stage .logo { fill: none; stroke: #231c17; stroke-width: 1; }
.size-stage .logo.head { fill: #231c17; stroke: none; }
.size-stage .name { font-size: 44px; font-weight: 600; }
.size-stage .mm { font-size: 20px; font-weight: 600; }
.size-stage .tag { fill: #f5ecdf; stroke: #231c17; stroke-width: 1; }
.size-stage .tag-text { fill: #231c17; stroke: none; font-family: var(--sans); font-size: 12px; font-weight: 600; }
@media (max-aspect-ratio: 23/20) {
  .size-ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto auto; padding-bottom: 16px; }
  .size-intro { grid-area: 1 / 1; text-align: center; }
  .size-intro h2 { font-size: clamp(38px, 10vw, 64px); }
  .size-intro p { display: none; }
  .size-view { grid-area: 2 / 1; }
  .size-picker { grid-area: 3 / 1; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 8px; }
  .size-picker button { display: flex; justify-content: center; min-height: 48px; padding: 4px; }
  .size-picker button[aria-pressed="true"] { transform: none; }
  .size-picker strong { font-size: 24px; }
  .size-picker span { display: none; }
  .size-spec { display: block; grid-area: 4 / 1; margin-top: 10px; text-align: center; font-size: 14px; color: var(--cream-2); text-shadow: 0 1px 12px rgba(20, 18, 19, 0.9); }
  .size-act { grid-area: 5 / 1; margin-top: 10px; }
  .size-act .btn { width: 100%; height: 46px; }
  .size-stage .name { font-size: 30px; }
  .size-stage .mm { font-size: 16px; }
}
/* without 3D the words and sizes simply stack */
.sizes.no-webgl .size-story, .sizes.no-webgl .size-pin { height: auto; min-height: 0; position: static; }
.sizes.no-webgl .size-stage, .sizes.no-webgl .size-view { display: none; }
.sizes.no-webgl .size-ui { display: flex; flex-direction: column; gap: 16px; padding-block: 96px; pointer-events: auto; }
.sizes.no-webgl .size-picker span { display: block; }
/* ---------- The three steps stay together beside the piece ---------- */
.together { position: relative; z-index: 1; height: 200vh; height: 200svh; pointer-events: none; }
.together .chapter { position: sticky; top: 0; }
.beat { transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.story.live .beat:not(.on) { opacity: 0; transform: translateY(20px); }
.beat + .beat { margin-top: 40px; }
.together .beat h2 { font-size: clamp(34px, 3.6vw, 54px); line-height: 1.05; white-space: nowrap; }
.together .beat p { margin-top: 10px; font-size: 16px; line-height: 1.6; }
@media (max-aspect-ratio: 23/20) {
  .beat + .beat { margin-top: 12px; }
  .together .beat h2 { font-size: clamp(24px, 6.6vw, 40px); }
  .together .beat p { margin-top: 2px; font-size: 13px; line-height: 1.45; }
}
/* ---------- Frosted glass buttons with Apple-style continuous corners ---------- */
:root {
  --btn-radius: 16px;             /* corner size, for browsers that draw ordinary round corners */
  --btn-radius-smooth: 24px;      /* corner size where continuous (squircle) corners are supported */
  --glass-blur: blur(12px) saturate(170%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.42), inset 0 -1px 0 rgba(255, 255, 255, 0.1), inset 0 0 14px rgba(255, 255, 255, 0.06), 0 10px 28px -14px rgba(0, 0, 0, 0.65);
}
.btn, .size-picker button {
  border-radius: var(--btn-radius);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.btn-small { --btn-radius: 13px; --btn-radius-smooth: 19px; }
@supports (corner-shape: squircle) {
  .btn, .size-picker button { border-radius: var(--btn-radius-smooth); corner-shape: squircle; }
}
.btn-gold { color: #fff6e8; border-color: rgba(255, 216, 164, 0.55); background: linear-gradient(180deg, rgba(226, 184, 126, 0.24), rgba(190, 150, 104, 0.09)); }
.btn-gold:hover { background: linear-gradient(180deg, rgba(238, 198, 142, 0.38), rgba(190, 148, 98, 0.18)); }
.btn-line { color: var(--cream); border-color: rgba(255, 255, 255, 0.22); background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)); }
.btn-line:hover { border-color: rgba(255, 255, 255, 0.48); background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05)); }
/* on cream paper the glass is barely tinted, so the lettering turns dark */
.btn-dark, .btn-secondary { color: var(--ink); text-shadow: none; border-color: rgba(35, 28, 23, 0.26); background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(35, 28, 23, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 24px -14px rgba(35, 28, 23, 0.45); }
.btn-dark:hover, .btn-secondary:hover { border-color: rgba(35, 28, 23, 0.5); background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(35, 28, 23, 0.13)); }
.size-picker button { border-color: rgba(255, 255, 255, 0.16); background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)); }
.size-picker button:hover { border-color: rgba(255, 255, 255, 0.42); }
.size-picker button[aria-pressed="true"] { color: #fff8ee; border-color: rgba(255, 226, 188, 0.85); background: linear-gradient(180deg, rgba(255, 240, 218, 0.24), rgba(226, 184, 126, 0.12)); }
.size-picker button[aria-pressed="true"] strong { color: #fff8ee; }
/* solid fills where glass is unavailable or the reader asks for less transparency */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn-gold { background: #a98250; }
  .btn-line, .size-picker button { background: rgba(40, 35, 33, 0.92); }
}
@media (prefers-reduced-transparency: reduce) {
  .btn, .size-picker button { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .btn-gold { background: #9c7747; }
  .btn-line, .size-picker button { background: #2e2927; }
  .btn-dark, .btn-secondary { background: var(--stone); color: var(--cream); }
  .size-picker button[aria-pressed="true"] { background: #6a5440; }
}
/* ---------- Final pass ---------- */
/* glass header, matching the buttons */
.site-header { background: rgba(32, 30, 31, 0.62); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
.site-header.scrolled { border-bottom-color: rgba(255, 255, 255, 0.08); }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--wall); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.brand { font-size: 21px; letter-spacing: 0.06em; }
/* hero */
.chapter.hero p { max-width: 27rem; font-size: 17px; }
/* the three steps: a gold numeral beside each */
.beat { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: baseline; }
.beat .num { font: 500 clamp(30px, 3vw, 42px)/1 var(--serif); color: var(--gold-hi); font-variant-numeric: lining-nums; }
.together .words { max-width: min(32rem, 42%); }
.together .beat p { max-width: 25rem; color: var(--cream-2); }
.beat + .beat { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
@media (max-aspect-ratio: 23/20) {
  .together .words { max-width: none; }
  .beat { grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; }
  .beat .num { font-size: 24px; }
  .beat + .beat { margin-top: 10px; padding-top: 10px; }
}
/* sections breathe a little more and read more evenly */
.companies-head p, .enquiry-head > p { line-height: 1.6; }
.steps h3 { font-size: 30px; }
.size-intro h2 { white-space: normal; max-width: 9ch; }
@media (max-aspect-ratio: 23/20) { .size-intro h2 { max-width: none; } }