/* ==========================================================================
   Ítrio Digital v3 — Home
   Abertura cinematográfica com campo vivo, deck na segunda dobra e
   acabamento mais autoral (menos "cara de código").
   ========================================================================== */
.v3-home {
  --v3-ink: #f6efff;
  --v3-muted: rgba(232, 220, 248, 0.68);
  --v3-violet: #a463ff;
  --v3-violet-deep: #8333f5;
  --v3-cyan: #83fff7;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  background: #0d0714;
  overflow-x: clip;
}
.v3-home main > section { overflow-x: clip; }
.v3-home .st-progress-track { height: 2px; }

/* ---------- ABERTURA ---------- */
.v3-hero { position: relative; background: #0d0714; }
.v3-hero__track { position: relative; height: 250svh; }
.v3-hero__sticky {
  --hx: 0;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.v3-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.v3-hero__vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 42%, rgba(131, 51, 245, 0.18) 0%, transparent 70%),
    radial-gradient(120% 80% at 50% 50%, transparent 55%, rgba(8, 4, 13, 0.85) 100%),
    linear-gradient(180deg, rgba(13, 7, 20, 0) 70%, #120a1f 100%);
}
.v3-hero__sticky > *:not(.v3-field):not(.v3-hero__vignette) { grid-area: 1 / 1; }

.v3-hero__kicker {
  --t: 1;
  align-self: start;
  margin: max(118px, 15svh) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 600 12px/1.4 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--v3-muted);
  text-align: center;
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * -16px), 0);
  animation: v3FadeDown 1.2s 0.9s var(--ease-out) both;
}
.v3-hero__kicker span { width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--v3-violet)); }
@keyframes v3FadeDown { from { opacity: 0; translate: 0 -12px; } }

.v3-hero__logo {
  --glow: 1;
  position: relative;
  width: min(560px, 62vw);
  will-change: transform;
  transform-origin: 50% 50%;
}
.v3-hero__logo .st-logo-svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 30px 60px rgba(131, 51, 245, calc(0.45 * var(--glow)))); }
.v3-hero__halo {
  position: absolute;
  inset: -40% -30%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(164, 99, 255, calc(0.32 * var(--glow))), transparent 70%);
  filter: blur(20px);
  animation: v3Breathe 6s ease-in-out infinite;
}
@keyframes v3Breathe { 50% { transform: scale(1.08); opacity: 0.8; } }

.v3-hero__title {
  margin: 4vh 0 0;
  padding: 0 20px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(38px, 6.4vw, 104px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--v3-ink);
  transform: translate3d(0, calc(var(--hx) * -60px), 0);
  opacity: calc(1 - var(--hx) * 0.7);
}
.v3-line { display: block; }
.v3-w {
  --t: 0;
  display: inline-block;
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 0.6em), 0) rotate(calc((1 - var(--t)) * 7deg));
  filter: blur(calc((1 - var(--t)) * 12px));
  transform-origin: 0 100%;
}
.v3-line--accent .v3-w {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.035em;
  background: linear-gradient(120deg, #ffffff 0%, #d8b9ff 35%, #a463ff 70%, #83fff7 110%);
  background-size: 200% 100%;
  background-position: calc(100% - var(--t) * 100%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.04em;
}

.v3-pillars {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  gap: clamp(14px, 2vw, 28px);
  margin: 0 0 max(120px, 15svh);
  padding: 0 20px;
  list-style: none;
  transform: translate3d(0, calc(var(--hx) * -40px), 0);
  opacity: calc(1 - var(--hx) * 0.8);
}
.v3-pillar {
  --t: 0;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 18px 18px 18px 16px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(40, 22, 66, 0.62), rgba(18, 10, 31, 0.55));
  border: 1px solid rgba(197, 152, 239, 0.16);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 40px), 0) scale(calc(0.94 + var(--t) * 0.06));
}
.v3-pillar::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(164, 99, 255, 0.7), transparent 40%, transparent 70%, rgba(131, 255, 247, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.v3-pillar__glyph {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  fill: none;
  stroke: #d8b9ff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.v3-pillar__glyph * { stroke-dasharray: 160; stroke-dashoffset: calc(160 - var(--t) * 160); }
.v3-pillar__n { position: absolute; top: 12px; right: 14px; font: 600 11px/1 var(--font-heading); letter-spacing: 0.1em; color: rgba(197, 152, 239, 0.6); }
.v3-pillar strong { font: 600 15px/1.25 var(--font-heading); color: #fff; letter-spacing: -0.01em; padding-right: 22px; }
.v3-pillar small { font: 500 12.5px/1.45 var(--font-body); color: var(--v3-muted); margin-top: 4px; }

.v3-hero__foot {
  --t: 0;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: max(44px, 6svh);
  opacity: calc(var(--t) * (1 - var(--hx)));
  transform: translate3d(0, calc((1 - var(--t)) * 20px), 0);
  pointer-events: none;
}
.v3-hero__foot.is-live { pointer-events: auto; }
.v3-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #9a55ff, #6f21e6);
  color: #fff;
  font: 700 14px/1 var(--font-body);
  text-decoration: none;
  box-shadow: 0 18px 40px -14px rgba(131, 51, 245, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}
.v3-cta svg { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease-out); }
.v3-cta:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 24px 50px -14px rgba(131, 51, 245, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.v3-cta:hover svg { transform: translateY(3px); }
.v3-link { color: var(--v3-muted); font: 600 13.5px/1 var(--font-body); text-decoration: none; border-bottom: 1px solid rgba(197, 152, 239, 0.35); padding-bottom: 3px; }
.v3-link:hover { color: #fff; text-decoration: none; border-color: #fff; }

.v3-hero__cue {
  --t: 1;
  align-self: end;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font: 600 10.5px/1 var(--font-body);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(232, 220, 248, 0.6);
  opacity: var(--t);
  animation: v3FadeUp 1s 1.6s var(--ease-out) both;
}
.v3-hero__cue i { width: 1px; height: 44px; background: linear-gradient(#c598ef, transparent); transform-origin: top; animation: v3Cue 1.9s var(--ease-out) infinite; }
@keyframes v3Cue { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { opacity: 0; } }
@keyframes v3FadeUp { from { opacity: 0; translate: 0 12px; } }

/* ---------- DECK (2ª dobra) ---------- */
.v3-home .st-morph-section {
  border-top: 0;
  background:
    radial-gradient(70% 55% at calc(70% + var(--deck-p, 0) * 20%) calc(10% + var(--deck-p, 0) * 30%), rgba(131, 51, 245, 0.24) 0%, transparent 60%),
    radial-gradient(60% 50% at calc(18% - var(--deck-p, 0) * 10%) 86%, rgba(58, 184, 205, 0.14) 0%, transparent 58%),
    linear-gradient(180deg, #120a1f 0%, #170d28 52%, #0e0816 100%);
}
.v3-home .st-morph-pin-height { height: 300svh; }
.v3-home .st-morph-topbar { padding-top: max(96px, 12svh); }
.v3-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px; font: 600 11px/1 var(--font-body); letter-spacing: 0.22em; text-transform: uppercase; color: #c598ef; }
.v3-eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.v3-home .st-morph-heading h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: -0.04em; }
.v3-deck-hint { max-width: 52ch; }
.v3-hint-touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .v3-hint-desk { display: none; }
  .v3-hint-touch { display: inline; }
}
.v3-home .st-mode-tabs { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
.v3-home .st-mode-tab { font-size: 12.5px; letter-spacing: 0.01em; }
.v3-home .st-mode-tab.is-active { background: #fff; color: #1b0f2c; }
.v3-home .st-filter-select { background-color: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.14); }

.v3-home .st-cards-stage { touch-action: pan-y; }
.v3-home .wheel-card-wrapper { transition: filter 0.4s ease; }

.v3-home .st-deck-arrow { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.16); transition: background 0.25s ease, transform 0.3s var(--ease-out); }
.v3-home .st-deck-arrow:hover { background: rgba(255, 255, 255, 0.14); transform: scale(1.06); }
.v3-home .st-deck-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v3-home .st-focused-readout { background: rgba(16, 9, 27, 0.72); border-color: rgba(255, 255, 255, 0.1); }
.v3-counter { font: 600 15px/1 var(--font-heading); letter-spacing: 0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.v3-counter i { font-style: normal; color: rgba(197, 152, 239, 0.65); font-weight: 500; }
.v3-home .st-focused-readout__sub { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(197, 152, 239, 0.8); }
.v3-home .st-focused-readout__cta { gap: 8px; padding: 9px 12px 9px 16px; background: #fff; color: #1b0f2c; }
.v3-home .st-focused-readout__cta:hover { background: #ecdcff; }
.v3-home .st-focused-readout__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Card do Renato: o retrato em traço aparece nítido no rosto do card */
.wheel-card--portrait .wheel-card__icon { top: 57%; width: 100%; }
.wheel-card--portrait .wheel-card__icon-refl {
  opacity: 1;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, calc(var(--active, 0) * 0.55)) 0%, transparent 45%),
    linear-gradient(170deg, #1a1a8a 0%, #00005e 55%, #000040 100%);
}
.wheel-card--portrait .wheel-card__icon-holo { opacity: calc(var(--active, 0) * 0.55); mix-blend-mode: color-dodge; }
.wheel-card--portrait:hover .wheel-card__icon-refl { opacity: 1; }

/* ---------- acabamento das demais dobras ---------- */
.v3-home .st-section-eyebrow { letter-spacing: 0.2em; font-weight: 600; gap: 10px; }
.v3-home .st-section-eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: 0.8; }
.v3-home .st-svg-orb,
.v3-home .st-cap-icon-shell {
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  width: auto;
  height: auto;
  color: #d8b9ff;
}
.v3-home .st-svg-orb svg { width: 26px; height: 26px; stroke-width: 1.4; }
.v3-home .st-cap-icon-shell svg { width: 40px; height: 40px; stroke-width: 1.3; }
.v3-home .st-cap-icon-shell { position: relative; padding: 0 0 14px; }
.v3-home .st-cap-icon-shell::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #a463ff, #83fff7); }
.v3-dice-glyph {
  width: 52px !important;
  height: 52px !important;
  border-radius: 0 !important;
  background: none !important;
  border: 0 !important;
  font: 700 46px/1 var(--font-display) !important;
  font-style: italic !important;
  color: transparent !important;
  -webkit-text-stroke: 1.2px rgba(216, 185, 255, 0.75);
  transition: color 0.3s ease, -webkit-text-stroke-color 0.3s ease;
}
.v3-home .st-dice-step-btn.is-active .v3-dice-glyph { color: #c598ef !important; -webkit-text-stroke-color: transparent; text-shadow: 0 0 24px rgba(164, 99, 255, 0.55); }
.v3-home .st-dice-badge { text-transform: none; letter-spacing: 0.04em; }

/* ---------- celular ---------- */
@media (max-width: 767px) {
  .v3-hero__track { height: 230svh; }
  .v3-hero__kicker { margin-top: 100px; padding: 0 28px; font-size: 10.5px; letter-spacing: 0.18em; line-height: 1.6; }
  .v3-hero__kicker span { display: none; }
  .v3-hero__logo { width: min(330px, 80vw); }
  .v3-hero__title { margin-top: 0; font-size: clamp(36px, 11vw, 52px); translate: 0 -2svh; }
  .v3-pillars { grid-template-columns: 1fr; gap: 8px; width: 100%; max-width: 420px; margin-bottom: max(112px, 15svh); }
  .v3-pillar { padding: 12px 14px; border-radius: 16px; }
  .v3-pillar small { display: none; }
  .v3-pillar__glyph { width: 30px; height: 30px; grid-row: auto; }
  .v3-pillar strong { font-size: 14px; }
  .v3-pillar__n { top: 50%; translate: 0 -50%; }
  .v3-hero__foot { flex-direction: column; gap: 14px; margin-bottom: 34px; }
  .v3-home .st-morph-pin-height { height: 280svh; }
  .v3-home .st-morph-topbar { padding-top: 84px; }
  .v3-home .st-morph-heading p { font-size: 12.5px; }
  .v3-home .st-focused-readout { border-radius: 22px; padding: 10px 12px 10px 16px; }
  .v3-home .st-focused-readout__sub { display: none; }
}
@media (max-height: 700px) and (min-width: 768px) {
  .v3-pillar small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-hero__track { height: auto; }
  .v3-hero__sticky { position: relative; min-height: 100svh; height: auto; }
}
