/* Marbox Interiors: an explorable studio wall, typewriter labels and colour-blocked bands.
   Palette from the brand book: Charcoal Black #2C2929, Earth Clay #9A7C5F, Warm Brown #875A3C, Beige Sand #E5DACB.
   Type: DM Sans (the font of the previous marboxinteriors.ae) with its companion DM Mono for labels. */

@font-face { font-family: 'DM Sans'; src: url(/assets/fonts/dm-sans.woff2) format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(/assets/fonts/dm-sans-italic.woff2) format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url(/assets/fonts/dm-mono-400.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url(/assets/fonts/dm-mono-500.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --paper: #FCFAF7;
  --sand: #F2ECE4;
  --mist: #E8DFD3;
  --beige: #E5DACB;
  --clay: #9A7C5F;
  --brown: #875A3C;
  --brown-2: #6E4730;
  --ink: #2C2929;
  --ink-2: #6A605A;
  --line: rgba(44, 41, 41, .18);
  --sans: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
  --pad: clamp(16px, 2.6vw, 40px);
  --gap: clamp(14px, 1.8vw, 28px);
  --section: clamp(80px, 10vw, 160px);
  --header: 54px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 300 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--brown); outline-offset: 3px; }
::selection { background: var(--beige); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------- type ---------- */
.mono { font: 400 12px/1.5 var(--mono); letter-spacing: .02em; text-transform: uppercase; }
.idx { color: var(--ink-2); margin: 0 0 16px; }
.head { font: 700 clamp(28px, 3.1vw, 50px)/1.08 var(--sans); letter-spacing: -.012em; text-transform: uppercase; color: var(--brown); }
.head em { font-style: italic; }
.head.xl { font-size: clamp(34px, 4.3vw, 70px); }
.mega { font: 700 clamp(56px, 13vw, 220px)/.86 var(--sans); letter-spacing: -.035em; text-transform: uppercase; margin-left: -.04em; color: var(--brown); }
.lead { font-size: clamp(18px, 1.45vw, 22px); line-height: 1.5; max-width: 40ch; }
.link { display: inline-flex; align-items: center; gap: 10px; padding-bottom: 4px; border-bottom: 1px solid currentColor; }
.arr { display: inline-block; transition: transform .4s var(--ease); }
a:hover .arr { transform: translateX(4px); }
.btn { display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 14px 22px; background: var(--brown); color: var(--paper); transition: background .3s; }
.btn:hover { background: var(--brown-2); }
.btn[disabled] { opacity: .5; cursor: wait; }

/* ---------- logo: one cached SVG, coloured by currentColor ---------- */
.logo { display: block; aspect-ratio: 200 / 55.2; background: currentColor;
  -webkit-mask: url(/assets/brand/marbox-interiors.svg) no-repeat center / contain; mask: url(/assets/brand/marbox-interiors.svg) no-repeat center / contain; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 var(--pad); color: var(--brown); background: rgba(252, 250, 247, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: block; width: 116px; justify-self: center; }
.nav { display: flex; gap: clamp(20px, 2.6vw, 44px); }
.nav-r { justify-self: end; }
.nav a { font: 400 12px/1 var(--mono); letter-spacing: .02em; text-transform: uppercase; padding: 8px 0; display: inline-flex; align-items: center; gap: 8px; border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.ico { width: 14px; height: 11px; }
.menu-btn { display: none; justify-self: end; font: 400 12px/1 var(--mono); text-transform: uppercase; padding: 10px 0; }
.menu { position: fixed; inset: var(--header) 0 0; z-index: 45; background: var(--paper); padding: 36px var(--pad) 32px; display: flex; flex-direction: column; justify-content: space-between; }
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { font: 300 clamp(40px, 12vw, 64px)/1.1 var(--sans); letter-spacing: -.03em; text-transform: uppercase; }
.menu-contact { color: var(--ink-2); line-height: 2; }
body.menu-open { overflow: hidden; }

/* ---------- media ---------- */
.media { overflow: hidden; background: var(--mist); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }

/* ---------- home: the explorable wall ---------- */
.canvas { --u: max(calc(100vw / 1440), .62px); position: relative; height: calc(100vh - var(--header)); height: calc(100svh - var(--header)); min-height: 520px; overflow: hidden; background: var(--paper); }
.world { position: absolute; left: 50%; top: 50%; width: calc(var(--cw) * var(--u)); height: calc(var(--ch) * var(--u)); margin: calc(var(--ch) * var(--u) / -2) 0 0 calc(var(--cw) * var(--u) / -2); }
.tile { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--tw) * var(--u)); will-change: transform; }
.tile .media { aspect-ratio: 1 / var(--r); }
.tile .cap { display: block; margin-top: 8px; font-size: 11px; }
a.tile:hover img { transform: scale(1.05); }
a.tile:hover .cap { text-decoration: underline; text-underline-offset: 3px; }
.tile.note { margin: 0; font: italic 700 calc(46 * var(--u))/1.05 var(--sans); letter-spacing: -.02em; color: var(--brown); }

/* ---------- sections ---------- */
.intro, .work, .process, .gallery, .svc-grid, .faq, .timeline, .why, .contact { padding: var(--section) 0 0; }
.band { margin-top: var(--section); padding: var(--section) 0; }
.band.sand { background: var(--sand); }
.band.mist { background: var(--mist); }
.band.ink { background: var(--ink); color: var(--paper); }
.band.ink .idx { color: rgba(252, 250, 247, .6); }
.band + .band { margin-top: 0; }
.process + .band, .faq + .band { margin-top: var(--section); }
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 56px); }
.row-head .head { max-width: 22ch; }

.intro .idx { grid-column: 1 / 3; }
.intro-head { grid-column: 3 / 8; }
.intro-head .head { font-size: clamp(30px, 3.6vw, 60px); max-width: 16ch; margin-bottom: 28px; }
.intro-p { font-size: clamp(17px, 1.25vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 44ch; margin: 0; }
.quick { grid-column: 9 / 13; align-self: end; }
.quick ul { border-top: 1px solid var(--line); }
.quick a { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: color .3s; }
.quick .q-name { font: 300 clamp(22px, 1.9vw, 30px)/1.2 var(--sans); text-transform: uppercase; letter-spacing: -.01em; }
.quick .mono { color: var(--ink-2); }
.quick a:hover { color: var(--brown); }

/* project cards: four equal columns, rows aligned */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(40px, 4.5vw, 72px); align-items: start; }
.card .media { aspect-ratio: 4 / 5; }
.card a:hover img, .strip-item:hover img { transform: scale(1.04); }
.card-t { font: 400 16px/1.35 var(--sans); margin-top: 14px; }
.meta { color: var(--ink-2); font-size: 11px; margin: 6px 0 0; }
.card.out { display: none; }
.empty { color: var(--ink-2); }

/* services band */
.svc-head { grid-column: 1 / 6; align-self: start; }
.svc-head .head { margin-bottom: 24px; }
.svc-head p:not(.idx) { max-width: 38ch; color: var(--ink-2); }
.svc-list { grid-column: 7 / 13; border-top: 1px solid var(--line); }
.svc-list a { display: grid; grid-template-columns: 52px 1fr auto; align-items: baseline; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: color .3s; }
.svc-name { font: 300 clamp(19px, 1.6vw, 26px)/1.3 var(--sans); }
.svc-list a:hover { color: var(--brown); }

/* quote band */
.quote-band .wrap { text-align: center; }
.quote { font: italic 300 clamp(26px, 3vw, 48px)/1.25 var(--sans); letter-spacing: -.015em; max-width: 30ch; margin: 0 auto 28px; }

/* horizontal strips: cards the width of one grid column of four, first card on the page margin */
.concepts, .related { container-type: inline-size; }
.strip { --edge: max(var(--pad), calc((100cqw - 1680px) / 2 + var(--pad))); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--edge) 6px; scroll-padding-left: var(--edge); scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-item { flex: 0 0 calc((min(100cqw, 1680px) - 2 * var(--pad) - 3 * var(--gap)) / 4); scroll-snap-align: start; }
.strip-item .media { aspect-ratio: 4 / 5; }
.strip-nav { display: flex; gap: 6px; }
.strip-nav button { width: 44px; height: 44px; border: 1px solid var(--brown); color: var(--brown); font-size: 16px; transition: background .3s, color .3s; }
.strip-nav button:hover { background: var(--brown); color: var(--paper); }

/* numbered steps, pillars, reasons */
.steps { display: grid; gap: var(--gap); }
.cols5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { border-top: 1px solid var(--ink); padding-top: 18px; }
.step-t { font: 400 17px/1.35 var(--sans); margin: 22px 0 8px; }
.steps p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(40px, 6vw, 96px) 0 0; }
.page-head .lead { margin: clamp(24px, 3vw, 40px) 0 0; color: var(--ink-2); }
.filters { display: flex; justify-content: space-between; gap: 14px 32px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 56px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: 400 11px/1 var(--mono); text-transform: uppercase; padding: 10px 12px; border: 1px solid var(--line); transition: border-color .3s, background .3s, color .3s; }
.chips button:hover { border-color: var(--brown); }
.chips button[aria-pressed="true"] { background: var(--brown); color: var(--paper); border-color: var(--brown); }

/* project page */
.p-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; height: calc(100vh - var(--header)); height: min(calc(100svh - var(--header)), 62vw); min-height: 420px; }
.p-hero .media { height: 100%; }
.p-intro { padding: clamp(48px, 6vw, 96px) 0 0; }
.p-title { grid-column: 1 / 7; }
.crumbs { color: var(--ink-2); margin: 0 0 18px; }
.crumbs a:hover { color: var(--ink); }
.p-body { grid-column: 8 / 13; padding-top: 34px; }
.facts { margin: 32px 0 14px; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; text-align: right; }
.facts a:hover { color: var(--brown); }
.note { color: var(--clay); font-size: 11px; margin: 0; }
.p-collage .grid { align-items: center; }
.collage { grid-column: 1 / 7; position: relative; padding-bottom: 14%; }
.collage .c1 { width: 66%; aspect-ratio: 4 / 5; }
.collage .c2 { position: absolute; right: 2%; bottom: 0; width: 44%; aspect-ratio: 4 / 5; box-shadow: 0 30px 60px -30px rgba(44, 41, 41, .35); }
.collage-text { grid-column: 8 / 13; }
.collage-text .head { margin-bottom: 24px; }
.collage-text p:not(.idx) { color: var(--ink-2); max-width: 44ch; }
.collage-text .idx + .head { margin-top: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.gallery-grid .media { aspect-ratio: 4 / 5; }

/* services page */
.svc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(56px, 6vw, 96px); align-items: start; }
.svc .media { aspect-ratio: 4 / 5; margin-bottom: 18px; }
.svc .mono { color: var(--ink-2); margin: 0 0 8px; }
.svc-t { font: 300 clamp(22px, 2vw, 30px)/1.2 var(--sans); text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 10px; }
.svc p:last-child { color: var(--ink-2); max-width: 46ch; margin: 0; }
.svc { scroll-margin-top: calc(var(--header) + 24px); }
.faq-head { grid-column: 1 / 5; }
.faq-list { grid-column: 6 / 13; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; font: 300 clamp(18px, 1.5vw, 22px)/1.35 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 18px/1 var(--mono); transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); max-width: 56ch; padding-bottom: 22px; margin: 0; }

/* studio page */
.tl-head { grid-column: 1 / 5; }
.tl { grid-column: 6 / 13; border-top: 1px solid var(--line); }
.tl li { display: grid; grid-template-columns: 140px 1fr; gap: var(--gap); padding: 22px 0; border-bottom: 1px solid var(--line); }
.tl .mono { color: var(--brown); padding-top: 4px; }
.tl p { margin: 0; font-size: 17px; }

/* ---------- footer and the contact card ---------- */
.site-footer { background: var(--brown); color: var(--paper); padding: clamp(56px, 7vw, 110px) 0; margin-top: var(--section); }
.band + .site-footer, .contact + .site-footer { margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.foot-left { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 72px); height: 100%; justify-content: space-between; }
.polaroid { width: min(300px, 100%); background: var(--paper); color: var(--ink); padding: 12px 12px 18px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45); }
.polaroid .media { aspect-ratio: 4 / 5; }
.polaroid figcaption { margin-top: 12px; font-size: 11px; }
.foot-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; font-size: 11px; line-height: 1.75; }
.foot-index p { margin: 0; }
.foot-index .dim { opacity: .6; margin-bottom: 6px; }
.foot-index a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-form { background: var(--paper); color: var(--ink); padding: clamp(22px, 2.6vw, 40px); display: flex; flex-direction: column; gap: 26px; }
.contact .card-form { border: 1px solid var(--line); }
.cf-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cf-title { margin: 0; font: 700 clamp(24px, 2.2vw, 34px)/1.1 var(--sans); text-transform: uppercase; letter-spacing: -.01em; color: var(--brown); }
.cf-title em { font-style: italic; }
.clock { margin: 0; color: var(--ink-2); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.intents { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; }
.intent { cursor: pointer; }
.intent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.intent span { font: 400 11px/1 var(--mono); text-transform: uppercase; color: var(--ink-2); padding-bottom: 5px; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.intent input:checked + span { color: var(--brown); border-bottom-color: var(--brown); }
.intent input:focus-visible + span { outline: 1px solid var(--brown); outline-offset: 3px; }
.field { grid-column: 1 / -1; min-width: 0; }
.field.half { grid-column: span 1; }
.field input, .field select, .field textarea { width: 100%; font: 400 12px/1.4 var(--mono); text-transform: uppercase; color: var(--ink); background: transparent; border: 1px solid var(--brown); border-radius: 0; padding: 12px 12px; -webkit-appearance: none; appearance: none; }
.field textarea { text-transform: none; font: 300 15px/1.5 var(--sans); resize: vertical; min-height: 96px; }
.field ::placeholder { color: var(--ink-2); opacity: 1; text-transform: uppercase; font: 400 12px/1.4 var(--mono); }
.field select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23875A3C'/%3E%3C/svg%3E") no-repeat right 12px center; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brown-2); box-shadow: inset 0 0 0 1px var(--brown-2); }
.field [aria-invalid="true"] { border-color: #a0442c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 6px; }
.form-status { margin: 0; font-size: 14px; color: var(--ink-2); }
.form-status.ok { color: #3f6b46; }
.form-status.err { color: #a0442c; }
.cf-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.cf-bottom .logo { width: 110px; color: var(--brown); }
.cf-bottom .mono { font-size: 11px; color: var(--ink-2); }
.contact-info { display: flex; flex-direction: column; gap: 40px; }
.contact-info .facts { margin: 0; }
.nf .mono { margin-top: 32px; }

/* ---------- reveal on scroll: main.js adds .wait only to things below the fold ---------- */
.rv { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rv.wait { opacity: 0; transform: translateY(26px); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-item { flex-basis: calc((100cqw - 2 * var(--pad) - var(--gap)) / 2.3); }
  .cols5, .cols4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .svc-head, .svc-list, .faq-head, .faq-list, .tl-head, .tl { grid-column: 1 / -1; }
  .svc-list, .faq-list, .tl { margin-top: 32px; }
  .intro .idx, .intro-head, .quick { grid-column: 1 / -1; }
  .quick { margin-top: 44px; }
  .p-title, .p-body { grid-column: 1 / -1; }
  .collage, .collage-text { grid-column: 1 / -1; }
  .collage-text { margin-top: 48px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --header: 52px; }
  .site-header { grid-template-columns: auto 1fr; }
  .nav { display: none; }
  .brand { justify-self: start; width: 104px; }
  .menu-btn { display: block; }
  .canvas { height: 78svh; min-height: 480px; }
  .world { width: var(--mw); height: var(--mh); margin: calc(var(--mh) / -2) 0 0 calc(var(--mw) / -2); }
  .tile { left: var(--mx); top: var(--my); width: calc(var(--tw) * .56px); }
  .tile.note { font-size: calc(46 * .56px); }
  .cards { grid-template-columns: 1fr; }
  .strip-item { flex-basis: 72cqw; }
  .strip-nav { display: none; }
  .cols5, .cols4, .cols3 { grid-template-columns: 1fr; row-gap: 32px; }
  .p-hero { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .p-hero .media { aspect-ratio: 4 / 5; height: auto; }
  .p-hero .media + .media { display: none; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .svc-cols { grid-template-columns: 1fr; }
  .tl li { grid-template-columns: 1fr; gap: 6px; }
  .form { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .cf-actions { flex-direction: column-reverse; align-items: stretch; }
  .cf-actions .btn { text-align: center; }
}

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