/* =========================================================
   LUPPINO — Architectural Monograph design system
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --background: #f9f9f9;
  --on-background: #1a1c1c;
  --primary: #000000;
  --on-primary: #ffffff;
  --surface: #f9f9f9;
  --surface-variant: #e2e2e2;
  --on-surface: #1a1c1c;
  --on-surface-variant: #4c4546;
  --secondary: #5d5f5f;
  --outline: #7e7576;

  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;

  --content-margin: 48px;
  --section-gap: 160px;
  --rule: 1px;

  --col-gap: 24px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: transparent; border: 0; cursor: pointer; }

/* No rounded corners anywhere — strictly orthogonal. */
*, *::before, *::after { border-radius: 0 !important; }

/* ---------- Base ---------- */
html, body { background: var(--background); color: var(--on-background); }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--primary); color: var(--on-primary); }

main { flex: 1 0 auto; }

/* ---------- Typography utilities ---------- */
.display-xl {
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.headline-lg {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.headline-md {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.body-md {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
}
.label-sm {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Layout primitives ---------- */
.container {
  padding-left: var(--content-margin);
  padding-right: var(--content-margin);
}
.section { padding-top: var(--section-gap); padding-bottom: var(--section-gap); }
.section--top-rule { border-top: var(--rule) solid var(--surface-variant); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
}

/* Convenient column helpers — set grid-column-end so they compose with start-N */
.col-3 { grid-column-end: span 3; }
.col-4 { grid-column-end: span 4; }
.col-5 { grid-column-end: span 5; }
.col-6 { grid-column-end: span 6; }
.col-7 { grid-column-end: span 7; }
.col-8 { grid-column-end: span 8; }
.col-10 { grid-column-end: span 10; }
.col-12 { grid-column-end: span 12; }

.start-2 { grid-column-start: 2; }
.start-3 { grid-column-start: 3; }
.start-4 { grid-column-start: 4; }
.start-5 { grid-column-start: 5; }
.start-6 { grid-column-start: 6; }
.start-7 { grid-column-start: 7; }
.start-10 { grid-column-start: 10; }

/* ---------- Top nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--content-margin);
  background: transparent;
}
.nav__logo {
  height: 38px;
  width: auto;
  display: block;
  filter: invert(1);
}
.nav--over-image .nav__logo { filter: none; }
.nav__list {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav__link {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #94989b;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.nav__link:hover { color: var(--primary); }
.nav__link.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- Footer ---------- */
.footer {
  border-top: var(--rule) solid var(--surface-variant);
  background: #ffffff;
  padding: 80px var(--content-margin);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: center;
}
.footer__copyright {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--secondary);
}
.footer__links {
  display: flex;
  gap: 48px;
  justify-content: flex-end;
}
.footer__links a {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--secondary);
  text-underline-offset: 4px;
  transition: color 0.4s ease;
}
.footer__links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 16px 28px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.button:hover {
  background: var(--background);
  color: var(--primary);
}

/* ---------- Hero (homepage) ---------- */
.hero {
  padding: 0 var(--content-margin);
  padding-bottom: var(--section-gap);
  position: relative;
}
.hero__frame {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 600px;
  background: var(--surface-variant);
  overflow: hidden;
}
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
  transition: transform 1.5s ease-out;
}
.hero__image--clean { filter: none; }
.hero__frame:hover .hero__image { transform: scale(1.04); }
.hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 32px;
  pointer-events: none;
}
.hero__wordmark {
  width: 50vw;
  max-width: 720px;
  height: auto;
  /* Logo file is already white on transparent — no filter needed. */
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.35));
}
.hero__tagline {
  margin-top: 32px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.hero__caption {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-top: var(--rule) solid var(--surface-variant);
  padding-top: 16px;
  width: 33.333%;
}
.hero__caption .right { text-align: right; color: var(--on-surface-variant); }

/* ---------- Mission section ---------- */
.mission {
  padding: var(--section-gap) var(--content-margin);
  border-top: var(--rule) solid var(--surface-variant);
}
.mission__title {
  position: sticky;
  top: 160px;
  color: var(--primary);
}
.mission__copy {
  border-left: var(--rule) solid var(--surface-variant);
  padding-left: 48px;
}
.mission__copy-cols {
  column-count: 2;
  column-gap: 48px;
  color: var(--on-surface-variant);
}
.mission__copy-cols p { break-inside: avoid; margin-bottom: 24px; }

.mission__statement {
  font-size: 22px;
  line-height: 1.55;
  color: var(--on-surface);
  max-width: 580px;
}

@media (max-width: 800px) {
  .mission__statement { font-size: 18px; }
}

/* ---------- Featured projects (homepage) ---------- */
.featured {
  padding: var(--section-gap) var(--content-margin);
  border-top: var(--rule) solid var(--surface-variant);
}
.featured__heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 128px;
}
.featured__heading .label-sm { color: var(--primary); }
.featured__heading .rule {
  height: var(--rule);
  background: var(--surface-variant);
  flex: 1;
}
.featured__row { margin-bottom: 192px; align-items: end; }
.featured__row:last-child { margin-bottom: 0; }

.featured__image-wrap--lg img { height: 819px; }
.featured__image-wrap--md img { height: 614px; }
.featured__image-wrap { display: block; }
.featured__image-wrap a { display: block; width: 100%; }
.featured__image-wrap img { width: 100%; object-fit: cover; }

.featured__caption {
  padding-bottom: 8px;
}
.featured__caption--left {
  border-left: var(--rule) solid var(--primary);
  padding-left: 24px;
}
.featured__caption--right {
  border-right: var(--rule) solid var(--primary);
  padding-right: 24px;
  text-align: right;
}
.featured__caption h3 {
  color: var(--primary);
  margin-bottom: 8px;
}
.featured__caption p {
  font-style: italic;
  font-size: 15px;
  color: var(--on-surface-variant);
}
.featured__link {
  display: inline-block;
  margin-top: 16px;
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}
.featured__link:hover { opacity: 0.6; }

/* ---------- Single project showcase ---------- */
.project-showcase {
  padding: 0 var(--content-margin);
  padding-bottom: var(--section-gap);
}
.project-showcase__hero {
  width: 100%;
  height: 80vh;
  min-height: 600px;
  margin-bottom: 80px;
  background: var(--surface-variant);
  overflow: hidden;
}
.project-showcase__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-showcase__meta {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  padding-top: 32px;
  padding-bottom: 96px;
  border-top: var(--rule) solid var(--surface-variant);
}
.project-showcase__meta-item h4 {
  color: var(--secondary);
  margin-bottom: 12px;
}
.project-showcase__meta-item p {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.project-showcase__intro {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  margin-bottom: 96px;
}
.project-showcase__intro-title { color: var(--primary); }
.project-showcase__intro-body { color: var(--on-surface); }
.project-showcase__intro-body p { margin-bottom: 24px; }
.project-showcase__intro-body p:last-child { margin-bottom: 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 80px var(--col-gap);
  padding-bottom: 96px;
}
.gallery__image-wrap {
  width: 100%;
  background: var(--surface-variant);
  overflow: hidden;
}
.gallery__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease-out;
}
.gallery__image-wrap:hover img { transform: scale(1.03); }
.gallery__caption {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.gallery__caption span:last-child { color: var(--on-surface-variant); }

@media (max-width: 800px) {
  .project-showcase__meta > * { grid-column: 1 / -1; padding-bottom: 16px; }
  .project-showcase__intro > * { grid-column: 1 / -1; }
  .gallery > * { grid-column: 1 / -1 !important; }
  .project-showcase__hero { height: 60vh; min-height: 360px; margin-bottom: 48px; }
}

/* ---------- Closing image pair (homepage) ---------- */
.closing {
  padding: 0 var(--content-margin) var(--section-gap);
  border-top: var(--rule) solid var(--surface-variant);
  padding-top: 96px;
}
.closing__row { align-items: end; }
.closing__frame {
  width: 100%;
  background: var(--surface-variant);
  overflow: hidden;
}
.closing__frame--lg { height: 720px; }
.closing__frame--md { height: 560px; }
.closing__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.closing__frame:hover img { transform: scale(1.04); }
.closing__caption {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  border-top: var(--rule) solid var(--surface-variant);
  padding-top: 16px;
}
.closing__caption .right { color: var(--on-surface-variant); }

@media (max-width: 1100px) {
  .closing__frame--lg { height: 540px; }
  .closing__frame--md { height: 420px; }
}
@media (max-width: 800px) {
  .closing { padding-top: 64px; }
  .closing__row > * { grid-column: 1 / -1; margin-bottom: 32px; }
  .closing__frame--lg { height: 380px; }
  .closing__frame--md { height: 300px; }
}

/* ---------- Projects page ---------- */
.page-header {
  padding: 200px var(--content-margin) 96px;
}
.page-header__title { color: var(--primary); }
.page-header__intro {
  max-width: 540px;
  color: var(--on-surface-variant);
}

.page-header__grid {
  align-items: end;
}
.page-header__eyebrow {
  display: block;
  margin-bottom: 24px;
  color: var(--secondary);
}
.page-header__aside {
  padding-bottom: 12px;
  border-left: var(--rule) solid var(--surface-variant);
  padding-left: 32px;
}

@media (max-width: 800px) {
  .page-header__grid > * { grid-column: 1 / -1; }
  .page-header__aside {
    border-left: 0;
    padding-left: 0;
    margin-top: 32px;
  }
}

.projects-grid {
  padding: 0 var(--content-margin) var(--section-gap);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 96px var(--col-gap);
}
.project { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
a.project:hover { text-decoration: none; }
.project__image {
  width: 100%;
  background: var(--surface-variant);
  overflow: hidden;
}
.project__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease-out;
}
.project:hover .project__image img { transform: scale(1.03); }

.project__meta {
  margin-top: 16px;
  border-top: var(--rule) solid var(--surface-variant);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.project__meta h3 { color: var(--primary); }
.project__meta .meta-right {
  color: var(--on-surface-variant);
  text-align: right;
}
.project__caption {
  margin-top: 8px;
  font-style: italic;
  color: var(--on-surface-variant);
  font-size: 15px;
}

/* Aspect ratio helpers */
.ratio-21x9 { aspect-ratio: 21 / 9; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-3x2  { aspect-ratio: 3 / 2; }
.ratio-4x5  { aspect-ratio: 4 / 5; }
.ratio-3x4  { aspect-ratio: 3 / 4; }
.ratio-1x1  { aspect-ratio: 1 / 1; }

/* ---------- Contact page ---------- */
.contact-hero {
  padding: 200px var(--content-margin) 80px;
}
.contact-hero__title {
  color: var(--primary);
  text-transform: uppercase;
}
.contact-hero__intro {
  color: var(--on-surface-variant);
  max-width: 460px;
  margin-top: 24px;
}

.contact-info {
  padding: 80px var(--content-margin);
  border-top: var(--rule) solid var(--surface-variant);
  border-bottom: var(--rule) solid var(--surface-variant);
}
.info-block { padding-right: 24px; }
.info-block + .info-block {
  border-left: var(--rule) solid var(--surface-variant);
  padding-left: 48px;
  padding-right: 0;
}
.info-block h4 {
  color: var(--secondary);
  margin-bottom: 24px;
}
.info-block p { color: var(--on-surface); margin-bottom: 8px; font-size: 17px; }
.info-block a { display: block; margin-bottom: 8px; font-size: 17px; }
.info-block a:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-form-section {
  padding: var(--section-gap) var(--content-margin);
}
.contact-form-section__title {
  color: var(--primary);
  margin-bottom: 64px;
}
.form {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px var(--col-gap);
}
.form__field {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
}
.form__field--full { grid-column: span 12; }
.form__label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 12px;
}
.form__input,
.form__textarea {
  background: transparent;
  border: 0;
  border-bottom: var(--rule) solid var(--primary);
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--on-background);
  outline: none;
  transition: border-bottom-width 0.2s ease;
}
.form__input:focus,
.form__textarea:focus {
  border-bottom-width: 2px;
  padding-bottom: 7px;
}
.form__textarea {
  min-height: 120px;
  resize: vertical;
}
.form__submit-row {
  grid-column: span 12;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}
.form__note {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
}

/* Inline form banners. Stay hidden until JS removes the `hidden` attribute
   after a successful submit (success) or a server error (error). */
.form__success,
.form__error {
  margin-bottom: 48px;
  padding: 32px 40px;
  background: #ffffff;
  border-top: var(--rule) solid var(--primary);
  border-bottom: var(--rule) solid var(--primary);
}
.form__error {
  border-color: var(--error, #ba1a1a);
  color: var(--error, #ba1a1a);
}
.form__success .label-sm {
  color: var(--secondary);
  margin-bottom: 12px;
  display: block;
}
.form__success .body-md { color: var(--primary); }

/* Disabled submit while the form is in flight */
.button[disabled] {
  opacity: 0.5;
  cursor: progress;
  pointer-events: none;
}

/* ---------- About page ---------- */
.about {
  padding: 40px var(--content-margin) var(--section-gap);
}
.about__grid {
  align-items: start;
}
.about__portrait {
  margin: 0;
}
.about__portrait img {
  display: block;
  width: 100%;
  height: auto;
}
.about__copy {
  padding-top: 8px;
}
.about__eyebrow {
  display: block;
  color: var(--secondary);
  margin-bottom: 24px;
}
.about__name {
  color: var(--primary);
  margin-bottom: 8px;
}
.about__role {
  color: var(--on-surface-variant);
  margin-bottom: 32px;
}
.about__body p {
  color: var(--on-surface);
  margin-bottom: 20px;
}
.about__body p:last-child {
  margin-bottom: 0;
}

.about-cta {
  padding: 0 var(--content-margin) var(--section-gap);
}
.about-cta__row {
  border-top: var(--rule) solid var(--surface-variant);
  padding-top: 48px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

/* =========================================================
   Motion — emulating the slow, editorial feel of high-end
   architectural sites. All transforms run on cheap properties
   (opacity, transform, clip-path) and respect reduced motion.
   ========================================================= */

html { scroll-behavior: smooth; }

/* ---- Intro curtain (homepage only) ---- */
body.has-intro { overflow: hidden; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: grid;
  place-items: center;
  transform: translateY(0);
}
/* Both logo + slogan stack in the same grid cell so they share the centre */
.intro__logo,
.intro__slogan { grid-area: 1 / 1; }

.intro__logo {
  width: 32vw;
  max-width: 420px;
  height: auto;
  opacity: 0;
  transform: translateY(12px);
  /* Beat 1: logo fades in, holds, then fades out (slight rise) */
  animation:
    intro-logo-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards,
    intro-logo-out 0.55s cubic-bezier(0.65, 0, 0.35, 1) 1.6s forwards;
}

.intro__slogan {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 3.6vw, 44px);
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translateY(18px);
  /* Beat 2: slogan masks up after the logo leaves; rides the curtain on exit */
  animation: intro-slogan-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 2.25s forwards;
}

.intro--leaving {
  animation: intro-fade-out 1.2s ease forwards;
  pointer-events: none;
}
.intro--done { display: none; }

@keyframes intro-logo-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes intro-logo-out {
  to { opacity: 0; transform: translateY(-8px); }
}
@keyframes intro-slogan-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes intro-fade-out {
  to { opacity: 0; }
}

/* While the intro is showing, hold the entrance animations off */
body.has-intro .nav { transform: translateY(-100%); opacity: 0; }
body.has-intro .hero__frame { clip-path: inset(0 0 100% 0); }
body.has-intro .hero__image { transform: scale(1.04); animation: none; }
body.has-intro .hero__caption { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  body.has-intro { overflow: auto; }
}

/* ---- Page-load entrance ---- */
.nav {
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
              opacity 0.9s ease 0.2s;
}
.is-loaded .nav { transform: translateY(0); opacity: 1; }

/* Nav hides on scroll-down, returns on scroll-up */
.nav { transition-property: transform, opacity, background; }
.nav--hidden { transform: translateY(-100%); }
.nav--scrolled {
  background: rgba(249, 249, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav--scrolled,
.nav--hidden { transition-delay: 0s; }

/* ---- Hero entrance + Ken Burns ---- */
.hero__frame {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.6s cubic-bezier(0.65, 0, 0.35, 1) 0.2s;
}
.is-loaded .hero__frame { clip-path: inset(0); }

@keyframes ken-burns {
  0%   { transform: scale(1.04); }
  100% { transform: scale(1.10); }
}
.hero__image {
  transform: scale(1.04);
  transition: transform 2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
}
.is-loaded .hero__image {
  transform: scale(1);
  animation: ken-burns 18s ease-in-out 2.4s infinite alternate;
}
.hero__frame:hover .hero__image { animation-play-state: paused; }

.hero__caption {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s ease 1.2s, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.2s;
}
.is-loaded .hero__caption { opacity: 1; transform: translateY(0); }

/* ---- Scroll-triggered reveals ---- */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mask reveal — image clips up from the bottom */
.reveal-mask {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.4s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: clip-path;
}
.reveal-mask.is-visible { clip-path: inset(0); }

/* Line-by-line text reveal — for headlines */
.reveal-lines { display: block; }
.reveal-lines .line {
  display: block;
  overflow: hidden;
}
.reveal-lines .line > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-lines.is-visible .line > span { transform: translateY(0); }
.reveal-lines.is-visible .line:nth-child(2) > span { transition-delay: 0.12s; }
.reveal-lines.is-visible .line:nth-child(3) > span { transition-delay: 0.24s; }

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }

/* Image hover lift on featured/project tiles */
.featured__image-wrap img,
.gallery__image-wrap img,
.project__image img,
.project-showcase__hero img {
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.featured__image-wrap:hover img,
.gallery__image-wrap:hover img,
.project:hover .project__image img,
.project-showcase__hero:hover img { transform: scale(1.04); }

/* Reduced motion — disable everything except basic fades */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero__frame,
  .reveal,
  .reveal-mask,
  .reveal-stagger > *,
  .reveal-lines .line > span { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .is-loaded .hero__image { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root {
    --content-margin: 32px;
    --section-gap: 120px;
  }
  .display-xl { font-size: 72px; }
  .headline-lg { font-size: 56px; }
  .featured__image-wrap--lg img { height: 600px; }
  .featured__image-wrap--md img { height: 480px; }
}

@media (max-width: 800px) {
  :root {
    --content-margin: 24px;
    --section-gap: 96px;
    --col-gap: 16px;
  }

  .display-xl { font-size: 56px; }
  .headline-lg { font-size: 44px; }
  .headline-md { font-size: 32px; }

  .nav {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 16px var(--content-margin);
  }
  .nav__list { gap: 18px; flex-wrap: nowrap; }
  .nav__link { font-size: 9.5px; letter-spacing: 0.12em; white-space: nowrap; }
  .nav__logo { height: 22px; }

  /* Collapse 12-col grids on mobile */
  .grid-12 > [class*="col-"] { grid-column: 1 / -1; }
  .grid-12 > [class*="start-"] { grid-column-start: 1; }

  .hero__frame { height: 70vh; min-height: 480px; }
  .hero__wordmark { width: 70vw; }
  .hero__tagline { font-size: 14px; }
  .hero__caption { width: 100%; }

  .mission__title { position: static; margin-bottom: 32px; }
  .mission__copy { border-left: 0; padding-left: 0; }
  .mission__copy-cols { column-count: 1; }

  .featured__heading { margin-bottom: 64px; }
  .featured__row { margin-bottom: 96px; }
  .featured__image-wrap--lg img,
  .featured__image-wrap--md img { height: 360px; }
  .featured__caption--left,
  .featured__caption--right {
    border: 0;
    padding: 0;
    text-align: left;
  }

  .projects-grid { gap: 64px var(--col-gap); }
  .projects-grid > .project { grid-column: 1 / -1 !important; }

  .footer {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 56px var(--content-margin);
  }
  .footer__links { justify-content: flex-start; flex-wrap: wrap; gap: 24px; }

  .info-block + .info-block {
    border-left: 0;
    border-top: var(--rule) solid var(--surface-variant);
    padding-left: 0;
    padding-top: 32px;
    margin-top: 32px;
  }
  .form__field { grid-column: span 12; }

  .about__copy { padding-top: 32px; }
  .about__role { margin-bottom: 24px; }
}
