@import url("colors_and_type.css");

/* ============================================================
   NASIDA · Trasformazione section
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg-1); }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.55; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 500;
}

em { font-style: italic; font-family: var(--font-serif); color: var(--nasida-amber); }
.mono { font-family: var(--font-mono); }
.arr { font-family: var(--font-serif); font-style: italic; color: var(--nasida-amber); }

/* ---------- Section frame --------------------------------- */
.story {
  position: relative;
  padding: clamp(72px, 9vw, 128px) 0 clamp(64px, 7vw, 112px);
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
/* a very soft, edge-of-page sfumato — never a hard ramp */
.story::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -10%; right: -10%;
  width: 56vw; height: 56vw;
  max-width: 820px; max-height: 820px;
  background: radial-gradient(closest-side,
    rgba(127,38,56,0.18) 0%,
    rgba(127,38,56,0.07) 45%,
    rgba(127,38,56,0) 78%);
  filter: blur(14px);
  pointer-events: none;
  transition: opacity 520ms var(--ease-out);
  opacity: 0.55;
}
.story.is-step-4::before { opacity: 1; }
.story.is-step-1::before { opacity: 0.25; }

.story__inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

/* ---------- Header ---------------------------------------- */
.story__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.story__eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.story__eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nasida-amber);
}
.story__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--fg-1);
  margin: 0;
  max-width: 760px;
  text-wrap: pretty;
}
.story__counter {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  white-space: nowrap;
  padding-bottom: 8px;
}
.story__counter b {
  color: var(--fg-1);
  font-weight: 500;
}

/* ---------- Stage ----------------------------------------- */
.stage {
  position: relative;
  background: var(--nasida-cream-50);
  border: 1px solid var(--border-hair);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.stage__canvas {
  position: relative;
  height: clamp(480px, 60vh, 620px);
  overflow: hidden;
}
.stage__act {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: none;
  transition: opacity 420ms var(--ease-out);
}
.stage__act.is-active {
  opacity: 1;
  pointer-events: auto;
  display: block;
}

/* Caption strip under each canvas */
.stage__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 24px clamp(20px, 3vw, 36px) 24px;
  border-top: 1px solid var(--border-hair);
  background: var(--nasida-cream);
}
.stage__caption {
  position: relative;
  min-height: 56px;
}
.stage__caption-item {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 360ms var(--ease-out),
    transform 360ms var(--ease-out);
  pointer-events: none;
}
.stage__caption-item.is-active {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 120ms;
}
.stage__caption-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--nasida-amber);
  letter-spacing: 0.02em;
}
.stage__caption-text {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--fg-1);
  margin: 0;
  text-wrap: balance;
}
.stage__caption-sub {
  font-size: 14px;
  color: var(--fg-2);
  margin-top: 4px;
  line-height: 1.5;
}

/* Stage controls */
.stage__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stage__btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--fg-1);
  transition: background 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.stage__btn:hover { background: var(--nasida-cream-200); }
.stage__btn:disabled { opacity: 0.35; cursor: default; }
.stage__btn svg { width: 14px; height: 14px; }

.stage__play {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0 6px 0 14px;
}
.stage__play span { color: var(--nasida-amber); }

/* ---------- Step navigator -------------------------------- */
.story__nav {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-hair);
}
.nav-step {
  appearance: none;
  background: transparent;
  border: 0;
  border-top: 2px solid transparent;
  margin-top: -1px;
  padding: 22px 24px 6px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--fg-2);
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
  position: relative;
  font-family: inherit;
}
.nav-step:hover { color: var(--fg-1); }
.nav-step.is-active {
  color: var(--fg-1);
  border-top-color: var(--nasida-cocoa);
}
.nav-step__n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--nasida-amber);
}
.nav-step__label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.nav-step__hint {
  font-size: 12px;
  color: var(--fg-2);
  margin-top: 2px;
}
.nav-step.is-active .nav-step__hint { color: var(--fg-1); opacity: 0.7; }

/* Progress sliver under each nav step */
.nav-step__progress {
  position: absolute;
  top: -1px; left: 0;
  height: 2px;
  width: 0;
  background: var(--nasida-amber);
  transition: width 80ms linear;
}
.nav-step.is-active .nav-step__progress {
  background: var(--nasida-cocoa);
}

/* ============================================================
   ACT 1 — Operational chaos
   ============================================================ */
.chaos {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(1200px 600px at 30% 90%, rgba(60,47,38,0.04), transparent 60%),
    var(--nasida-cream-50);
}
.chaos__paper {
  position: absolute;
  inset: 0;
  /* Faint ruled paper feel, very subtle */
  background-image:
    linear-gradient(to bottom, rgba(60,47,38,0.025) 1px, transparent 1px);
  background-size: 100% 40px;
  background-position: 0 12px;
  pointer-events: none;
  opacity: 0.5;
}
.chaos__items {
  position: absolute;
  inset: 0;
}
.c-item {
  position: absolute;
  background: var(--surface-card);
  border: 1px solid var(--border-hair);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(60,47,38,0.06), 0 1px 2px rgba(60,47,38,0.04);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--fg-1);
  transform-origin: center;
  animation: drift 9s ease-in-out infinite alternate;
}
.c-item--note  { animation-duration: 11s; }
.c-item--pdf   { animation-duration: 13s; }
.c-item--wa    { animation-duration: 7.5s; }
.c-item--cal   { animation-duration: 10.5s; }
.c-item--xls   { animation-duration: 12s; }
.c-item--audio { animation-duration: 8s; }
.c-item--task  { animation-duration: 9.5s; }
.c-item--clock { animation-duration: 14s; }
.c-item--inbox { animation-duration: 10s; }

@keyframes drift {
  0%   { transform: var(--rot) translate(0,0); }
  100% { transform: var(--rot) translate(2px, -4px); }
}

.c-item__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.c-item__icon {
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-2);
}
.c-item__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
}
.c-item__title {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--fg-1);
  letter-spacing: -0.005em;
}
.c-item__body {
  font-size: 11.5px;
  color: var(--fg-2);
  line-height: 1.45;
}
.c-item__bar {
  height: 4px;
  background: var(--border-hair);
  border-radius: 2px;
  margin-top: 6px;
}
.c-item__bar.w-80 { width: 80%; }
.c-item__bar.w-60 { width: 60%; }
.c-item__bar.w-40 { width: 40%; }

/* Email */
.c-email { width: 200px; top: 4%; left: 22%; --rot: rotate(-5deg); transform: var(--rot); z-index: 2; }
/* PDF */
.c-pdf { width: 168px; top: 11%; left: 50%; --rot: rotate(4deg); transform: var(--rot); }
.c-pdf__icon {
  width: 28px; height: 34px;
  background: var(--nasida-cream-200);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  position: relative;
  flex-shrink: 0;
}
.c-pdf__icon::after {
  content: "PDF";
  position: absolute;
  bottom: 3px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--err);
  letter-spacing: 0.05em;
}
.c-pdf__row { display: flex; gap: 10px; align-items: flex-start; }
.c-pdf__name { font-size: 11.5px; line-height: 1.35; word-break: break-all; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
/* WhatsApp */
.c-wa { width: 196px; top: 6%; right: 4%; --rot: rotate(-3deg); transform: var(--rot); padding: 10px 12px; }
.c-wa__bubble {
  background: #DCF8C6;
  border-radius: 8px 8px 8px 2px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--fg-1);
  margin-top: 6px;
  position: relative;
}
.c-wa__time {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-2);
  text-align: right;
  margin-top: 4px;
}
/* Excel */
.c-xls { width: 200px; top: 34%; left: 8%; --rot: rotate(6deg); transform: var(--rot); padding: 10px; }
.c-xls__grid {
  display: grid;
  grid-template-columns: 18px repeat(3, 1fr);
  grid-auto-rows: 18px;
  gap: 1px;
  background: var(--border-hair);
  border: 1px solid var(--border-hair);
  margin-top: 6px;
}
.c-xls__cell {
  background: var(--surface-card);
  font-family: var(--font-mono);
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-2);
}
.c-xls__cell.h { background: var(--nasida-cream-200); color: var(--fg-1); }
.c-xls__cell.err { background: var(--err-bg); color: var(--err); font-weight: 600; }
.c-xls__cell.num { color: var(--fg-1); }

/* Calendar */
.c-cal { width: 180px; top: 38%; left: 38%; --rot: rotate(-5deg); transform: var(--rot); padding: 10px 12px; z-index: 2; }
.c-cal__head { display: flex; justify-content: space-between; align-items: baseline; }
.c-cal__day { font-family: var(--font-serif); font-size: 18px; line-height: 1; }
.c-cal__dot { font-family: var(--font-mono); font-size: 10px; color: var(--fg-2); }
.c-cal__events { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.c-cal__event {
  height: 12px;
  background: var(--nasida-cream-200);
  border-left: 2px solid var(--nasida-amber);
  border-radius: 2px;
  padding-left: 4px;
  font-size: 9px;
  color: var(--fg-1);
  display: flex; align-items: center;
}
.c-cal__event.conflict { border-left-color: var(--err); background: var(--err-bg); }

/* Sticky note */
.c-note {
  width: 156px; top: 4%; left: 4%;
  --rot: rotate(-11deg); transform: var(--rot);
  background: #F6E6BD;
  border: 1px solid #E8D6A4;
  box-shadow: 0 6px 16px rgba(60,47,38,0.10), 0 1px 2px rgba(60,47,38,0.06);
  padding: 14px;
  z-index: 3;
}
.c-note__urg {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--err);
  margin-bottom: 6px;
}
.c-note__text {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.3;
  color: var(--nasida-cocoa-900);
}

/* Voice memo */
.c-audio { width: 176px; bottom: 8%; left: 6%; --rot: rotate(-9deg); transform: var(--rot); padding: 10px 12px; }
.c-audio__row { display: flex; align-items: center; gap: 8px; }
.c-audio__wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 18px; }
.c-audio__bar { width: 2px; background: var(--fg-2); border-radius: 1px; }
.c-audio__time { font-family: var(--font-mono); font-size: 10px; color: var(--fg-2); }

/* Task list */
.c-task { width: 178px; bottom: 8%; left: 36%; --rot: rotate(2deg); transform: var(--rot); padding: 12px; }
.c-task__row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.c-task__box { width: 12px; height: 12px; border: 1px solid var(--fg-2); border-radius: 2px; flex-shrink: 0; }
.c-task__text { font-size: 11.5px; color: var(--fg-1); line-height: 1.3; }

/* Clock / late hour */
.c-clock { width: 132px; bottom: 10%; right: 6%; --rot: rotate(-4deg); transform: var(--rot); padding: 10px 12px; }
.c-clock__t { font-family: var(--font-serif); font-size: 22px; letter-spacing: -0.01em; color: var(--fg-1); }
.c-clock__l { font-size: 10.5px; color: var(--fg-2); margin-top: 2px; }

/* Inbox badge */
.c-inbox {
  width: 154px; top: 38%; right: 6%;
  --rot: rotate(8deg); transform: var(--rot);
  padding: 10px 12px;
}
.c-inbox__num { font-family: var(--font-serif); font-size: 22px; color: var(--err); line-height: 1; }
.c-inbox__l { font-size: 10.5px; color: var(--fg-2); margin-top: 4px; }

/* ============================================================
   ACT 2 — AI organization (radial)
   ============================================================ */
.org {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--nasida-cream-50);
  display: grid;
  place-items: center;
}
.org__rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.org__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  opacity: 0.45;
}
.org__ring.r1 { width: 220px; height: 220px; }
.org__ring.r2 { width: 360px; height: 360px; }
.org__ring.r3 { width: 520px; height: 520px; opacity: 0.25; }

.org__core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 144px; height: 144px;
  border-radius: 50%;
  background: var(--nasida-cocoa);
  color: var(--nasida-cream);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 40px rgba(60,47,38,0.24), 0 2px 8px rgba(60,47,38,0.12);
  z-index: 2;
}
.org__core::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(127,38,56,0.28), rgba(127,38,56,0) 70%);
  z-index: -1;
  animation: pulse 3.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.1); opacity: 1; }
}
.org__core img { width: 84px; height: 84px; filter: invert(95%) sepia(8%) saturate(218%) hue-rotate(2deg) brightness(99%); }
.org__core-label {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
}

.org__svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.org__line {
  stroke: var(--border-strong);
  stroke-width: 1;
  fill: none;
}
.org__line.l1 { animation-delay: 200ms; }
.org__line.l2 { animation-delay: 320ms; }
.org__line.l3 { animation-delay: 440ms; }
.org__line.l4 { animation-delay: 560ms; }
.org__line.l5 { animation-delay: 680ms; }
.org__line.l6 { animation-delay: 800ms; }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.org__node {
  position: absolute;
  background: var(--surface-card);
  border: 1px solid var(--border-hair);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: var(--shadow-1);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 168px;
}
.org__node-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nasida-amber);
}
.org__node-v {
  font-size: 13.5px;
  letter-spacing: -0.005em;
  color: var(--fg-1);
  font-weight: 500;
}
.org__node-c {
  font-size: 11.5px;
  color: var(--fg-2);
}

.org__node.n1 { top: 8%; left: 8%; }
.org__node.n2 { top: 12%; right: 8%; }
.org__node.n3 { top: 50%; left: 4%; transform: translateY(-50%); }
.org__node.n4 { top: 50%; right: 4%; transform: translateY(-50%); }
.org__node.n5 { bottom: 8%; left: 12%; }
.org__node.n6 { bottom: 10%; right: 12%; }

/* small traveling dots on a couple of lines for liveness */
.org__pulse {
  fill: var(--nasida-amber);
  opacity: 0;
}
.stage__act.is-active .org__pulse {
  animation: pulseDot 2.6s linear infinite;
}
@keyframes pulseDot {
  0%   { opacity: 0; offset-distance: 0%; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; offset-distance: 100%; }
}

/* ============================================================
   ACT 3 — Clear workflow (branching pipeline)
   ============================================================ */
.flow {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--nasida-cream-50);
  padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px);
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr minmax(180px, 220px);
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
}

/* Full-flow SVG behind everything, draws the fan-out / fan-in. */
.flow__svg-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.flow__pillar {
  position: relative;
  z-index: 2;
}
.flow__node {
  background: var(--surface-card);
  border: 1px solid var(--border-hair);
  border-radius: 10px;
  padding: 18px 18px;
  box-shadow: var(--shadow-1);
}
.flow__node--in  { border-left: 3px solid var(--nasida-cocoa); }
.flow__node--out { border-left: 3px solid var(--nasida-amber); }
.flow__node-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 6px;
}
.flow__node-v {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--fg-1);
}
.flow__node-c {
  font-size: 12px;
  color: var(--fg-2);
  margin-top: 6px;
}

.flow__middle {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 24px 0 8px;
}
.flow__mid-label {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nasida-amber);
  background: var(--nasida-cream-50);
  padding: 0 10px;
  z-index: 3;
}
.flow__mids {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.flow__mid {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-card);
  border: 1px solid var(--border-hair);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow-1);
}
.stage__act.is-active .flow__mid { animation-play-state: running; }
.flow__mid:nth-child(1),
.flow__mid:nth-child(2),
.flow__mid:nth-child(3),
.flow__mid:nth-child(4) { /* stagger handled by entry on stage__act */ }
@keyframes midIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

.flow__mid-ico {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--nasida-cream-200);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--nasida-cocoa);
}
.flow__mid-ico svg { width: 14px; height: 14px; }
.flow__mid-l {
  display: flex; flex-direction: column; min-width: 0;
  line-height: 1.3;
}
.flow__mid-t { font-size: 13.5px; font-weight: 500; color: var(--fg-1); letter-spacing: -0.005em; line-height: 1.2; }
.flow__mid-s { font-size: 11.5px; color: var(--fg-2); line-height: 1.3; }

.flow__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}
.flow__path {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 0.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.stage__act.is-active .flow__path { animation-play-state: running; }
.flow__path.p1 { animation-delay: 80ms; }
.flow__path.p2 { animation-delay: 180ms; }
.flow__path.p3 { animation-delay: 280ms; }
.flow__path.p4 { animation-delay: 380ms; }
.flow__path.p5 { animation-delay: 480ms; }
.flow__path.p6 { animation-delay: 580ms; }
.flow__path.p7 { animation-delay: 680ms; }
.flow__path.p8 { animation-delay: 780ms; }

.flow__travel {
  fill: var(--nasida-amber);
  opacity: 0;
}
.stage__act.is-active .flow__travel {
  animation: travel 3.4s ease-in-out infinite;
}
.flow__travel.t1 { animation-delay: 1200ms; }
.flow__travel.t2 { animation-delay: 1700ms; }
.flow__travel.t3 { animation-delay: 2200ms; }
.flow__travel.t4 { animation-delay: 2700ms; }
@keyframes travel {
  0%   { opacity: 0; offset-distance: 0%; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { opacity: 0; offset-distance: 100%; }
}

/* ============================================================
   ACT 4 — NASIDA
   ============================================================ */
.end {
  position: relative;
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: var(--nasida-cream-50);
  overflow: hidden;
}
.end::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(closest-side at 50% 56%,
      rgba(127,38,56,0.22) 0%,
      rgba(127,38,56,0.08) 35%,
      rgba(127,38,56,0) 72%);
  filter: blur(8px);
  pointer-events: none;
}
.end__inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}
.end__mark {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.end__mark img { width: 64px; height: 64px; }
@keyframes markIn { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.end__brand {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.end__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--fg-1);
  margin: 0;
  max-width: 820px;
  white-space: normal;
}
.end__title em { white-space: nowrap; }
.end__sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
  max-width: 520px;
}
.end__cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--nasida-cocoa);
  color: var(--nasida-cream);
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 140ms var(--ease-out);
}
.end__cta:hover { background: var(--nasida-cocoa-900); }
.end__cta .arr { color: var(--nasida-amber-soft); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .story__head { grid-template-columns: 1fr; gap: 12px; }
  .story__counter { padding-bottom: 0; }
  .stage__canvas { height: clamp(440px, 60vh, 540px); }
  .flow { grid-template-columns: 1fr; gap: 14px; padding: 24px; align-content: start; }
  .flow__svg-bg { display: none; }
  .flow__pillar { display: flex; }
  .flow__middle { padding: 12px 0 4px; }
  .story__nav { grid-template-columns: repeat(2, 1fr); }
  .nav-step { padding: 16px 18px; }
  /* Hide hint sublabels — keep label tight */
  .nav-step__hint { display: none; }
}
@media (max-width: 640px) {
  .story { padding: 56px 0 48px; }
  .story__inner { padding: 0 20px; }
  .stage__canvas { height: 560px; }
  .stage__foot { grid-template-columns: 1fr; padding: 18px 20px; gap: 14px; }
  .stage__controls { justify-content: space-between; }
  .stage__caption { min-height: 48px; }
  .stage__caption-text { font-size: 18px; }
  /* hide secondary subline on mobile to reduce noise */
  .stage__caption-sub { display: none; }
  /* shrink play label to a compact icon-only feel */
  .stage__play { padding: 0 6px; }

  /* Chaos — shrink to fit narrow screens, reduce noise */
  .c-item { font-size: 11.5px; }
  .c-email   { width: 168px; top: 4%; left: 26%; }
  .c-note    { width: 132px; top: 4%; left: 3%; }
  .c-pdf     { width: 140px; top: 18%; left: 50%; }
  .c-wa      { width: 168px; top: 12%; right: 3%; }
  .c-xls     { width: 168px; top: 44%; left: 4%; }
  .c-cal     { width: 156px; top: 42%; right: 4%; }
  .c-audio   { display: none; }
  .c-task    { display: none; }
  .c-clock   { width: 116px; bottom: 6%; right: 6%; }
  .c-inbox   { width: 132px; bottom: 8%; left: 10%; }

  /* Organization — tighter radial */
  .org__ring.r3 { display: none; }
  .org__ring.r2 { width: 280px; height: 280px; }
  .org__ring.r1 { width: 180px; height: 180px; }
  .org__core { width: 112px; height: 112px; }
  .org__core img { width: 64px; height: 64px; }
  .org__node { min-width: 132px; padding: 8px 12px; }
  .org__node-v { font-size: 12.5px; }
  .org__node-c { display: none; }
  /* keep only 4 strongest nodes on mobile */
  .org__node.n3, .org__node.n4 { display: none; }
  .org__line.l3, .org__line.l4 { display: none; }

  /* Workflow — clean vertical stack with the four mids only */
  .flow__pillar .flow__node { padding: 14px 16px; }
  .flow__node-v { font-size: 17px; }
  .flow__mid-label { position: static; transform: none; text-align: center; padding: 0; background: transparent; margin-bottom: 2px; }
  .flow__mid { padding: 10px 14px; }

  /* End */
  .end__inner { gap: 12px; }
  .end__title { font-size: 26px; }
  .end__sub { font-size: 14.5px; }
  .end__cta { padding: 10px 16px; font-size: 13.5px; }

  /* Step nav — single column, compact */
  .story__nav { grid-template-columns: repeat(4, 1fr); }
  .nav-step { padding: 14px 8px; }
  .nav-step__label { font-size: 14px; }
  .nav-step__n { font-size: 11.5px; }
}
