/* The Ryze moment: styles for ryzeHero() and ryzeMark() from /deck/ryze.js (loaded by importing ryze.js).
 * Every class starts with rz-. Layout classes follow deck-r3/FORMAT.md section 7:
 * desktop (default), compact (max-width 959px or max-height 619px), phone (max-width 759px, portrait). */

/* ---------- the theme: deep night with warm light ---------- */
.theme-ryze {
  --s-bg: #070506; --s-fg: #FFF8F1; --s-muted: rgb(255 238 224 / .7); --s-line: rgb(255 214 186 / .16); --s-accent: #FF7F32;
  background: radial-gradient(72% 82% at 68% 47%, #1d1009 0%, #100907 40%, #070506 74%), #070506;
  color: var(--s-fg);
}
.deck[data-theme="ryze"] { --hud-fg: #fff; }
.deck[data-theme="ryze"] .nav__btn--next { background: #fff; color: #000; border-color: #fff; }
.deck[data-theme="ryze"] .nav__btn--next:hover { background: #FFE9D9; }

/* ---------- hero layers ---------- */
.rz-hero { --rz-top: var(--hud-top, 64px); --rz-bot: var(--hud-bottom, 100px); }
.rz-hero__vis { position: absolute; inset: 0; z-index: 0; }
.rz-hero__gl { position: absolute; inset: 0; }
.rz-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rz-hero__scrim { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(7 5 6 / .88) 0%, rgb(7 5 6 / .8) 26%, rgb(7 5 6 / .36) 38%, rgb(7 5 6 / 0) 48%),
    linear-gradient(180deg, rgb(7 5 6 / .6) 0, rgb(7 5 6 / 0) 24%); }
.rz-hero__pills { position: absolute; inset: 0; pointer-events: none; }
/* while the camera dives into the core, the scrim deepens so the title and text stay readable (--rz-dive: 0 to 1) */
.rz-hero__scrim::after { content: ""; position: absolute; inset: 0; opacity: var(--rz-dive, 0);
  background: linear-gradient(90deg, rgb(7 5 6 / .9) 0%, rgb(7 5 6 / .82) 34%, rgb(7 5 6 / 0) 58%), linear-gradient(180deg, rgb(7 5 6 / .85) 0, rgb(7 5 6 / 0) 30%), linear-gradient(0deg, rgb(7 5 6 / .7) 0, rgb(7 5 6 / 0) 22%); }
@media (max-width: 759px) and (orientation: portrait) {
  .rz-hero__scrim::after { background: linear-gradient(180deg, rgb(7 5 6 / .94) 0, rgb(7 5 6 / .86) 40%, rgb(7 5 6 / 0) 58%), linear-gradient(0deg, rgb(7 5 6 / .85) 0, rgb(7 5 6 / 0) 26%); }
}

/* a connector label riding on its node */
.rz-node { position: absolute; left: 0; top: 0; z-index: 2; display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box;
  padding: 6px 12px 6px 10px; border-radius: 6px; background: rgb(16 10 8 / .84); color: #FFF6EE;
  box-shadow: inset 0 0 0 1px rgb(255 214 186 / .2), 0 10px 26px -12px rgb(0 0 0 / .9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: clamp(14px, calc(.9vw + 2px), 18px); font-weight: 500; line-height: 1.25; letter-spacing: -.005em; white-space: nowrap;
  opacity: 0; visibility: hidden; will-change: transform;
  transition: opacity .55s var(--ease, ease), visibility 0s linear .55s, box-shadow .6s var(--ease, ease); }
.scene.is-active .rz-node.is-on { opacity: 1; visibility: visible; transition: opacity .55s var(--ease, ease), box-shadow .6s var(--ease, ease); }
/* tight frames (row layout that would not fit otherwise): smaller pills, still 14 px text */
.rz-hero.rz-tight .rz-node { font-size: 14px; padding: 3px 8px 3px 7px; gap: 6px; border-radius: 5px; }
.rz-hero.rz-tight .rz-node__dot { width: 6px; height: 6px; }
.rz-node__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / .42); transition: background .5s, box-shadow .5s; }
.rz-node__icon { flex: none; width: 16px; height: 16px; object-fit: contain; }
.rz-node.is-lock { box-shadow: inset 0 0 0 1px rgb(255 150 90 / .62), 0 0 24px -6px rgb(255 127 50 / .6), 0 10px 26px -12px rgb(0 0 0 / .9); }
.rz-node.is-lock .rz-node__dot { background: #FF7F32; box-shadow: 0 0 8px 2px rgb(255 127 50 / .75); }

/* the name under the logo */
.rz-hero__name { position: absolute; left: 0; top: 0; z-index: 2; margin: 0; white-space: nowrap; pointer-events: none;
  font-size: clamp(15px, 1.12vw, 19px); font-weight: 500; line-height: 1.2; letter-spacing: .01em; color: #FFF3E8;
  text-shadow: 0 0 18px rgb(255 127 50 / .6), 0 1px 2px rgb(0 0 0 / .6);
  opacity: 0; visibility: hidden; will-change: transform; transition: opacity .8s var(--ease, ease), visibility 0s linear .8s; }
.scene.is-active .rz-hero__name.is-on { opacity: 1; visibility: visible; transition: opacity .8s var(--ease, ease); }
.rz-hero__name::before { content: ""; position: absolute; inset: -6px -14px; z-index: -1; border-radius: 999px; background: radial-gradient(closest-side, rgb(10 6 5 / .78), rgb(10 6 5 / .5) 62%, rgb(10 6 5 / 0)); }

/* ---------- the text grid ---------- */
.scene .rz-hero__inner { z-index: 1; pointer-events: none;
  padding: calc(var(--rz-top) + 10px) clamp(24px, 6vw, 112px) calc(var(--rz-bot) + 8px);
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr);   /* round 5: the text sits right under the title */
  column-gap: clamp(24px, 3vw, 56px); row-gap: 16px; }
.rz-hero__t { grid-column: 1 / -1; grid-row: 1; align-self: start; max-width: min(100%, 15em); position: relative;
  font-size: clamp(28px, 3.05vw, 50px); line-height: 1.08; letter-spacing: -.028em; font-weight: 500; color: var(--s-fg); text-wrap: balance; }
.rz-hero__side { grid-column: 1; grid-row: 2; align-self: start; width: 100%; display: grid; justify-items: start; gap: clamp(16px, 2.4vh, 26px); }
.rz-hero__copy { display: grid; width: 100%; }
.rz-hero__p { grid-area: 1 / 1; align-self: start; max-width: 27em; font-size: clamp(16px, 1.32vw, 21px); line-height: 1.5; color: rgb(255 244 234 / .88); text-wrap: pretty;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .45s var(--ease, ease), transform .6s var(--ease, ease), visibility 0s linear .45s; }
.scene.is-active .rz-hero__p.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .7s var(--ease, ease) .1s, transform .8s var(--ease, ease) .1s; }

.rz-hero__link { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 20px; box-sizing: border-box;
  border-radius: 4px; background: #fff; color: #111; font-size: 16px; font-weight: 500; letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  box-shadow: 0 14px 34px -14px rgb(255 127 50 / .65); transition: background .25s, color .25s; }
.rz-hero__link:hover { background: #FF7F32; color: #fff; }
.rz-hero__arrow { display: grid; transition: transform .35s var(--ease, ease); }
.rz-hero__link:hover .rz-hero__arrow { transform: translate(2px, -2px); }
.rz-hero__link:focus-visible { outline: 2px solid #FF7F32; outline-offset: 3px; }

/* the figures under the logo, from the data beat on */
.rz-hero__stats { grid-column: 2; grid-row: 2 / 4; justify-self: center; align-self: end; position: relative; display: none; justify-items: center; gap: 10px; text-align: center; max-width: 100%; }
.rz-is-data .rz-hero__stats { display: grid; }
.rz-is-data.rz-stats-live .rz-hero__stats { animation: rz-rise .9s var(--ease, ease) .3s both; }   /* forward step only */
.rz-is-data.rz-stats-live.rz-diving .rz-hero__stats { animation-duration: .6s; animation-delay: 1.2s; }   /* they rise as the camera starts pulling back out of the core, in place by about 1.8 s */
.rz-hero__stats::before { content: ""; position: absolute; inset: -28px -56px -20px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(7 5 6 / .8), rgb(7 5 6 / .55) 55%, rgb(7 5 6 / 0)); }
.rz-hero__nums { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 12px clamp(22px, 2.6vw, 48px); }
.rz-stat { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.rz-stat__v { display: inline-grid; font-size: clamp(30px, 2.75vw, 50px); line-height: 1; letter-spacing: -.03em; font-weight: 500; font-variant-numeric: tabular-nums; color: #fff; opacity: 1;
  text-shadow: 0 0 26px rgb(255 127 50 / .45); }
.rz-stat__v::after { content: attr(data-final); grid-area: 1 / 1; visibility: hidden; }
.rz-stat__v > span { grid-area: 1 / 1; text-align: center; }
.rz-stat__l { font-size: clamp(14px, 1.05vw, 17px); line-height: 1.3; color: #F6E6DA; max-width: 8.5em; text-wrap: balance; }
.rz-hero__src { margin: 0; font-size: 14px; line-height: 1.4; color: #E2CFC2; }
@keyframes rz-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.rz-hero__fallback { position: absolute; left: 0; top: 0; }

/* ---------- compact: short or narrow landscape ---------- */
@media (max-width: 959px), (max-height: 619px) {
  .scene .rz-hero__inner { padding: calc(var(--rz-top) + 6px) clamp(20px, 4vw, 48px) calc(var(--rz-bot) + 4px); grid-template-columns: minmax(0, 50%) minmax(0, 1fr); column-gap: 20px; row-gap: 10px; }
  .rz-hero__t { max-width: min(100%, 13.5em); font-size: clamp(24px, calc(2.4vw + 6px), 34px); line-height: 1.1; letter-spacing: -.022em; }
  .rz-hero__p { font-size: 15px; line-height: 1.45; }
  .rz-hero__side { gap: 12px; }
  .rz-hero__link { height: 38px; padding: 0 14px 0 16px; font-size: 15px; gap: 8px; }
  .rz-stat__v { font-size: clamp(21px, 2.6vw, 30px); }
  .rz-stat__l { font-size: 14px; max-width: 5.6em; }
  .rz-hero__nums { flex-wrap: nowrap; gap: 8px clamp(10px, 1.8vw, 18px); }
  .rz-stat { gap: 4px; }
  .rz-hero__stats { gap: 6px; }
  .rz-node { font-size: 14px; padding: 5px 10px 5px 8px; gap: 7px; }
  .rz-hero__name { font-size: 15px; }
  .rz-hero__scrim { background: linear-gradient(90deg, rgb(7 5 6 / .86) 0%, rgb(7 5 6 / .66) 34%, rgb(7 5 6 / .2) 50%, rgb(7 5 6 / 0) 58%), linear-gradient(180deg, rgb(7 5 6 / .55) 0, rgb(7 5 6 / 0) 26%); }
}
@media (max-height: 400px) and (min-aspect-ratio: 1/1) {
  .rz-hero__p { font-size: 14px; line-height: 1.42; }
  .rz-hero__t { font-size: 24px; }
  .rz-hero__side { gap: 10px; }
  .rz-hero__link { height: 34px; font-size: 14px; }
  .rz-stat__v { font-size: 20px; }
  .rz-stat__l { max-width: 5.2em; }
  .rz-hero__nums { gap: 6px 10px; }
  .rz-hero__src { line-height: 1.25; }
}

/* narrow landscape frames: four figures must still fit one row in the right column */
@media (max-width: 799px) and (orientation: landscape) {
  .rz-hero__stats { min-width: 0; }
  .rz-hero__nums { gap: 6px 9px; }
  .rz-stat__v { font-size: 19px; letter-spacing: -.035em; }
  .rz-stat__l { max-width: 5em; }
  .rz-hero__stats::before { inset: -20px -10px -14px; }
}

/* ---------- phone: portrait, title and text above, the visual below ---------- */
@media (max-width: 759px) and (orientation: portrait) {
  .theme-ryze { background: radial-gradient(90% 60% at 50% 40%, #1d1009 0%, #100907 42%, #070506 76%), #070506; }
  .scene .rz-hero__inner { padding: calc(var(--rz-top) + 10px) 16px calc(var(--rz-bot) + 6px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; row-gap: 12px; }
  .rz-hero__t { grid-column: 1; max-width: 100%; font-size: clamp(22px, 6.4vw, 28px); line-height: 1.14; letter-spacing: -.02em; }
  .rz-hero__stats { grid-column: 1; grid-row: 4; justify-self: stretch; }
  .rz-hero__side { grid-column: 1; grid-row: 2; gap: 12px; }
  .rz-hero__p { font-size: 15px; line-height: 1.45; max-width: none; }
  .rz-hero__nums { flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
  .rz-stat__v { font-size: clamp(20px, 6vw, 26px); }
  .rz-stat__l { font-size: 14px; max-width: 6.2em; }
  .rz-hero__link { height: 38px; font-size: 15px; }
  .rz-hero__scrim { background: linear-gradient(180deg, rgb(7 5 6 / .9) 0, rgb(7 5 6 / .78) 34%, rgb(7 5 6 / 0) 52%), linear-gradient(0deg, rgb(7 5 6 / .75) 0, rgb(7 5 6 / 0) 24%); }
  .rz-hero__stats::before { inset: -18px -16px -12px; }
}

@media (prefers-reduced-motion: reduce) {
  .rz-is-data .rz-hero__stats { animation: none; }
  .rz-mark *, .rz-mark { animation: none !important; }
}

/* ================================================================== ryzeMark */
.rz-mark { --rz-size: 120px; position: relative; display: inline-block; width: var(--rz-size); height: var(--rz-size); flex: none; vertical-align: middle; isolation: isolate; pointer-events: none; }
.rz-mark > i, .rz-mark i { display: block; font-style: normal; }
.rz-mark__halo { position: absolute; inset: -46%; z-index: -2; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 226 190 / .46), rgb(255 140 66 / .3) 32%, rgb(255 110 40 / .1) 62%, rgb(255 110 40 / 0) 100%); }
.rz-mark__dots { position: absolute; inset: -30%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 150 80 / .62) 0 1.1px, transparent 1.6px) 50% 50% / max(5px, calc(var(--rz-size) * .045)) max(5px, calc(var(--rz-size) * .045));
  -webkit-mask: radial-gradient(closest-side, #000 34%, rgb(0 0 0 / .45) 62%, transparent 100%); mask: radial-gradient(closest-side, #000 34%, rgb(0 0 0 / .45) 62%, transparent 100%); }
.rz-mark__turn { position: absolute; inset: 0; }
.rz-mark__glow { position: absolute; inset: 0; filter: blur(calc(var(--rz-size) * .055)); opacity: .95; }
.rz-mark__shape, .rz-mark__body { position: absolute; inset: 0;
  -webkit-mask: url(../assets/brand/main-logo-sun-2.png) center / contain no-repeat; mask: url(../assets/brand/main-logo-sun-2.png) center / contain no-repeat; }
.rz-mark__shape { background: #FF7F32; }
.rz-mark__body { background: radial-gradient(circle at 50% 50%, #FFF9F1 0 11%, #FFE6CB 21%, #FFB878 36%, #FF8E40 54%, #FF7F32 72%, #FF7429 100%); }
.rz-mark--light .rz-mark__halo { background: radial-gradient(closest-side, rgb(255 160 100 / .3), rgb(255 127 50 / .14) 40%, rgb(255 127 50 / 0) 100%); }
.rz-mark--light .rz-mark__dots { background-image: radial-gradient(circle, rgb(255 127 50 / .5) 0 1.1px, transparent 1.6px); }
.rz-mark--light .rz-mark__glow { opacity: .55; }
.rz-mark--light .rz-mark__body { background: radial-gradient(circle at 50% 50%, #FFC08E 0 12%, #FF9550 34%, #FF7F32 58%, #F26C20 100%); }
.rz-mark--spin .rz-mark__turn { animation: rz-mark-turn 64s linear infinite; }
.rz-mark--glow .rz-mark__halo { animation: rz-mark-breathe 5.4s ease-in-out infinite; }
.rz-mark--glow .rz-mark__glow { animation: rz-mark-glow 5.4s ease-in-out infinite; }
@keyframes rz-mark-turn { to { transform: rotate(360deg); } }
@keyframes rz-mark-breathe { 50% { transform: scale(1.06); opacity: .86; } }
@keyframes rz-mark-glow { 50% { opacity: .75; } }

/* Once the scene is no longer active, hide the hero text at once: the delayed visibility fade must not leave it over the next slide */
.scene:not(.is-active) .rz-node, .scene:not(.is-active) .rz-hero__name, .scene:not(.is-active) .rz-hero__p { transition: none; }
