:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
}

body.hyperise-case {
  --case-background: #fff;
  --case-foreground: #2b2b2b;
  --case-muted: #747474;
  --case-border: rgba(30, 38, 43, .12);
  --case-meta-accent: #348f72;
  --hyperise-green: #348f72;
  --hyperise-rail: 1240px;
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: #fff;
  color: var(--case-foreground);
  font-family: var(--font-family-base);
}

.hyperise-case img {
  display: block;
  max-width: 100%;
}

.hyperise-case :is(h1, h2, h3, h4, p, figure, ul) {
  margin: 0;
}

.hyperise-main {
  padding-bottom: calc(168px + env(safe-area-inset-bottom));
}

.hyperise-main > .hyperise-section:last-child {
  margin-bottom: 0;
}

.hyperise-shell {
  width: min(calc(100% - 48px), var(--hyperise-rail));
  margin-inline: auto;
}

.hyperise-section {
  margin-block: var(--case-section-gap);
}

.hyperise-case .hyperise-section h2 {
  margin-bottom: var(--case-heading-gap);
  scroll-margin-top: 96px;
  font-size: var(--case-section-title-size) !important;
  line-height: var(--case-section-title-line-height) !important;
  letter-spacing: -.02em;
}

.hyperise-case .hyperise-section p {
  font-size: var(--case-body-size) !important;
  line-height: var(--case-body-line-height) !important;
}

.hyperise-case .hyperise-section p + p {
  margin-top: var(--case-subsection-gap);
}

.hyperise-hero {
  --hyperise-parallax-rate: .36;
  position: relative;
  overflow: clip;
  isolation: isolate;
  background: #fff;
}

.hyperise-hero__backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: #378f73;
  pointer-events: none;
}

.hyperise-hero__background-art {
  position: relative;
  width: min(100%, 1920px);
  height: 100%;
  margin-inline: auto;
  background: url("assets/hero-background.png?v=20261001-2x") center / 100% 100% no-repeat;
}

.hyperise-hero__stage {
  position: relative;
  z-index: 1;
  width: min(100%, 1920px);
  aspect-ratio: 1920 / 1343;
  margin-inline: auto;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .hyperise-hero__backdrop {
    will-change: transform;
  }
}

.hyperise-hero .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hyperise-hero__wordmark,
.hyperise-hero__dashboard,
.hyperise-hero__graph,
.hyperise-hero__card {
  position: absolute;
}

.hyperise-hero__wordmark {
  top: .9%;
  left: 16.15%;
  width: 67.71%;
  opacity: .68;
}

.hyperise-hero__dashboard,
.hyperise-hero__graph,
.hyperise-hero__card {
  display: block;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 50px rgba(4, 39, 28, .14);
}

.hyperise-hero__dashboard img,
.hyperise-hero__graph img,
.hyperise-hero__card img {
  width: 100%;
  height: auto;
}

.hyperise-hero__dashboard {
  top: 20.63%;
  left: 15.83%;
  width: 68.28%;
  border: 1px solid rgba(30, 38, 43, .1);
  border-radius: clamp(8px, 1.875vw, 36px);
}

.hyperise-hero__graph {
  top: 28.89%;
  left: 45.52%;
  width: 40.63%;
  border-radius: clamp(7px, 1.25vw, 24px);
}

.hyperise-hero__caption {
  position: absolute;
  bottom: 6.5%;
  left: 20%;
  width: 60%;
  color: #fff;
  text-align: center;
}

.hyperise-intro__lead,
.hyperise-editor__copy {
  max-width: 836px;
}

.hyperise-hero__card {
  top: 62.47%;
  left: 13.7%;
  width: 14.64%;
  border: 1px solid rgba(30, 38, 43, .1);
  border-radius: clamp(7px, 1.25vw, 24px);
}

.hyperise-problem {
  margin-top: 104px;
}

.hyperise-problem__grid {
  display: grid;
  grid-template-columns: minmax(0, 448fr) minmax(0, 719fr);
  gap: 73px;
  align-items: center;
}

.hyperise-problem__copy {
  min-width: 0;
}

.hyperise-problem__visual {
  position: relative;
  min-width: 0;
}

.hyperise-visual-frame {
  display: block;
  overflow: hidden;
  border: 1px solid var(--case-border);
  border-radius: 32px;
  background: #f2f2f2;
}

.hyperise-visual-frame img {
  width: 100%;
  height: auto;
}

.hyperise-problem__screen {
  border-width: 4px;
  border-color: #e4e4e4;
  border-radius: 16px;
}

.hyperise-problem__close {
  position: absolute;
  top: -33px;
  left: -30px;
  width: 77px;
  height: 77px;
}

.hyperise-channels__grid {
  display: grid;
  grid-template-columns: minmax(0, 506fr) minmax(0, 315fr) minmax(0, 317fr);
  gap: 20px;
  align-items: stretch;
}

.hyperise-channels__grid .hyperise-visual-frame {
  border: 0;
}

.hyperise-channels__grid .hyperise-visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hyperise-about-project__layout,
.hyperise-about-project__client-details,
.hyperise-about-project__phases,
.hyperise-about-project__responsibilities {
  display: grid;
  gap: var(--space-xl);
}

.hyperise-about-project__layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
}

.hyperise-about-project__client-details {
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--space-xl);
}

.hyperise-about-project__phases {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hyperise-about-project__panel,
.hyperise-about-project__phases section {
  min-width: 0;
}

.hyperise-case .hyperise-about-project :is(h3, h4) {
  margin-bottom: var(--space-sm);
  font-size: 16px !important;
  line-height: 22px;
  letter-spacing: normal;
}

.hyperise-about-project h3 {
  color: var(--case-meta-accent);
}

.hyperise-about-project .case-project-link {
  color: var(--case-meta-accent);
  font-weight: 400;
  text-decoration: none;
}

.hyperise-main .hyperise-about-project__responsibilities {
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  row-gap: var(--space-sm);
  list-style: none;
}

/* Figma artwork: 1336 × 745.56, screen at (48, 0), panels at
   (0, 275) and (1073, 541). Each window clips its own contents.
   The stage reserves the full composition before the next text section. */
.hyperise-editor__stage {
  position: relative;
  left: 50%;
  width: min(calc(100% + 96px), calc(100vw - 48px), 1336px);
  aspect-ratio: 1336 / 745.56;
  margin-top: 64px;
  overflow: visible;
  transform: translateX(-50%);
}

.hyperise-editor__visual,
.hyperise-editor__panel {
  position: absolute;
}

.hyperise-editor__visual {
  top: 0;
  left: 3.5928%;
  width: 92.8144%;
  border-radius: 32px;
}

.hyperise-editor__panel {
  z-index: 1;
  display: block;
  overflow: hidden;
  border: 2px solid #e4e4e4;
  border-radius: 16px;
  background: #eee;
}

.hyperise-editor__panel img {
  width: 100%;
  height: auto;
}

.hyperise-editor__panel--text {
  top: 36.8845%;
  left: 0;
  width: 21.8563%;
}

.hyperise-editor__panel--shape {
  top: 72.5629%;
  left: 80.3144%;
  width: 19.6856%;
}

.hyperise-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--case-columns-gap);
  margin-bottom: 64px;
}

.hyperise-copy-grid > div {
  min-width: 0;
}

.hyperise-results__layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--case-columns-gap);
  column-gap: var(--space-3xl);
  align-items: start;
}

.hyperise-case .hyperise-results__facts {
  grid-template-columns: minmax(0, 1fr) !important;
}

.hyperise-case .hyperise-results .case-outcome-item h3 {
  margin: 0 0 var(--case-inline-gap);
  font-size: var(--case-body-size) !important;
  font-weight: 700;
  line-height: var(--case-body-line-height) !important;
  letter-spacing: normal;
}

.hyperise-feedback {
  min-width: 0;
}

.hyperise-results__recognition .case-project-link,
.hyperise-feedback__source .case-project-link {
  color: var(--case-meta-accent);
  text-decoration: none;
  white-space: nowrap;
}

.hyperise-case .hyperise-feedback__quote {
  margin: 0;
  font-size: var(--case-body-size);
  font-style: normal;
  line-height: var(--case-body-line-height);
}

.hyperise-case .hyperise-feedback__quote ul {
  display: grid;
  gap: var(--space-xs);
  margin-top: var(--case-inline-gap);
  padding-left: var(--case-subsection-gap);
}

.hyperise-feedback .hyperise-feedback__source {
  margin-top: var(--case-inline-gap);
}

.hyperise-case .hyperise-results .hyperise-feedback h3 {
  margin-bottom: var(--space-xs);
}

.hyperise-feedback__header {
  display: flex;
  gap: var(--case-subsection-gap);
  align-items: center;
  margin-bottom: var(--case-subsection-gap);
}

.hyperise-feedback__portrait {
  flex: 0 0 64px;
  overflow: hidden;
  border-radius: 16px;
}

.hyperise-feedback__portrait img {
  width: 100%;
  height: auto;
}

.hyperise-billing__copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--case-columns-gap);
}

.hyperise-billing__copy > div {
  min-width: 0;
}

/* Figma artwork: 1278 × 929. Payment is offset by (0, 44),
   the library by (606, 0). Below the wide rail, scale the complete
   composition inside the shell so the protruding library stays visible. */
.hyperise-billing__stage {
  position: relative;
  width: min(calc(100% + 38px), 1278px);
  aspect-ratio: 1278 / 929;
  margin: 64px auto 0;
  overflow: visible;
}

.hyperise-billing__payment,
.hyperise-billing__modal {
  position: absolute;
  display: block;
  overflow: hidden;
  background: #fff;
}

.hyperise-billing__payment {
  top: 4.74%;
  left: 0;
  width: 97.03%;
  border-radius: 32px;
}

.hyperise-billing__modal {
  z-index: 1;
  top: 0;
  left: 47.42%;
  width: 52.58%;
  border: 1px solid #e4e4e4;
  border-radius: 32px;
  box-shadow: 0 20px 50px rgba(31, 53, 46, .13);
}

.hyperise-billing__stage img {
  width: 100%;
  height: auto;
}

.hyperise-case .hyperise-editor__stage,
.hyperise-case .hyperise-billing__stage {
  margin-top: 64px;
}

.case-side-panel {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 48px;
  height: 100vh;
  height: 100dvh;
  padding: 24px 0;
  pointer-events: none;
}

.case-side-panel__logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  pointer-events: auto;
}

.case-side-panel__logo img {
  width: 48px;
  height: 48px;
}

.case-side-panel__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 48px;
  padding: 16px 0;
  border: 1px solid var(--case-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, .74);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.case-side-panel__link {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #5a6870;
}

.case-side-panel__link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@media (max-width: 1359px) {
  .hyperise-billing__stage {
    width: 100%;
  }
}

@media (max-width: 1279px) {
  .case-side-panel {
    top: 0;
    left: 16px;
    justify-content: flex-start;
    height: auto;
    padding-top: 16px;
  }

  .case-side-panel__links {
    display: none;
  }
}

@media (max-width: 1024px) {
  .hyperise-about-project__layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hyperise-about-project__work {
    grid-column: 1 / -1;
  }

}

@media (max-width: 900px) {
  .hyperise-problem__grid {
    gap: 36px;
  }

  .hyperise-channels__grid {
    gap: 12px;
  }

  .hyperise-visual-frame,
  .hyperise-editor__visual,
  .hyperise-billing__payment,
  .hyperise-billing__modal {
    border-radius: 20px;
  }
}

@media (max-width: 767px) {
  .hyperise-results__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2xl);
  }

  .hyperise-main {
    padding-bottom: calc(152px + env(safe-area-inset-bottom));
  }

  .hyperise-shell {
    width: min(calc(100% - 24px), var(--hyperise-rail));
  }

  .hyperise-section {
    margin-block: var(--space-2xl);
  }

  .hyperise-hero {
    --hyperise-parallax-rate: .45;
  }

  .hyperise-hero__background-art {
    background-size: auto 100%;
  }

  .hyperise-hero__stage {
    height: 520px;
    aspect-ratio: auto;
  }

  .hyperise-hero__wordmark {
    top: 54px;
    left: 5%;
    width: 90%;
  }

  .hyperise-hero__dashboard {
    top: 152px;
    left: 50%;
    width: min(94%, 390px);
    transform: translateX(-50%);
    border-radius: 14px;
  }

  .hyperise-hero__graph {
    top: 204px;
    left: 35%;
    width: 61%;
    border-radius: 10px;
  }

  .hyperise-hero__card {
    top: 349px;
    left: 5%;
    width: 31%;
    border-radius: 10px;
  }

  .hyperise-case .hyperise-hero__caption {
    bottom: 16px;
    left: 5%;
    width: 90%;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .hyperise-problem {
    margin-top: 68px;
  }

  .hyperise-problem__grid,
  .hyperise-billing__copy,
  .hyperise-copy-grid,
  .hyperise-about-project__layout,
  .hyperise-about-project__phases {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .hyperise-about-project__work {
    grid-column: auto;
  }

  .hyperise-editor__stage {
    width: 100%;
    margin-top: 40px;
  }

  .hyperise-editor__visual {
    border-radius: 12px;
  }

  .hyperise-editor__panel {
    border-width: 1px;
    border-radius: 5px;
  }

  .hyperise-copy-grid {
    margin-bottom: 40px;
  }

  .hyperise-problem__close {
    top: -18px;
    left: -8px;
    width: 42px;
    height: 42px;
  }

  .hyperise-channels__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .hyperise-channels__grid .hyperise-visual-frame:first-child {
    grid-column: 1 / -1;
  }

  .hyperise-channels__grid .hyperise-visual-frame {
    aspect-ratio: 506 / 390;
  }

  .hyperise-channels__grid .hyperise-visual-frame:not(:first-child) {
    aspect-ratio: 315 / 390;
  }

  .hyperise-billing__stage {
    width: 100%;
    margin-top: 40px;
  }

  .hyperise-case .hyperise-editor__stage,
  .hyperise-case .hyperise-billing__stage {
    margin-top: 40px;
  }

  .hyperise-billing__payment,
  .hyperise-billing__modal {
    border-radius: 12px;
  }

  .hyperise-billing__modal {
    border-width: 1px;
    box-shadow: 0 8px 18px rgba(31, 53, 46, .16);
  }
}

/* Sasha narrative: text stays in normal flow on the existing case rail.
   Hero and editor/payment overlay coordinate systems are preserved. */
.hyperise-narrative__scope { max-width: 836px; margin-bottom: var(--case-section-gap); }
.hyperise-narrative__scope h3,
.hyperise-narrative__friction-grid h3,
.hyperise-narrative__goals h3,
.hyperise-narrative__sprints-grid h3,
.hyperise-narrative__results-grid h3 { margin-bottom: 12px; font-size: 16px !important; line-height: 1.625; }
.hyperise-intro__layout { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: var(--space-3xl); align-items: start; }
.hyperise-intro__copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--case-columns-gap); align-items: start; }
.hyperise-narrative__highlights { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 0; }
.hyperise-narrative__highlights > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.hyperise-narrative__highlights dt { color: var(--case-meta-accent); font-size: 32px; font-weight: 700; line-height: 1.2; margin: 0; white-space: nowrap; }
.hyperise-narrative__highlights dd { margin: 0; font-size: 16px; line-height: 1.625; }
.hyperise-narrative__context { margin-bottom: 32px !important; }
.hyperise-narrative__friction-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.hyperise-narrative__friction-grid > section { min-width: 0; }
.hyperise-narrative__friction-grid .hyperise-narrative__label { color: var(--case-meta-accent); font-weight: 700; margin-bottom: 12px; }
.hyperise-narrative__goals .hyperise-copy-grid { margin-bottom: 0; }
.hyperise-narrative__overview { margin-top: 64px; }
.hyperise-narrative__sprints-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.hyperise-case .hyperise-narrative__results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.hyperise-narrative__closing { max-width: 836px; margin-top: 48px !important; }
.hyperise-narrative__rollout .hyperise-feedback h3 { margin-bottom: 8px; }
.hyperise-narrative__rollout .hyperise-feedback { grid-column: 1 / -1; }
.hyperise-narrative__results-grid .case-project-link { color: var(--case-meta-accent); text-decoration: none; }
@media (max-width: 1279px) {
  .hyperise-narrative__friction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .hyperise-intro__layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
}
@media (max-width: 767px) {
  .hyperise-intro__copy { grid-template-columns: minmax(0, 1fr); }
  .hyperise-narrative__scope { margin-bottom: var(--space-2xl); }
  .hyperise-narrative__highlights { gap: 16px; }
  .hyperise-narrative__highlights dt { font-size: 24px; }
  .hyperise-narrative__highlights dd { font-size: 14px; }
  .hyperise-narrative__friction-grid,
  .hyperise-narrative__sprints-grid { grid-template-columns: minmax(0, 1fr); }
  .hyperise-case .hyperise-narrative__results-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .hyperise-narrative__overview { margin-top: 40px; }
  .hyperise-narrative__closing { margin-top: 32px !important; }
}
