/* Design Lab home — approved editorial motion hero.
   Scoped to the gallery hero; no external assets, fonts, or libraries. */

.gallery-hero {
  padding: clamp(65px, 5.8vw, 98px) 0 86px;
  position: relative;
  overflow: clip;
}

.gallery-hero .gallery-title {
  position: relative;
  isolation: isolate;
  display: block;
  min-height: clamp(475px, 35.5vw, 565px);
  padding: 0;
}

.gallery-title-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  pointer-events: none;
}

.gallery-title-copy .eyebrow {
  color: #65716e;
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: .19em;
  font-weight: 780;
}

.gallery-hero .gallery-title h1 {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin: clamp(27px, 3.1vw, 45px) 0 0;
  color: #192025;
  font-size: clamp(72px, 7.7vw, 131px);
  font-weight: 790;
  line-height: .89;
  letter-spacing: -.082em;
  white-space: nowrap;
}

.gallery-hero .gallery-title h1 span {
  display: block;
  margin-top: .02em;
  color: #91a39b;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: .92em;
  line-height: 1.02;
  letter-spacing: -.075em;
}

.gallery-hero-art {
  position: absolute;
  z-index: 0;
  inset: -55px -24px -3px -3px;
  pointer-events: none;
  user-select: none;
  opacity: .95;
  transform: translate3d(0, var(--hero-art-shift, 0px), 0);
  will-change: transform;
}

.hero-motion-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.hero-guide-grid {
  opacity: var(--hero-grid-opacity, .30);
}

.hero-main-route {
  stroke-dasharray: 100;
  stroke-dashoffset: var(--hero-route-offset, 23);
}

.hero-glass-stack {
  transform: translate3d(0, var(--hero-lens-shift, 0px), 0);
}

.hero-lens-front {
  transform-origin: 823px 246px;
  transform: rotate(var(--hero-lens-angle, 0deg));
}

.hero-guide-arc {
  stroke-dasharray: 310;
  stroke-dashoffset: var(--hero-arc-offset, 135);
}

.hero-motion-nodes circle {
  transition: opacity .3s ease;
}

.gallery-hero .gallery-hero-lead {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: clamp(49px, 5vw, 88px);
  width: min(30%, 315px);
  max-width: none;
  margin: 0;
  border-left: 1px solid #9aaca2;
  padding: 3px 0 3px 24px;
  color: #596765;
  font-size: clamp(16px, 1.27vw, 19px);
  line-height: 1.57;
  letter-spacing: -.022em;
  font-weight: 400;
  text-wrap: pretty;
  background: linear-gradient(90deg, rgb(247 248 246 / 74%), rgb(247 248 246 / 42%) 58%, transparent);
}

.gallery-hero .gallery-note {
  margin: 0 0 0;
  padding-top: 7px;
  color: #6f7d79;
  font-size: 10px;
  letter-spacing: .09em;
}

.gallery-hero .gallery-cards {
  margin-top: 37px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-guide-arc-one {
    transform-origin: 799px 265px;
    animation: hero-guide-float 13s ease-in-out infinite alternate;
  }

  .hero-glass-stack .hero-lens-middle,
  .hero-glass-stack .hero-lens-sub {
    animation: hero-glass-opacity 8s ease-in-out infinite alternate;
  }

  .hero-glass-stack .hero-lens-sub {
    animation-delay: -3s;
  }

  .hero-flow-trails {
    animation: hero-trails-fade 9s ease-in-out infinite alternate;
  }

  .hero-motion-nodes > circle:nth-last-child(2) {
    animation: hero-node-pulse 6s ease-in-out infinite;
  }
}

@keyframes hero-guide-float {
  from { opacity: .7; transform: rotate(-3deg); }
  to { opacity: 1; transform: rotate(3deg); }
}

@keyframes hero-glass-opacity {
  from { opacity: .6; }
  to { opacity: 1; }
}

@keyframes hero-trails-fade {
  from { opacity: .3; }
  to { opacity: .6; }
}

@keyframes hero-node-pulse {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

@media (max-width: 1100px) and (min-width: 861px) {
  .gallery-hero .gallery-title {
    min-height: 490px;
  }

  .gallery-hero .gallery-title h1 {
    font-size: clamp(72px, 8vw, 96px);
  }

  .gallery-hero .gallery-hero-lead {
    width: 31%;
    font-size: 15px;
    right: 0;
  }

  .gallery-hero-art {
    right: -26px;
  }
}

@media (max-width: 860px) {
  .gallery-hero {
    padding: 64px 0 74px;
  }

  .gallery-hero .gallery-title {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .gallery-title-copy .eyebrow {
    font-size: 9px;
  }

  .gallery-hero .gallery-title h1 {
    margin-top: 31px;
    font-size: clamp(64px, 11.3vw, 92px);
    max-width: 100%;
  }

  .gallery-hero-art {
    position: relative;
    inset: auto;
    order: 2;
    flex: none;
    width: calc(100% + 42px);
    height: clamp(240px, 46vw, 360px);
    margin: -17px -21px -10px;
    transform: translate3d(0, var(--hero-art-shift, 0px), 0);
  }

  .gallery-hero .gallery-hero-lead {
    position: relative;
    order: 3;
    inset: auto;
    width: min(100%, 430px);
    max-width: 430px;
    margin: 0 0 16px;
    font-size: 16px;
    padding-left: 18px;
    background: none;
  }

  .gallery-hero .gallery-note {
    margin-top: 18px;
  }
}

@media (max-width: 560px) {
  .gallery-hero {
    padding: 53px 0 66px;
  }

  .gallery-hero .gallery-title h1 {
    margin-top: 26px;
    font-size: clamp(49px, 13.5vw, 76px);
  }

  .gallery-hero .gallery-title h1 span {
    font-size: .88em;
  }

  .gallery-hero-art {
    width: calc(100% + 40px);
    margin: -10px -20px -22px;
    height: 244px;
  }

  .gallery-hero .gallery-hero-lead {
    width: 100%;
    max-width: 34ch;
    font-size: 15px;
    line-height: 1.62;
  }

  .gallery-hero .gallery-note {
    font-size: 9px;
    line-height: 1.6;
    align-items: flex-start;
    gap: 10px;
  }

  .gallery-hero .gallery-note::before {
    width: 24px;
    flex: 0 0 24px;
    margin-top: 7px;
  }

  .gallery-hero .gallery-cards {
    margin-top: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-hero-art, .hero-glass-stack, .hero-lens-front {
    transition: none;
    animation: none !important;
    transform: none !important;
  }

  .gallery-hero .hero-main-route {
    stroke-dashoffset: 0 !important;
  }

  .gallery-hero .hero-guide-arc {
    stroke-dashoffset: 0 !important;
  }

  .hero-glass-stack *,
  .hero-guide-arc,
  .hero-flow-trails,
  .hero-motion-nodes * {
    animation: none !important;
  }
}

/* Kinetic motion v2: geometry-bound signal and depth-based SVG layers.
   The artwork remains fully legible with JavaScript or motion disabled. */

.hero-lens-layer {
  --hero-layer-depth: 0px;
  --hero-layer-drift: 0px;
  transform: translate3d(var(--hero-layer-depth), 0, 0);
}

.hero-lens-layer--back {
  --hero-layer-depth: var(--hero-depth-back, 0px);
  --hero-layer-drift: -7px;
}
.hero-lens-layer--middle {
  --hero-layer-depth: var(--hero-depth-middle, 0px);
  --hero-layer-drift: -4px;
}
.hero-lens-layer--sub {
  --hero-layer-depth: var(--hero-depth-sub, 0px);
  --hero-layer-drift: 4px;
}
.hero-lens-layer--front {
  --hero-layer-depth: var(--hero-depth-front, 0px);
  --hero-layer-drift: 6px;
}

.hero-orbit-ring {
  transform-origin: 799px 265px;
}

.hero-path-signal {
  opacity: 0;
  pointer-events: none;
}

.gallery-hero.hero-motion-ready .hero-path-signal {
  opacity: .95;
}

.gallery-hero .gallery-note {
  justify-content: space-between;
  gap: 12px;
}

.gallery-hero .gallery-note::before {
  flex: 0 0 45px;
}

.gallery-note-copy {
  flex: 1;
  min-width: 0;
}

.hero-motion-toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  margin: -6px 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #5a6d61;
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .025em;
  text-transform: none;
  cursor: pointer;
}

.gallery-hero.hero-motion-ready .hero-motion-toggle {
  display: inline-flex;
}

.hero-motion-toggle:hover,
.hero-motion-toggle:focus-visible {
  color: #284b38;
  border-color: #b7c9bb;
  background: #eaf0ea;
}

.hero-motion-toggle:focus-visible {
  outline: 2px solid #618c6c;
  outline-offset: 2px;
}

.hero-motion-toggle-icon {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .gallery-hero.hero-motion-ready .hero-motion-svg {
    animation: hero-art-arrive 900ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .gallery-hero.hero-motion-ready .hero-orbit-ring--inner {
    animation: hero-kinetic-orbit 44s linear infinite;
  }

  .gallery-hero.hero-motion-ready .hero-orbit-ring--outer {
    animation: hero-kinetic-orbit-reverse 66s linear infinite;
  }

  .gallery-hero.hero-motion-ready .hero-lens-layer {
    animation: hero-layer-breathe 9.5s ease-in-out infinite;
  }

  .gallery-hero.hero-motion-ready .hero-lens-layer--back { animation-delay: -5s; }
  .gallery-hero.hero-motion-ready .hero-lens-layer--middle { animation-delay: -2.5s; }
  .gallery-hero.hero-motion-ready .hero-lens-layer--sub { animation-delay: -6s; }
  .gallery-hero.hero-motion-ready .hero-lens-layer--front { animation-delay: -1.5s; }

  .gallery-hero.hero-motion-paused .hero-motion-svg,
  .gallery-hero.hero-motion-paused .hero-motion-svg * {
    animation-play-state: paused !important;
  }
}

@keyframes hero-art-arrive {
  from { opacity: .56; transform: translate3d(0, 9px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-kinetic-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hero-kinetic-orbit-reverse {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes hero-layer-breathe {
  0%, 100% { transform: translate3d(var(--hero-layer-depth), 0, 0); }
  50% {
    transform: translate3d(calc(var(--hero-layer-depth) + var(--hero-layer-drift)), -5px, 0);
  }
}

@media (max-width: 620px) {
  .gallery-hero .gallery-note {
    flex-wrap: wrap;
  }

  .gallery-hero .gallery-note::before {
    flex-basis: 24px;
  }

  .gallery-hero .gallery-note-copy {
    flex: 1 1 calc(100% - 40px);
  }

  .hero-motion-toggle {
    margin: 4px 0 0 34px;
    font-size: 10px;
  }

  .gallery-hero.hero-motion-ready .hero-orbit-ring--outer,
  .gallery-hero.hero-motion-ready .hero-lens-layer,
  .gallery-hero.hero-motion-ready .hero-flow-trails {
    animation: none;
  }

  .gallery-hero.hero-motion-ready .hero-motion-svg {
    animation-duration: 600ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-hero.hero-motion-ready .hero-motion-toggle {
    display: none !important;
  }

  .gallery-hero .hero-path-signal {
    opacity: 0 !important;
  }

  .gallery-hero .hero-motion-svg,
  .gallery-hero .hero-motion-svg * {
    animation: none !important;
    transition: none !important;
  }

  .gallery-hero .hero-lens-layer {
    transform: none !important;
  }
}
