/* Home sections: hero, stats, tabs, triangle reveal, report, cases, deal, quotes, cta */

/* hero: consumer-brand mosaic (like L Catterton / VMG) + DealReveal card */
.hero { position: relative; overflow: hidden; background: var(--ink); isolation: isolate; }
.hero__inner { display: grid; gap: 2.25rem; padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 1.5rem); padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.hero__title { font-size: var(--fs-display); line-height: 0.94; letter-spacing: -0.05em; margin-bottom: 1.5rem; }
.hero__row { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__row > span { display: inline-block; }
.hero__title .ital { letter-spacing: -0.03em; padding-right: 0.08em; }
.hero__sub { font-size: var(--fs-lead); color: rgba(var(--paper-rgb), 0.82); max-width: 31em; margin-bottom: 2rem; }
.hero__visual { position: relative; }

.mosaic {
  display: grid; gap: 0.6rem; margin-inline: calc(var(--gutter) * -1); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.mosaic__col { overflow: hidden; }
.mosaic__track { display: flex; gap: 0.6rem; padding-right: 0.6rem; width: max-content; animation: marqueeX 46s linear infinite; }
.mosaic__col:nth-child(2) .mosaic__track { animation-direction: reverse; animation-duration: 52s; }
.mosaic__col:nth-child(3) .mosaic__track { animation-duration: 38s; }
@keyframes marqueeX { to { transform: translateX(-50%); } }
@keyframes marqueeY { to { transform: translateY(-50%); } }
.tile { position: relative; flex: none; margin: 0; width: 10rem; height: 7.25rem; border-radius: 14px; overflow: hidden; background: var(--ink-3); }
.tile--tall { width: 7.5rem; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile--pack { background: radial-gradient(120% 80% at 50% 35%, #eef3f6 0%, #c9d6de 100%); }
.tile--pack img { object-fit: contain; padding: 10% 0 4%; filter: drop-shadow(0 12px 16px rgba(var(--ink-rgb), 0.3)); }
.tile figcaption {
  position: absolute; left: 0.5rem; bottom: 0.5rem; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25rem 0.5rem; border-radius: 999px; background: rgba(var(--ink-rgb), 0.72); color: var(--on-dark);
}
@media (prefers-reduced-motion: reduce) { .mosaic__track { animation: none; } }

.dealcard {
  position: relative; z-index: 1; margin: -3.5rem 0 0 auto; width: min(calc(100% - 1.25rem), 23rem);
  background: rgba(var(--ink-rgb), 0.78); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(var(--paper-rgb), 0.16); border-radius: 20px; padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.7);
}
.dealcard__head { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-2); }
.dealcard__live { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--lime); }
.dealcard__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(124, 238, 99, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(124, 238, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 238, 99, 0); } }
.dealcard__score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem; margin: 0.9rem 0 1.1rem; }
.dealcard__score b { font-size: 3.4rem; font-weight: 600; letter-spacing: -0.06em; line-height: 0.9; }
.dealcard__score span { color: var(--on-dark-2); font-size: 1.1rem; }
.dealcard__score em { flex-basis: 100%; font-style: normal; font-weight: 600; font-size: 0.95rem; margin-top: 0.5rem; }
.bars--sm { gap: 0.75rem; }
.bars--sm li { font-size: 0.82rem; }

@media (min-width: 1000px) {
  .hero { min-height: 100svh; display: flex; align-items: center; }
  .hero__inner { padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 4rem; }
  .hero__copy { max-width: calc(100% - min(40vw, 34rem) - 6rem); }
  .hero__title { font-size: clamp(3.2rem, 4.6vw, 5.6rem); }
  .hero__visual { position: absolute; top: calc(var(--nav-h) + 0.75rem); bottom: 0; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); width: min(40vw, 34rem); }
  .mosaic {
    height: 100%; margin: 0; grid-template-columns: repeat(3, 1fr);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  }
  .mosaic__track { flex-direction: column; width: auto; padding: 0 0 0.6rem; animation-name: marqueeY; }
  .tile, .tile--tall { width: 100%; height: 12rem; }
  .tile--tall { height: 17rem; }
  .dealcard { position: absolute; left: -3rem; bottom: 8%; margin: 0; width: 21rem; }
}

/* stats */
.stats { background: var(--ink); border-top: 1px solid var(--line-dark); }
.stats__grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat { padding: 1.75rem 0.5rem 1.75rem 0; display: flex; flex-direction: column; gap: 0.5rem; border-bottom: 1px solid var(--line-dark); }
.stat:nth-child(odd) { padding-right: 1rem; border-right: 1px solid var(--line-dark); }
.stat:nth-child(even) { padding-left: 1rem; }
.stat__n { font-size: clamp(2.2rem, 7vw, 3.75rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__l { font-size: 0.88rem; color: var(--on-dark-2); line-height: 1.35; }
@media (min-width: 860px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); }
  .stat { border-bottom: 0; padding: 2.5rem 1.5rem; border-right: 1px solid var(--line-dark); }
  .stat:nth-child(odd), .stat:nth-child(even) { padding-inline: 1.5rem; }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { border-right: 0; }
}

/* tabs */
.tabs__list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.25rem; padding: 0.3rem; margin-bottom: 2.5rem;
  background: var(--paper-2); border-radius: 999px; width: 100%;
}
@media (min-width: 640px) { .tabs__list { display: flex; width: max-content; } }
.tabs__list [role="tab"] {
  flex: none; border: 0; background: none; cursor: pointer;
  min-height: 44px; padding: 0.5rem 0.6rem; border-radius: 999px; line-height: 1.15;
  font-weight: 600; font-size: clamp(0.82rem, 3.4vw, 0.95rem); letter-spacing: -0.01em; color: var(--on-light-2);
  transition: background-color 0.3s, color 0.3s;
}
.tabs__list [aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs__panel { animation: fadeUp 0.5s var(--ease); }
.tabs__panel > .btn { margin-top: 2.5rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
.aud { display: grid; gap: 2.5rem; }
.aud__for { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); margin-bottom: 0.9rem; }
.aud__title { font-size: clamp(1.7rem, 4.6vw, 3rem); margin-bottom: 1.25rem; }
.aud__text { color: var(--on-light-2); font-size: 1.08rem; max-width: 36em; }
.checks { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.7rem; }
.checks li { display: flex; gap: 0.75rem; align-items: flex-start; font-weight: 500; }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%230b0d0c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.services { list-style: none; counter-reset: s; padding: 0; margin: 0; border-top: 1px solid var(--line-light); }
.services li { counter-increment: s; padding: 1.4rem 0 1.4rem 3rem; border-bottom: 1px solid var(--line-light); position: relative; }
.services li::before { content: "0" counter(s); position: absolute; left: 0; top: 1.55rem; font-family: var(--mono); font-size: 0.78rem; color: rgba(var(--ink-rgb), 0.55); }
.services h4 { font-size: 1.2rem; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.services p { color: var(--on-light-2); font-size: 0.98rem; }
@media (min-width: 960px) { .aud { grid-template-columns: 1fr 1fr; gap: 5rem; } }

/* triangle reveal (vastworld-style) */
.tri { background: var(--paper); position: relative; }
.tri__shape { background: var(--lime); color: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.js-motion .tri__shape { clip-path: polygon(50% 18%, 78% 82%, 22% 82%); will-change: clip-path; }
.tri__inner { display: grid; gap: 3rem; padding-block: clamp(5rem, 13vw, 10rem); align-items: center; }
.tri__copy .lead { margin-top: 1.25rem; color: rgba(var(--ink-rgb), 0.75); }
.tri .eyebrow::before { background: var(--ink); }
.tri .btn--ghost { --bd: rgba(var(--ink-rgb), 0.3); }
.tri__fact { margin: 1.75rem 0 2rem; padding: 1.3rem 1.5rem; background: var(--ink); color: var(--on-dark); border-radius: 16px; max-width: 34em; box-shadow: 0 20px 44px rgba(var(--ink-rgb), 0.28); }
.tri__fact strong { display: block; color: var(--lime); font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1; letter-spacing: -0.05em; margin-bottom: 0.45rem; }
@media (min-width: 960px) { .tri__inner { grid-template-columns: 1.15fr 0.85fr; gap: 5rem; } }

/* sample report card */
.report {
  background: var(--ink); color: var(--on-dark); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: 0 30px 60px -30px rgba(var(--ink-rgb), 0.6);
  width: 100%; max-width: 30rem; justify-self: center;
}
.report__head { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-2); }
.report__tag { border: 1px solid var(--line-dark); border-radius: 999px; padding: 0.25rem 0.6rem; }
.report__score { display: flex; align-items: baseline; gap: 0.3rem; margin: 1.25rem 0 0.4rem; }
.report__num { font-size: clamp(4rem, 15vw, 6rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.9; color: var(--lime); font-variant-numeric: tabular-nums; }
.report__of { font-size: 1.5rem; color: var(--on-dark-2); }
.report__level { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; margin-bottom: 1.5rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(124, 238, 99, 0.2); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem 1rem; font-size: 0.92rem; }
.bars b { font-family: var(--mono); font-weight: 500; }
.bars i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--line-dark); position: relative; overflow: hidden; }
.bars i::after { content: ""; position: absolute; inset: 0; width: calc(var(--v) * 100%); background: var(--lime); border-radius: inherit; transform-origin: left; transition: transform 1.2s var(--ease); }
.js-motion .report:not(.is-in) .bars i::after { transform: scaleX(0); }

/* cases */
.sec-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; max-width: none; }
.cases {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 24rem); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
.cases::-webkit-scrollbar { display: none; }
.case {
  scroll-snap-align: start; text-decoration: none; display: flex; flex-direction: column;
  background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.3s, transform 0.5s var(--ease);
}
.case:hover { border-color: rgba(124, 238, 99, 0.55); transform: translateY(-4px); }
.case__img { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: var(--ink-3); }
.case__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.case:hover .case__img img { transform: scale(1.05); }
.case__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--ink-rgb), 0.35) 0%, transparent 22%, transparent 38%, rgba(var(--ink-rgb), 0.75) 62%, rgba(var(--ink-rgb), 0.95) 100%); pointer-events: none; }
.case__img--pack { background: radial-gradient(120% 80% at 50% 35%, #eef3f6 0%, #c9d6de 100%); }
.case__img--pack img { object-fit: contain; height: 78%; margin-top: 9%; filter: drop-shadow(0 24px 30px rgba(var(--ink-rgb), 0.35)); }
.case__chip {
  position: absolute; top: 1rem; left: 1rem; z-index: 1;
  font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em;
  padding: 0.4rem 0.8rem; border-radius: 999px; background: rgba(var(--ink-rgb), 0.7); color: var(--on-dark);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.case__over { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1.1rem; z-index: 1; color: var(--on-dark); }
.case__over b { display: block; font-size: clamp(3rem, 12vw, 4.25rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.95; color: var(--lime); }
.case__over span { display: block; margin-top: 0.35rem; font-size: 0.92rem; line-height: 1.35; color: rgba(var(--paper-rgb), 0.85); max-width: 22em; }
.case__body { padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.case__tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-2); }
.case__text { margin-top: 0.7rem; font-size: 0.96rem; color: var(--on-dark-2); }
.case__more { margin-top: auto; padding-top: 1.1rem; font-weight: 600; }
/* kept for case-studies list */
.case__brand { font-weight: 600; font-size: 1.1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.case__brand span { font-family: var(--mono); font-size: 0.72rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-2); }
.case__metric { font-size: clamp(2.6rem, 8vw, 3.4rem); font-weight: 600; letter-spacing: -0.05em; color: var(--lime); margin-top: 1.25rem; line-height: 1; }
.case__metric-l { font-size: 0.9rem; color: var(--on-dark-2); margin-top: 0.35rem; }
@media (min-width: 960px) { .case__img { aspect-ratio: 4 / 5; } .cases { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; } }

/* Capezio deal */
.deal { padding-block: clamp(4rem, 10vw, 7.5rem); }
.deal__inner { text-align: center; max-width: 60rem; }

/* home: Capezio on a black stage, lime type, the dancer lit from behind */
.deal--stage { --lime-a: color-mix(in srgb, var(--lime) 78%, transparent); --lime-line: color-mix(in srgb, var(--lime) 22%, transparent);
  position: relative; overflow: hidden; isolation: isolate; background: #000; color: var(--lime); border-top: 1px solid var(--lime-line); }
.deal--stage .deal__inner { position: relative; }
.deal--stage .eyebrow { color: var(--lime-a); }
.deal--stage .eyebrow::before { background: var(--lime); }
.deal--stage .deal__title .ital { color: var(--paper); background: none; padding-inline: 0; }
.deal--stage .deal__text { color: var(--lime-a); }
.deal--stage .deal__facts { border-top-color: var(--lime-line); }
.deal--stage .deal__facts div + div { border-left-color: var(--lime-line); }
.deal--stage .deal__facts dd { color: var(--lime-a); }
.deal--stage .deal__logo { display: block; aspect-ratio: 200 / 30.66; background: var(--lime);
  -webkit-mask: url("../../img/logos/capezio.svg") center / contain no-repeat; mask: url("../../img/logos/capezio.svg") center / contain no-repeat; }
/* the photo is a white dancer on black: screen blend drops the black into the stage */
.deal__dancer { position: absolute; z-index: -1; bottom: 0; left: 0; right: 0; margin-inline: auto; height: 100%; width: auto; max-width: none; mix-blend-mode: screen; opacity: calc(var(--reveal, 1) * 0.32); pointer-events: none; transform-origin: 50% 100%; }
@media (min-width: 960px) {
  .deal--stage { padding-block: clamp(6rem, 11vw, 9rem); }
  .deal--stage .deal__inner { text-align: left; max-width: var(--max); }
  .deal--stage .deal__inner > * { max-width: min(36rem, 50vw); }
  .deal--stage .deal__logo { margin: 0 0 2rem; }
  .deal--stage .deal__text { margin-inline: 0; }
  .deal__dancer { left: auto; right: calc(max(0px, (100% - var(--max)) / 2) - 6rem); height: 104%; opacity: var(--reveal, 1); }
}
.deal__title { font-size: var(--fs-h1); letter-spacing: -0.05em; margin-bottom: 1.5rem; }
.deal__title .ital { color: var(--ink); background: linear-gradient(transparent 58%, var(--lime) 58% 90%, transparent 90%); padding-inline: 0.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.deal__text { font-size: var(--fs-lead); color: var(--on-light-2); max-width: 40em; margin-inline: auto; }
.deal__facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2.75rem 0 0; border-top: 1px solid var(--line-light); }
.deal__facts div { padding: 1.4rem 0.25rem 0; }
.deal__facts div + div { border-left: 1px solid var(--line-light); }
.deal__facts dt { font-size: clamp(1.6rem, 6vw, 2.75rem); font-weight: 600; letter-spacing: -0.04em; }
.deal__facts dd { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--on-light-2); }

/* quotes */
.quotes__track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.quotes__track::-webkit-scrollbar { display: none; }
.quote { margin: 0; scroll-snap-align: start; padding-right: 1rem; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 3.6vw, 2.35rem); line-height: 1.22; letter-spacing: -0.01em; max-width: 32em; }
.quote figcaption { display: flex; align-items: center; gap: 0.9rem; margin-top: 2rem; }
.quote figcaption img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; filter: grayscale(1); }
.quote figcaption span { display: flex; flex-direction: column; font-size: 0.9rem; color: var(--on-light-2); line-height: 1.4; }
.quote figcaption b { color: var(--on-light); font-size: 1rem; }
.quotes__nav { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.round { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-light); background: none; cursor: pointer; font-size: 1.15rem; transition: background-color 0.25s, color 0.25s; }
.round:hover { background: var(--ink); color: var(--paper); }
.quotes__count { font-size: 0.85rem; min-width: 3.5em; text-align: center; }

/* final cta */
.cta { background: var(--ink); padding-block: clamp(5rem, 14vw, 10rem); position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; width: min(90vw, 56rem); aspect-ratio: 1.15; left: 50%; bottom: -38%;
  transform: translateX(-50%); background: var(--lime); opacity: 0.09;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.cta__inner { position: relative; text-align: center; }
.cta__title { font-size: var(--fs-h1); letter-spacing: -0.05em; max-width: 14em; margin: 0 auto 1.5rem; }
.cta .lead { margin: 0 auto 2.5rem; }
.cta .btns { justify-content: center; }

/* brand logo panels (cards + mosaic) */
.case__logo { aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--paper); transition: background-color 0.4s; }
.case__logo img { width: 54%; max-height: 24%; object-fit: contain; transition: transform 0.6s var(--ease); }
.case:hover .case__logo img { transform: scale(1.05); }
.case .case__metric { margin-top: 0.9rem; }
.tile--logo { display: grid; place-items: center; background: var(--paper); }
.tile--logo img { width: 68%; height: auto; max-height: 40%; object-fit: contain; }
.deal__logo { width: min(14rem, 50%); margin: 0 auto 2rem; }

/* ===== motion layer (inspired by fintech product sites): aurora, pinned story, word reveal, glow line ===== */

/* hero aurora: slow drifting light behind the headline */
.hero__aurora { position: absolute; inset: auto -15% -35% -15%; height: 85%; z-index: -1; pointer-events: none; filter: blur(70px); opacity: 0.5; transform: translate3d(var(--ax, 0), var(--ay, 0), 0); transition: transform 1.2s var(--ease); }
.hero__aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; will-change: transform; }
.hero__aurora i:nth-child(1) { width: 46%; height: 70%; left: 8%; bottom: 0; background: #7cee63; animation: aurora-a 16s ease-in-out infinite alternate; }
.hero__aurora i:nth-child(2) { width: 40%; height: 60%; left: 38%; bottom: 10%; background: #7cee63; opacity: 0.55; animation: aurora-b 20s ease-in-out infinite alternate; }
.hero__aurora i:nth-child(3) { width: 34%; height: 55%; right: 6%; bottom: 0; background: #7cee63; opacity: 0.7; animation: aurora-c 18s ease-in-out infinite alternate; }
@keyframes aurora-a { to { transform: translate3d(18%, -12%, 0) scale(1.15); } }
@keyframes aurora-b { to { transform: translate3d(-22%, 8%, 0) scale(0.9); } }
@keyframes aurora-c { to { transform: translate3d(-14%, -16%, 0) scale(1.2); } }

/* word-by-word reveal */
[data-words] .w { transition: opacity 0.2s linear; }
.js-motion [data-words] .w { opacity: 0.16; }

/* pinned DealReveal story */
.story { background: var(--paper); color: var(--on-light); padding-block: clamp(4rem, 9vw, 7rem) clamp(3rem, 6vw, 5rem); }
.story__inner { display: grid; gap: 1.5rem; }
.story__head { margin-bottom: 1rem; }
.story__steps { position: relative; padding-left: 1.4rem; }
.story__rail { position: absolute; left: 0; top: 9rem; bottom: 6rem; width: 2px; background: var(--line-light); border-radius: 2px; overflow: hidden; }
.story__rail i { position: absolute; inset: 0; background: var(--lime); transform-origin: top; transform: scaleY(var(--p, 0)); }
.story__list { list-style: none; margin: 0; padding: 0; display: grid; }
.story__step { min-height: 58vh; padding-block: 1.5rem; display: flex; flex-direction: column; justify-content: center; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.story__step h3 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.03em; line-height: 1.1; margin: 1rem 0 0.6rem; }
.story__step p { color: var(--on-light-2); max-width: 34rem; }
.story__step .steps__tip { margin-top: 1.5rem; display: grid; gap: 0.5rem; font-size: 1.12rem; line-height: 1.5; padding: 1.35rem 1.6rem; background: var(--ink); color: var(--on-dark); border-left: 4px solid var(--lime); border-radius: 16px; max-width: 34rem; box-shadow: 0 20px 44px rgba(var(--ink-rgb), 0.28); }
.story__step .steps__tip b { font-family: var(--mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.js-story .story__step:not(.is-active) { opacity: 0.22; }
.story__cta { margin-top: 1rem; }
.story__stage { position: sticky; top: calc(var(--nav-h) + 0.75rem); z-index: 2; order: -1; }
.story__card { position: relative; overflow: hidden; background: var(--ink); color: var(--on-dark); border-radius: 26px; padding: 1.1rem 1.2rem 1.3rem; min-height: 19.5rem; box-shadow: 0 30px 80px rgba(var(--ink-rgb), 0.28); isolation: isolate; }
.story__glow { position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(124, 238, 99, 0.45), transparent 65%); filter: blur(30px); top: -30%; left: -20%; transition: transform 1.1s var(--ease); }
.story__card[data-state="2"] .story__glow { transform: translate(55%, 40%); }
.story__card[data-state="3"] .story__glow { transform: translate(110%, 10%); }
.story__card[data-state="4"] .story__glow { transform: translate(60%, 90%); }
.story__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-2); }
.story__pill { background: rgba(var(--paper-rgb), 0.1); padding: 0.25rem 0.55rem; border-radius: 99px; color: var(--lime); }
.story__screen { position: absolute; inset: 3.2rem 1.2rem 1.2rem; opacity: 0; transform: translateY(14px) scale(0.98); transition: opacity 0.55s var(--ease), transform 0.7s var(--ease); pointer-events: none; }
.story__card[data-state="1"] [data-screen="1"], .story__card[data-state="2"] [data-screen="2"],
.story__card[data-state="3"] [data-screen="3"], .story__card[data-state="4"] [data-screen="4"] { opacity: 1; transform: none; }
.story__label { font-size: 0.8rem; color: var(--on-dark-2); }
.story__label b { color: var(--lime); font-family: var(--mono); font-weight: 500; }
.story__inputs { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.story__inputs li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.7rem; border-radius: 10px; background: rgba(var(--paper-rgb), 0.06); font-size: 0.82rem; opacity: 0; transform: translateX(-10px); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.story__inputs b { font-family: var(--mono); font-weight: 500; }
.story__card[data-state="1"] .story__inputs li { opacity: 1; transform: none; }
.story__inputs li:nth-child(2) { transition-delay: 0.08s; } .story__inputs li:nth-child(3) { transition-delay: 0.16s; }
.story__inputs li:nth-child(4) { transition-delay: 0.24s; } .story__inputs li:nth-child(5) { transition-delay: 0.32s; } .story__inputs li:nth-child(6) { transition-delay: 0.4s; }
.story__score { position: relative; width: 7.5rem; margin: 0 auto; }
.story__score svg { display: block; width: 100%; transform: rotate(-90deg); }
.story__score circle { fill: none; stroke: rgba(var(--paper-rgb), 0.1); stroke-width: 9; }
.story__score .story__ring { stroke: var(--lime); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s var(--ease) 0.15s; }
.story__card[data-state="2"] .story__ring { stroke-dashoffset: 26; }
.story__score > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.story__score b { font-size: 2.2rem; letter-spacing: -0.04em; line-height: 1; }
.story__score small { color: var(--on-dark-2); font-size: 0.75rem; }
.story__level { text-align: center; margin: 0.5rem 0 0.7rem; font-size: 0.82rem; color: var(--lime); }
.story__bars { gap: 0.45rem; }
.story__bars li { font-size: 0.76rem; }
.story__card:not([data-state="2"]) .story__bars i::after { transform: scaleX(0); }
.story__val { font-size: clamp(1.8rem, 4.5vw, 2.6rem); letter-spacing: -0.04em; font-weight: 600; margin: 0.4rem 0; filter: blur(10px); transition: filter 0.9s var(--ease) 0.2s; }
.story__val span { color: var(--on-dark-2); font-weight: 400; }
.story__card[data-state="3"] .story__val { filter: none; }
.story__sub { font-size: 0.78rem; color: var(--on-dark-2); }
.story__actions { margin: 0.9rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; font-size: 0.85rem; }
.story__actions li::marker { color: var(--lime); }
.story__pdf { position: absolute; right: 0; bottom: 0; font-family: var(--mono); font-size: 0.7rem; background: var(--lime); color: var(--ink); padding: 0.35rem 0.6rem; border-radius: 8px; transform: rotate(-6deg); }
.story__cal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; margin-top: 0.9rem; font-family: var(--mono); font-size: 0.68rem; color: var(--on-dark-2); text-align: center; }
.story__cal i { height: 3.2rem; border-radius: 10px; background: rgba(var(--paper-rgb), 0.06); position: relative; transition: background 0.5s var(--ease) 0.3s, transform 0.5s var(--ease) 0.3s; }
.story__card[data-state="4"] .story__cal i.is-pick { background: var(--lime); transform: scale(1.06); }
.story__cal i.is-pick::after { content: "10:00"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-style: normal; opacity: 0; transition: opacity 0.3s 0.6s; }
.story__card[data-state="4"] .story__cal i.is-pick::after { opacity: 1; }
.story__booked { margin-top: 1rem; display: flex; gap: 0.6rem; align-items: center; font-size: 0.9rem; }
.story__booked span { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--lime); color: var(--ink); font-weight: 700; }
@media (max-width: 899px) {
  .story__steps { padding-left: 1rem; }
  .story__step { min-height: 46vh; }
}
@media (min-width: 900px) {
  .story__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
  .story__stage { order: 0; top: calc(50vh - 13rem); }
  .story__card { min-height: 26rem; padding: 1.5rem 1.6rem 1.6rem; }
  .story__screen { inset: 3.8rem 1.6rem 1.6rem; }
  .story__step { min-height: 72vh; }
  .story__score { width: 9.5rem; }
}

/* glowing growth line behind the dark case-studies block */
.section--glowline { position: relative; overflow: hidden; isolation: isolate; }
.section--glowline > .wrap { position: relative; z-index: 1; }
.glowline { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.5; }
.glowline path { fill: none; stroke: var(--lime); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: var(--draw, 0); filter: drop-shadow(0 0 6px rgba(124, 238, 99, 0.9)) drop-shadow(0 0 26px rgba(124, 238, 99, 0.55)); }
.js-motion .glowline path { stroke-dashoffset: var(--draw, 1); }

/* Capezio block warms from white to lime */
.deal { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .hero__aurora i { animation: none; }
  .story__screen, .story__inputs li, .story__val, .story__ring, .story__glow, .story__cal i { transition: none !important; }
}
.js-motion .dealcard:not(.is-in) .bars i::after { transform: scaleX(0); }
.dealcard { transform-style: preserve-3d; will-change: transform; }
@media (max-width: 899px) { .story__stage { margin-inline: calc(-1 * var(--gutter)); padding: 0.4rem var(--gutter) 1.2rem; top: var(--nav-h); background: linear-gradient(var(--paper) 82%, rgba(var(--paper-rgb), 0)); } }
/* phones: title first, then a compact pinned card, then the steps */
@media (max-width: 899px) {
  .story__steps { display: contents; }
  .story__head { order: 0; margin-bottom: 0; }
  .story__stage { order: 1; }
  .story__list { order: 2; }
  .story__cta { order: 3; }
  .story__rail { display: none; }
  .story__step { min-height: 44vh; padding-block: 1.5rem; }
  .story__card { min-height: 15.5rem; padding: 0.9rem 1rem 1rem; border-radius: 20px; }
  .story__screen { inset: 2.7rem 1rem 1rem; }
  .story__inputs { gap: 0.35rem; margin-top: 0.6rem; }
  .story__inputs li { padding: 0.4rem 0.6rem; font-size: 0.78rem; }
  .story__inputs li:nth-child(n + 5) { display: none; }
  .story__score { width: 5.4rem; }
  .story__score b { font-size: 1.6rem; }
  .story__level { margin: 0.35rem 0 0.5rem; font-size: 0.76rem; }
  .story__bars li:nth-child(n + 3) { display: none; }
  .story__val { font-size: 1.75rem; }
  .story__actions { margin-top: 0.6rem; font-size: 0.8rem; gap: 0.3rem; }
  .story__cal i { height: 2.6rem; }
}
