/* =========================================================
   HERO V4 — Calm 3D EQTY phone with halo light + kinetic text.
   ========================================================= */

/* ---------- Container ---------- */
.hv2 {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-items: center;
  padding: 88px var(--pad) 48px;
  background:
    var(--bg)
    url("assets/Backgrounds/HeroBG.png")
    center center / cover
    no-repeat;
  color: var(--fg);
}
.hv2 .hero__glow, .hv2 .hero__grid, .hv2 .hero__noise, .hv2 .hero__mark { display: none; }
.hv2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 220px;
  background: linear-gradient(to bottom, transparent, #12161C);
  pointer-events: none;
  z-index: 2;
}

/* ---------- Ambient layer ---------- */
.hv2-amb { display: none; }
.hv2-amb__glow {
  position: absolute;
  left: 65%; top: 50%;
  width: 1100px; height: 1100px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(34% 34% at 50% 50%, rgba(255,213,0,.14), transparent 70%),
    radial-gradient(60% 60% at 50% 50%, rgba(80,120,180,.05), transparent 70%);
  filter: blur(24px);
  animation: hv2-glow 14s ease-in-out infinite;
}
@keyframes hv2-glow {
  0%, 100% { opacity: .9; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;  transform: translate(-50%, -50%) scale(1.07); }
}
.hv2-amb__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 65% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 65% 50%, black 0%, transparent 70%);
}
.hv2-amb__mark {
  position: absolute;
  right: -16%; top: 50%;
  width: 70%;
  transform: translateY(-50%);
  color: rgba(242,244,246,.022);
  pointer-events: none;
  animation: hv2-markSpin 90s linear infinite;
  transform-origin: 50% 50%;
}
.hv2-amb__mark svg { width: 100%; height: auto; }
@keyframes hv2-markSpin {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

/* ---------- Grid layout ---------- */
.hv2-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hv2-grid {
    grid-template-columns: minmax(380px, 5fr) minmax(420px, 7fr);
    gap: 40px;
    align-items: start;
  }
}
@media (min-width: 1400px) { .hv2-grid { gap: 80px; } }

/* ====== LEFT: content with kinetic effects ====== */
.hv2-content {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 24px;
  text-align: left;
  max-width: 580px;
}

@media (min-width: 1024px) {
  .hv2-content {
    align-self: start;
    padding-top: 0;
  }
}

/* Eyebrow with cursor */
.hv2-eyebrow {
  font-family: var(--mono, ui-monospace, 'SF Mono', Menlo, monospace);
  display: inline-flex; align-items: center; gap: 10px;
}
.hv2-eye-text {
  position: relative;
  display: inline-block;
}
.hv2-eye-text::after {
  display: none;
}
@keyframes hv2-caret { 50% { opacity: 0; } }

/* Headline */
.hv2-h {
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--t-h1) !important;
  line-height: var(--t-h1-lh);
  letter-spacing: var(--t-h1-ls);
  margin: 4px 0 0 !important;
  text-wrap: balance;
  transform-style: preserve-3d;
}
.hv2-h em { font-style: italic; color: var(--accent); }

/* Line wrapper inside (the original .hero__line > span carries the y-translate reveal) */
.hv2-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .28em;
}

/* Per-word parallax. --d is depth (0..40 ish).
   JS sets --tmx and --tmy globally on .hv2-content, each word translates
   by (tmx * d) px / (tmy * d * 0.7) px. */
.hv2-w {
  display: inline-block;
}

/* Italic accent word — also gets a soft yellow glow that breathes */
.hv2-em {
  position: relative;
  text-shadow: 0 0 22px rgba(255,213,0,.35);
  animation: emBreath 4s ease-in-out infinite;
}
@keyframes emBreath {
  0%, 100% { text-shadow: 0 0 18px rgba(255,213,0,.3); }
  50%       { text-shadow: 0 0 36px rgba(255,213,0,.6), 0 0 60px rgba(255,213,0,.2); }
}
.hv2-em::after {
  display: none;
}
@keyframes hv2-emLine {
  0%, 100% { transform: scaleX(0); opacity: .0; }
  20%      { transform: scaleX(1); opacity: 1; }
  80%      { transform: scaleX(1); opacity: 1; }
  90%      { transform: scaleX(1) translateX(100%); opacity: 0; }
}

/* Sub paragraph — gets parallax too via --d */
.hv2-sub {
  font-family: var(--sans);
  font-size: var(--t-bodyL);
  font-weight: 300;
  line-height: var(--t-bodyL-lh);
  max-width: 460px;
  color: var(--fg-dim);
  margin-top: 8px;
}
.hv2-cta { margin-top: 8px; justify-content: flex-start; }

/* ====== RIGHT: 3D scene ====== */
.hv2-scene {
  position: relative;
  height: clamp(480px, 66vh, 760px);
  perspective: 1800px;
  perspective-origin: 50% 50%;
  width: 100%;
  pointer-events: auto;
}
@media (max-width: 1023px) { .hv2-scene { height: clamp(500px, 60vh, 680px); } }
@media (max-width: 640px)  { .hv2-scene { height: 580px; } }

.hv2-world {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.hv2-artwork {
  position: relative;
  width: min(100%, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hv2-artwork::before {
  content: "";
  position: absolute;
  inset: 14% 8% 10%;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 213, 0, 0.16), transparent 40%),
    radial-gradient(circle at 55% 60%, rgba(17, 25, 40, 0.55), transparent 68%);
  pointer-events: none;
}

.hv2-artwork img {
  display: block;
  width: min(100%, 620px);
  height: auto;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 32px 48px rgba(0, 0, 0, 0.38));
}

@media (max-width: 1023px) {
  .hv2-artwork {
    width: min(100%, 640px);
  }

  .hv2-artwork img {
    width: min(100%, 540px);
  }
}

@media (max-width: 640px) {
  .hv2-artwork {
    width: min(100%, 460px);
  }

  .hv2-artwork img {
    width: min(100%, 390px);
  }
}

/* ---------- Floor reflection ---------- */
.hv2-floor {
  position: absolute;
  left: 50%; top: 50%;
  width: 540px; height: 90px;
  transform: translate(-50%, calc(-50% + 320px)) rotateX(70deg);
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,213,0,.16), transparent 65%);
  filter: blur(14px);
  pointer-events: none;
  animation: hv2-floor 6s ease-in-out infinite;
}
@keyframes hv2-floor {
  0%, 100% { opacity: .85; }
  50%      { opacity: 1; }
}

/* ====== HALO ELEMENTS around the phone ====== */
.hv2-halo {
  position: absolute;
  top: 50%; left: 50%;
  pointer-events: none;
}

/* A faint yellow ring orbiting behind the phone */
.hv2-halo--ring {
  width: 560px; height: 560px;
  border: 1px solid rgba(255,213,0,.18);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, -120px) rotateX(70deg);
  box-shadow: 0 0 60px rgba(255,213,0,.06) inset;
}
.hv2-halo--ring::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 1px dashed rgba(255,213,0,.18);
  border-radius: 50%;
  animation: hv2-ringSpin 28s linear infinite;
}
@keyframes hv2-ringSpin {
  to { transform: rotate(360deg); }
}

/* A second, larger, tilted ring */
.hv2-halo--ring2 {
  width: 720px; height: 720px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, -180px) rotateX(72deg) rotateZ(28deg);
}
.hv2-halo--ring2::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,213,0,.10);
  border-radius: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  animation: hv2-ringSpin 40s linear infinite reverse;
}

/* A bright "satellite" orb that orbits the phone */
.hv2-halo--orb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 14px rgba(255,213,0,.9),
    0 0 40px rgba(255,213,0,.5),
    0 0 80px rgba(255,213,0,.3);
  transform-origin: 50% 50%;
  animation: hv2-orbSpin 18s linear infinite;
}
@keyframes hv2-orbSpin {
  0%   { transform: translate3d(-50%, -50%, -120px) rotateY(0deg)   translateX(280px); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translate3d(-50%, -50%, -120px) rotateY(180deg) translateX(280px); opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate3d(-50%, -50%, -120px) rotateY(360deg) translateX(280px); opacity: 0; }
}

/* A soft vertical beam of light kissing the phone from above */
.hv2-halo--beam {
  width: 540px; height: 90%;
  transform: translate3d(-50%, -50%, -160px);
  background:
    radial-gradient(50% 100% at 50% 0%, rgba(255,213,0,.18) 0%, transparent 60%),
    radial-gradient(50% 100% at 50% 100%, rgba(255,213,0,.06) 0%, transparent 60%);
  filter: blur(20px);
  opacity: .8;
  mix-blend-mode: screen;
}

/* ====== PHONE ====== */
.hv2-phone-wrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate3d(-50%, -50%, 0);
  transform-style: preserve-3d;
  --mx: 0px;
  --my: 0px;
}
.hv2-phone {
  position: relative;
  width: 320px;
  height: 640px;
  transform-style: preserve-3d;
  transform: translate3d(calc(var(--mx) * 0.15), calc(var(--my) * 0.1), 60px) rotateY(-6deg) rotateX(2deg);
  animation: hv2-phoneBreath 11s ease-in-out infinite;
  filter: drop-shadow(0 50px 70px rgba(0,0,0,.6)) drop-shadow(0 0 80px rgba(255,213,0,.12));
}
@media (max-width: 1023px) { .hv2-phone { width: 280px; height: 560px; } }
@media (max-width: 640px)  { .hv2-phone { width: 240px; height: 480px; } }

@keyframes hv2-phoneBreath {
  0%, 100% { transform: translate3d(calc(var(--mx) * 0.15), calc(var(--my) * 0.1 - 5px), 60px) rotateY(-6deg) rotateX(2deg); }
  50%      { transform: translate3d(calc(var(--mx) * 0.15), calc(var(--my) * 0.1 + 5px), 60px) rotateY(2deg)  rotateX(-1deg); }
}

.hv2-phone__shell {
  position: absolute; inset: 0;
  border-radius: 42px;
  background:
    linear-gradient(170deg, #232b37 0%, #0e1218 100%);
  padding: 10px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    inset 0 2px 0 rgba(255,255,255,.08),
    inset 0 -3px 0 rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.6),
    0 30px 60px rgba(0,0,0,.5);
  transform-style: preserve-3d;
}

/* Glass reflection on the phone */
.hv2-phone__shell::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 42px;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, transparent 30%, transparent 70%, rgba(255,255,255,.04) 100%);
  pointer-events: none;
  mix-blend-mode: screen;
}

.hv2-phone__notch {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 24px;
  background: #0a0d12;
  border-radius: 0 0 16px 16px;
  z-index: 4;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.06);
}
.hv2-phone__home {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 999px;
  z-index: 4;
}
.hv2-phone__screen {
  position: absolute; inset: 10px;
  background: #12161C;
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--fg);
  font-size: var(--t-eyebrow);
  transform-style: preserve-3d;
}

/* The screen content gets a subtle internal depth via mouse tilt */
.hv2-phone__screen {
  --smx: 0;
  --smy: 0;
}
.hv2-phone__screen > * {
  position: relative;
}

/* Status bar — pops out slightly */
.hv2-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px 8px;
  font-size: var(--t-eyebrow); letter-spacing: .04em;
  color: rgba(242,244,246,.7);
  transform: translate3d(calc(var(--smx) * 4px), calc(var(--smy) * 3px), 12px);
}
.hv2-status__dots { display: inline-flex; gap: 2px; }
.hv2-status__dots i { width: 3px; height: 3px; border-radius: 50%; background: rgba(242,244,246,.6); display: block; }

/* Screen stack */
.hv2-stack {
  flex: 1;
  position: relative;
  transform-style: preserve-3d;
  perspective: 800px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  transform: translate3d(calc(var(--smx) * 6px), calc(var(--smy) * 4px), 6px);
}

.hv2-s {
  position: absolute; inset: 0;
  padding: 10px 16px 14px;
  display: flex; flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: rotateY(70deg) translateZ(120px) scale(.9);
  transform-origin: 50% 50%;
  transition:
    opacity .9s cubic-bezier(.2,.7,.2,1),
    transform 1.1s cubic-bezier(.7,.05,.2,1);
  pointer-events: none;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}
.hv2-s.is-on {
  opacity: 1;
  transform: rotateY(0deg) translateZ(0) scale(1);
}
.hv2-s.is-out {
  opacity: 0;
  transform: rotateY(-70deg) translateZ(140px) scale(.9);
}

/* The single "hero card" inside any screen lifts out toward viewer */
.hv2-bigcard {
  margin-top: 4px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,213,0,.10) 0%, rgba(255,213,0,0) 60%),
    rgba(255,255,255,.04);
  border: 1px solid rgba(255,213,0,.22);
  border-radius: 14px;
  display: grid; gap: 8px;
  /* Float forward */
  transform: translate3d(0, 0, 18px);
}

/* Screen building blocks */
.hv2-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 2px 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: var(--t-eyebrow);
}
.hv2-head__chev { color: var(--accent); font-size: var(--t-body); }
.hv2-head__title { font-family: var(--serif); font-weight: 700; font-size: var(--t-eyebrow); letter-spacing: .02em; }
.hv2-head__prof { color: #B4BCC6; }

.hv2-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,.04);
  border-radius: 999px; padding: 3px;
  font-size: var(--t-eyebrow);
}
.hv2-tabs span {
  flex: 1; text-align: center; padding: 6px 10px;
  color: #B4BCC6; border-radius: 999px;
}
.hv2-tabs span.on { background: var(--accent); color: #111317; font-weight: 600; }

.hv2-theme {
  font-family: var(--mono, ui-monospace, 'SF Mono', Menlo, monospace);
  font-size: var(--t-eyebrow); letter-spacing: .25em;
  color: rgba(242,244,246,.45);
  margin-top: 4px;
}
.hv2-row {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 8px;
  background: rgba(255,255,255,.025);
  border-radius: 10px;
}
.hv2-row span.dotY, .hv2-row span.dotB {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.hv2-row span.dotY { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.hv2-row span.dotB { background: transparent; border: 1px solid #6F7782; }
.hv2-row b { display: block; font-size: var(--t-eyebrow); font-weight: 600; }
.hv2-row i { font-style: normal; font-size: var(--t-eyebrow); color: rgba(242,244,246,.5); }
.hv2-row--mini { padding: 7px; }
.hv2-row--mini b { font-size: var(--t-eyebrow); }

.hv2-bigcard__step {
  font-family: var(--mono, ui-monospace, 'SF Mono', Menlo, monospace);
  font-size: var(--t-eyebrow); letter-spacing: .25em; color: var(--accent);
}
.hv2-bigcard__h {
  font-family: var(--serif); font-weight: 700;
  font-size: var(--t-bodyL); line-height: 1.15; letter-spacing: -.01em;
}
.hv2-bigcard__p {
  font-size: var(--t-eyebrow); line-height: 1.45;
  color: rgba(242,244,246,.65);
}
.hv2-bigcard__cta { font-size: var(--t-eyebrow); color: var(--accent); margin-top: 2px; }
.hv2-bigcard__field {
  font-size: var(--t-eyebrow); color: rgba(242,244,246,.4);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  min-height: 52px;
}
.hv2-bigcard--ref { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.08); }

.hv2-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.hv2-pills span {
  font-size: var(--t-eyebrow); padding: 6px 10px;
  border: 1px solid #6F7782; border-radius: 999px;
  color: #B4BCC6;
}
.hv2-pills span.on { color: var(--accent); border-color: var(--accent); }

.hv2-saveBtn {
  align-self: flex-start;
  margin-top: 4px;
  background: var(--accent); color: #111317;
  border-radius: 999px; padding: 9px 14px;
  font-size: var(--t-eyebrow); font-weight: 600;
  transform: translate3d(0, 0, 14px);
}

.hv2-search {
  font-size: var(--t-eyebrow);
  color: rgba(242,244,246,.55);
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 9px 12px;
}
.hv2-glos { display: grid; gap: 8px; margin-top: 4px; }
.hv2-glos__tag {
  font-family: var(--mono, ui-monospace, 'SF Mono', Menlo, monospace);
  font-size: var(--t-eyebrow); letter-spacing: .25em; color: var(--accent);
  margin-top: 4px;
}
.hv2-glos__term {
  font-family: var(--serif); font-weight: 700;
  font-size: var(--t-h3); line-height: 1.05; letter-spacing: -.01em;
}
.hv2-glos__def { font-size: var(--t-eyebrow); line-height: 1.45; color: rgba(242,244,246,.6); }

.hv2-done {
  flex: 1; display: grid; place-content: center;
  justify-items: center; text-align: center; gap: 12px;
  padding: 16px;
  transform: translate3d(0, 0, 14px);
}
.hv2-done__check {
  width: 60px; height: 60px;
  background: var(--accent); border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 0 30px rgba(255,213,0,.4);
}
.hv2-done h3 { font-family: var(--serif); font-weight: 700; font-size: var(--t-h3); letter-spacing: -.01em; }
.hv2-done p { font-size: var(--t-eyebrow); color: rgba(242,244,246,.6); max-width: 200px; line-height: 1.45; }

.hv2-nav {
  display: flex; justify-content: space-around;
  padding: 10px 0 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: var(--t-eyebrow);
  color: #6F7782;
  transform: translate3d(calc(var(--smx) * 4px), calc(var(--smy) * 2px), 12px);
}
.hv2-nav__i.on { color: var(--accent); }

/* ---------- Scroll cue ---------- */
.hv2-scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono, ui-monospace, 'SF Mono', Menlo, monospace);
  font-size: var(--t-eyebrow);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 3;
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hv2-phone, .hv2-amb__glow, .hv2-floor, .hv2-amb__mark,
  .hv2-halo--ring::before, .hv2-halo--ring2::before, .hv2-halo--orb,
  .hv2-em::after {
    animation: none !important;
  }
  .hv2-s { transition: opacity .25s linear !important; }
  .hv2-w, .hv2-sub { transform: none !important; }
}

/* ---------- Layout safety: tighter wrap on smaller screens ---------- */
@media (max-width: 1023px) {
  .hv2 { padding-top: 120px; }
  .hv2-content { max-width: 100%; }
}
