/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
  --bg:          #0A1628;
  --surface:     #0F1E35;
  --surface-up:  #152640;
  --text:        #F0EDE8;
  --text-muted:  #8A9BB0;
  --accent:      #00C9A7;
  --warm:        #F4A261;
  --border:      #1B4D6E;

  --font-display: 'IBM Plex Sans', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;

  --nav-h: 68px;
  --max-w: 1200px;
  --gap:   clamp(2rem, 5vw, 4rem);
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ─── Base ───────────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

html.page-transition-ready body {
  opacity: 0;
  transition: opacity 260ms ease;
}

html.page-transition-ready body.is-loaded {
  opacity: 1;
}

html.page-transition-ready body.is-leaving {
  opacity: 0;
  transition-duration: 220ms;
}

@media (prefers-reduced-motion: reduce) {
  html.page-transition-ready body {
    opacity: 1;
    transition: none;
  }
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27, 77, 110, 0.3);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s;
}

/* ─── Page wrapper ───────────────────────────────────────────────────────── */
.page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ─── Hero (Landing) ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 0;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,22,40,0.2) 0%,
    rgba(10,22,40,0.5) 60%,
    rgba(10,22,40,0.95) 100%
  );
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 800px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

/* ─── Page Header ────────────────────────────────────────────────────────── */
.page-header {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(1rem, 1vw, 2rem);
  /* padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); */
  /* border-bottom: 1px solid var(--border); */
  /* margin-bottom: clamp(3rem, 6vw, 5rem); */
}

.page-header .label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}

.page-header .subtitle {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
}

/* ─── Inline body links (studio, what-we-do) ────────────────────────────── */
.studio-text p a,
.service-text p a,
.work-entry-desc a {
  color: var(--text);
  border-bottom: 1px solid rgba(240,237,232,0.3);
  transition: color 0.2s, border-color 0.2s;
}
.studio-text p a:hover,
.service-text p a:hover,
.work-entry-desc a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── Studio Page ────────────────────────────────────────────────────────── */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.studio-portrait {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.studio-portrait img {
  width: 100%;
  height: clamp(460px, 58vh, 620px);
  object-fit: cover;
  object-position: center top;
}

.studio-portrait .portrait-caption {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.studio-portrait .portrait-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.studio-portrait .portrait-link:hover { border-color: var(--accent); }

.studio-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.studio-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
}
.studio-text p:first-of-type {
  color: var(--text);
  font-size: 1.05rem;
}

.services-list {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.services-list h3 {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.services-list ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.services-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.services-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

/* ─── Stats Row ──────────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2.5rem 0 2.5rem;
}

.stat-item {}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ─── Institution Logos ──────────────────────────────────────────────────── */
.institution-logos {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: center;
  justify-content: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin: -0.5rem 0 2.5rem;
}

.institution-logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 30%;
  min-height: 4.5rem;
  padding: 0.75rem;
  border: 1px solid transparent;
  opacity: 0.6;
  transition: border-color 0.2s, opacity 0.2s;
}

.institution-logos a:nth-child(n+4) {
  flex-basis: 45%;
}

.institution-logos a:hover,
.institution-logos a:focus-visible {
  border-color: rgba(0, 201, 167, 0.6);
  opacity: 0.92;
  outline: none;
}

.institution-logos img {
  width: 100%;
  max-width: 8rem;
  max-height: 3rem;
  object-fit: contain;
  filter: grayscale(1) brightness(1.3);
}

.institution-logos a:nth-child(2) img,
.institution-logos a:nth-child(3) img {
  max-width: 4.5rem;
  max-height: 3.25rem;
}

.institution-logos a:nth-child(5) img {
  max-width: 14rem;
}

.institution-logos a:nth-child(4) img {
  max-width: 12rem;
}

/* ─── Pull Quote ─────────────────────────────────────────────────────────── */
.pull-quote {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 1.75rem 0 1.75rem 1.5rem;
  border-left: 2px solid var(--border);
  margin: 2rem 0;
  font-style: italic;
}

/* ─── Section Label ──────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-top: 2.5rem;
}

/* ─── Atmospheric Page Background ────────────────────────────────────────── */
.what-we-do-page,
.atmosphere-page {
  position: relative;
  background: #081321;
  isolation: isolate;
}

.what-we-do-page::before,
.what-we-do-page::after,
.atmosphere-page::before,
.atmosphere-page::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.what-we-do-page::before,
.atmosphere-page::before {
  z-index: 0;
  background-image: url("../images/what-we-do-atmosphere.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.82;
}

.what-we-do-page::after,
.atmosphere-page::after {
  z-index: 0;
  background:
    /* linear-gradient(180deg, rgba(8, 19, 33, 0.55) 0%, rgba(8, 19, 33, 0.82) 46%, rgba(8, 19, 33, 0.9) 150%), */
    radial-gradient(circle at 18% 20%, rgba(10, 22, 40, 0.2), rgba(10, 22, 40, 0.78) 58%);
}

.what-we-do-page .page,
.atmosphere-page .page {
  background: transparent;
}

.what-we-do-page .container {
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.what-we-do-page .page,
.what-we-do-page footer,
.atmosphere-page .page,
.atmosphere-page footer {
  position: relative;
}

.what-we-do-page .nav,
.atmosphere-page .nav {
  z-index: 100;
}

.what-we-do-page .page,
.what-we-do-page footer,
.atmosphere-page .page,
.atmosphere-page footer {
  z-index: 1;
}

.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: clamp(440px, 45vw, 620px);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(21, 38, 64, 0.78), rgba(10, 22, 40, 0.42));
  border: 1px solid rgba(27, 77, 110, 0.56);
  scroll-margin-top: calc(var(--nav-h) + 5rem);
}
.service:last-child { margin-bottom: 0; }

.service.reverse { direction: rtl; }
.service.reverse > * { direction: ltr; }

.service-image {
  overflow: hidden;
  min-height: 100%;
}

.service-image img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.5s ease, transform 0.7s ease;
}
.service:hover .service-image img {
  opacity: 0.98;
  transform: scale(1.025);
}

.service-text {
  align-self: center;
  padding: clamp(2rem, 4vw, 4rem);
}

.service-text .label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.service-text h2::after {
  content: '';
  display: block;
  width: 2.25rem;
  height: 1px;
  margin-top: 1.1rem;
  background: var(--accent);
}

.service-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.service-text p + p {
  margin-top: 1rem;
}

/* ─── Past Work ──────────────────────────────────────────────────────────── */
.work-page-header {
  /* margin-bottom: 1.5rem; */
}

/* Experience category filters */
.work-filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work-filter-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  background: transparent;
  border: 1px solid rgba(138, 155, 176, 0.35);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.work-filter-button:hover,
.work-filter-button:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}

.work-filter-button.active {
  background: rgba(0, 201, 167, 0.12);
  border-color: rgba(0, 201, 167, 0.75);
  color: var(--accent);
}

.work-filter-count {
  margin-top: 0.9rem;
  padding-bottom: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.75;
}

.work-page [id],
.service[id] {
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}

.work-sections {
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.work-section {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.work-section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.work-section-header h2 {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-section-header span {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.work-entry {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: 2rem 0;
  border-bottom: 1px solid rgba(27, 77, 110, 0.2);
  align-items: start;
}
.work-entry:last-child { border-bottom: none; }

.work-entry-image {
  overflow: hidden;
  flex-shrink: 0;
}

.work-entry-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}
.work-entry:hover .work-entry-image img {
  transform: scale(1.03);
}

.work-entry-info {}

.work-entry-tag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.work-entry-title {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.work-entry-title a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.work-entry-title a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.work-entry-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  opacity: 0.7;
}

.work-entry-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 768px) {

  .work-entry {
    grid-template-columns: 1fr;
  }
}

/* ─── Contact ────────────────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "heading intro"
    "divider divider"
    "form image"
    "details image";
  gap: 1.25rem clamp(2rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.contact-heading {
  grid-area: heading;
  align-self: end;
}

.contact-heading .label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-heading h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
}

.contact-divider {
  grid-area: divider;
  height: 1px;
  background: var(--border);
}

.contact-image {
  grid-area: image;
  overflow: hidden;
  border-radius: 2px;
}

.contact-image img {
  width: 100%;
  height: min(72vh, 780px);
  min-height: 560px;
  object-fit: cover;
  object-position: center;
}

.contact-wrap {
  padding: 0;
}

.contact-intro {
  grid-area: intro;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 0;
  align-self: end;
}

.contact-legal {
  grid-area: details;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  opacity: 0.6;
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 0;
  padding-top: 0.5rem;
}

.contact-email {
  display: inline-block;
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  letter-spacing: 0.02em;
}
.contact-email:hover { border-color: var(--accent); }

/* ─── Contact Form ───────────────────────────────────────────────────────── */
.contact-form {
  grid-area: form;
  margin-top: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.form-field label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
}

.form-field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A9BB0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-field select option {
  background: var(--surface);
  color: var(--text);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form-submit {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.9rem 2.5rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}

.form-submit:hover {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .form-submit { width: 100%; }
}

/* ─── Mood Divider ───────────────────────────────────────────────────────── */
.mood-divider {
  width: 100%;
  height: 40vh;
  min-height: 260px;
  overflow: hidden;
  position: relative;
}
.mood-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

/* ─── Scroll Homepage ────────────────────────────────────────────────────── */
.scroll-page body,
body.scroll-page {
  overflow-x: hidden;
}

html.home-snap-page {
  scroll-behavior: auto;
  scroll-snap-type: none;
}

/* Hero */
.scroll-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: 100dvh;
  min-height: 600px;
  padding-top: var(--nav-h);
  overflow: hidden;
  background: #081321;
}

.scroll-hero::before {
  content: none;
}

.scroll-hero-image {
  position: relative;
  inset: auto;
  z-index: auto;
  min-height: calc(100dvh - var(--nav-h));
  overflow: hidden;
}

.scroll-hero-panel {
  position: relative;
  z-index: auto;
  min-height: calc(100dvh - var(--nav-h));
  overflow: hidden;
}

.scroll-hero-image .scroll-bg {
  position: absolute;
  inset: -5% 0;
  background-size: cover;
  background-position: center;
  transform: translate3d(0, var(--hero-parallax-y, 0px), 0);
}

.scroll-hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
  background:
    radial-gradient(circle at 18% 20%, rgba(10, 22, 40, 0.2), rgba(10, 22, 40, 0.78) 58%),
    url("../images/what-we-do-atmosphere.png") center top / cover no-repeat,
    #081321;
}

.scroll-hero-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 19, 33, 0.1), rgba(8, 19, 33, 0.5));
}

.scroll-hero-title {
  position: relative;
  z-index: 4;
  text-align: left;
  max-width: 32rem;
  opacity: 0;
  animation: scrollFadeIn 1.2s ease forwards;
  animation-delay: 0.35s;
}

.scroll-hero-title h1 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8.5vw, 8.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.scroll-hero-title p {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 300;
  color: rgba(240,237,232,0.92);
  letter-spacing: 0.03em;
  max-width: 520px;
  margin: 0;
}

@keyframes scrollFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Project sections */
.scroll-project {
  display: block;
  position: relative;
  height: 100dvh;
  min-height: 500px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

.scroll-project .scroll-bg {
  position: absolute;
  inset: -7% 0;
  background-size: cover;
  background-position: center;
  transform: translate3d(0, var(--project-parallax-y, 0px), 0);
}

.scroll-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45dvh;
  min-height: 220px;
  background: linear-gradient(
    to top,
    rgba(10,22,40,0.92) 0%,
    rgba(10,22,40,0.68) 45%,
    rgba(10,22,40,0.08) 100%
  );
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 54%, rgba(0,0,0,0.4) 78%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, #000 54%, rgba(0,0,0,0.4) 78%, transparent 100%);
  z-index: 1;
  pointer-events: none;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.scroll-project:hover .scroll-overlay {
  background: linear-gradient(
    to top,
    rgba(10,22,40,0.86) 0%,
    rgba(10,22,40,0.58) 45%,
    rgba(10,22,40,0.06) 100%
  );
}

.scroll-project-info {
  position: absolute;
  bottom: clamp(2rem, 7dvh, 4.5rem);
  left: clamp(1.5rem, 4vw, 3rem);
  z-index: 2;
  max-width: min(48rem, calc(100% - 3rem));
  transition: transform 0.28s ease;
}

.scroll-project:hover .scroll-project-info,
.scroll-project:focus-visible .scroll-project-info {
  transform: translateY(-0.25rem);
}

.scroll-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0,201,167,0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.scroll-project:hover .scroll-tag,
.scroll-project:focus-visible .scroll-tag {
  background: rgba(0,201,167,0.08);
  border-color: rgba(0,201,167,0.55);
  color: rgba(0, 201, 167, 0.95);
}

.scroll-project-info h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--text);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.scroll-project:hover .scroll-project-info h2,
.scroll-project:focus-visible .scroll-project-info h2 {
  color: #fffaf3;
  text-shadow: 0 0 24px rgba(240,237,232,0.16);
}

.scroll-project-info p {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(240,237,232,0.6);
  letter-spacing: 0.03em;
  transition: color 0.25s ease;
}

.scroll-project:hover .scroll-project-info p,
.scroll-project:focus-visible .scroll-project-info p {
  color: rgba(240,237,232,0.78);
}

@media (max-width: 768px) {
  .scroll-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "panel"
      "image";
    height: auto;
    min-height: 0;
  }

  .scroll-hero-image {
    grid-area: image;
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .scroll-hero-image .scroll-bg {
    inset: -16px 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #081321;
  }

  .scroll-hero-panel {
    grid-area: panel;
    min-height: clamp(20rem, 46dvh, 27rem);
    align-items: center;
    justify-content: flex-start;
    padding: clamp(2.25rem, 9vw, 4rem) clamp(1.5rem, 7vw, 2.5rem);
  }

  .scroll-hero-title {
    text-align: left;
    width: min(100%, 32rem);
    max-width: 100%;
  }

  .scroll-hero-title h1 {
    font-size: clamp(2.75rem, 13vw, 4.5rem);
  }

  .scroll-hero-title p {
    max-width: min(19rem, 100%);
    margin-left: 0;
  }
}

html.home-snap-page body.scroll-page footer {
  scroll-snap-align: none;
}

@media (prefers-reduced-motion: reduce) {
  html.home-snap-page {
    scroll-snap-type: none;
  }

  .scroll-hero-title {
    animation: none;
    opacity: 1;
  }

  .scroll-hero-image .scroll-bg {
    inset: 0;
    transform: none;
  }

  .scroll-project .scroll-bg {
    inset: 0;
    transform: none;
  }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.footer-legal {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.45;
  letter-spacing: 0.03em;
  text-align: center;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-portrait { position: static; max-width: 420px; }
  .studio-portrait img { height: clamp(300px, 58vw, 420px); }

  .service,
  .service.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    min-height: 0;
  }
  .service.reverse .service-image { order: -1; }

  .service-image {
    min-height: 0;
  }

  .service-image img {
    height: clamp(260px, 52vw, 420px);
    min-height: 0;
  }

  .service-text {
    padding: clamp(1.5rem, 5vw, 2.5rem);
  }

  .work-grid { grid-template-columns: repeat(2, 1fr); }

}

/* Nav collapses to hamburger at 900px */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    padding: 2rem clamp(1.5rem, 4vw, 3rem);
    border-bottom: 1px solid var(--border);
    gap: 1.25rem;
  }
  .nav-toggle { display: flex; }

}

@media (max-width: 700px) {
  .contact-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "intro"
      "divider"
      "form"
      "details"
      "image";
    gap: 1.25rem;
    padding-top: clamp(1.75rem, 6vw, 2.75rem);
  }

  .contact-image {
    margin-top: 0.5rem;
  }

  .contact-image img {
    height: 260px;
    min-height: 260px;
  }

  .contact-heading h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .contact-intro,
  .contact-legal {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .services-list ul { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; gap: 1.25rem; }
  .institution-logos a,
  .institution-logos a:nth-child(n+4) {
    flex-basis: 45%;
  }
  footer { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .institution-logos a,
  .institution-logos a:nth-child(n+4) {
    flex-basis: 100%;
  }
}

/* Portfolio framing */
.home-bridge {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 18% 20%, rgba(10, 22, 40, 0.2), rgba(10, 22, 40, 0.78) 58%),
    url("../images/what-we-do-atmosphere.png") center / cover no-repeat,
    #081321;
  border-bottom: 1px solid var(--border);
}

.home-bridge p {
  max-width: 48rem;
  font-size: clamp(1.2rem, 2.1vw, 1.8rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text);
}

/* Honor's attribution content, using our existing palette and typography. */
.studio-notes {
  margin: 2.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.studio-text .studio-notes p,
.credit-note {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.credit-note {
  max-width: 900px;
}

.credit-note a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.credit-note a:hover,
.credit-note a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.credit-note-block {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.project-credit {
  padding-bottom: 2rem;
}

.credits-image {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.credits-image img {
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .credits-image { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
