/*
 * Raster artwork is rendered as a real content insert in its own layout cell.
 * It never sits behind copy, and dark image edges dissolve into the shared canvas.
 */

:root {
  --scene-canvas: #02040a;
}

html {
  scroll-snap-type: none;
}

body,
.app-shell,
.app-shell main {
  background: var(--scene-canvas);
}

.app-shell main {
  overflow: clip;
}

.screen,
.contact-screen {
  min-height: auto;
  overflow: clip;
  isolation: isolate;
  background: var(--scene-canvas);
}

.screen::after,
.contact-screen::after,
.screen-shade {
  display: none;
}

.screen-inner {
  min-height: 100svh;
  padding-top: calc(var(--header-height) + 42px);
  padding-bottom: 56px;
}

.scene {
  position: relative;
  z-index: 0;
  inset: auto;
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  overflow: visible;
  transform: none;
  background: transparent;
  pointer-events: none;
}

.scene img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center !important;
  transform: none !important;
  animation: none !important;
  opacity: 0.95;
  filter: saturate(0.96) contrast(1.04);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 76% 72% at 50% 50%, #000 42%, rgba(0, 0, 0, 0.96) 62%, rgba(0, 0, 0, 0.42) 80%, transparent 100%);
  mask-image: radial-gradient(ellipse 76% 72% at 50% 50%, #000 42%, rgba(0, 0, 0, 0.96) 62%, rgba(0, 0, 0, 0.42) 80%, transparent 100%);
}

.hero-copy,
.direction-copy,
.projects-heading,
.cta-card,
.contact-intro,
.brief-card {
  position: relative;
  z-index: 2;
}

.hero-copy h1,
.direction-copy h2,
.projects-heading h2,
.cta-card h2,
.contact-heading h2 {
  text-wrap: balance;
}

/* Hero */

.hero-layout {
  grid-template-columns: minmax(0, 1.04fr) minmax(500px, 0.96fr);
  grid-template-rows: 1fr;
  gap: clamp(30px, 4vw, 84px);
  align-items: center;
}

.hero-copy {
  width: auto;
  max-width: 960px;
  padding-top: 0;
}

.hero-copy h1 {
  max-width: 960px;
  font-size: clamp(54px, 4.15vw, 82px);
}

.hero-visual,
.direction-visual {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  align-items: center;
}

.hero-visual .scene,
.direction-visual .scene {
  grid-area: 1 / 1;
}

.hero-rail,
.section-rail {
  z-index: 2;
  grid-area: 1 / 1;
  align-self: center;
  justify-self: end;
  width: min(48%, 430px);
}

.hero-proof,
.direction-proof {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: -22px;
}

.hero-proof {
  grid-column: auto;
  margin: 0;
}

/* Direction screens */

.direction-layout {
  grid-template-columns: minmax(420px, 0.94fr) minmax(500px, 1.06fr);
  grid-template-rows: 1fr;
  gap: clamp(40px, 5vw, 96px);
  align-items: center;
}

.direction-copy {
  width: auto;
  max-width: 720px;
}

.direction-copy h2 {
  font-size: clamp(46px, 4.25vw, 74px);
}

.direction-proof {
  grid-column: auto;
  margin: 0;
}

/* Calls to action */

.cta-screen,
.cta-screen .screen-inner {
  min-height: 82svh;
}

.cta-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(440px, 0.85fr);
  gap: clamp(44px, 7vw, 132px);
  place-items: center stretch;
}

.cta-media {
  min-width: 0;
}

.cta-media .scene {
  width: 118%;
  margin-left: -18%;
}

.cta-card {
  width: 100%;
  max-width: 680px;
  justify-self: end;
}

/* Projects */

.projects-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(640px, 1.28fr);
  grid-template-rows: auto 1fr auto;
  gap: 28px clamp(36px, 5vw, 92px);
  align-items: center;
}

.projects-heading {
  grid-column: 1 / -1;
}

.projects-visual {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.projects-visual .scene {
  width: 124%;
  margin-left: -24%;
}

.project-cards {
  grid-column: 2;
  grid-row: 2;
}

.metrics {
  grid-column: 1 / -1;
  grid-row: 3;
}

/* Contact */

.contact-screen,
.contact-layout {
  min-height: 118svh;
}

.contact-layout {
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1fr);
  grid-template-rows: minmax(620px, 1fr) auto;
}

.contact-intro {
  display: grid;
  align-content: center;
  min-width: 0;
}

.contact-visual {
  width: 112%;
  margin: 26px 0 -34px -14%;
}

@media (min-width: 1900px) {
  .hero-copy h1 {
    max-width: 1040px;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(560px, 0.92fr);
  }
}

@media (max-width: 1180px) {
  .hero-layout,
  .direction-layout {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.9fr);
  }

  .hero-rail,
  .section-rail {
    width: min(52%, 350px);
  }

  .projects-layout {
    grid-template-columns: minmax(300px, 0.65fr) minmax(560px, 1.35fr);
  }
}

@media (max-width: 900px) {
  .screen-inner {
    min-height: 100svh;
    padding-top: calc(var(--header-height) + 48px);
    padding-bottom: 48px;
  }

  .hero-layout,
  .direction-layout,
  .cta-layout,
  .projects-layout,
  .contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .hero-layout,
  .direction-layout {
    gap: 24px;
  }

  .hero-copy,
  .direction-copy {
    max-width: 640px;
  }

  .hero-visual,
  .direction-visual {
    min-height: 270px;
    margin-top: 2px;
  }

  .hero-visual .scene,
  .direction-visual .scene {
    width: 142%;
    margin-left: -38%;
  }

  .hero-rail,
  .section-rail {
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;
    width: auto;
    max-width: none;
  }

  .hero-proof,
  .direction-proof {
    display: none;
  }

  .cta-screen,
  .cta-screen .screen-inner {
    min-height: 100svh;
  }

  .cta-layout {
    gap: 4px;
  }

  .cta-media {
    min-height: 230px;
    overflow: visible;
  }

  .cta-media .scene {
    width: 142%;
    margin-left: -26%;
  }

  .cta-card {
    justify-self: stretch;
  }

  .projects-layout {
    gap: 18px;
  }

  .projects-heading,
  .projects-visual,
  .project-cards,
  .metrics {
    grid-column: 1;
    grid-row: auto;
  }

  .projects-visual {
    min-height: 205px;
  }

  .projects-visual .scene {
    width: 138%;
    margin-left: -22%;
  }

  .contact-screen,
  .contact-layout {
    min-height: auto;
  }

  .contact-layout {
    grid-template-rows: auto auto auto;
  }

  .contact-visual {
    width: 130%;
    margin: 18px 0 -24px -22%;
  }
}

@media (max-width: 640px) {
  .screen-inner {
    padding-top: calc(var(--header-height) + 34px);
    padding-bottom: 38px;
  }

  .hero-layout,
  .direction-layout {
    padding-top: 0;
  }

  .hero-copy h1 {
    max-width: 350px;
    font-size: clamp(42px, 11.8vw, 52px);
    line-height: 0.98;
  }

  .hero-lead {
    margin-top: 20px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-visual {
    min-height: 240px;
  }

  .direction-visual {
    min-height: 225px;
  }

  .hero-visual .scene,
  .direction-visual .scene {
    width: 154%;
    margin-left: -46%;
  }

  .direction-copy h2 {
    max-width: 360px;
    font-size: clamp(38px, 10.2vw, 46px);
    line-height: 1;
  }

  .direction-screen--marketing .direction-layout,
  .direction-screen--consulting .direction-layout {
    padding-top: 0;
  }

  .cta-media {
    min-height: 205px;
  }

  .cta-media .scene {
    width: 154%;
    margin-left: -34%;
  }

  .projects-layout {
    padding-top: calc(var(--header-height) + 30px);
  }

  .projects-visual {
    min-height: 180px;
  }

  .contact-layout {
    padding-top: calc(var(--header-height) + 44px);
  }
}

@media (max-width: 380px) {
  .hero-actions {
    align-items: stretch;
  }

  .hero-visual {
    min-height: 225px;
  }

  .direction-visual {
    min-height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene img {
    animation: none !important;
  }
}
