/* Website portfolio — "viewing room": grey walls, white mats, the websites are the exhibits.
   One family (Archivo, variable weight + width). Expanded widths for titles, normal width for reading. */

@font-face {
  font-family: "Archivo";
  src: url(fonts/archivo-var.woff2) format("woff2-variations"), url(fonts/archivo-var.woff2) format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url(fonts/archivo-var-ext.woff2) format("woff2-variations"), url(fonts/archivo-var-ext.woff2) format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --wall: #e3e5e8;
  --wall-deep: #d5d9de;
  --mat: #ffffff;
  --ink: #121826;
  --graphite: #535c6c;
  --signal: #0b7a70;
  --hairline: #c6ccd4;
  --error: #b42318;
  --ok: #1e7a4c;

  --fs-1: 0.8125rem;
  --fs-2: 0.9375rem;
  --fs-3: 1.0625rem;
  --fs-4: 1.3125rem;
  --fs-5: 1.625rem;
  --fs-6: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  --fs-7: 2.75rem;
  --fs-8: clamp(2.4rem, 1.5rem + 3vw, 4rem);

  --gutter: clamp(16px, 4vw, 56px);
  --radius-frame: 4px;
  --radius-ui: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #15191f;
    --wall-deep: #1d232b;
    --mat: #1d232b;
    --ink: #e8ebf0;
    --graphite: #9ba4b2;
    --signal: #43c4b4;
    --hairline: #2f3843;
    --error: #f0796e;
    --ok: #5ccf94;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-3);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  color: var(--ink);
  background: var(--wall);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--signal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

.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: 12px; }
.skip:focus { left: 16px; z-index: 20; background: var(--ink); color: var(--mat); padding: 8px 14px; border-radius: var(--radius-ui); }

/* ---------- top bar ---------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--hairline);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  font-size: 1.125rem; font-weight: 760; font-stretch: 125%; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wordmark-mark { width: 24px; height: 24px; fill: none; stroke: var(--signal); stroke-width: 1.8; flex: none; }
.topnav { display: flex; flex: none; align-items: center; gap: 22px; }
.topnav > a:not(.btn) { color: var(--ink); font-weight: 600; text-decoration: none; font-size: var(--fs-2); }
.topnav > a:not(.btn):hover { text-decoration: underline; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border: 1.5px solid transparent; border-radius: var(--radius-ui);
  font: inherit; font-size: var(--fs-2); font-weight: 640; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-solid { background: var(--ink); color: var(--mat); }
.btn-solid:hover { background: color-mix(in srgb, var(--ink) 82%, var(--signal)); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--wall-deep); }

/* ---------- hero: the live viewer ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(270px, 25rem) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding: clamp(32px, 5vw, 72px) var(--gutter) clamp(44px, 6vw, 88px);
}
.hero-solo { grid-template-columns: minmax(0, 46rem); }
.hero h1 {
  font-size: clamp(2.4rem, 1.2rem + 2.1vw, 3.25rem); font-weight: 780; font-stretch: 118%;
  line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 20px;
}
.hero-solo h1 { font-size: var(--fs-8); font-stretch: 125%; }
.lede { font-size: var(--fs-4); line-height: 1.45; color: var(--graphite); max-width: 36ch; }

.switcher { margin-top: 32px; border-top: 1px solid var(--hairline); }
.switch {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  width: 100%; padding: 13px 4px 13px 14px;
  background: none; border: 0; border-bottom: 1px solid var(--hairline); border-left: 3px solid transparent;
  font: inherit; text-align: left; color: var(--graphite); cursor: pointer;
}
.switch:hover { color: var(--ink); }
.switch[aria-pressed="true"] { color: var(--ink); border-left-color: var(--signal); }
.switch-title { font-weight: 680; font-stretch: 112%; }
.switch-meta { font-size: var(--fs-2); white-space: nowrap; }

.stage { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.browser {
  max-width: 100%;
  background: var(--mat);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 34px 60px -40px rgba(18, 24, 38, 0.6);
  transition: width 0.4s ease;
}
.browser-bar {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 14px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--mat) 88%, var(--wall));
}
.dots { display: flex; gap: 6px; flex: none; }
.dots i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--hairline); }
.address {
  flex: 1; min-width: 0; margin-right: 46px;
  padding: 2px 10px; border-radius: 6px;
  background: var(--wall); color: var(--graphite);
  font-size: var(--fs-1); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.viewport { position: relative; overflow: hidden; background: #fff; width: 100%; aspect-ratio: 16 / 10; transition: height 0.4s ease; }
.viewport iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: 0; background: #fff;
  transform-origin: 0 0; transition: transform 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .browser, .viewport, .viewport iframe { transition: none; }
}

.stage-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; width: 100%; }
.devices {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--mat); border: 1px solid var(--hairline); border-radius: var(--radius-ui);
}
.devices button {
  min-height: 36px; padding: 0 14px;
  font: inherit; font-size: var(--fs-2); font-weight: 620;
  color: var(--graphite); background: transparent;
  border: 0; border-radius: 6px; cursor: pointer;
}
.devices button:hover { color: var(--ink); }
.devices button[aria-pressed="true"] { background: var(--ink); color: var(--mat); }
.text-link { color: var(--ink); font-weight: 620; font-size: var(--fs-2); }

/* ---------- work wall ---------- */

.work, .process { padding: clamp(40px, 6vw, 84px) var(--gutter); border-top: 1px solid var(--hairline); }
.work h2, .process h2, .contact h2, .screens h2, .case-cta h2 {
  font-size: var(--fs-6); font-weight: 760; font-stretch: 125%; line-height: 1.08; letter-spacing: -0.012em;
}
.work-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  min-height: 40px; padding: 0 15px;
  font: inherit; font-size: var(--fs-2); font-weight: 600;
  color: var(--ink); background: transparent;
  border: 1px solid var(--hairline); border-radius: 999px; cursor: pointer;
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--mat); }
.count { margin-left: 4px; opacity: 0.62; font-variant-numeric: tabular-nums; }

.wall {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(44px, 5vw, 76px) clamp(24px, 4vw, 56px);
}
.piece[hidden] { display: none; }
.frame {
  display: block; padding: clamp(10px, 1.4vw, 16px);
  background: var(--mat); border: 1px solid var(--hairline); border-radius: var(--radius-frame);
}
.frame:hover { border-color: var(--graphite); }
.frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; background: var(--wall); }
.frame-blank {
  display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--wall);
  font-size: var(--fs-7); font-weight: 800; font-stretch: 125%; color: var(--graphite);
}
.placard { padding-top: 18px; max-width: 38rem; }
.placard h3 { font-size: var(--fs-5); font-weight: 720; font-stretch: 118%; line-height: 1.15; margin-bottom: 4px; }
.placard h3 a { color: var(--ink); text-decoration: none; }
.placard h3 a:hover { text-decoration: underline; }
.placard-line { color: var(--graphite); font-size: var(--fs-2); }
.tag {
  display: inline-block; margin-left: 8px; padding: 0 9px;
  border: 1px solid var(--graphite); border-radius: 999px;
  font-size: var(--fs-1); line-height: 1.55; vertical-align: 1px;
}
.placard-summary { margin-top: 10px; max-width: 60ch; }
.placard-tech { margin-top: 8px; color: var(--graphite); font-size: var(--fs-2); }
.placard-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; font-size: var(--fs-2); font-weight: 620; }
.empty, .filter-empty { color: var(--graphite); max-width: 52ch; }
.filter-empty { margin-top: 24px; }

/* ---------- process (a real sequence, so it is numbered) ---------- */

.steps {
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
  margin: 32px 0 0; padding: 0;
}
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 16px; }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 12px;
  font-size: var(--fs-6); font-weight: 780; font-stretch: 125%; line-height: 1;
  color: var(--signal); font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: var(--fs-4); font-weight: 700; font-stretch: 112%; margin-bottom: 6px; }
.steps p { color: var(--graphite); max-width: 34ch; }

/* ---------- contact ---------- */

.contact {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(40px, 6vw, 84px) var(--gutter);
  background: var(--mat); border-top: 1px solid var(--hairline);
}
.contact-intro p { color: var(--graphite); max-width: 40ch; margin-top: 14px; }
.contact-intro a { font-weight: 600; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; align-content: start; }
.field-wide, .form-alert, .form-actions { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-2); font-weight: 620; }
.optional { font-weight: 400; color: var(--graphite); }
.form input, .form select, .form textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  font: inherit; font-size: var(--fs-3); color: var(--ink);
  background: var(--wall); border: 1px solid var(--hairline); border-radius: var(--radius-ui);
}
.form textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--signal); outline: 2px solid var(--signal); outline-offset: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.field-error { margin-top: 6px; color: var(--error); font-size: var(--fs-2); }
.form-alert { padding: 10px 14px; border-left: 3px solid var(--error); background: color-mix(in srgb, var(--error) 9%, var(--mat)); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { align-self: start; border-left: 3px solid var(--ok); padding: 6px 0 6px 18px; }
.notice h3 { font-size: var(--fs-5); font-weight: 720; font-stretch: 118%; margin-bottom: 6px; }
.notice p { color: var(--graphite); }

/* ---------- footer ---------- */

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 22px var(--gutter);
  border-top: 1px solid var(--hairline);
  color: var(--graphite); font-size: var(--fs-2);
}
.footer a { color: var(--graphite); }

/* ---------- project page ---------- */

.case { padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(48px, 7vw, 96px); }
.back a { color: var(--ink); font-weight: 620; font-size: var(--fs-2); }
.case-head { max-width: 64rem; margin: 18px 0 36px; }
.case-head h1 { font-size: var(--fs-8); font-weight: 780; font-stretch: 125%; line-height: 1.02; letter-spacing: -0.02em; }
.case-head .lede { margin-top: 16px; max-width: 52ch; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 32px;
  margin: 28px 0; padding: 18px 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.facts dt { font-size: var(--fs-1); color: var(--graphite); }
.facts dd { margin: 2px 0 0; font-weight: 620; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.case-cover {
  margin: 0 0 48px; padding: clamp(10px, 1.6vw, 20px);
  background: var(--mat); border: 1px solid var(--hairline); border-radius: var(--radius-frame);
}
.case-cover img { display: block; width: 100%; height: auto; max-height: 82vh; object-fit: cover; object-position: top; }
.case-body { max-width: 66ch; }
.case-body p + p { margin-top: 1em; }

.screen { margin: 0; }
.screen-scroll {
  max-height: min(78vh, 780px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--mat); border: 1px solid var(--hairline); border-radius: 10px;
}
.screen-scroll img { display: block; width: 100%; height: auto; }
.screen-phone { width: min(330px, 100%); }
.screen-phone .screen-scroll { max-height: 660px; border: 8px solid var(--ink); border-radius: 30px; }
figcaption { margin-top: 10px; color: var(--graphite); font-size: var(--fs-2); }
.screens-hint { color: var(--graphite); font-size: var(--fs-2); }

/* desktop and phone side by side, the same height, right under the project header */
.lineup { --frame-h: clamp(420px, 68vh, 660px); margin: 0 0 56px; }
.lineup-row { display: flex; align-items: flex-start; gap: clamp(20px, 3vw, 40px); }
.lineup .screen-desktop { flex: 1; min-width: 0; }
.lineup .screen-desktop .screen-scroll { height: var(--frame-h); max-height: none; }
.lineup .screen-phone { flex: none; width: calc((var(--frame-h) - 16px) * 0.4621 + 16px); }
.lineup .screen-phone .screen-scroll { height: var(--frame-h); max-height: none; }
.lineup .screens-hint { margin-top: 14px; }

.screens { margin-top: 64px; }
.screens .screen-desktop { margin: 28px 0 40px; }
.phones { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 8px; }

.case-cta {
  display: grid; justify-items: start; gap: 12px;
  max-width: 46rem; margin-top: 72px; padding: clamp(22px, 3vw, 36px);
  background: var(--mat); border: 1px solid var(--hairline); border-radius: var(--radius-frame);
}
.case-cta p { color: var(--graphite); }
.next { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.next a { display: inline-grid; color: var(--ink); text-decoration: none; }
.next-label { color: var(--graphite); font-size: var(--fs-2); }
.next-title { font-size: var(--fs-6); font-weight: 760; font-stretch: 125%; line-height: 1.1; }
.next a:hover .next-title { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- full-screen preview ---------- */

.is-bare { overflow: hidden; }
.pv { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; }
.pv-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  padding: 10px 16px; background: var(--mat); border-bottom: 1px solid var(--hairline);
}
.pv-close, .pv-open { color: var(--ink); font-weight: 620; font-size: var(--fs-2); white-space: nowrap; }
.pv-title { flex: 1; min-width: 150px; font-weight: 720; font-stretch: 112%; }
.pv-meta { margin-left: 10px; font-weight: 400; font-stretch: 100%; color: var(--graphite); font-size: var(--fs-2); }
.pv-stage { min-height: 0; overflow: auto; padding: 20px; display: flex; justify-content: center; align-items: flex-start; }
.pv-stage .browser { flex: none; }

/* ---------- not found ---------- */

.missing { padding: clamp(48px, 8vw, 112px) var(--gutter); max-width: 44rem; }
.missing h1 { font-size: var(--fs-8); font-weight: 780; font-stretch: 125%; line-height: 1.04; }
.missing p { margin-top: 18px; color: var(--graphite); }

/* ---------- smaller screens ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: var(--fs-8); font-stretch: 125%; line-height: 1.02; }
  .lede { max-width: 48ch; }
  .switcher { display: flex; overflow-x: auto; border-top: 0; gap: 8px; margin-top: 24px; padding-bottom: 4px; }
  .switch { flex: none; width: auto; flex-direction: column; gap: 0; padding: 8px 14px; border: 1px solid var(--hairline); border-radius: var(--radius-ui); }
  .switch[aria-pressed="true"] { border-color: var(--ink); border-left-color: var(--ink); box-shadow: inset 0 -3px 0 var(--signal); }
  .wall { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .topbar { gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .topnav > a:not(.btn) { display: none; }
  .topnav .btn { min-height: 40px; padding: 0 12px; font-size: 0.875rem; }
  .wordmark { font-size: 1rem; font-stretch: 110%; gap: 8px; }
  .lede { font-size: 1.125rem; }
  .pv-meta { display: none; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .stage-controls { justify-content: center; }
  .pv-open { display: none; }
}
@media (max-width: 760px) {
  .lineup-row { flex-direction: column; align-items: stretch; }
  /* on phones the desktop shots show the first screen only, so page scrolling never gets trapped */
  .screen-desktop .screen-scroll, .lineup .screen-desktop .screen-scroll { height: auto; max-height: none; aspect-ratio: 16 / 10; overflow: hidden; }
  .lineup .screen-phone { align-self: center; width: min(300px, 100%); }
  .lineup .screen-phone .screen-scroll { height: min(72vh, 600px); }
  .screen-phone .screen-scroll { overscroll-behavior: auto; }
}
@media (max-width: 370px) {
  .wordmark-mark { display: none; }
}
