/* Phase 5C. A common light direction across the marine architecture and paper chapters. */
body[data-environment] {
  --env-deep: #0b2029;
  --env-field: #132f3a;
  --env-light: #365965;
  --env-copper: #e3b99d;
  --env-paper: #f0eddf;
  --env-shadow: #d9d4c3;
  --env-edge: #91735e;
  --copper: var(--env-copper);
  --ground: var(--env-deep);
  --chalk: #f3efe4;
  --editorial-line: #6b8790;
  background: var(--env-deep);
}

[data-environment] main {
  isolation: isolate;
  background: radial-gradient(ellipse 80% 660px at 94% 0, #264653 0%, transparent 95%), var(--env-deep);
}
[data-environment] .identity { background: #091c24; }
[data-environment] .identity nav [aria-current] { background: #193742; }
[data-environment] :is(.intro,.chapter-entry,.case-header) { --env-gutter: var(--editorial-inset); }
.portfolio-home[data-environment] .intro {
  background: var(--env-deep);
  border: 0;
  min-height: 545px;
}
.portfolio-home[data-environment] .intro::after {
  background: linear-gradient(90deg,#0b2029 0%,#0b2029ed 35%,#0b202961 72%,transparent),
              linear-gradient(0deg,#102b36 0%,transparent 23%);
}
.portfolio-home[data-environment] .intro .opening-copy {
  padding-top: clamp(7px,2.1vw,33px);
}
.portfolio-home[data-environment] .intro .opening-art {
  inset: 0;
  z-index: -2;
}
.portfolio-home[data-environment] .intro .opening-art img { object-position: 64% 54%; }
[data-environment] .opening-edge {
  position: absolute;
  bottom: 0;
  inset-inline: var(--env-gutter);
  height: 1px;
  background: linear-gradient(90deg,#ddae8c,#ddae8c24 76%,transparent);
  transform-origin: left;
  pointer-events: none;
}
[data-environment] #work {
  position: relative;
  isolation: isolate;
  padding-top: clamp(12px,2.8vw,34px);
}
[data-environment] #work::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--editorial-inset)) -40px;
  z-index: -1;
  background: radial-gradient(ellipse 88% 880px at 85% 5%,#2a4d5a 0%,transparent 82%),
              linear-gradient(180deg,#102b36,transparent 82%);
}
[data-environment] .work-label h2 { font-size: clamp(37px,5.2vw,75px); }
[data-environment] .register > .project-row {
  border-top-color: #66828a;
}
[data-environment] .register > .project-row .project-heading {
  z-index: 1;
}
[data-environment] .register > .project-row .project-summary { z-index: 1; }
[data-environment] .register > .project-row:first-child {
  isolation: isolate;
  min-height: clamp(350px,37vw,510px);
  grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr);
  align-content: center;
  grid-template-rows: auto auto;
  padding: clamp(20px,4vw,62px) 0;
}
[data-environment] .register > .project-row:first-child .project-heading {
  padding-top: 0;
}
[data-environment] .register > .project-row:first-child .project-art.editorial-folio {
  position: absolute;
  inset: 0 0 0 30%;
  grid-area: auto;
  z-index: -1;
  width: auto;
  height: auto;
  min-height: 0;
}
[data-environment] .register > .project-row:first-child .editorial-folio .editorial-crop {
  mask-image: linear-gradient(90deg,transparent 0%,#0004 15%,#000 47%),
              linear-gradient(0deg,transparent,#000 15%);
  mask-composite: intersect;
}
[data-environment] .register > .project-row:first-child .editorial-folio figcaption {
  text-align: right;
  border: 0;
}
[data-environment] .register > .project-row:first-child .project-summary {
  max-width: min(48ch,93%);
}
[data-environment] .register > .project-row:first-child .row-category { color: #ebdbcf; }
[data-environment] .register .evidence-cover,
[data-environment] .register .ownership-index {
  border-block: 1px solid #779199;
  box-shadow: 0 15px 28px #07191e80;
}
[data-environment] .register .digital-art {
  background: radial-gradient(ellipse at 67% 45%,#467983,#214c5b 54%,#142f3d 93%);
  color: #f2efe4;
}
[data-environment] .register .custom-art {
  background: linear-gradient(135deg,#4e554e,#857969 55%,#403f37);
  color: #fff6e8;
}
[data-environment] .register .ownership-index {
  position: relative;
  isolation: isolate;
  background: #102935;
}
[data-environment] .ownership-index span { border-top-color: #91a2a5; }
[data-environment] .ownership-index .ownership-cover {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 53% 50%;
}
[data-environment] .ownership-index::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(92deg,#0c232eec,#102c38a8 100%);
}
[data-environment] .register .editorial-crop { background: var(--env-deep); }
[data-environment] .register > .project-row:first-child .editorial-image { object-position: 68% 49%; }
[data-environment] .register .art-service-bay .editorial-image { object-position: 57% 56%; }
[data-environment] .register > .project-row:not(:first-child) .editorial-crop {
  mask-image: linear-gradient(90deg,transparent,#000 12%);
}
[data-environment] .work-exit {
  padding-top: clamp(24px,4vw,54px);
  margin-top: clamp(32px,5vw,70px);
}
[data-environment] .chapter-entry {
  min-height: clamp(330px,40vw,560px);
  margin-top: 24px;
  margin-bottom: 0;
  background: var(--env-deep);
}
[data-environment] .chapter-entry::after {
  background: linear-gradient(0deg,#122f3a 0%,#0c222b 7%,#0c222bba 33%,#0c222b10 82%),
              linear-gradient(95deg,#0c222b92,transparent 74%);
}
[data-environment] .chapter-entry h2 em { color: var(--env-copper); }
[data-environment] .chapter-image img { object-position: 64% 49%; filter: saturate(.6); }
[data-environment] .career-map {
  background: radial-gradient(ellipse 85% 170% at 87% 0,#234452,transparent 79%),#122f3a;
  border: 0;
  margin: 0 calc(-1 * var(--editorial-inset)) 36px;
  padding: clamp(28px,4.5vw,65px) var(--editorial-inset);
}
[data-environment] .career-plane { opacity: .09; }
[data-environment] .qualifications {
  background: linear-gradient(113deg,#ded8c5,var(--env-paper) 23%,#ece7d8 74%,#dfdac9);
  padding-inline: max(var(--editorial-inset),5%);
}
[data-environment] #contact {
  background: radial-gradient(ellipse 70% 180% at 97% 100%,#254755,transparent),#0b2029;
}
[data-environment] #contact h2 { color: #f0e7d8; }

.case-page[data-environment] .case-header {
  position: relative;
  isolation: isolate;
  margin: calc(-1 * var(--env-gutter)) calc(-1 * var(--env-gutter)) 0;
  padding: clamp(29px,4.4vw,64px) var(--env-gutter) clamp(18px,3.6vw,44px);
  border: 0;
  background: radial-gradient(ellipse 87% 115% at 99% -10%,var(--case-light,#264957),transparent 78%),
              linear-gradient(180deg,#102a36,#0d2530);
}
.case-page[data-environment] .case-header-split {
  display: block;
  min-height: clamp(435px,37vw,550px);
}
.case-page[data-environment] .case-opening-copy {
  position: relative;
  z-index: 1;
  max-width: min(57%,690px);
}
.case-page[data-environment] .case-opening-copy .case-meta {
  background: linear-gradient(90deg,#0d253085,#0d253000);
}
.case-page[data-environment] .case-header h1 {
  font-size: clamp(43px,5.9vw,89px);
  text-wrap: balance;
}
.case-page[data-environment] .case-header-split h1 { font-size: clamp(43px,5.5vw,80px); }
.case-page[data-environment] .case-header-split .editorial-folio {
  position: absolute;
  inset: 0 0 8px 38%;
  align-self: stretch;
  z-index: -1;
}
.case-page[data-environment] .case-header-split .editorial-crop {
  height: 100%;
  aspect-ratio: auto;
  mask-image: linear-gradient(90deg,transparent,#0002 12%,#000 40%),
              linear-gradient(0deg,transparent,#000 19%);
  mask-composite: intersect;
}
.case-page[data-environment] .case-header-split .editorial-crop img {
  object-position: 65% 47%;
}
.case-page[data-environment] .case-header-split .editorial-folio figcaption {
  position: absolute;
  right: var(--env-gutter);
  bottom: 0;
  border: 0;
  background: #0b2029;
  padding: 4px 7px;
}
.case-digital[data-environment] { --case-light: #3c6f77; }
.case-cd[data-environment] { --case-light: #37535e; }
.case-custom[data-environment] { --case-light: #615747; }
.case-page[data-environment] .case-hero {
  background: #122d38;
  box-shadow: 0 16px 50px #071a245e;
  margin-top: clamp(16px,2.4vw,35px);
}
.case-page[data-environment] .case-hero > figcaption { background: #102a34; }
.case-page[data-environment] :is(.lens-controls,.hero-heading) {
  background: #0e2732;
}
.case-page[data-environment] .case-hero .step-content,
.case-page[data-environment] .case-hero .record-reading { background-color: #193643; }
.case-digital[data-environment] .service-art {
  background: radial-gradient(ellipse at 62% 62%,#416f78 0%,#234d5a 44%,#143643 83%);
}
.case-digital[data-environment] .service-art .context-screen {
  box-shadow: 0 14px 29px #03151db0,0 0 1px #f2e8da;
}
.case-digital[data-environment] .adoption-composition { background: #142f3b; }
.case-digital[data-environment] .service-title > strong {
  font-size: clamp(27px,3vw,40px);
  line-height: 1.06;
}
.case-digital[data-environment] .service-title br { display: none; }
.case-digital[data-environment] .service-image-field { margin-top: 12px; }
.case-page[data-environment] .case-header:not(.case-header-split) {
  padding-block: clamp(22px,3.2vw,45px) clamp(18px,2.7vw,36px);
}
.case-custom[data-environment] :is(.project-workflow,.quote-composition,.custom-art) {
  background-color: #263d43;
}
.case-custom[data-environment] .case-lens .custom-sequence {
  background-image: radial-gradient(ellipse at 70% 35%,#6d6354,#394b4b 44%,#1a353f);
}
.case-custom[data-environment] :is(.studio-frame,.quote-frame) img { box-shadow: 0 16px 38px #06182094; }
.case-cd[data-environment] .ownership-composition {
  background: linear-gradient(150deg,#294651,#18333e 65%);
}
.case-cd[data-environment] .ownership-heading {
  position: relative;
  isolation: isolate;
  min-height: clamp(150px,17vw,224px);
  align-items: end;
  background: #17323e;
}
.case-cd[data-environment] .ownership-heading p { color: #f2e8d8; }
.case-cd[data-environment] .ownership-heading img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 61% 53%;
}
.case-cd[data-environment] .ownership-heading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,#102935f5 3%,#102935c9 46%,#10293565),
              linear-gradient(0deg,#17343f,transparent 45%);
}
.case-cd[data-environment] .ownership-heading .material-credit {
  display: block;
  margin-top: 10px;
  color: #e0c4ae;
  font-size: 11px;
}
.case-cd[data-environment] .ownership-composition .service-exhibit {
  background: radial-gradient(ellipse at 49% 15%,#294a55,#112d39 67%);
}
.case-page[data-environment] .reading-surface {
  position: relative;
  margin-inline: calc(-1 * var(--editorial-inset));
  padding-inline: clamp(20px,6vw,85px);
  background: linear-gradient(116deg,#ded8c7,var(--env-paper) 22%,#ece7d7 78%,#ded8c7);
  box-shadow: 0 14px 32px #06161f55;
}
.case-page[data-environment] .reading-surface::before,
[data-environment] .qualifications::before {
  height: 7px;
  background: linear-gradient(90deg,#845843,#be9379 40%,#be937932 89%,transparent);
}
.case-page[data-environment] .case-story h2 {
  width: fit-content;
  border-top: 1px solid #9f8a76;
  color: #344e55;
}
.case-page[data-environment] .case-story h3 { color: #112a35; }
.case-page[data-environment] .case-contact {
  background: radial-gradient(ellipse at 94% 120%,#224451,transparent 69%),var(--env-deep);
}

/* Major movements follow the entering surface. Copy and controls remain stationary. */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    html[data-motion="full"] [data-environment] .opening-edge {
      animation: environment-edge linear both;
      animation-timeline: --editorial-scene;
      animation-range: exit 0% exit 76%;
    }
    html[data-motion="full"] [data-environment] [data-editorial-motion="image"] .editorial-crop img {
      animation-name: environment-plate;
      animation-range: entry 0% entry 88%;
    }
    html[data-motion="full"] [data-environment] [data-editorial-motion="chapter"] .chapter-image img {
      animation-name: environment-corridor;
      animation-range: entry 0% entry 94%;
    }
    html[data-motion="full"] [data-environment] [data-editorial-motion="reading"]::before {
      animation-name: environment-paper;
      animation-range: entry 0% cover 24%;
    }
  }
}
@keyframes environment-edge {
  from { transform: scaleX(.25); opacity: .55; }
  75%,to { transform: scaleX(1); opacity: 1; }
}
@keyframes environment-plate {
  from { transform: scale(1.19) translateX(5%); }
  79%,to { transform: scale(1); }
}
@keyframes environment-corridor {
  from { transform: scale(1.19) translate(-3%,5%); }
  82%,to { transform: scale(1.025); }
}
@keyframes environment-paper {
  from { transform: scaleX(.12); opacity: .55; }
  84%,to { transform: scaleX(1); opacity: 1; }
}

@media (max-width: 1000px) {
  .case-page[data-environment] .case-opening-copy { max-width: 61%; }
  .case-page[data-environment] .case-header-split .editorial-folio { left: 43%; }
}
@media (max-width: 760px) {
  .case-page[data-environment] .case-header {
    margin-top: 0;
    padding-top: 21px;
  }
  .case-page[data-environment] .case-header h1 { font-size: clamp(39px,8vw,62px); }
  .case-page[data-environment] .case-header-split { min-height: 0; }
  .case-page[data-environment] .case-opening-copy { max-width: none; }
  .case-page[data-environment] .case-header-split .editorial-folio {
    position: relative;
    inset: auto;
    margin: 10px calc(-1 * var(--env-gutter)) 0;
    z-index: 0;
  }
  .case-page[data-environment] .case-header-split .editorial-crop {
    height: clamp(168px,54vw,330px);
    mask-image: linear-gradient(0deg,transparent,#000 18%,#000 88%,transparent);
  }
  .case-page[data-environment] .case-header-split .editorial-folio figcaption {
    position: relative;
    inset: auto;
    text-align: right;
    padding-inline: var(--env-gutter);
    background: transparent;
  }
}
@media (max-width: 600px) {
  .portfolio-home[data-environment] .intro { min-height: 0; }
  .portfolio-home[data-environment] .intro .opening-art {
    position: relative;
    inset: auto;
    height: 194px;
    z-index: 0;
    mask-image: linear-gradient(0deg,transparent,#000 17%,#000 88%,transparent);
  }
  .portfolio-home[data-environment] .intro .opening-art img { object-position: 74% 50%; }
  .portfolio-home[data-environment] .intro::after { background: linear-gradient(180deg,#102b36,#0b2029 64%); }
  [data-environment] .register > .project-row:first-child {
    min-height: 0;
    padding: 0;
  }
  [data-environment] .register > .project-row:first-child .project-heading { padding-top: 22px; }
  [data-environment] .register > .project-row:first-child .project-art.editorial-folio {
    position: relative;
    inset: auto;
    z-index: 0;
    height: clamp(218px,62vw,345px);
    margin-inline: calc(-1 * var(--editorial-inset));
  }
  [data-environment] .register > .project-row:first-child .editorial-folio .editorial-crop {
    mask-image: linear-gradient(0deg,transparent,#000 16%,#000 91%,transparent);
  }
  [data-environment] .register > .project-row:first-child .editorial-folio figcaption {
    padding-inline: var(--editorial-inset);
  }
  [data-environment] .chapter-entry {
    min-height: 350px;
    align-content: end;
    margin-top: 18px;
  }
  [data-environment] .chapter-image img { object-position: 65% 48%; }
  [data-environment] .career-map { margin-bottom: 24px; }
  .case-page[data-environment] .case-header h1 { text-wrap: initial; }
  .case-cd[data-environment] .ownership-heading { min-height: 172px; }
}
@media print {
  [data-environment] :is(main,.intro,.case-header,.reading-surface,.qualifications,#contact) {
    background: white !important;
    color: #112933 !important;
    box-shadow: none;
  }
}
