/* Rangka demo site. Mona Sans only, self-hosted. One accent (marking orange) for dimension lines. */
@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/mona-sans.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg: #E8E9E4;
  --ink: #1F2320;
  --muted: #646862;
  --faint: #757973;
  --raised: #F5F5F2;
  --panel: #DDDFD8;
  --line: #CFD1CA;
  --mark: #E8622C;          /* dimension lines only */
  --mark-text: #AE4318;     /* measurement text, 4.7:1 on the ground */
  --on-ink: #F2F2EE;
  --blue: #1F6FB2;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gap: 104px;
  --gutter: 20px;
  --font: "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (min-width: 900px) {
  :root { --gap: 160px; --gutter: 48px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: 1344px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 900px) {
  .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
}

h1, h2 { font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
h1 { font-size: 42px; line-height: 1.04; }
h2 { font-size: 32px; line-height: 1.08; }
@media (min-width: 900px) {
  h1 { font-size: 76px; line-height: 1; }
  h2 { font-size: 48px; }
}
.lede { color: var(--muted); max-width: 34ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.4; }

/* Studio label: the first thing on every page */
.demo-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  padding: 9px var(--gutter);
}

/* Header */
.site-header { position: relative; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.wordmark { font-weight: 500; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.menu-btn { min-height: 44px; padding: 0 0 0 16px; font-size: 16px; }
.nav-desktop { display: none; }
.menu-panel { border-top: 1px solid var(--line); }
.menu-panel ul { padding: 8px 0 16px; }
.menu-panel a { display: flex; align-items: center; min-height: 52px; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; }
@media (min-width: 900px) {
  .menu-btn, .menu-panel { display: none !important; }
  .nav-desktop { display: flex; gap: 32px; }
  .nav-desktop a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; text-decoration: none; }
  .nav-desktop a:hover, .nav-desktop a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
}

/* Buttons and text links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--ink); color: var(--on-ink);
  font-weight: 500; font-size: 16px; letter-spacing: 0;
  text-decoration: none; border-radius: 0; border: 0;
  transition: transform 140ms var(--ease-out), background-color 140ms var(--ease-out);
}
.btn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #363B37; }
}
.link {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}

/* Photos: fixed ratios so nothing jumps. Already graded, never filtered. */
.ph { display: block; background: var(--panel); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.r45 { aspect-ratio: 4 / 5; }
.r34 { aspect-ratio: 3 / 4; }
.r11 { aspect-ratio: 1 / 1; }

/* ---------- Home ---------- */
.hero { margin-top: 40px; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero-text .btn { margin-top: 12px; }
.hero-figure { margin-top: 48px; }
.arch-wrap { container-type: inline-size; }
.arch {
  aspect-ratio: 1 / 1.04;
  border-radius: 180px 180px 0 0;
  border-top-left-radius: 50cqw;
  border-top-right-radius: 50cqw;
}
.hero-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* Dimension line: the one orange thing. Draws outward from the centre on load. */
.dim { position: relative; height: 24px; margin-top: 16px; }
.dim-line {
  position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -0.5px;
  background: var(--mark);
  transform-origin: 50% 50%;
  animation: dim-draw 700ms cubic-bezier(0.16, 1, 0.3, 1) 250ms backwards;
}
.dim-tick {
  position: absolute; top: 50%; width: 1px; height: 13px; margin-top: -6.5px; background: var(--mark);
  animation: dim-fade 220ms ease-out 700ms backwards;
}
.dim-tick.l { left: 0; }
.dim-tick.r { right: 0; }
.dim-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 0 10px; background: var(--bg); color: var(--mark-text);
  font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap;
  animation: dim-label 360ms ease-out 800ms backwards;
}
@keyframes dim-draw { from { transform: scaleX(0); } }
@keyframes dim-fade { from { opacity: 0; } }
@keyframes dim-label { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .dim-line, .dim-tick, .dim-label { animation: none; }
}

@media (min-width: 900px) {
  .hero { margin-top: 72px; }
  .hero .grid { align-items: start; }
  .hero-text { grid-column: 1 / 6; padding-top: 24px; gap: 28px; }
  .hero-text .lede { font-size: 19px; }
  .hero-figure { grid-column: 7 / 13; margin-top: 0; }
  .arch { aspect-ratio: 612 / 640; }
}

.section { margin-top: var(--gap); }

/* Sketch pad showcase */
.sp-copy h2 { margin-bottom: 20px; }
.sp-copy p { color: var(--muted); max-width: 36ch; }
.sp-panel { margin-top: 40px; background: var(--raised); border-radius: 22px; padding: 12px; }
.sp-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--panel); }
.sp-photo img { width: 100%; height: 100%; object-fit: cover; }
.sp-photo svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sp-chips { display: flex; gap: 6px; margin-top: 12px; }
.sp-chip {
  flex: 1 1 0; min-width: 0; padding: 9px 4px; border-radius: 8px;
  background: var(--panel); font-size: 13px; line-height: 1.1; text-align: center; white-space: nowrap;
}
.sp-chip.on { background: var(--ink); color: var(--on-ink); }
.sp-finish { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 0 2px; }
.sp-swatch { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.sp-swatch.sel { box-shadow: 0 0 0 2px var(--raised), 0 0 0 4px var(--ink); }
.sp-finish .name { margin-left: auto; font-size: 14px; font-weight: 500; }
.sp-send {
  margin-top: 14px; min-height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--on-ink); font-size: 15px; font-weight: 500;
}
.sp-reach { margin-top: 32px; margin-left: 40px; }
.sp-reach h3 { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.bubble {
  background: #DCE6D6; color: var(--ink);
  border-radius: 14px 14px 14px 4px; padding: 8px; max-width: 300px;
}
.bubble-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--panel); }
.bubble-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bubble-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bubble-text { padding: 8px 4px 0; font-size: 15px; line-height: 1.4; }
.bubble-text span { display: block; }
.bubble-text .first { font-weight: 500; }
.bubble-time { display: block; text-align: right; font-size: 11px; color: var(--muted); padding: 2px 4px 0; }
.sp-cta { margin-top: 36px; }
@media (min-width: 900px) {
  .sp-grid { align-items: start; grid-template-rows: auto 1fr; }
  .sp-copy { grid-column: 1 / 5; grid-row: 1; }
  .sp-cta { grid-column: 1 / 5; grid-row: 2; margin-top: 28px; align-self: start; }
  .sp-panel { grid-column: 6 / 10; grid-row: 1 / span 2; margin-top: 0; }
  .sp-reach { grid-column: 10 / 13; grid-row: 1 / span 2; align-self: end; margin: 0; }
}

/* Trades */
.trades a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 80px; padding: 12px 0; text-decoration: none;
  border-top: 1px solid var(--line);
  font-size: 26px; letter-spacing: -0.03em; font-weight: 500; line-height: 1.15;
}
.trades li:last-child a { border-bottom: 1px solid var(--line); }
.trades .ph { width: 56px; height: 56px; flex: none; }
@media (min-width: 900px) {
  .trades ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; }
  .trades a { flex-direction: column-reverse; align-items: stretch; justify-content: flex-end; gap: 14px; border: 0 !important; padding: 0; font-size: 22px; }
  .trades .ph { width: 100%; height: auto; aspect-ratio: 3 / 4; }
}
@media (hover: hover) {
  .trades a:hover span.t { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
}
.trades a:focus-visible span.t { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* Selected work */
.sw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.sw-item a { text-decoration: none; display: block; }
.sw-item figcaption { margin-top: 12px; font-size: 15px; }
.sw-item figcaption span { color: var(--muted); }
.sw-phone { display: grid; gap: 40px; }
.sw-desk { display: none; }
@media (min-width: 900px) {
  .sw-phone { display: none; }
  .sw-desk { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .sw-desk .a { grid-column: 1 / 8; }
  .sw-desk .a .ph { height: 560px; aspect-ratio: auto; }
  .sw-desk .b { grid-column: 9 / 13; margin-top: 160px; }
}

/* Contact + footer */
#contact { scroll-margin-top: 24px; }
.contact h2 { margin-bottom: 28px; }
.contact p { margin-top: 24px; color: var(--muted); }
.site-footer { margin-top: var(--gap); padding-bottom: 32px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Work ---------- */
.work-head { margin-top: 40px; }
@media (min-width: 900px) { .work-head { margin-top: 72px; } }
.tabs-wrap { position: relative; margin-top: 28px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; position: relative; }
.tabs::-webkit-scrollbar { display: none; }
.tab { min-height: 48px; flex: none; color: var(--muted); font-size: 16px; padding: 0; }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.tab-ind { position: absolute; left: 0; bottom: 0; height: 2px; width: 1px; background: var(--ink); transform-origin: 0 50%; will-change: transform; }
.tab-ind.ready { transition: transform 240ms var(--ease-out); }

.gallery { margin-top: 40px; display: grid; grid-template-columns: 1fr; gap: 40px; }
.work-item { display: block; width: 100%; }
.work-item .cap { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 16px; line-height: 1.35; }
.work-item .cap span:last-child { color: var(--muted); font-size: 14px; text-align: right; flex: none; padding-top: 1px; }
.empty { margin-top: 40px; color: var(--muted); }
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 24px; margin-top: 56px; }
}

/* Project view */
.pv {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto;
  opacity: 0; transition: opacity 160ms var(--ease-out);
}
.pv.is-open { opacity: 1; transition-duration: 220ms; }
.pv-inner { max-width: 1344px; margin: 0 auto; padding: 0 var(--gutter) 48px; }
.pv-top { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.pv-close { min-height: 44px; padding-right: 8px; font-size: 16px; }
.pv-trade { color: var(--muted); font-size: 15px; }
.pv-grid { margin-top: 8px; }
.pv-photo { transform: translateY(14px); transition: transform 160ms var(--ease-out); }
.pv.is-open .pv-photo { transform: none; transition-duration: 280ms; }
.pv-body { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.pv-body p.note { color: var(--muted); max-width: 40ch; }
.pv-body .btn { margin-top: 10px; }
.pv-hint { font-size: 14px; color: var(--muted); }
@media (min-width: 900px) {
  .pv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; margin-top: 16px; align-items: end; }
  .pv-photo { grid-column: 1 / 7; }
  .pv-photo .ph { max-height: calc(100vh - 140px); aspect-ratio: 4 / 5; }
  .pv-body { grid-column: 8 / 13; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pv, .pv.is-open { transition: none; }
  .pv-photo, .pv.is-open .pv-photo { transform: none; transition: none; }
  .tab-ind.ready { transition: none; }
}
