/* Mathias Wennerberg, architectural visualisation
   Layout: one label column (1/4) and one content column (3/4) on wide screens, stacked on phones.
   Type: Inter Tight for everything, IBM Plex Mono for small labels. Black on white, grey for secondary text. */

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #6b6b6b;      /* small grey text, 5.3:1 on white */
  --muted-lg: #8c8c8c;   /* large grey text only, 3.4:1 on white */
  --rule: #d9d9d9;
  --frame: #ececec;
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --fs-body: clamp(15px, 1.2vw, 18px);
  --fs-mid: clamp(20px, 2.2vw, 32px);
  --fs-statement: clamp(26px, 3.1vw, 48px);
  --fs-menu: clamp(46px, 6.2vw, 96px);
  --pad: max(16px, min(1.7vw, 32px));
  --section-gap: clamp(80px, 8vw, 128px);
  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-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.35;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; transition: opacity 200ms ease; }
a:hover { opacity: 0.55; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 10px 14px; z-index: 30; }
.skip:focus { left: 8px; }

/* Type */
.statement { font-size: var(--fs-statement); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; text-wrap: pretty; max-width: 30em; }
.mid { font-size: var(--fs-mid); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; text-wrap: pretty; }
.grey { color: var(--muted); }
.grey-lg { color: var(--muted-lg); }
.label { font-family: var(--mono); font-size: 12px; line-height: 1.4; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; line-height: 1.4; }
.measure { max-width: 34em; }

/* Layout */
.wrap { padding-inline: max(var(--pad), env(safe-area-inset-left, 0px)) max(var(--pad), env(safe-area-inset-right, 0px)); }
main { display: flex; flex-direction: column; gap: var(--section-gap); }
.intro { padding-top: clamp(96px, 12vw, 200px); display: flex; flex-direction: column; gap: 1.08em; }
.row { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.row > .side { flex: 1 1 200px; }
.row > .main { flex: 3 1 560px; min-width: 0; }
.row > h2.side { font-size: inherit; font-weight: 400; color: var(--muted); }

/* Header */
.site-header { position: relative; z-index: 5; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; min-height: 56px; }
.bar .brand-cell { flex: 1 1 200px; display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 600; padding-block: 12px; }
.nav { flex: 3 1 560px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.nav ul { display: flex; gap: 24px; }
.nav a { display: inline-block; padding-block: 12px; font-weight: 500; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.menu-btn { display: none; min-height: 44px; padding: 12px 0 12px 16px; border: 0; background: none; font-weight: 500; cursor: pointer; }
@media (max-width: 719px) {
  .nav { display: none; }
  .menu-btn { display: block; }
}

/* Menu overlay (phones) */
.menu { position: fixed; inset: 0; z-index: 20; background: var(--paper); overflow-y: auto; display: flex; flex-direction: column; }
.menu[hidden] { display: none; }
.menu-close { min-height: 44px; padding: 12px 0 12px 16px; border: 0; background: none; font-weight: 500; cursor: pointer; }
.menu nav { flex: 1; padding-block: 48px; }
.menu nav ul { display: flex; flex-direction: column; gap: 4px; }
.menu nav a { font-size: var(--fs-menu); font-weight: 600; line-height: 1.06; letter-spacing: -0.02em; color: var(--muted-lg); }
.menu nav a[aria-current="page"] { color: var(--ink); }
.menu .menu-foot { display: flex; flex-direction: column; gap: 6px; padding-block: 20px 32px; border-top: 1px solid var(--ink); }
body.menu-open { overflow: hidden; }

/* Image grid with hover */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; align-items: start; }
.grid .col { display: flex; flex-direction: column; gap: clamp(24px, 2.8vw, 48px); min-width: 0; }
.tile { display: flex; flex-direction: column; gap: 10px; transition: opacity 350ms ease; }
.tile:hover { opacity: 1; }
.tile .frame { position: relative; overflow: hidden; background: var(--frame); }
.tile .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile .prompt { position: absolute; left: 12px; bottom: 12px; padding: 8px 12px; background: var(--paper); font-size: 14px; font-weight: 500; line-height: 1.2; opacity: 0; transform: translateY(6px); transition: opacity 300ms ease, transform 300ms ease; }
.tile .cap { display: flex; flex-wrap: wrap; gap: 0 8px; padding-inline: 8px; line-height: 1.25; }
.grid .col:first-child .tile .cap { padding-left: var(--pad); }
.tile .cap span + span { color: var(--muted); }
.grid:has(.tile:hover) .tile:not(:hover),
.grid:has(.tile:focus-visible) .tile:not(:focus-visible) { opacity: 0.35; }
.tile:hover .frame img, .tile:focus-visible .frame img { transform: scale(1.04); }
.tile:hover .prompt, .tile:focus-visible .prompt { opacity: 1; transform: none; }
.r-4-3 { aspect-ratio: 4 / 3; }
.r-4-5 { aspect-ratio: 4 / 5; }

/* Studio: services list with preview */
.services { display: flex; flex-wrap: wrap; gap: 24px; }
.services ul { flex: 1 1 280px; min-width: 0; }
.services button { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--muted-lg); transition: color 250ms ease; }
.services button[aria-pressed="true"] { color: var(--ink); }
.services figure { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.preview { position: relative; aspect-ratio: 4 / 3; background: var(--frame); overflow: hidden; }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview .soon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.preview .soon::before { content: ""; position: absolute; inset: 8%; border: 1px solid #cfcfcf; }
.preview .soon[hidden] { display: none; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 24px; }
.steps li { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--ink); }

.faq { border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 52px; padding: 14px 0; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 16px; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 18px; max-width: 36em; color: var(--muted); }

/* Project pages */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px 24px; padding-top: 12px; border-top: 1px solid var(--ink); }
.facts div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gallery { display: flex; flex-direction: column; gap: 4px; }
.gallery .g { display: grid; gap: 4px; }
.gallery .g.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery img { width: 100%; height: auto; object-fit: cover; background: var(--frame); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px;
}
textarea.input { line-height: 1.4; resize: vertical; }
.checks { border: 1px solid var(--ink); }
.checks label { display: flex; gap: 12px; align-items: center; padding: 12px; min-height: 44px; cursor: pointer; }
.checks label + label { border-top: 1px solid var(--ink); }
.checks input { margin: 0; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.summary { border: 1px solid var(--ink); padding: 16px; font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer; }
.btn-solid { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; padding: 12px 16px; border: 0; background: var(--ink); color: var(--paper); font-weight: 500; }
.btn-solid:hover { opacity: 0.8; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.enquiry { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px 48px; align-items: start; }
.two-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 16px; }

/* Footer */
.site-footer { margin-top: clamp(96px, 10vw, 160px); padding-bottom: 24px; display: flex; flex-direction: column; gap: clamp(96px, 10vw, 160px); }
.foot { display: flex; flex-direction: column; gap: 48px; }
.foot .row { padding-top: 12px; border-top: 1px solid var(--ink); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px 24px; }
.foot-cols > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.foot-cols h2 { font-size: inherit; font-weight: 400; color: var(--muted); margin-bottom: 4px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.email { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .tile:hover .frame img, .tile:focus-visible .frame img { transform: none; }
}
