/* WS-3 internal compositions */
.internal-hero {
  --shade: #151123;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(480px, 49vw, 690px);
  overflow: hidden;
  color: #fff;
  background: var(--shade);
}

.internal-art, .internal-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.internal-art { inset-inline-start: 23%; background: #13121d; }
.internal-art picture, .internal-art img { width: 100%; height: 100%; display: block; }
.internal-art img { object-fit: cover; object-position: 50% 50%; }
.internal-hero::after {
  --light-direction: 90deg;
  content: "";
  background: linear-gradient(var(--light-direction), var(--shade) 2%, #14111fe8 23%, #14111f50 65%, #14111f14),
              linear-gradient(0deg, #14111fd9, transparent 70%);
}
[dir="rtl"] .internal-hero::after { --light-direction: 270deg; }
.internal-copy { padding-block: 62px 76px; }
.internal-copy .crumb { font-size: .94rem; margin-block-end: 26px; }
.internal-copy h1 { max-width: 14ch; font-size: clamp(3rem, 7vw, 6.9rem); margin-block-end: 22px; }
.internal-copy p { max-width: 36rem; color: #f4eef9; font-size: clamp(1.06rem,1.55vw,1.32rem); margin-block-end: 24px; }
.internal-products { --shade: #151920; min-height: clamp(445px,42vw,600px); }
.internal-products .internal-art { inset-inline-start: 33%; }
.internal-digital { --shade: #101623; }
.internal-digital .internal-art { inset-inline-start: 15%; }
.internal-about .internal-art img, .internal-contact .internal-art img { object-position: 54% 36%; }
.internal-projects .internal-art img, .internal-clients .internal-art img { object-position: 50% 62%; }
.internal-partners, .internal-clients, .internal-contact { min-height: clamp(390px,36vw,520px); }
.image-credit {
  position: absolute;
  inset-inline-end: max(16px,calc((100vw - 1320px) / 2));
  inset-block-end: 15px;
  border-radius: 3px;
  background: #14111fde;
  padding: 3px 9px;
  color: #f3edf7;
  font-size: .875rem;
}
[dir="rtl"] .internal-copy h1 { max-width: 17ch; font-size: clamp(2.7rem,6.1vw,5.65rem); }

.index-wrap { padding-block: 24px; }
.section-index, .gallery-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.index-link, .gallery-filter button {
  border: 1px solid #d8cddd;
  border-radius: 2px;
  background: #fff;
  padding: .6rem .94rem;
  color: #35233b;
  text-decoration: none;
  font-size: .94rem;
  transition: color 180ms, background-color 180ms, border-color 180ms;
}
.index-link:hover, .index-link[aria-current], .gallery-filter button[aria-pressed="true"] {
  background: #35203f;
  border-color: #35203f;
  color: #fff;
}
.editorial-band { padding-block: clamp(45px,8vw,104px); scroll-margin-block-start: 10px; }
.editorial-grid, .flagship {
  display: grid;
  grid-template-columns: minmax(0,1.23fr) minmax(0,1fr);
  gap: clamp(28px,6vw,88px);
  align-items: center;
}
.editorial-band:nth-of-type(even) .editorial-media { grid-column: 2; grid-row: 1; }
.editorial-band:nth-of-type(even) .editorial-text { grid-column: 1; grid-row: 1; }
.editorial-media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #1a1824;
  border: 1px solid #745d813b;
  aspect-ratio: 16 / 10;
}
.editorial-media :is(img,picture) { display: block; width: 100%; height: 100%; }
.editorial-media img { object-fit: cover; }
.editorial-text h2 { max-width: 19ch; margin-block-end: 18px; }
.editorial-text > p, .flagship-copy > p, .institutional p { font-size: 1.12rem; max-width: 52ch; }
.dark .editorial-text > p, .dark .flagship-copy > p:not(.eyebrow) { color: #e7ddeb; }
.dark .textlink { color: #f6c7f5; }
.process-label { margin-block: 23px 6px; }
.pathway {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  padding: 0;
  margin: 14px 0 24px;
  gap: 0;
  border-block: 1px solid #9c8aa270;
}
.pathway li { position: relative; display: grid; align-content: start; gap: 2px; padding: .78rem .55rem; min-width: 0; }
.pathway li + li { border-inline-start: 1px solid #9c8aa270; }
.pathway span { color: #752771; font-size: .88rem; font-variant-numeric: tabular-nums; }
.dark .pathway span { color: #e8a7e5; }
.pathway strong { font-size: .96rem; overflow-wrap: anywhere; }
.pathway li::after {
  content: ""; position: absolute; block-size: 2px; inline-size: 100%;
  inset-block-start: 0; inset-inline-start: 0; background: #bc65b9; opacity: 0;
}

.technical-disclosure, .offering { border-block-start: 1px solid #95829c80; }
.technical-disclosure { margin-block: 12px 18px; }
:where(.technical-disclosure,.offering,.project-copy details) summary { padding-block: 12px; font-weight: 700; cursor: pointer; }
:where(.technical-disclosure,.offering,.project-copy details) summary:focus-visible { outline: 3px solid #bc65b9; outline-offset: 2px; }
.technical-disclosure ul { padding-inline-start: 1.3rem; margin-block: 2px 14px; }
.technical-disclosure li { padding-block: 3px; }
.offering h3 { display: inline; font-size: 1.12rem; }
.offering p { padding-inline-start: 16px; padding-block-end: 10px; color: var(--muted); }
.flagship { grid-template-columns: minmax(0,.83fr) minmax(0,1.4fr); }
.flagship .demo { box-shadow: 0 20px 45px #09081275; }
.twin-indicators { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 0; padding: 2px 18px 14px; }
.twin-indicators div { background: #30243c; border: 1px solid #6e5478; padding: 8px; border-radius: 4px; }
.twin-indicators dt { color: #efd9f1; font-size: .88rem; }
.twin-indicators dd { color: #c4eaff; font-weight: 700; margin: 1px 0 0; transition: color 220ms; }
.demo[data-mode="restricted"] dd { color: #ffd1a8; }
.demo[data-mode="idle"] dd { color: #e2d7e4; }
.twin-valve { transition: transform 230ms; }
.demo[data-mode="idle"] .twin-rotor { opacity: .62; }

.institutional { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 60px; }
.institutional > div { border-block-start: 2px solid var(--purple); padding-block-start: 18px; }
.portfolio .project-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
.portfolio .project-card:first-child:last-child, .portfolio .project-card:first-child:nth-last-child(3) { grid-column: 1/-1; }
.portfolio .project-card:first-child:nth-last-child(3) img { aspect-ratio: 2.25; }
.portfolio .project-card { border: 0; border-radius: 3px; background: #181423; color: #fff; }
.portfolio .project-copy { padding: 24px; }
.portfolio .project-copy h2 { font-size: clamp(1.45rem,2.8vw,2.3rem); }
.portfolio .project-copy p { color: #e5dce8; }
.portfolio .project-copy summary { color: #f5c4f0; }
.portfolio .gallery-filter { margin-block: 0 20px; }
.portfolio .gallery-filter[hidden], .portfolio [data-sector][hidden] { display: none; }
.case-gallery { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 12px; margin-block: 14px; }
.case-gallery img { aspect-ratio: 4/3; }
.directory .logo-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.directory .logo-grid li { min-height: 132px; border-radius: 3px; transition: background-color 180ms, border-color 180ms, translate 180ms; }
.directory .logo-grid li:hover { background: #faf6fb; border-color: #bc65b9; translate: 0 -2px; }
.contact-layout { background: linear-gradient(135deg,#f8f3f8,#fff 55%); }
.contact-layout .contact { gap: clamp(28px,6vw,76px); }
.contact-layout .contact > div { border-block-start: 2px solid var(--purple); padding-block-start: 24px; }
.contact-layout .contact > div p { font-size: 1.12rem; overflow-wrap: anywhere; }
.contact-layout #rfq { box-shadow: 0 16px 45px #33223912; padding: clamp(18px,3vw,36px); }
.contact-layout :is(input,textarea,select) { transition: border-color 180ms, background-color 180ms; }
.contact-layout :is(input,textarea,select):focus { border-color: var(--purple); background: #fcf7fc; }
#rfq [aria-invalid="true"] { border-color: #a93250; }
[dir="rtl"] :is(.internal-copy,.editorial-text,.flagship-copy) p { line-height: 1.8; }

@media (prefers-reduced-motion: no-preference) {
  .internal-copy h1 { animation: title-enter 520ms ease-out both; }
  .internal-art img { animation: camera-settle 1800ms cubic-bezier(.2,.65,.25,1) both; }
  [data-motion="mask"].motion-seen img { animation: image-travel 750ms ease-out both; }
  [data-motion="path"].motion-seen li::after { animation: signal-pass 560ms ease-out both; }
  [data-motion="path"].motion-seen li:nth-child(2)::after { animation-delay: 160ms; }
  [data-motion="path"].motion-seen li:nth-child(3)::after { animation-delay: 320ms; }
  .editorial-band:target .editorial-text,
  .portfolio [data-sector]:not([hidden]).sector-enter { animation: title-enter 370ms ease-out both; }
  .technical-disclosure[open] ul,.offering[open] p { animation: title-enter 280ms ease-out both; }
  .demo.is-refreshing:not([data-mode="idle"]) .twin-flow { animation: none; }
  @keyframes title-enter { from { opacity: .72; translate: 0 10px; } }
  @keyframes camera-settle { from { transform: scale(1.045); } }
  @keyframes image-travel { from { clip-path: inset(0 0 7% 0); transform: scale(1.035); } to { clip-path: inset(0); } }
  @keyframes signal-pass { 30% { opacity: 1; } to { opacity: .24; } }
}
@media(max-width:800px) {
  .internal-art, .internal-products .internal-art, .internal-digital .internal-art { inset-inline-start: 0; }
  .internal-hero::after { background: linear-gradient(0deg,#14111ff7 8%,#14111fe2 30%,#14111f30 87%); }
  .internal-copy { padding-block: 116px 62px; }
  .editorial-grid, .flagship { grid-template-columns: 1fr; }
  .editorial-band:nth-of-type(even) :is(.editorial-media,.editorial-text) { grid-row: auto; grid-column: auto; }
  .directory .logo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:510px) {
  .internal-hero { min-height: 405px; }
  .institutional,.portfolio .project-gallery { grid-template-columns: 1fr; }
  .index-link,.gallery-filter button { padding: .5rem .68rem; }
  .portfolio .project-card:first-child:nth-last-child(3) img { aspect-ratio: 16/10; }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 801px) {
    .internal-art {
      animation: hero-depth linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 620px;
    }
    @keyframes hero-depth { to { transform: translateY(18px) scale(1.025); } }
  }
}
