/* Editorial home: natural scrolling, stable cards, video loaded on request. */
.editorial-section { background: var(--bg); padding-block: clamp(3.5rem, 7vw, 7rem); }
.editorial-section[id] { scroll-margin-top: calc(var(--header) + 2rem); }
.editorial-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .15em; margin: 0 0 1.5rem; }
.editorial-hero { min-height: min(850px, 85svh); display: flex; align-items: flex-end; padding-block: clamp(3rem, 7vw, 7rem); }
.editorial-hero { background: linear-gradient(90deg, #111c, #1115 60%, transparent); color: #fff; }
.editorial-hero h1 { color: #fff; }
.editorial-hero .btn-primary { background: #f4f3f1; color: #111; border-color: #f4f3f1; }
.editorial-hero .btn-ghost { color: #fff; border-color: #fffa; }
.editorial-hero h1 { max-width: 17ch; font-size: clamp(2.2rem, 5.5vw, 4.8rem); line-height: 1.15; margin: 0 0 1.5rem; }
.editorial-hero-note { max-width: 32ch; font-size: 1.1rem; }
.editorial-hero .actions { margin-top: 2rem; flex-wrap: wrap; }
.editorial-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 7vw, 6rem); align-items: center; }
.editorial-story h2 { max-width: 15ch; }
.editorial-story p:not(.editorial-kicker) { max-width: 45ch; }
.editorial-founder { margin: 0; }
.editorial-founder img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: center top; display: block; }
.editorial-founder figcaption { display: grid; gap: .3rem; padding-top: 1rem; font-size: .85rem; }
.editorial-founder figcaption span { color: var(--text-2); }
.editorial-link { text-underline-offset: .35em; font-size: .9rem; }
.editorial-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2.5rem; }
.editorial-heading h2 { max-width: 19ch; margin-bottom: 0; }
.editorial-heading > p { max-width: 30ch; color: var(--text-2); font-size: .95rem; margin-bottom: 0; }
.editorial-results { background: #e9e6e1; }
.editorial-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.5rem; }
.editorial-result { margin: 0; min-width: 0; }
.editorial-result-collage img { display: block; width: 100%; height: auto; filter: none; }
.editorial-result-collage figcaption { padding-top: .8rem; font-size: .85rem; }
.editorial-results-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.editorial-results-intro img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.editorial-devices-heading { margin-top: 4rem; margin-bottom: 1.5rem; }
.editorial-results .device-mosaic { height: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; }
.editorial-results .device-mosaic .device-tile:nth-child(n) { grid-column: auto; grid-row: auto; aspect-ratio: 4/3; height: auto; }

/* Scroll story: apparatuses drive in one by one */
.device-story {
  --device-story-chrome: var(--site-chrome-h, var(--header));
  background:
    radial-gradient(120% 80% at 80% 20%, rgba(255, 255, 255, 0.7), transparent 55%),
    linear-gradient(180deg, #efece6 0%, #f6f4f0 42%, #ebe7e0 100%);
  color: var(--text);
  position: relative;
}
.device-story-track {
  height: 420vh;
  position: relative;
}
/* Manual pin via JS (body overflow-x:hidden kills position:sticky). */
.device-story-pin {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100svh - var(--device-story-chrome));
  display: grid;
  align-items: stretch;
  overflow: hidden;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  background:
    radial-gradient(120% 80% at 80% 20%, rgba(255, 255, 255, 0.7), transparent 55%),
    linear-gradient(180deg, #efece6 0%, #f6f4f0 42%, #ebe7e0 100%);
}
.device-story-pin.is-fixed {
  position: fixed;
  top: var(--device-story-chrome);
  left: 0;
  right: 0;
}
.device-story-pin.is-end {
  position: absolute;
  top: auto;
  bottom: 0;
}
.device-story-frame {
  position: relative;
  width: min(1280px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: stretch;
  padding-block: clamp(0.75rem, 2vh, 1.5rem);
}
.device-story-intro,
.device-story-stage {
  grid-area: 1 / 1;
  align-self: stretch;
}
.device-story-intro {
  max-width: min(36rem, 92%);
  z-index: 2;
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  display: grid;
  align-content: center;
  padding-inline: 0.25rem;
}
.device-story-intro.is-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.device-story-intro.is-out {
  opacity: 0;
  transform: translate3d(0, -24px, 0);
  pointer-events: none;
}
.device-story-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.08;
  margin: 0 0 1.1rem;
  max-width: 14ch;
}
.device-story-lead {
  margin: 0;
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  line-height: 1.55;
  max-width: 42ch;
}
.device-story-stage {
  position: relative;
  min-height: 0;
  z-index: 1;
  height: 100%;
}
.device-story-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(1.75rem, 4.5vw, 4rem);
  align-items: center;
  pointer-events: none;
  visibility: hidden;
  --machine: 0;
  --copy: 0;
  --spray: 1;
}
.device-story-slide.is-active {
  visibility: visible;
  pointer-events: auto;
}
.device-story-media {
  position: relative;
  width: 100%;
  height: min(74vh, 680px);
  max-height: 100%;
  display: grid;
  place-items: center;
}
.device-story-machine {
  margin: 0;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 2px;
  background:
    linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(246, 244, 240, 0.92) 48%,
      rgba(234, 230, 222, 0.98) 100%
    );
  opacity: var(--machine, 0);
  transform:
    translate3d(var(--mx, 46vw), calc(var(--my, 0) * 1vh), 0)
    scale(calc(0.92 + var(--machine, 0) * 0.08));
  filter: none;
  will-change: transform, opacity;
  box-shadow: none;
  clip-path: none;
}
.device-story-machine img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 55%;
  padding: 2% 4%;
  box-sizing: border-box;
  filter: none;
  transform: scale(calc(1.04 - var(--machine, 0) * 0.04));
  transform-origin: center 55%;
}
.device-story-glow,
.device-story-rings,
.device-story-spray,
.device-story-speck {
  display: none !important;
}
.device-story-copy {
  max-width: 34rem;
  opacity: var(--copy, 0);
  transform: translate3d(calc((1 - var(--copy, 0)) * 28px), calc((1 - var(--copy, 0)) * 18px), 0);
  filter: blur(calc((1 - var(--copy, 0)) * 4px));
  will-change: transform, opacity, filter;
  align-self: center;
}
.device-story-tag {
  margin: 0 0 0.75rem;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.device-story-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  margin: 0 0 1rem;
  line-height: 1.12;
}
.device-story-copy p:not(.device-story-tag) {
  margin: 0 0 1.35rem;
  color: var(--text-2);
  font-size: clamp(1.02rem, 1.4vw, 1.12rem);
  line-height: 1.65;
  max-width: 38ch;
}
.device-story-progress {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  padding: 0.55rem 0 0.15rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.device-story-progress.is-on {
  opacity: 1;
}
.device-story-dot {
  width: 2.4rem;
  height: 2px;
  background: rgba(20, 20, 20, 0.16);
  transition: background 0.3s ease, transform 0.3s ease;
}
.device-story-dot.is-on {
  background: #141414;
  transform: scaleX(1.15);
}
.device-story-all {
  position: absolute;
  right: 0;
  top: clamp(0.85rem, 2vh, 1.5rem);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.device-story.is-ready .device-story-all {
  opacity: 1;
}
.device-story-fallback {
  display: none;
  padding-block: clamp(3.5rem, 7vw, 7rem);
}
.device-story-fallback .device-story-lead {
  margin: 0 0 2rem;
}
.device-story-fallback-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.device-story-fallback-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center 45%;
  background:
    linear-gradient(
      180deg,
      #f8f6f2 0%,
      #f1eee8 100%
    );
  display: block;
  margin-bottom: 1.1rem;
  padding: 1.1rem 1.25rem 0.85rem;
  box-sizing: border-box;
  filter: none;
  border-radius: 2px;
}
.device-story-fallback-card h3 {
  font-family: var(--font-display);
  margin: 0.35rem 0 0.6rem;
  font-size: 1.45rem;
}
.device-story-fallback-card h3 a {
  color: inherit;
  text-decoration: none;
}
.device-story-fallback-card p:not(.device-story-tag) {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.55;
}
@media (max-width: 820px) {
  .device-story-track {
    height: 340vh;
  }
  .device-story-pin {
    /* Clearance for fixed .sticky-cta bar on compact viewports. */
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }
  .device-story-frame {
    width: min(100% - 2 * var(--gutter), 1280px);
    padding-block: 0.65rem 0.85rem;
    grid-template-rows: 1fr auto;
  }
  .device-story-intro {
    max-width: none;
    align-content: end;
    padding-bottom: 0.5rem;
  }
  .device-story-intro h2 {
    font-size: clamp(2rem, 9vw, 2.75rem);
    max-width: 12ch;
  }
  .device-story-lead {
    font-size: 1.02rem;
    max-width: none;
  }
  .device-story-slide {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.15fr) auto;
    gap: 0.85rem;
    align-content: center;
  }
  .device-story-media {
    height: min(42svh, 320px);
    max-height: none;
  }
  .device-story-machine img {
    object-position: center 50%;
    padding: 4% 6%;
  }
  .device-story-copy {
    max-width: none;
    filter: none;
    align-self: start;
    padding-bottom: 0.25rem;
  }
  .device-story-copy h3 {
    font-size: clamp(1.55rem, 6.5vw, 2.1rem);
    margin-bottom: 0.55rem;
  }
  .device-story-copy p:not(.device-story-tag) {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0.85rem;
    max-width: none;
  }
  .device-story-all {
    top: 0.55rem;
    font-size: 0.9rem;
  }
  .device-story-fallback-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .device-story-track,
  .device-story-pin,
  .device-story-frame,
  .device-story-intro,
  .device-story-stage,
  .device-story-progress,
  .device-story-all {
    display: none !important;
  }
  .device-story-fallback {
    display: block;
  }
  .device-story-machine,
  .device-story-copy,
  .device-story-intro {
    transition: none !important;
    filter: none !important;
  }
}
.editorial-reviews { background: #0b0b0b; color: #f5f5f7; }
.editorial-reviews .editorial-heading > p { color: rgba(245, 245, 247, 0.62); }
.editorial-reviews .editorial-kicker { color: rgba(245, 245, 247, 0.48); }
.editorial-review-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 24%);
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.15rem 0 1.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}
.editorial-review { scroll-snap-align: start; min-width: 0; }
.editorial-review-open {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 28px;
  background: #1c1c1e;
  color: #f5f5f7;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 18px 40px rgba(0, 0, 0, 0.35);
  isolation: isolate;
}
.editorial-review-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none;
  transform: scale(1.01);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.editorial-review-open::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 28%, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}
.editorial-review-open:hover img { transform: scale(1.045); }
.editorial-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, border-color 0.25s ease;
}
.editorial-play svg {
  display: block;
  margin-left: 2px;
}
.editorial-review-open:hover .editorial-play {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.5);
}
.editorial-review-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.15rem 1.15rem 1.2rem;
  display: grid;
  gap: 0.12rem;
  pointer-events: none;
}
.editorial-review-kicker {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.72);
}
.editorial-review-title {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
}
.editorial-reviews .editorial-link {
  color: rgba(245, 245, 247, 0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 245, 247, 0.28);
  padding-bottom: 0.08em;
}
.editorial-reviews .editorial-link:hover {
  color: #fff;
  border-bottom-color: rgba(245, 245, 247, 0.7);
}
.editorial-doctor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 1.5rem; }
.editorial-doctor { display: flex; flex-direction: column; min-width: 0; }
.editorial-doctor-photo { display: block; aspect-ratio: 4/5; overflow: hidden; background: var(--bg-alt); }
.editorial-doctor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.editorial-doctor h3 { font-size: 1.25rem; margin: 1.25rem 0 .5rem; }
.editorial-doctor > p { font-size: .85rem; margin: 0 0 1.25rem; }
.editorial-doctor-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: auto; }
.editorial-doctor-actions .btn { font-size: .75rem; padding: .75rem 1rem; }
.editorial-consultation { background: #e9e6e1; }
.editorial-consultation .form { padding: clamp(1.5rem, 3vw, 3rem); background: var(--bg); }
.editorial-consultation .consent { font-size: .75rem; }
.editorial-dialog { border: 0; padding: clamp(1.5rem, 4vw, 3rem); padding-top: 4rem; max-width: min(700px, calc(100vw - 2rem)); max-height: 85svh; overflow: auto; background: var(--bg); color: var(--text); overscroll-behavior: contain; }
.editorial-dialog::backdrop { background: #000b; }
.editorial-dialog h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); }
.editorial-dialog-close {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  cursor: pointer;
}

.story-expand {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.story-expand[hidden] {
  display: none !important;
}
.story-expand:not([hidden]) {
  pointer-events: auto;
}
.story-expand.is-open {
  background: rgba(0, 0, 0, 0.72);
}
.story-expand-stage {
  position: fixed;
  overflow: hidden;
  background: #0b0b0b;
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  will-change: top, left, width, height, border-radius;
  transition:
    top 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}
.story-expand-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
  border: 0;
}
.story-expand-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 5;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.42);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  transition: opacity 0.22s ease 0.18s, transform 0.22s ease 0.18s, background 0.2s ease;
}
.story-expand.is-open .story-expand-close {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.story-expand-close:hover,
.story-expand-close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}
html.is-story-open {
  overflow: hidden;
}
html.is-story-open .sticky-cta {
  visibility: hidden;
  pointer-events: none;
}
html:has(.editorial-dialog[open]) { overflow: hidden; }
@media (max-width: 520px) {
  .story-expand-stage {
    border-radius: 24px;
  }
  .story-expand-close {
    top: 0.65rem;
    right: 0.65rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-expand,
  .story-expand-stage,
  .story-expand-close {
    transition: none !important;
  }
}
.editorial-section a:focus-visible, .editorial-section button:focus-visible, .editorial-dialog button:focus-visible { outline: 3px solid #8a683e; outline-offset: 4px; }
@media (max-width: 820px) {
  .editorial-split, .editorial-results-intro { grid-template-columns: 1fr; }
  .editorial-founder { max-width: 500px; }
  .editorial-heading { display: block; }
  .editorial-heading > p { margin-top: 1rem; }
  .editorial-doctor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-results .device-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-review-list { grid-auto-columns: min(58vw, 240px); gap: 0.85rem; }
  .editorial-review-open { border-radius: 24px; }
  .editorial-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .editorial-review-title { font-size: 1.35rem; }
  .editorial-hero { min-height: 70svh; }
  .device-story-fallback-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .editorial-doctor-grid { grid-template-columns: 1fr; }
  .editorial-results .device-mosaic { grid-template-columns: 1fr; }
  .editorial-hero .actions { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .editorial-review-open img,
  .editorial-play { transition: none; }
  .editorial-review-open:hover img,
  .editorial-review-open:hover .editorial-play { transform: none; }
}
