/* ==========================================================================
   AGNIESZKA RUDOWSKI — ARCHITECTURAL VISUALIZATION
   Design system: warm off-white / charcoal, editorial serif + clean sans.
   ========================================================================== */

/* ---- fonts: served from /fonts (no Google requests — better privacy, GDPR-friendly) ---- */
/* Fraunces italic, latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fraunces-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fraunces italic, latin */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fraunces-italic-latin.woff2') format('woff2');
  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;
}
/* Fraunces normal, latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fraunces-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fraunces normal, latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fraunces-normal-latin.woff2') format('woff2');
  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;
}
/* Inter normal, latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter normal, latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-normal-latin.woff2') format('woff2');
  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;
}

:root {
  /* ---- palette (restrained, neutral, architectural) ---- */
  --bg: #F7F5F1;
  --bg-alt: #EFEAE2;
  --bg-dark: #171614;
  --bg-dark-alt: #201F1C;
  --ink: #1B1917;
  --ink-soft: #4B4740;
  --ink-faint: #6B655A;
  --line: #DCD5C8;
  --line-strong: #8A8273; /* form field outlines: ≥3:1 contrast on both backgrounds */
  --line-dark: #38352F;
  --white: #FDFCFA;     /* always white: text on photos and the dark footer */
  --charcoal: #1B1917;  /* always dark: text on white buttons over photos */
  --on-ink: #FDFCFA;    /* text on solid (ink-coloured) buttons */
  --header-bg: rgba(247, 245, 241, 0.92);
  --success: #3E6B4F;
  --error: #9A3B32;

  /* ---- type ---- */
  --font-serif: 'Fraunces', 'Liberation Serif', Georgia, serif;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* ---- spacing scale ---- */
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 32px;
  --gap-lg: 64px;
  --gap-xl: 120px;
  --section-pad: 140px;
  --section-pad-sm: 72px;

  --container-max: 1440px;
  --edge: 6vw;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- dark theme ----
   Used automatically when the visitor's device is in dark mode, unless they
   chose a theme with the header toggle (stored as data-theme on <html> by
   js/theme.js). All contrast ratios checked to WCAG AA. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #121110;
  --bg-alt: #1C1A17;
  --bg-dark: #0A0A09;
  --bg-dark-alt: #1C1A17;
  --ink: #EDE8E0;
  --ink-soft: #BCB5A9;
  --ink-faint: #9A9385;
  --line: #2E2B27;
  --line-strong: #7A7366;
  --line-dark: #2A2723;
  --on-ink: #121110;
  --header-bg: rgba(18, 17, 16, 0.92);
  --success: #8CC3A0;
  --error: #EC9B90;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121110;
  --bg-alt: #1C1A17;
  --bg-dark: #0A0A09;
  --bg-dark-alt: #1C1A17;
  --ink: #EDE8E0;
  --ink-soft: #BCB5A9;
  --ink-faint: #9A9385;
  --line: #2E2B27;
  --line-strong: #7A7366;
  --line-dark: #2A2723;
  --on-ink: #121110;
  --header-bg: rgba(18, 17, 16, 0.92);
  --success: #8CC3A0;
  --error: #EC9B90;
  color-scheme: dark;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; } /* used to hide sections waiting for real images */
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
input, textarea, select { font: inherit; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- skip link (a11y) ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--on-ink);
  padding: 12px 20px;
  z-index: 1000;
}
.skip-link:focus { left: var(--edge); top: var(--edge); }

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

/* ---- layout helpers ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--edge);
}

.section { padding: var(--section-pad) 0; }
.section--tight { padding: var(--section-pad-sm) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: var(--white); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
.section--dark .eyebrow { color: #9A9488; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-lg);
  flex-wrap: wrap;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2.section-title {
  font-size: clamp(28px, 3.4vw, 46px);
  max-width: 14ch;
}

.section-sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 42ch;
}
.section--dark .section-sub { color: #C8C3B8; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--on-ink); }

.btn--solid { background: var(--ink); color: var(--on-ink); }
.btn--solid:hover { background: transparent; color: var(--ink); }

.btn--light { border-color: var(--white); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--charcoal); }

.btn--ghost-light { border-color: rgba(255,255,255,0.55); color: var(--white); }
.btn--ghost-light:hover { background: var(--white); color: var(--charcoal); border-color: var(--white); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  transition: opacity 0.3s var(--ease);
}
.text-link:hover { opacity: 0.6; }
.section--dark .text-link { border-color: var(--white); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 26px 0;
  transition: background-color 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  border-bottom-color: var(--line);
}
.site-header.is-dark-mode {
  color: var(--white);
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.38) 0%, rgba(10, 9, 8, 0.20) 55%, rgba(10, 9, 8, 0) 100%);
}
.site-header.is-dark-mode .wordmark__role { color: rgba(255, 255, 255, 0.72); }
.site-header.is-menu-open,
.site-header.is-menu-open.is-dark-mode {
  color: var(--ink);
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
}
.site-header.is-menu-open .wordmark__role { color: var(--ink-faint); }
.site-header.is-dark-mode .main-nav__cta {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.wordmark__name {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.03em;
  font-weight: 600;
}
.wordmark__role {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.main-nav { display: flex; align-items: center; gap: var(--gap-lg); }
.main-nav__list { display: flex; gap: 40px; }
.main-nav__list a {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
  padding-bottom: 4px;
}
.main-nav__list a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.main-nav__list a:hover::after,
.main-nav__list a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.main-nav__cta { display: inline-flex; }

/* 44px tap target around a 30×19 icon; negative margin keeps the icon
   aligned with the page edge. */
/* light/dark switch: shows a moon in light mode, a sun in dark mode */
.main-nav { margin-left: auto; }
.theme-toggle {
  background: none;
  border: none;
  color: inherit;
  width: 44px;
  height: 44px;
  margin-left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s var(--ease);
}
.theme-toggle:hover { opacity: 0.6; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: inherit;
  width: 44px;
  height: 44px;
  margin-right: -7px;
  position: relative;
  padding: 0;
}
.nav-toggle span {
  position: absolute;
  left: 7px; right: 7px;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 31px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-135deg); }

/* ==========================================================================
   MOBILE NAV OVERLAY
   ========================================================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 450;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--edge);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav__list { display: flex; flex-direction: column; gap: 22px; margin-bottom: var(--gap-lg); }
.mobile-nav__list a {
  font-family: var(--font-serif);
  font-size: 36px;
}
.mobile-nav__meta {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   HERO
   ========================================================================== */
/* At least one screen tall, but allowed to grow: on short phone screens
   (iPhone SE with browser bars ≈ 550px) the text needs more room, and a
   fixed height pushed it up under the header. padding-top keeps the
   header's space clear. */
.hero {
  position: relative;
  min-height: max(560px, 100svh);
  padding-top: 140px;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroReveal 1.6s var(--ease) forwards;
}
@keyframes heroReveal { to { transform: scale(1); } }
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,14,12,0.32) 0%, rgba(15,14,12,0.05) 30%, rgba(15,14,12,0.55) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 76px;
}
.hero__location {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 22px;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 14px rgba(0,0,0,0.45); /* readable over busy renders */
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 15ch;
}
.hero__sub {
  margin-top: 26px;
  font-size: clamp(15px, 1.5vw, 19px);
  max-width: 46ch;
  color: rgba(255,255,255,0.92);
}
.hero__actions {
  margin-top: 42px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__scrolldown {
  position: absolute;
  right: var(--edge);
  bottom: 40px;
  z-index: 2;
  writing-mode: vertical-rl;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero__scrolldown::after {
  content: '';
  width: 1px;
  height: 46px;
  background: rgba(255,255,255,0.5);
}

/* ==========================================================================
   WORK GRID
   ========================================================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap-md) var(--gap-md);
}
/* min-width: 0 stops long captions from stretching a card past its column
   (which made the whole page scroll sideways on phones).
   Each card spans two grid rows — image, then caption — shared with its
   neighbour through subgrid, so images and captions line up across a row
   even when one caption wraps onto two lines. */
.project-card {
  grid-column: span 3;
  min-width: 0;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  row-gap: 18px;
}
.project-card:nth-child(1) { grid-column: span 4; }
.project-card:nth-child(2) { grid-column: span 2; }
.project-card:nth-child(3) { grid-column: span 2; }
.project-card:nth-child(4) { grid-column: span 4; }
.project-card:nth-child(5) { grid-column: span 6; }

/* Each row pairs a wide card (4:3) with a narrow one. The narrow card's
   frame stretches to the wide card's height, so both images end on the
   same line and no empty space is left under the narrow card. */
.project-card__link {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  row-gap: 18px;
}
.project-card__frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 4 / 3;
}
.project-card:nth-child(2) .project-card__frame,
.project-card:nth-child(3) .project-card__frame { aspect-ratio: auto; min-height: 0; }
.project-card:nth-child(5) .project-card__frame { aspect-ratio: 21 / 9; }

.project-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.project-card__link:hover .project-card__frame img,
.project-card__link:focus-visible .project-card__frame img { transform: scale(1.045); }

.project-card__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20,19,17,0);
  transition: background-color 0.5s var(--ease);
}
.project-card__link:hover .project-card__frame::after { background: rgba(20,19,17,0.06); }

.project-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.project-card__title {
  font-family: var(--font-serif);
  font-size: 20px;
}
.project-card__cat {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.work-footer {
  margin-top: var(--gap-xl);
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.service {
  padding: var(--gap-lg) var(--gap-md);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.service:first-child { padding-left: 0; }
.service:nth-child(3) { border-right: none; padding-right: 0; }
.service__num {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-faint);
  margin-bottom: var(--gap-lg);
}
.service__icon { margin-bottom: var(--gap-md); color: var(--ink); }
.service__icon svg { width: 34px; height: 34px; }
.service__title {
  font-size: 19px;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  text-transform: uppercase;
}
.service__desc { color: var(--ink-soft); font-size: 15px; max-width: 34ch; }
.service__desc ul { margin-top: 10px; }
.service__desc li { position: relative; padding-left: 16px; margin-bottom: 4px; }
.service__desc li::before { content: '—'; position: absolute; left: 0; color: var(--ink-faint); }

/* ==========================================================================
   ABOUT / ARCHITECT-LED
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr;
  gap: var(--gap-xl);
  align-items: center;
}
.about__media { position: relative; overflow: hidden; width: 100%; }
.about__media img { width: 100%; height: 100%; aspect-ratio: 6/5; object-fit: cover; }
.about__title {
  font-size: clamp(26px, 3vw, 40px);
  margin-bottom: var(--gap-md);
  max-width: 15ch;
}
.about__body p { font-size: 17px; color: var(--ink-soft); max-width: 52ch; }
.about__body p + p { margin-top: 18px; }
.about__meta {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   PROCESS (workflow steps)
   ========================================================================== */
#process .section-head { margin-bottom: calc(var(--gap-lg) * 0.78); }
.process-sub {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 32ch;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-md);
}
.process-step { padding-top: var(--gap-md); border-top: 1px solid var(--line); }
.process-step__num {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink-faint);
  margin-bottom: var(--gap-md);
}
.process-step__title {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.process-step__desc { color: var(--ink-soft); font-size: 14.5px; }

/* ==========================================================================
   UNREAL / INTERACTIVE
   ========================================================================== */
.unreal { color: var(--white); }
.unreal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
  align-items: center;
}
.unreal__body p { color: #C8C3B8; font-size: 17px; max-width: 46ch; }
.unreal__body p + p { margin-top: 16px; }
.unreal__actions { margin-top: var(--gap-md); }

.demo-frame {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-dark-alt);
  border: 1px solid var(--line-dark);
}
.demo-frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }
.demo-frame__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(180deg, rgba(15,14,12,0.25), rgba(15,14,12,0.55));
  text-align: center;
  padding: var(--gap-md);
}
.demo-frame__play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.demo-frame__play svg { width: 18px; height: 18px; margin-left: 3px; }
.demo-frame:hover .demo-frame__play { background: rgba(255,255,255,0.12); transform: scale(1.06); }
.demo-frame__label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.demo-frame__note {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  max-width: 34ch;
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta { text-align: center; }
.cta__title {
  font-size: clamp(28px, 4vw, 52px);
  max-width: 18ch;
  margin: 0 auto var(--gap-sm);
}
.cta__sub {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 44ch;
  margin: 0 auto var(--gap-lg);
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--gap-xl);
}
.contact-grid > * { min-width: 0; } /* let columns shrink on narrow phones */
.contact-info__title { font-size: 28px; margin-bottom: var(--gap-sm); max-width: 14ch; }
.contact-info__sub { margin-bottom: var(--gap-lg); max-width: 38ch; }
.contact-info__email {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 26px);
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin-bottom: var(--gap-lg);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}
.contact-info__list { display: flex; flex-direction: column; gap: 10px; color: var(--ink-soft); font-size: 15px; margin-bottom: var(--gap-lg); }
.contact-info__socials { display: flex; gap: 22px; }
.contact-info__socials a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}
.contact-info__socials a:hover { border-color: var(--ink); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-md); }
.field { margin-bottom: var(--gap-md); }
.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 10px 2px;
  font-size: 15.5px;
  color: var(--ink);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* "Select a type" prompt looks like a placeholder until a real choice is made */
.field select:has(option[value=""]:checked) { color: var(--ink-faint); }
.field select option { color: var(--ink); }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 1px 0 var(--ink); }
.field textarea { resize: vertical; min-height: 110px; }

.form-submit { display: flex; align-items: center; gap: 20px; margin-top: var(--gap-md); flex-wrap: wrap; }
.form-note { font-size: 13px; color: var(--ink-faint); }
.form-note a,
.form-status a { text-decoration: underline; text-underline-offset: 2px; }
.form-status { font-size: 13px; color: var(--ink-soft); margin-top: var(--gap-sm); }
.form-status:empty { display: none; }
.contact-form button[disabled] { opacity: 0.6; cursor: progress; }
/* spam trap: kept out of sight and out of the tab order */
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status[data-state="success"] { color: var(--success); }
.form-status[data-state="error"] { color: var(--error); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.82);
  padding: var(--gap-xl) 0 var(--gap-md);
  border-top: 1px solid var(--line); /* separates it from the page in dark mode */
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--gap-lg);
  padding-bottom: var(--gap-lg);
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand__name { font-family: var(--font-serif); font-size: 22px; color: var(--white); margin-bottom: 6px; }
.footer-brand__role { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #8F8A7D; margin-bottom: 22px; }
.footer-brand__meta { font-size: 14px; color: #B7B2A5; display: flex; flex-direction: column; gap: 6px; }
.footer-col-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #8F8A7D; margin-bottom: 18px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 14.5px; transition: opacity 0.3s var(--ease); }
.footer-links a:hover { opacity: 0.65; }
.footer-bottom {
  padding-top: var(--gap-md);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #837E71;
}

/* ==========================================================================
   REVEAL ON SCROLL
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   PROJECT / CASE STUDY PAGES
   ========================================================================== */
.project-hero {
  position: relative;
  height: 82vh;
  min-height: 480px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* breadcrumb at top, title at bottom */
  overflow: hidden;
}
.project-hero > .container { width: 100%; }
.project-hero__media { position: absolute; inset: 0; }
.project-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.project-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,9,0.25) 0%, rgba(10,10,9,0.08) 35%, rgba(10,10,9,0.62) 100%);
}
.project-hero__content { position: relative; z-index: 2; padding-bottom: 64px; }
.project-hero__cat { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 16px; color: rgba(255,255,255,0.85); }
.project-hero__title { font-family: var(--font-serif); font-size: clamp(32px, 5.5vw, 68px); max-width: 20ch; }

.breadcrumb {
  position: relative;
  z-index: 3;
  padding-top: 130px; /* side padding comes from .container */
}
.breadcrumb a { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { text-decoration: underline; }

.project-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
}
.project-intro__desc { font-size: 19px; color: var(--ink-soft); max-width: 48ch; }
.project-meta-table { display: flex; flex-direction: column; gap: var(--gap-md); }
.project-meta-table dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.project-meta-table dd { font-size: 15.5px; margin: 0; }

.project-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-md);
}
.project-gallery figure { overflow: hidden; }
.project-gallery figure.is-full { grid-column: 1 / -1; }
.project-gallery img { width: 100%; height: 100%; object-fit: cover; }
.project-gallery figcaption { margin-top: 12px; font-size: 13px; color: var(--ink-faint); }

.process-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
  align-items: start;
}
.process-flow__step { position: relative; }
.process-flow__frame { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); margin-bottom: 16px; }
.process-flow__frame img { width: 100%; height: 100%; object-fit: cover; }
.process-flow__label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); text-align: center; }
.process-flow__arrow {
  display: none;
  position: absolute;
  right: -14px;
  top: 38%;
  color: var(--ink-faint);
}
.process-note {
  margin-top: var(--gap-lg);
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
}

.next-project { display: flex; flex-direction: column; gap: 10px; }
.next-project__label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.next-project__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  transition: opacity 0.3s var(--ease);
}
.next-project:hover .next-project__title { opacity: 0.6; }
.project-nav__actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 32px;
}

/* ==========================================================================
   404 PAGE
   ========================================================================== */
.not-found {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--section-pad) + 40px);
}
.not-found__title { margin-bottom: var(--gap-sm); }
.not-found__sub { margin-bottom: var(--gap-lg); }
.not-found__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   PRIVACY / LEGAL TEXT
   ========================================================================== */
.legal { padding-top: calc(var(--section-pad) + 40px); }
.legal__body { max-width: 68ch; margin-top: var(--gap-md); }
.legal__body h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: var(--gap-md) 0 10px;
}
.legal__body p { color: var(--ink-soft); margin-bottom: 14px; }
.legal__body a { text-decoration: underline; text-underline-offset: 2px; }
.legal__updated { font-size: 13px; color: var(--ink-faint); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  :root { --section-pad: 100px; --edge: 24px; }
  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 280px; }
  .unreal__grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--gap-lg); }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service:nth-child(2) { border-right: none; }
  .service:nth-child(3) { border-right: 1px solid var(--line); padding-right: var(--gap-md); }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .project-intro { grid-template-columns: 1fr; gap: var(--gap-md); }
  .process-flow { grid-template-columns: 1fr 1fr; gap: var(--gap-md); }
}

@media (max-width: 860px) {
  .main-nav__list, .main-nav__cta { display: none; }
  .nav-toggle { display: block; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(3),
  .project-card:nth-child(4) { grid-column: span 1; }
  .project-card:nth-child(5) { grid-column: span 2; }
  /* equal-width cards: every frame portrait, the last one wide */
  .project-card .project-card__frame,
  .project-card:nth-child(2) .project-card__frame,
  .project-card:nth-child(3) .project-card__frame { aspect-ratio: 4 / 5; }
  .project-card:nth-child(5) .project-card__frame { aspect-ratio: 16 / 9; }
  .project-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --section-pad: 76px; --section-pad-sm: 56px; }
  .work-grid { grid-template-columns: 1fr; }
  .project-card, .project-card:nth-child(5) { grid-column: span 1; }
  .services-grid { grid-template-columns: 1fr; }
  .service { border-right: none !important; padding-right: 0; padding-left: 0; }
  /* process steps as a compact list: number beside title + description */
  .process-grid { grid-template-columns: 1fr; gap: 0; }
  .process-step {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 12px;
    padding: 18px 0;
  }
  .process-step__num { grid-row: span 2; margin-bottom: 0; font-size: 20px; line-height: 1.2; }
  .process-step__title { margin-bottom: 4px; align-self: end; }
  .process-flow { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-top { grid-template-columns: 1fr; gap: var(--gap-md); }
  .hero { padding-top: 128px; }
  /* on phones the text covers most of the image, so darken it more evenly */
  .hero__scrim { background: linear-gradient(180deg, rgba(15,14,12,0.40) 0%, rgba(15,14,12,0.30) 35%, rgba(15,14,12,0.62) 100%); }
  .hero__content { padding-bottom: 44px; }
  .hero__location { margin-bottom: 14px; }
  .hero__sub { margin-top: 18px; }
  .hero__actions { flex-direction: column; align-items: flex-start; margin-top: 28px; gap: 12px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__scrolldown { display: none; }
  .project-card__meta { flex-wrap: wrap; }
  .section-head { flex-direction: column; align-items: flex-start; }
  /* room so Netlify's floating badge never covers the last footer line */
  .footer-bottom { padding-bottom: 72px; }
}

/* ==========================================================================
   LIGHTBOX (fullscreen image viewer)
   Applies to project hero, gallery and process images on case-study pages.
   ========================================================================== */
.project-hero__media img,
.project-gallery img,
.process-flow__frame img {
  cursor: zoom-in;
}

.lightbox-zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(20, 19, 17, 0.55);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}
.lightbox-zoom-hint svg { width: 16px; height: 16px; }
.project-gallery figure,
.process-flow__frame { position: relative; }
.project-gallery figure:hover .lightbox-zoom-hint,
.process-flow__frame:hover .lightbox-zoom-hint { opacity: 1; transform: scale(1); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 11, 10, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease);
  padding: 40px;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__figure {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.lightbox.is-open .lightbox__img { opacity: 1; transform: scale(1); }
.lightbox__caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 70vw;
}

.lightbox__btn {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.6); }
.lightbox__btn svg { width: 18px; height: 18px; }

.lightbox__close { top: 24px; right: 24px; }
.lightbox__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 24px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lightbox__close { top: 12px; right: 12px; width: 38px; height: 38px; }
  .lightbox__prev { left: 8px; width: 38px; height: 38px; }
  .lightbox__next { right: 8px; width: 38px; height: 38px; }
  .lightbox-zoom-hint { display: none; }
}
