/* ══════════════════════════════════════════════════════════════════════
   Yotta — Homepage static sections (between the opening 3D act and the
   closing 3D reveal). Everything is scoped under #yotta-intro / #yotta-static
   / #yotta-finale so it never touches the PeachWorlds scene (#i7fsr / #ilxh).
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --ys-bg: #06040A;
  --ys-ink: #ffffff;
  --ys-muted: rgba(255, 255, 255, 0.56);
  --ys-faint: rgba(255, 255, 255, 0.34);
  --ys-line: rgba(255, 255, 255, 0.10);
  --ys-line-soft: rgba(255, 255, 255, 0.06);
  --ys-accent: #67E8F9;
  --ys-surface: rgba(255, 255, 255, 0.025);
  --ys-serif: "cotford-display-light-italic", "InstrumentSerif", Georgia, serif;
  --ys-sans: "kantumruypro-regular", "Almarena", Inter, sans-serif;
  --ys-body: "kantumruypro-light", "Almarena", Inter, sans-serif;
  --ys-ui: Inter, system-ui, sans-serif;
  --ys-pad: clamp(22px, 6vw, 120px);
  --ys-max: 1240px;
}

.ys-wrap {
  position: relative;
  z-index: 3;
  max-width: var(--ys-max);
  margin: 0 auto;
  padding-left: var(--ys-pad);
  padding-right: var(--ys-pad);
}

/* ════════ INTRO · cinematic cross-fade out of the live 3D ════════
   Transparent at the top (the parked, still-animating 3D shows through and is
   held for a beat), dissolving to solid by the bottom so it joins the reading
   panel below with no visible seam. */
#yotta-intro {
  position: relative;
  z-index: 1;
  min-height: 144vh;
  display: flex;
  align-items: center;
  padding: 12vh 0 9vh;
  color: var(--ys-ink);
  background: linear-gradient(to bottom,
    rgba(6, 4, 10, 0) 0%,
    rgba(6, 4, 10, 0.32) 26%,
    rgba(6, 4, 10, 0.70) 52%,
    rgba(6, 4, 10, 0.93) 78%,
    var(--ys-bg) 100%);
}
/* a soft pool of darkness behind the copy keeps it legible while the 3D is
   still faintly visible around it */
#yotta-intro .ys-intro-inner { position: relative; }
#yotta-intro .ys-intro-inner::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--ys-pad)); right: 0;
  top: -14%; bottom: -14%;
  background: radial-gradient(125% 92% at 28% 50%, rgba(6, 4, 10, 0.82), transparent 72%);
  z-index: -1;
  pointer-events: none;
}
.ys-statement {
  font-family: var(--ys-sans);
  font-weight: 400;
  font-size: clamp(32px, 5.6vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 16ch;
  text-shadow: 0 2px 44px rgba(0, 0, 0, 0.55);
}
.ys-statement em { font-family: var(--ys-serif); font-style: italic; }
#yotta-intro .ys-lede { margin-top: 34px; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5); }
.ys-scrollcue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  font-family: var(--ys-ui);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ys-faint);
}
.ys-scrollcue::after {
  content: "";
  width: 44px; height: 1px;
  background: linear-gradient(90deg, var(--ys-accent), transparent);
  animation: ys-cue 2.4s ease-in-out infinite;
}
@keyframes ys-cue { 0%,100% { transform: scaleX(0.5); opacity: 0.4; transform-origin: left; } 50% { transform: scaleX(1); opacity: 1; transform-origin: left; } }

/* ── The opaque reading panel that covers the fixed 3D canvas ── */
#yotta-static {
  position: relative;
  z-index: 1;
  background: var(--ys-bg);
  color: var(--ys-ink);
  font-family: var(--ys-body);
  overflow: hidden;
  background-image:
    radial-gradient(1100px 620px at 82% 2%, rgba(103, 232, 249, 0.10), transparent 60%),
    radial-gradient(900px 700px at 6% 46%, rgba(120, 110, 255, 0.07), transparent 62%),
    radial-gradient(1000px 800px at 92% 98%, rgba(103, 232, 249, 0.06), transparent 60%);
}

/* ── shared section chrome ── */
.ys-section { padding-block: clamp(72px, 12vh, 168px); }
.ys-eyebrow {
  font-family: var(--ys-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ys-accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.ys-eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.ys-h2 {
  font-family: var(--ys-sans);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 18ch;
}
.ys-h2 em {
  font-family: var(--ys-serif);
  font-style: italic;
  letter-spacing: -0.01em;
}
.ys-lede {
  font-family: var(--ys-body);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--ys-muted);
  max-width: 56ch;
  margin-top: 28px;
}

/* ── reveal-on-scroll ── */
.ys-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--ys-delay, 0s);
  will-change: opacity, transform;
}
.ys-reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ys-reveal { opacity: 1 !important; transform: none !important; }
}

/* ════════ CAPABILITIES (cards) ════════ */
.ys-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.ys-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
/* animated gradient edge driven by --ys-ang (see @property below) */
@property --ys-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.ys-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 32px 30px;
  border-radius: 18px;
  background: var(--ys-surface);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), background 0.5s ease;
}
/* gradient border via a masked layer so we can animate the conic sweep */
.ys-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background:
    conic-gradient(from var(--ys-ang),
      rgba(255,255,255,0.10), rgba(255,255,255,0.04) 25%,
      rgba(103,232,249,0.55) 50%, rgba(255,255,255,0.04) 75%, rgba(255,255,255,0.10));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.ys-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(440px 240px at 80% -12%, rgba(103, 232, 249, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: -1;
}
.ys-card:hover {
  transform: translateY(-7px);
  background: rgba(103, 232, 249, 0.045);
}
.ys-card:hover::before { opacity: 1; animation: ys-spin 5s linear infinite; }
.ys-card:hover::after { opacity: 1; }
@keyframes ys-spin { to { --ys-ang: 360deg; } }
.ys-card-num {
  font-family: var(--ys-ui);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ys-faint);
  margin-bottom: auto;
}
.ys-card-title {
  font-family: var(--ys-serif);
  font-style: italic;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.1;
  margin: 30px 0 14px;
}
.ys-card-desc {
  font-size: 15px;
  line-height: 1.62;
  color: var(--ys-muted);
}
.ys-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  font-family: var(--ys-ui);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ys-accent);
}
.ys-card-cta svg { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.ys-card:hover .ys-card-cta svg { transform: translateX(5px); }

/* ════════ KEYWORD RIBBON (moving divider) ════════ */
.ys-ribbon {
  position: relative;
  overflow: hidden;
  padding: 30px 0;
  margin: clamp(36px, 6vh, 84px) 0;
  border-top: 1px solid var(--ys-line-soft);
  border-bottom: 1px solid var(--ys-line-soft);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.ys-ribbon-track {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  animation: ys-marquee 30s linear infinite;
  will-change: transform;
}
.ys-ribbon-track span {
  font-family: var(--ys-sans);
  font-size: clamp(20px, 2.6vw, 34px);
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.78);
}
.ys-ribbon-track i {
  font-style: normal;
  color: var(--ys-accent);
  font-size: 13px;
  opacity: 0.75;
}
@keyframes ys-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ════════ PROCESS (drawing spine + nodes) ════════ */
.ys-steps {
  position: relative;
  margin-top: 30px;
  border-top: 1px solid var(--ys-line-soft);
}
.ys-steps::before {
  content: "";
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--ys-accent), rgba(103, 232, 249, 0.18) 58%, transparent);
  transform: scaleY(0);
  transform-origin: top center;
  opacity: 0.55;
}
.ys-steps.in-view::before {
  transform: scaleY(1);
  transition: transform 1.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.ys-step {
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: clamp(20px, 5vw, 80px);
  align-items: baseline;
  padding: clamp(28px, 4vh, 46px) 0 clamp(28px, 4vh, 46px) 44px;
  border-bottom: 1px solid var(--ys-line-soft);
}
.ys-step::before {
  content: "";
  position: absolute;
  left: 1px;
  top: clamp(34px, 4.6vh, 54px);
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ys-bg);
  border: 1px solid var(--ys-accent);
  box-shadow: 0 0 0 4px var(--ys-bg), 0 0 16px rgba(103, 232, 249, 0.55);
}
.ys-step-num {
  font-family: var(--ys-serif);
  font-style: italic;
  font-size: clamp(30px, 3.4vw, 46px);
  color: var(--ys-accent);
  line-height: 1;
}
.ys-step-body { max-width: 62ch; }
.ys-step-title {
  font-family: var(--ys-sans);
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.ys-step-desc {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.6;
  color: var(--ys-muted);
  margin: 0;
}

/* ════════ PRODUCTS (rows) ════════ */
.ys-products { margin-top: 14px; border-top: 1px solid var(--ys-line); }
.ys-prod {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr) auto;
  gap: clamp(16px, 4vw, 56px);
  align-items: center;
  padding: clamp(22px, 3.4vh, 36px) 8px;
  border-bottom: 1px solid var(--ys-line);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ys-prod::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(to right, rgba(103, 232, 249, 0.10), transparent);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.ys-prod-tag {
  position: absolute;
  left: 8px; top: 10px;
  font-family: var(--ys-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ys-faint);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.ys-prod:hover { padding-left: 24px; }
.ys-prod:hover::before { width: 100%; }
.ys-prod:hover .ys-prod-tag { opacity: 1; transform: none; }
.ys-prod-name {
  font-family: var(--ys-sans);
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: -0.01em;
  position: relative;
}
.ys-prod-desc {
  font-size: clamp(13px, 1.1vw, 15.5px);
  line-height: 1.55;
  color: var(--ys-muted);
}
.ys-prod-arrow {
  width: 42px; height: 42px;
  border: 1px solid var(--ys-line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ys-faint);
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.ys-prod:hover .ys-prod-arrow {
  border-color: var(--ys-accent);
  color: var(--ys-accent);
  transform: rotate(-45deg);
}

/* ════════ PROOF (count-up stats + client marquee) ════════ */
.ys-proof { border-top: 1px solid var(--ys-line-soft); }
.ys-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: clamp(56px, 9vh, 110px);
}
.ys-stat-fig {
  font-family: var(--ys-serif);
  font-style: italic;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ys-stat-fig .u { color: var(--ys-accent); }
.ys-stat-label {
  font-family: var(--ys-ui);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ys-muted);
  margin-top: 16px;
  max-width: 24ch;
}
.ys-clients-label {
  font-family: var(--ys-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ys-faint);
  margin-bottom: 30px;
}
.ys-clients {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ys-clients-track {
  display: inline-flex;
  align-items: center;
  gap: clamp(44px, 7vw, 100px);
  animation: ys-marquee 34s linear infinite;
  will-change: transform;
}
.ys-clients-track img {
  height: clamp(40px, 4.8vw, 64px); /* QA14 #8 — logos were too small (26–40px); enlarge ~1.5x */
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.55; /* slightly stronger so the larger marks read clearly */
  transition: opacity 0.4s ease;
  flex-shrink: 0;
}
.ys-clients-track img:hover { opacity: 0.9; }

@media (prefers-reduced-motion: reduce) {
  .ys-ribbon-track, .ys-clients-track { animation: none; }
  .ys-scrollcue::after { animation: none; }
  .ys-card:hover::before { animation: none; }
}

/* ════════ FINALE · 3D reveal + closing CTA ════════ */
#yotta-finale {
  position: relative;
  z-index: 1;
  min-height: 130vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14vh var(--ys-pad) clamp(380px, 56vh, 540px);
  color: var(--ys-ink);
}
#yotta-finale .pwb-anchor {
  position: absolute;
  left: 0;
  bottom: 25vh;
  width: 1px; height: 1px;
  pointer-events: none;
  opacity: 0;
}
/* dissolve the dark panel above into the live 3D */
#yotta-finale::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 320px;
  background: linear-gradient(to bottom, var(--ys-bg) 0%, rgba(6, 4, 10, 0) 100%);
  pointer-events: none;
}
.ys-finale-inner { position: relative; max-width: 1000px; }
.ys-finale-eyebrow {
  font-family: var(--ys-ui);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ys-accent);
  margin-bottom: 30px;
}
.ys-finale-h {
  font-family: var(--ys-sans);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 116px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  text-shadow: 0 2px 60px rgba(0, 0, 0, 0.5);
}
.ys-finale-h em {
  font-family: var(--ys-serif);
  font-style: italic;
  letter-spacing: -0.01em;
}
.ys-finale-sub {
  font-family: var(--ys-body);
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--ys-muted);
  margin: 30px auto 44px;
  max-width: 46ch;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}
.ys-finale-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 17px 38px;
  border-radius: 100px;
  background: var(--ys-accent);
  color: #04181c;
  font-family: var(--ys-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  box-shadow: 0 0 0 rgba(103, 232, 249, 0);
}
.ys-finale-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(103, 232, 249, 0.28);
}
.ys-finale-btn svg { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.ys-finale-btn:hover svg { transform: translateX(5px); }

/* The global footer is transparent on /home and would sit illegibly over the
   bright 3D sphere in the finale. Scrim it (home-only — this file only loads
   here) so the 3D gently "sets" into a readable footer. */
#yotta-finale ~ .yotta-footer {
  background: linear-gradient(to bottom, rgba(6, 4, 10, 0) 0%, rgba(6, 4, 10, 0.72) 42%, #06040A 100%) !important;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* keep PeachWorlds' leftover hero/CTA fixed overlays from bleeding over the
   reading panel + finale (their own fade can lag the appended scroll) */
body.yotta-reading #ipgz5,
body.yotta-reading #ipgz5-2,
body.yotta-reading #ipgz5-3,
body.yotta-reading #ipgz5-4,
body.yotta-reading #ipgz5-2-2 {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.4s ease;
}

/* ════════ responsive ════════ */
@media (max-width: 900px) {
  #yotta-intro { min-height: 128vh; }
  .ys-cards { grid-template-columns: 1fr; }
  .ys-card { min-height: 0; }
  .ys-stats { grid-template-columns: 1fr; gap: 40px; }
  .ys-step { grid-template-columns: 54px 1fr; gap: 16px; padding-left: 38px; }
  .ys-step::before { top: clamp(30px, 4vh, 44px); }
  .ys-prod { grid-template-columns: 1fr auto; }
  .ys-prod-desc { display: none; }
  .ys-head-row { margin-bottom: 36px; }
}
@media (max-width: 480px) {
  #yotta-intro { min-height: 122vh; padding-top: 10vh; }
  .ys-prod:hover { padding-left: 12px; }
  .ys-finale-btn { padding: 15px 30px; font-size: 14px; }
}
