/* =========================================================
   Tokens
   :root holds light values; [data-theme="dark"] overrides.
   --bg       page background
   --surface  slightly raised areas (inputs, placeholders)
   --ink      main text
   --ink-2    secondary text
   --line     dividers and borders
   --accent   links, buttons, focus
   --on-accent text on an accent background
   --accent-2 secondary accent (art, status dot)
   ========================================================= */

:root {
  /* Jost: free geometric sans modeled on Futura */
  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  /* Weight roles (see "Type system" at the end of this file) */
  --w-light: 300;    /* large leads, hero statement, pull quotes */
  --w-regular: 400;  /* body copy, secondary text */
  --w-medium: 500;   /* sub-headings, UI: nav, buttons, labels */
  --w-semibold: 600; /* section headings, project names */
  --w-bold: 700;     /* display titles, logo */

  /* Type scale (roughly a 1.25 ratio, fluid at the top end) */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --step-hero: clamp(3.4rem, 1rem + 11vw, 10rem);

  --space-s: 0.75rem;
  --space-m: 1.5rem;
  --space-l: 3rem;
  --space-xl: clamp(5rem, 3rem + 7vw, 9rem);

  --wrap: 78rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius-s: 6px;
  --radius-l: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Palette: Slate and cobalt — cool, technical, precise */
:root {
  --bg: #eef1f4;
  --surface: #e2e7ec;
  --ink: #14202b;
  --ink-2: #4a5866;
  --line: #c9d1d9;
  --accent: #2f5bea;
  --on-accent: #ffffff;
  --accent-2: #f2b53a;
}
[data-theme="dark"] {
  --bg: #0f1720;
  --surface: #18232f;
  --ink: #e6ebf0;
  --ink-2: #9aa8b6;
  --line: #273544;
  --accent: #7c9bff;
  --on-accent: #0b1220;
  --accent-2: #f2c25e;
}

[data-theme="dark"] { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

/* =========================================================
   Base
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; }
h2 { font-size: var(--step-3); letter-spacing: -0.025em; }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-s);
}
.skip-link:focus { top: 0.75rem; }

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  min-height: 4.25rem;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }

.controls { display: flex; align-items: center; gap: 0.5rem; }

.ctrl {
  font: inherit;
  font-size: var(--step--1);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 2.5rem;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.ctrl:hover { border-color: var(--ink-2); }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  gap: 0.125rem;
}
.lang-opt {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}
html[lang="en"] .lang-opt[data-lang="en"],
html[lang="es"] .lang-opt[data-lang="es"] {
  background: var(--ink);
  color: var(--bg);
}

.icon-btn {
  width: 2.5rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
[data-theme="light"] .icon-sun,
[data-theme="dark"] .icon-moon { display: none; }

.menu-btn { display: none; padding-inline: 1rem; }

/* Six nav links plus controls need ~62rem before they wrap; collapse into the menu below that. */
@media (max-width: 62rem) {
  .menu-btn { display: inline-block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.8rem 0; font-size: var(--step-1); color: var(--ink); border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
}

/* =========================================================
   Hero — the one bold moment
   ========================================================= */

.hero { padding-bottom: var(--space-xl); }
.hero-content { padding-top: clamp(2.5rem, 6vw, 5rem); }

/* Full-bleed banner. The hatch shows only while assets/images/hero.jpg is missing. */
.hero-banner {
  margin: 0;
  height: clamp(240px, 52vh, 600px);
  overflow: hidden;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 14px);
}
.hero-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-banner.is-empty img { display: none; }

/* Quote over the cover image: bottom-left, clear of the watermark on the right. */
.hero-banner { position: relative; }
.hero-banner::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent);
  pointer-events: none;
  z-index: 1;
}
.hero-banner.is-empty::before { display: none; }
.hero-quote {
  position: absolute;
  z-index: 2;
  left: clamp(1rem, 5vw, 4rem);
  bottom: clamp(1rem, 5vw, 3.5rem);
  max-width: min(36rem, calc(100% - clamp(1rem, 5vw, 4rem) - clamp(60px, 14%, 180px)));
  margin: 0;
  color: #fff;
  font-size: var(--step-2);
  font-weight: var(--w-light);
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.45);
}
.hero-banner.is-empty .hero-quote { color: var(--ink); text-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-quote { animation: fade 1.2s 0.5s var(--ease) both; }
}

.hero-name {
  font-size: var(--step-hero);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 0.88;
  margin-left: -0.05em; /* optical alignment of the big Z with body text */
}
.hero-name .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-name .line > span { display: inline-block; }
.hero-name .line:nth-child(2) { padding-left: 0.9em; color: var(--accent); }

.hero-body {
  display: grid;
  gap: var(--space-m);
  max-width: 34rem;
  margin-top: var(--space-l);
  margin-left: auto;
  margin-right: clamp(0rem, 6vw, 6rem);
}
.hero-statement { font-size: var(--step-2); line-height: 1.3; letter-spacing: -0.01em; }
.hero-status { display: flex; align-items: center; gap: 0.6rem; color: var(--ink-2); }
.dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 25%, transparent);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Single page-load moment: the name rises in, then the body fades in. */
@media (prefers-reduced-motion: no-preference) {
  .hero-name .line > span { animation: rise 0.9s var(--ease) both; }
  .hero-name .line:nth-child(2) > span { animation-delay: 0.08s; }
  .hero-body { animation: fade 0.8s var(--ease) 0.45s both; }
  /* the banner photo fades in and settles from a slight zoom on every page load */
  .hero-banner img { animation: fade 1.1s var(--ease) both, settle 1.8s var(--ease) both; }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes settle { from { transform: scale(1.06); } }

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.btn-quiet { border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); }

/* =========================================================
   Sections
   ========================================================= */

.section {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--line);
}
.section + .section { margin-top: var(--space-xl); }
.hero + .section { margin-top: 0; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-m) var(--space-l);
  align-items: end;
  margin-bottom: var(--space-l);
}
.section-head p { color: var(--ink-2); max-width: 36ch; }
@media (max-width: 44rem) { .section-head { grid-template-columns: 1fr; } }

/* Placeholder art — swap each .art for a real <img> */
.art {
  background-color: var(--surface);
  border-radius: var(--radius-l);
  aspect-ratio: 4 / 3;
}
.art-1 {
  background-image:
    radial-gradient(circle at 70% 40%, var(--accent) 0 18%, transparent 18.5%),
    radial-gradient(circle at 70% 40%, color-mix(in srgb, var(--accent) 25%, transparent) 0 32%, transparent 32.5%);
}
.art-2 {
  background-image: repeating-linear-gradient(115deg,
    color-mix(in srgb, var(--accent-2) 55%, transparent) 0 14px, transparent 14px 34px);
}
.art-3 {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Home: project card linking to a project page */
.project-card { display: block; text-decoration: none; }
.pc-media { overflow: hidden; border-radius: var(--radius-s); background: var(--surface); }
.pc-media img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 55%;
  transition: transform 0.9s var(--ease);
}
.project-card:hover .pc-media img { transform: scale(1.03); }
.pc-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title cta" "meta cta";
  gap: 0.35rem var(--space-m);
  align-items: end;
  margin-top: 1.25rem;
}
.pc-meta h3 { grid-area: title; font-size: var(--step-3); letter-spacing: -0.03em; line-height: 1; }
.pc-meta p { grid-area: meta; color: var(--ink-2); }
.pc-cta {
  grid-area: cta;
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.4rem;
  border: 1px solid var(--line); border-radius: 999px; font-weight: 600;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.project-card:hover .pc-cta { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.project-card:focus-visible { outline-offset: 6px; border-radius: var(--radius-s); }
@media (max-width: 44rem) {
  .pc-media img { aspect-ratio: 4 / 3; }
  .pc-meta { grid-template-columns: 1fr; grid-template-areas: "title" "meta" "cta"; }
  .pc-cta { justify-self: start; margin-top: 0.75rem; }
}

.pc-meta--cta { grid-template-columns: 1fr; grid-template-areas: "cta"; }
.pc-meta--cta .pc-cta { justify-self: start; }

/* Work page */
.page-intro {
  display: grid;
  gap: var(--space-m);
  padding-top: clamp(3rem, 8vw, 7rem);
  padding-bottom: var(--space-l);
}
.page-title {
  font-size: clamp(3rem, 1rem + 9vw, 8.5rem);
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.page-intro p { color: var(--ink-2); max-width: 52ch; font-size: var(--step-1); }
.work-list { display: grid; gap: var(--space-xl); padding-bottom: var(--space-xl); }
.project-card h2 { font-size: var(--step-3); letter-spacing: -0.03em; line-height: 1; grid-area: title; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-l) var(--space-m);
}
.project-card--small .pc-media { aspect-ratio: 4 / 3; }
.project-card--small .pc-meta { grid-template-columns: 1fr; grid-template-areas: "title" "meta"; margin-top: 1rem; }
.project-card--small h3 { font-size: var(--step-2); }
.project-card--small:hover h3 { text-decoration: underline; text-underline-offset: 0.2em; }
/* Placeholder until a project has images */
.pc-media--empty {
  background-color: var(--surface);
  background-image: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 14px);
}
@media (max-width: 52rem) { .work-grid { grid-template-columns: 1fr; } }

.projects h3 a { text-decoration: none; }
.projects h3 a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* Beyond page: photography, games, websites */
.jump-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--space-s); }
.jump-links a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1.1rem;
  border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; font-weight: 600;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.jump-links a:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.jl-num { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }
.jump-links a:hover .jl-num { color: inherit; }

.interest { padding-bottom: var(--space-xl); }
.section.interest + .section.interest { margin-top: 0; }
.interest-title { font-size: var(--step-3); letter-spacing: -0.03em; line-height: 1; }
.interest-title .jl-num { display: block; font-size: var(--step--1); letter-spacing: 0; margin-bottom: 0.75rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-l) var(--space-m);
}
.photo-grid .pc-media, .photo-grid .shot-link img { width: 100%; height: 100%; object-fit: cover; }
.pg-wide { grid-column: span 8; }
.pg-tall { grid-column: span 4; }
.pg-third { grid-column: span 4; }
.pg-wide .pc-media, .pg-wide .shot-link { aspect-ratio: 3 / 2; }
.pg-tall .pc-media, .pg-tall .shot-link { aspect-ratio: 4 / 5; }
.pg-third .pc-media, .pg-third .shot-link { aspect-ratio: 1 / 1; }
/* Alternate wide/tall so the rows don't line up like a spreadsheet */
.photo-grid > :nth-child(4) { grid-column: 5 / -1; grid-row: 2; }
.photo-grid > :nth-child(3) { grid-column: 1 / span 4; grid-row: 2; }
.tag {
  display: inline-block; margin-right: 0.4rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}

.showcase { display: grid; gap: var(--space-xl); }
.showcase-item {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-m) var(--space-l);
  align-items: center;
}
.showcase-item:nth-child(even) .showcase-media { order: 2; }
.showcase-media { aspect-ratio: 16 / 10; }
.showcase-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.showcase-text { display: grid; gap: var(--space-s); align-content: center; max-width: 34rem; }
.showcase-text h3 { font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.1; }
.showcase-text > p:not(.showcase-meta) { color: var(--ink-2); }
.showcase-meta { font-size: var(--step--1); color: var(--ink-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }
.chips li {
  font-size: var(--step--1); padding: 0.25rem 0.7rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2);
}

@media (max-width: 52rem) {
  .showcase-item { grid-template-columns: 1fr; }
  .showcase-item:nth-child(even) .showcase-media { order: 0; }
}
@media (max-width: 44rem) {
  .photo-grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
}

/* Services page */
.services-page { padding-bottom: var(--space-l); }
.services-page .service:last-child { border-bottom: 1px solid var(--line); }

/* Project page */
.project-banner { height: clamp(300px, 70vh, 760px); }
.project-banner img { object-position: 50% 60%; }
.project-intro {
  display: grid;
  gap: var(--space-m) var(--space-l);
  padding-top: var(--space-l);
  padding-bottom: var(--space-xl);
}
.back-link { color: var(--ink-2); font-size: var(--step--1); justify-self: start; }
.back-link:hover { color: var(--ink); }
.project-title {
  font-size: clamp(2.8rem, 1rem + 8vw, 8rem);
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 0.9;
  max-width: 10ch;
}
.project-summary {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-l);
  align-items: start;
  margin-top: var(--space-m);
}
.project-text { display: grid; gap: var(--space-m); }
.project-summary .lead { max-width: 52ch; }
.project-more { color: var(--ink-2); max-width: 60ch; }
.case-facts { margin: 0; display: grid; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.case-facts dt { color: var(--ink-2); font-size: var(--step--1); }
.case-facts dd { margin: 0.15rem 0 0; }
@media (max-width: 52rem) { .project-summary { grid-template-columns: 1fr; } }

/* Story: images in varied sizes and a staggered rhythm */
.story { display: grid; gap: clamp(4rem, 2rem + 6vw, 8rem); padding-bottom: var(--space-xl); }
.shot { margin: 0; }
.shot-link { display: block; overflow: hidden; border-radius: var(--radius-s); background: var(--surface); cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; transition: transform 0.8s var(--ease); }
.shot-link:hover img { transform: scale(1.02); }
.shot figcaption { margin-top: 0.7rem; font-size: var(--step--1); color: var(--ink-2); }

.st-pair {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-m);
  align-items: start;
}
.st-pair .st-land { grid-column: 1 / span 8; }
.st-pair .st-tall { grid-column: 9 / -1; }
.st-pair--flip .st-tall { grid-column: 1 / span 4; grid-row: 1; }
.st-pair--flip .st-land { grid-column: 5 / -1; grid-row: 1; }
.st-drop { margin-top: clamp(3rem, 12vw, 11rem); }   /* stagger: second image sits lower */
.st-tall img { aspect-ratio: 4 / 5; object-fit: cover; }
.st-land img { aspect-ratio: 3 / 2; object-fit: cover; }

.st-quote {
  margin: 0;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1rem;
  padding-block: clamp(1rem, 4vw, 3rem);
}
.st-quote p {
  font-size: clamp(2.4rem, 1rem + 6vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--accent);
  max-width: 12ch;
}
.st-quote footer { color: var(--ink-2); font-size: var(--step--1); }

.st-drawings { display: grid; gap: var(--space-l); border-top: 1px solid var(--line); padding-top: var(--space-l); }
.st-pair--drawings { align-items: end; }
.st-pair--drawings .st-land img { aspect-ratio: auto; object-fit: contain; }
.st-pair--drawings .st-side { grid-column: 9 / -1; }
.g-drawing .shot-link { background: #ffffff; }
.g-drawing img { padding: clamp(0.5rem, 2vw, 1.5rem); }

.project-end {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-block: var(--space-l) var(--space-xl);
  border-top: 1px solid var(--line);
}

@media (max-width: 44rem) {
  .st-pair .st-land, .st-pair .st-tall, .st-pair--drawings .st-side,
  .st-pair--flip .st-tall, .st-pair--flip .st-land { grid-column: 1 / -1; grid-row: auto; }
  .st-drop { margin-top: 0; }
  .st-pair { row-gap: var(--space-l); }
}

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: color-mix(in srgb, #05080c 94%, transparent);
  color: #e6ebf0;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; gap: 0.75rem; justify-items: center; padding: 4.5rem 1rem; }
.lightbox img { max-width: min(94vw, 2400px); max-height: calc(100vh - 10rem); width: auto; height: auto; object-fit: contain; border-radius: var(--radius-s); }
.lightbox figcaption { font-size: var(--step--1); color: #9aa8b6; }
.lb-btn {
  position: absolute;
  font: inherit; font-size: var(--step--1); font-weight: 600;
  color: #e6ebf0; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px;
  padding: 0.6rem 1.1rem; cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.16); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { bottom: 1rem; left: 1rem; }
.lb-next { bottom: 1rem; right: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: fade 0.25s var(--ease); }
}

.index-list { margin-top: var(--space-xl); border-top: 1px solid var(--line); }
.index-list a {
  display: grid;
  grid-template-columns: 3fr 5fr 2fr 4rem;
  gap: var(--space-m);
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 0.25s var(--ease), color 0.2s;
}
.index-list a:hover { padding-left: 0.75rem; color: var(--accent); }
.il-title { font-weight: 700; font-size: var(--step-1); }
.il-desc, .il-kind, .il-year { color: var(--ink-2); }
.il-year { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 44rem) {
  .index-list a { grid-template-columns: 1fr auto; gap: 0.25rem 1rem; }
  .il-desc { grid-column: 1 / -1; grid-row: 2; }
  .il-kind { display: none; }
}

/* Services */
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-m) var(--space-l);
  padding: var(--space-l) 0;
  border-top: 1px solid var(--line);
}
.service h3 { font-size: var(--step-2); }
.service p { max-width: 44ch; }
.includes { margin-top: 1rem; display: grid; gap: 0.35rem; color: var(--ink-2); }
.includes li { padding-left: 1.1rem; position: relative; }
.includes li::before {
  content: "";
  position: absolute; left: 0; top: 0.65em;
  width: 0.45rem; height: 2px; background: var(--accent);
}
@media (max-width: 44rem) { .service { grid-template-columns: 1fr; } }

/* About */
.about {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-l);
  align-items: start;
}
.portrait { aspect-ratio: 4 / 5; }
.about-text { display: grid; gap: var(--space-m); max-width: 40rem; }
.lead { font-size: var(--step-2); line-height: 1.3; }
.about-text > p:not(.lead) { color: var(--ink-2); }
.facts { margin: var(--space-s) 0 0; display: grid; border-top: 1px solid var(--line); }
.facts > div {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
@media (max-width: 44rem) {
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 22rem; }
}

/* Other projects */
.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-l) var(--space-m);
}
.projects li { display: grid; gap: 0.5rem; align-content: start; padding-top: 1rem; border-top: 2px solid var(--ink); }
.projects h3 a { text-decoration: none; }
.projects h3 a:hover { text-decoration: underline; }
.projects p { color: var(--ink-2); }
.projects .status { font-size: var(--step--1); color: var(--accent); font-weight: 600; }
@media (max-width: 52rem) { .projects { grid-template-columns: 1fr; } }

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: var(--space-l);
  align-items: start;
  padding-bottom: var(--space-xl);
}
.contact-main { display: grid; gap: var(--space-m); }
.contact-main > p { color: var(--ink-2); }
.contact-email {
  font-size: clamp(1.6rem, 1rem + 3vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-decoration-thickness: 2px;
  word-break: break-word;
}
.socials { display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; padding: 0; margin: 0; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  color: var(--ink-2);
  border-radius: var(--radius-s);
  transition: color 0.2s, background-color 0.2s;
}
.socials a:hover { color: var(--ink); background: var(--surface); }
.socials svg { width: 1.5rem; height: 1.5rem; display: block; }
.socials li:has(a:not([href]), a[href=""], a[href="#"]) { display: none; }

.contact-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.field [aria-invalid="true"] { border-color: #c2412d; }
.contact-form .btn { justify-self: start; }
.form-note { min-height: 1.5em; color: var(--ink-2); font-size: var(--step--1); }
@media (max-width: 52rem) { .contact { grid-template-columns: 1fr; } }

/* Contact page + "Book a call" buttons */
.contact-page { padding-top: var(--space-m); }
.contact-book { display: grid; gap: 0.75rem; justify-items: start; padding-top: var(--space-s); }
.contact-book p { color: var(--ink-2); }
.btn-book { gap: 0.55rem; }
.btn-icon { flex: none; }
.end-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.home-end { align-items: center; }
.home-end-text { font-size: var(--step-2); font-weight: var(--w-semibold); letter-spacing: -0.02em; }

/* Booking page */
.booking { padding-bottom: var(--space-xl); }
.bk-pick {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-l);
  align-items: start;
}
.bk-pick[hidden], .bk-details[hidden] { display: none; }
.bk-cal {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(1rem, 3vw, 1.75rem);
}
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.bk-month { font-size: var(--step-1); font-weight: var(--w-semibold); }
.bk-cal-head .icon-btn:disabled { opacity: 0.3; cursor: default; }
.bk-weekdays, .bk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.bk-weekdays { margin-bottom: 0.5rem; }
.bk-weekdays span { text-align: center; font-size: var(--step--1); color: var(--ink-2); }
.bk-day {
  aspect-ratio: 1;
  min-height: 2.5rem;
  font: inherit;
  font-weight: var(--w-medium);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.bk-day:hover:not(:disabled) { border-color: var(--accent); }
.bk-day:disabled { background: none; color: var(--ink-2); opacity: 0.45; cursor: default; }
.bk-day.is-today { text-decoration: underline; text-underline-offset: 0.25em; }
.bk-day[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.bk-times { display: grid; gap: 0.75rem; align-content: start; }
.bk-times-title { font-size: var(--step-2); font-weight: var(--w-semibold); letter-spacing: -0.02em; }
.bk-tz { color: var(--ink-2); font-size: var(--step--1); }
.bk-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.5rem;
  max-height: 26rem;
  overflow-y: auto;
  padding: 2px;
}
.bk-slot {
  min-height: 2.75rem;
  font: inherit;
  font-weight: var(--w-medium);
  color: var(--accent);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.bk-slot:hover { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

.bk-details { max-width: 36rem; }
.bk-summary { font-size: var(--step-2); font-weight: var(--w-semibold); letter-spacing: -0.02em; }
.bk-summary:focus { outline: none; }
.bk-change {
  justify-self: start;
  padding: 0;
  font: inherit;
  font-size: var(--step--1);
  color: var(--accent);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
@media (max-width: 52rem) { .bk-pick { grid-template-columns: 1fr; } .bk-slots { max-height: none; } }
.bk-embed { display: block; width: 100%; height: 720px; border: 1px solid var(--line); border-radius: var(--radius-l); background: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-block: 1.75rem;
  color: var(--ink-2);
  font-size: var(--step--1);
}

/* =========================================================
   Blueprint background (built by js/blueprint.js)
   One continuous line draws as you scroll; its trail fades behind the pen.
   ========================================================= */

:root {
  --bp-op: 0.28;            /* line strength */
  --bp-core: var(--accent); /* glow dot centre */
}
[data-theme="dark"] {
  --bp-op: 0.36;
  --bp-core: color-mix(in srgb, var(--accent) 45%, #ffffff);
}

body { position: relative; }
main, .site-footer { position: relative; z-index: 1; }

.blueprint {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  /* Drafting paper grid: fine every 32px, heavier every 160px */
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--accent) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 4%, transparent) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
}
.blueprint svg { display: block; }

.bp-line {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: var(--bp-op);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bp-glow-stop { stop-color: var(--accent); }
.bp-dot { opacity: 0; transition: opacity 0.6s var(--ease); }
.bp-dot .core { fill: var(--bp-core); }
.bp-dot.node.on { opacity: 0.55; }                 /* corners the pen has passed */
.bp-dot.pen.tip { opacity: 1; transition: none; }  /* the pen tip */
.bp-dot.pen .core { r: 2.2px; }

/* =========================================================
   Type system (Jost)
   One family; each kind of text gets its own weight.
   ========================================================= */

/* Display: the biggest titles */
.hero-name,
.page-title,
.project-title { font-weight: var(--w-bold); letter-spacing: -0.03em; }

/* Logo: Futura-style spaced capitals */
.brand {
  font-weight: var(--w-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--step--1);
}

/* Section headings and project names */
h2,
.pc-meta h3,
.interest-title,
.project-card h2 { font-weight: var(--w-semibold); letter-spacing: -0.015em; }

/* Sub-headings */
h3,
.service h3,
.showcase-text h3,
.project-card--small h3,
.il-title { font-weight: var(--w-medium); letter-spacing: 0; }

/* Large reading text: light weight keeps big sizes elegant */
.hero-statement,
.lead,
.page-intro p { font-weight: var(--w-light); }
.st-quote p { font-weight: var(--w-light); letter-spacing: -0.02em; }

/* Body copy */
body { font-weight: var(--w-regular); }

/* UI and labels */
.site-nav a,
.btn,
.pc-cta,
.jump-links a,
.lang-opt,
.lb-btn,
.field label,
.showcase-meta,
.projects .status,
.contact-email { font-weight: var(--w-medium); }
.jl-num { font-weight: var(--w-semibold); }

/* Small caps-style labels */
.tag,
.case-facts dt {
  font-weight: var(--w-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* Beyond page: action buttons under a section intro */
.interest-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: calc(var(--space-l) * -0.5) 0 var(--space-l); }
.btn-icon { gap: 0.55rem; }
.btn-icon svg { flex: none; }
a.btn:not([href]) { cursor: default; } /* placeholder button with no link yet */

/* Logo (not a link) with a home button beside it. The logo file is used as a mask
   and painted in the theme colour: black on the light theme, white on the dark theme. */
.brand { display: inline-flex; align-items: center; gap: 0.9rem; line-height: 0; }
.brand-logo {
  display: block;
  height: 2.75rem;
  aspect-ratio: 487 / 240;
  background-color: #000;
  -webkit-mask: url("../assets/images/logo.png") center / contain no-repeat;
          mask: url("../assets/images/logo.png") center / contain no-repeat;
}
[data-theme="dark"] .brand-logo { background-color: #fff; }
.home-btn { color: var(--ink); }
/* Header spans the full window so the logo sits at the far left edge */
.site-header .header-inner { max-width: none; }

/* Banners with a photo fill the screen below the header, but never taller than the
   photo's own 3:2 shape, so wide windows show most of the image instead of a thin strip. */
.hero-banner:not(.is-empty) {
  height: max(260px, min(calc(100svh - 4.25rem), 66.67vw));
}
.hero-banner:not(.is-empty) img { object-position: 50% 60%; }
.project-banner:not(.is-empty) img { object-position: 50% 60%; }

/* Watermark: logo in the bottom-right corner of every image frame.
   White with a soft shadow on photos and renders; black on drawings with white paper.
   Placeholders (no image yet) get no watermark. */
.shot-link,
.pc-media:not(.pc-media--empty),
.hero-banner:not(.is-empty),
.lb-frame { position: relative; }

.shot-link::after,
.pc-media:not(.pc-media--empty)::after,
.hero-banner:not(.is-empty)::after,
.lb-frame::after {
  content: "";
  position: absolute;
  right: clamp(8px, 2.2%, 28px);
  bottom: clamp(8px, 2.2%, 28px);
  width: clamp(44px, 10%, 140px);
  aspect-ratio: 487 / 240;
  background: url("../assets/images/logo-white.png") center / contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
}
.g-drawing .shot-link::after,
.lb-frame.is-drawing::after {
  background-image: url("../assets/images/logo-black.png");
  filter: none;
  opacity: 0.75;
}
.lb-frame { display: inline-block; line-height: 0; }

/* =========================================================
   Intro (home page): plan -> isometric wireframe -> concrete building -> window -> logo.
   Shown only when the head script adds .intro-on; timing lives in js/intro.js.
   ========================================================= */
.intro { display: none; }
html.intro-hold { overflow: hidden; }
html.intro-on .intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #0a0a0a;
  /* failsafe: if the script never runs, get out of the way */
  animation: intro-failsafe 0.4s 14s forwards;
}
.intro canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.intro-logo { position: absolute; inset: 0; opacity: 0; background: #0a0a0a; }
.intro-trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* the logo itself: sized and moved by js/intro.js (it can fly to the header logo) */
.intro-mark {
  position: absolute;
  left: 0;
  top: 0;
  aspect-ratio: 487 / 240;
  background: #fff;
  -webkit-mask: url("../assets/images/logo.png") center / contain no-repeat;
          mask: url("../assets/images/logo.png") center / contain no-repeat;
  transform-origin: 0 0;
  opacity: 0;
  will-change: transform, opacity;
}
.intro-skip {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  padding: 0.45rem 0.95rem;
  font: 500 0.8rem/1 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  cursor: pointer;
}
.intro-skip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }
/* hold the hero's own entrance until the intro lets go */
html.intro-hold .hero-name .line > span,
html.intro-hold .hero-body,
html.intro-hold .hero-banner img { animation-play-state: paused; }
