/* The 3D world: one fixed canvas behind the page. Chapters (hero, «Una idea», cierre) let it
   show through; every other section keeps its own paper. Without WebGL or with reduced
   motion, .world never appears and the page keeps its illustrated version. */
.world-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100lvh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms var(--ease-out);
}
.world-canvas.is-on {
  opacity: 1;
}
.world main {
  position: relative;
  z-index: 1;
}
.world :where(main > section:not([data-world])) {
  background: var(--color-bg);
  box-shadow: 0 0 0 100vmax var(--color-bg);
  clip-path: inset(0 -100vmax);
}
.world .site-footer {
  position: relative;
  z-index: 1;
  background: var(--color-bg);
  box-shadow: 0 0 0 100vmax var(--color-bg);
  clip-path: inset(0 -100vmax);
}

/* Hero: the symbol takes the stage; Mara and the decision stay in front of it. */
:is(.world, .world-pending) :is(.hero-mark, .float-card) {
  display: none;
}
.world .hero-agent {
  left: -3em;
  top: 39em;
  width: 30em;
  padding: 1.6em 1.8em;
  background: rgba(252, 251, 247, 0.9);
  backdrop-filter: blur(10px);
}
.world .hero-says {
  font-size: 1.35em;
}
.world .hero-trail {
  display: none;
}
.world .hero-decision {
  left: auto;
  right: -2em;
  top: 50em;
}
.world .stage-caption {
  position: relative;
  z-index: 2;
}

/* «Una idea»: without the world it is a dark band that reads top to bottom. */
.idea {
  --p: 0;
  position: relative;
  background: var(--color-stage);
  color: var(--stage-text);
}
.idea-sticky {
  display: grid;
  gap: 40px;
  width: min(100% - 128px, 1280px);
  margin-inline: auto;
  padding: 120px 0;
}
.idea-mark {
  width: 120px;
  height: auto;
}
.idea-beats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.idea-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--stage-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.idea-kicker span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  padding-inline: 8px;
  border: 1px solid rgba(240, 238, 230, 0.24);
  border-radius: 99px;
  color: #f2967d;
  font: 500 12px var(--font-heading);
  letter-spacing: 0;
}
.idea h2,
.idea h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.idea h2 {
  font-size: clamp(56px, 7vw, 112px);
}
.idea h3 {
  font-size: clamp(36px, 3.6vw, 60px);
}
.idea em {
  color: #f2967d;
  font-style: normal;
}
.idea-beat > p:last-child {
  max-width: 460px;
  margin: 18px 0 0;
  color: var(--stage-muted);
  font-size: 17px;
  line-height: 1.6;
}
.idea-callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.idea-callouts li {
  display: grid;
  gap: 2px;
  padding: 10px 16px 12px;
  border: 1px solid rgba(240, 238, 230, 0.16);
  border-radius: 14px;
  background: rgba(38, 42, 38, 0.82);
  color: var(--stage-muted);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}
.idea-callouts b {
  color: var(--stage-text);
  font: 600 16px var(--font-heading);
}
.idea-callouts .is-yours {
  border-color: rgba(242, 150, 125, 0.5);
}
.idea-callouts .is-yours b {
  color: #f2967d;
}
.idea-lines,
.idea-steps {
  display: none;
}

/* With the world: a pinned stage in three beats, the symbol on the right and text on the left. */
:is(.world, .world-pending) .idea {
  height: 460vh;
  background: transparent;
}
:is(.world, .world-pending) .idea-sticky {
  position: sticky;
  top: 0;
  display: block;
  width: auto;
  height: 100svh;
  padding: 0;
  overflow: hidden;
}
:is(.world, .world-pending) .idea-mark {
  display: none;
}
:is(.world, .world-pending) .idea-beats {
  display: block;
}
:is(.world, .world-pending) .idea-beat {
  position: absolute;
  left: max(64px, calc((100% - 1312px) / 2));
  bottom: clamp(56px, 12svh, 140px);
  width: min(560px, 42%);
  opacity: var(--o);
  translate: 0 calc((1 - var(--o)) * 32px);
  visibility: hidden;
}
:is(.world, .world-pending) .idea-beat--1 {
  --o: clamp(0, min(calc((var(--p) - 0.02) * 14), calc((0.25 - var(--p)) * 14)), 1);
  visibility: visible;
}
:is(.world, .world-pending) .idea-beat--2 {
  --o: clamp(0, min(calc((var(--p) - 0.28) * 14), calc((0.6 - var(--p)) * 14)), 1);
  visibility: visible;
}
:is(.world, .world-pending) .idea-beat--3 {
  --o: clamp(0, calc((var(--p) - 0.7) * 14), 1);
  visibility: visible;
}
:is(.world, .world-pending) .idea h2 {
  font-size: clamp(72px, 11vw, 196px);
  letter-spacing: -0.055em;
}
:is(.world, .world-pending) .idea h3 {
  font-size: clamp(40px, 4.6vw, 76px);
}
.world .idea-callouts {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
.world .idea-callouts li {
  position: absolute;
  top: 0;
  left: 0;
  translate: var(--x, 0) var(--y, 0);
  opacity: calc(var(--show, 0) * var(--callouts, 0));
  backdrop-filter: blur(8px);
}
.world .idea-callouts li::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.world .idea-lines {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: var(--callouts, 0);
  stroke: rgba(240, 238, 230, 0.42);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  pointer-events: none;
}
.world .idea-steps {
  position: absolute;
  right: max(64px, calc((100% - 1312px) / 2));
  bottom: clamp(56px, 12svh, 140px);
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: idea;
  color: var(--stage-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.world .idea-steps li {
  --on: 0;
  display: grid;
  gap: 10px;
  width: 86px;
  counter-increment: idea;
  opacity: calc(0.45 + var(--on) * 0.55);
}
.world .idea-steps li::before {
  content: "";
  height: 2px;
  background: linear-gradient(90deg, #f2967d calc(var(--on) * 100%), rgba(240, 238, 230, 0.2) 0);
}
.world .idea-steps li:nth-child(1) {
  --on: clamp(0, calc(var(--p) * 4), 1);
}
.world .idea-steps li:nth-child(2) {
  --on: clamp(0, calc((var(--p) - 0.26) * 3), 1);
}
.world .idea-steps li:nth-child(3) {
  --on: clamp(0, calc((var(--p) - 0.66) * 3.5), 1);
}

/* Closing: the symbol returns on the right, larger, with its five networks in orbit. */
.world .final-cta {
  background: transparent;
  text-align: left;
}
.world .final-cta-inner {
  justify-items: start;
}
.world .final-cta .eyebrow {
  justify-content: flex-start;
}
.world .cta-mark {
  display: none;
}

@media (max-width: 1000px) {
  :is(.world, .world-pending) .idea-beat {
    left: 32px;
    width: min(560px, 58%);
  }
  .world .idea-steps {
    right: 32px;
  }
  .idea-beats {
    grid-template-columns: 1fr;
  }
}
@media (max-aspect-ratio: 21 / 20) {
  :is(.world, .world-pending) .idea-beat {
    width: min(640px, calc(100% - 64px));
  }
  .world .idea-steps {
    display: none;
  }
}
@media (max-width: 720px) {
  .idea-sticky {
    width: calc(100% - 44px);
    padding: 88px 0;
  }
  :is(.world, .world-pending) .idea-beat {
    left: 22px;
    right: 22px;
    bottom: 40px;
    width: auto;
  }
  :is(.world, .world-pending) .idea h2 {
    font-size: clamp(64px, 19vw, 96px);
  }
  :is(.world, .world-pending) .idea h3 {
    font-size: clamp(34px, 9.6vw, 44px);
  }
  :is(.world, .world-pending) .idea-beat > p:last-child {
    font-size: 15px;
  }
  .world .idea-callouts li {
    padding: 7px 11px 8px;
    font-size: 11px;
  }
  .world .idea-callouts b {
    font-size: 13px;
  }
  .world .idea-steps {
    display: none;
  }
  .world .hero-agent {
    left: 0;
    top: 41em;
    width: 36em;
  }
  .world .hero-decision {
    right: 0;
    top: 55em;
  }
  .world .final-cta {
    padding-top: calc(70px + 62vw);
  }
}
