/**
 * V7 hero orb — from earnsway-v7-fixed.html. Used on marketing landing only (.es-land-v7).
 */

.es-land-v7 .es7-dot {
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
  animation: es7-pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes es7-pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.6);
  }
}

.es-land-v7 .es7-dash-hero {
  min-height: calc(100svh - var(--nh, 60px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 40px 8px 32px;
  position: relative;
  overflow: hidden;
  gap: 20px;
  margin-bottom: 0;
}

.es-land-v7 .es7-dash-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(30, 40, 64, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 40, 64, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 0%, transparent 100%);
}

.es-land-v7 .es7-hero-glow {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: min(520px, 90vw);
  height: min(520px, 90vw);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(0, 200, 150, 0.08) 0%, transparent 65%);
}

.es-land-v7 .es7-h-copy {
  position: relative;
  z-index: 2;
}

.es-land-v7 .es7-h-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--p-dim);
  border: 1px solid rgba(0, 200, 150, 0.22);
  border-radius: var(--pill);
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.es-land-v7 .es7-dash-hero h1 {
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.045em;
  margin-bottom: 16px;
  color: var(--t1);
}

.es-land-v7 .es7-dash-hero h1 em {
  font-style: italic;
  font-family: "Playfair Display", Georgia, serif;
  color: var(--primary);
  font-weight: 700;
}

.es-land-v7 .es7-hero-sub {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--t2);
  line-height: 1.75;
  max-width: 420px;
  margin-bottom: 22px;
}

.es-land-v7 .es7-h-acts {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.es-land-v7 .es7-h-cta {
  font-size: 15px;
  font-weight: 700;
  padding: 12px 22px;
}

.es-land-v7 .es7-h-ghost {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
}

.es-land-v7 .es7-h-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--t3);
  flex-wrap: wrap;
}

.es-land-v7 .es7-h-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.es-land-v7 .es7-h-trust-item svg {
  flex-shrink: 0;
}

.es-land-v7 .es7-h-trust-div {
  width: 1px;
  height: 12px;
  background: var(--border2);
}

/* ─── ORB ASSEMBLY (one-time build animation) ─── */

/* SVG ring draw — initially invisible */
.es-land-v7 .es7-orb-svg {
  position: absolute;
  inset: -45%;
  width: 190%;
  height: 190%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.es-land-v7 .es7-ring-path {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 0 2000;
}

.es-land-v7 .es7-rp1 { stroke: rgba(0,200,150,.6);  stroke-width: 1.8; }
.es-land-v7 .es7-rp2 { stroke: rgba(0,150,220,.45); stroke-width: 1.5; }
.es-land-v7 .es7-rp3 { stroke: rgba(0,200,150,.3);  stroke-width: 1.5; }

/* Sphere and ES: hidden until JS assembly reveals them */
.es-land-v7 .es7-orb-sphere {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34,1.56,0.64,1);
}
.es-land-v7 .es7-orb-sphere.es7-show {
  opacity: 1;
  transform: scale(1);
}

.es-land-v7 .es7-orb-es {
  opacity: 0;
  transform: scale(0.4) rotate(-15deg);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.34,1.56,0.64,1);
}
.es-land-v7 .es7-orb-es.es7-show {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  /* After assembly, JS manages scale via the `transform` property directly */
  transition: none;
}

/* Spinning rings: hidden until assembly completes */
.es-land-v7 .es7-orb-ring {
  opacity: 0;
  transition: opacity 0.5s;
}
.es-land-v7 .es7-orb-ring.es7-show { opacity: 1; }

/* Tags: hidden until orb is built */
.es-land-v7 .es7-orb-tag {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.es-land-v7 .es7-orb-tag.es7-show { opacity: 1; }

/* ─── ORB ─── */
.es-land-v7 .es7-h-orb-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 8px;
}

.es-land-v7 .es7-orb-scene {
  position: relative;
  width: min(420px, 44vw);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: default;
}

.es-land-v7 .es7-orb-sphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, rgba(0, 220, 160, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 68% 70%, rgba(0, 140, 200, 0.12) 0%, transparent 36%),
    radial-gradient(circle at 50% 50%, #0d1c2c 0%, #07090d 100%);
  border: 1px solid rgba(0, 200, 150, 0.16);
  box-shadow: 0 0 70px rgba(0, 200, 150, 0.09), 0 0 160px rgba(0, 200, 150, 0.04),
    inset 0 1px 0 rgba(0, 200, 150, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  will-change: background, box-shadow;
}

.es-land-v7 .es7-orb-es {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(54px, 11vw, 108px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(0, 200, 150, 0.88);
  text-shadow: 0 0 40px rgba(0, 200, 150, 0.45), 0 0 90px rgba(0, 200, 150, 0.18);
  user-select: none;
  pointer-events: none;
  will-change: transform, text-shadow;
  transform-origin: center center;
}

.es-land-v7 .es7-orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid transparent;
  pointer-events: none;
}

.es-land-v7 .es7-orb-ring.es7-r1 {
  inset: -13%;
  border-top-color: rgba(0, 200, 150, 0.5);
  border-right-color: rgba(0, 200, 150, 0.18);
  animation: es7-rs1 calc(var(--ring-spd, 1) * 14s) linear infinite;
}

.es-land-v7 .es7-orb-ring.es7-r2 {
  inset: -24%;
  border-top-color: rgba(0, 150, 220, 0.38);
  border-left-color: rgba(0, 150, 220, 0.14);
  animation: es7-rs2 calc(var(--ring-spd, 1) * 20s) linear infinite reverse;
  transform: rotateX(62deg);
}

.es-land-v7 .es7-orb-ring.es7-r3 {
  inset: -35%;
  border-bottom-color: rgba(0, 200, 150, 0.22);
  border-right-color: rgba(0, 200, 150, 0.08);
  animation: es7-rs3 calc(var(--ring-spd, 1) * 28s) linear infinite;
  transform: rotateY(55deg);
}

@keyframes es7-rs1 {
  to {
    transform: rotate(360deg);
  }
}

@keyframes es7-rs2 {
  to {
    transform: rotateX(62deg) rotate(360deg);
  }
}

@keyframes es7-rs3 {
  to {
    transform: rotateY(55deg) rotate(360deg);
  }
}

/* Tag drift keyframes — CSS-only, no JS involvement */
@keyframes es7-td1 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(6px, -10px); }
}
@keyframes es7-td2 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(10px, 8px); }
}
@keyframes es7-td3 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(-7px, -9px); }
}

/* Orb tags: keep their will-change hint */
.es-land-v7 .es7-orb-tag { will-change: transform; }

/* CSS idle float — plays when mouse is NOT over the scene.
   JS tilt writes inline style.transform which overrides this animation
   while the mouse is active; when the mouse leaves, JS resets tgtX/Y → 0
   and the animation resumes naturally. */
.es-land-v7 .es7-orb-scene:not(:hover) {
  animation: es7-orb-idle 7s ease-in-out infinite;
}

@keyframes es7-orb-idle {
  0%, 100% { transform: perspective(900px) translateY(0); }
  50%       { transform: perspective(900px) translateY(-14px); }
}

.es-land-v7 .es7-orb-scene:hover {
  --ring-spd: 0.35;
}

/* Glow is driven by JS (proximity-based box-shadow). CSS only provides initial value. */

/* Orb tags: `transform` is the CSS keyframe drift; `translate` is JS parallax (separate property) */
.es-land-v7 .es7-orb-tag {
  will-change: transform, translate;
  translate: 0px 0px; /* ensure it's a composited layer from the start */
}

.es-land-v7 .es7-orb-tag {
  position: absolute;
  background: rgba(22, 30, 44, 0.92);
  border: 1px solid var(--border2);
  border-radius: var(--r3);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  pointer-events: none;
}

.es-land-v7 .es7-ot-ico {
  font-size: 18px;
  flex-shrink: 0;
}

.es-land-v7 .es7-ot-txt .es7-ot-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 2px;
}

.es-land-v7 .es7-ot-txt .es7-ot-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
}

.es-land-v7 .es7-ot-txt .es7-ot-val b {
  color: var(--primary);
}

/* Tag positions + individual CSS drift — JS never touches tags */
.es-land-v7 .es7-orb-tag.es7-t1 {
  top: 4%;
  left: -14%;
  animation: es7-td1 7s ease-in-out infinite;
}

.es-land-v7 .es7-orb-tag.es7-t2 {
  bottom: 8%;
  left: -12%;
  animation: es7-td2 9s ease-in-out infinite;
}

.es-land-v7 .es7-orb-tag.es7-t3 {
  top: 8%;
  right: -10%;
  animation: es7-td3 8s ease-in-out infinite;
}

.es-land-v7 .es7-orb-tag.es7-t4 {
  bottom: 5%;
  right: -8%;
  animation: es7-td1 10s ease-in-out infinite reverse;
}

@keyframes es7-td1 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(6px, -10px);
  }
}

@keyframes es7-td2 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, 8px);
  }
}

@keyframes es7-td3 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-7px, -9px);
  }
}

/* Tablet: stack hero, keep orb visible but smaller, hide floating tags */
@media (max-width: 900px) {
  .es-land-v7 .es7-dash-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 32px 0 16px;
    gap: 8px;
  }

  .es-land-v7 .es7-dash-hero h1 {
    font-size: clamp(30px, 8vw, 44px);
  }

  .es-land-v7 .es7-h-orb-wrap {
    padding: 16px 0 8px;
    justify-content: center;
  }

  .es-land-v7 .es7-orb-scene {
    width: min(280px, 68vw);
  }

  /* Hide floating info tags on tablet — they overflow in single-column layout */
  .es-land-v7 .es7-orb-tag {
    display: none;
  }
}

/* Large phones / small tablets in portrait */
@media (max-width: 600px) {
  .es-land-v7 .es7-h-orb-wrap {
    padding: 8px 0 12px;
  }

  .es-land-v7 .es7-orb-scene {
    width: min(220px, 58vw);
    max-width: 240px;
  }

  .es-land-v7 .es7-orb-es {
    font-size: clamp(38px, 12vw, 52px);
  }

  .es-land-v7 .es7-orb-sphere {
    box-shadow:
      0 0 36px rgba(0, 200, 150, 0.08),
      0 0 72px rgba(0, 200, 150, 0.04),
      inset 0 1px 0 rgba(0, 200, 150, 0.16),
      inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  }

  .es-land-v7 .es7-orb-svg {
    inset: -38%;
    width: 176%;
    height: 176%;
  }
}

/* Small phones — compact orb, hero copy stays primary */
@media (max-width: 480px) {
  .es-land-v7 .es7-h-orb-wrap {
    display: flex;
    padding: 4px 0 8px;
  }

  .es-land-v7 .es7-orb-scene {
    width: min(188px, 52vw);
    max-width: 210px;
  }

  .es-land-v7 .es7-orb-es {
    font-size: clamp(32px, 11vw, 44px);
  }

  .es-land-v7 .es7-orb-ring.es7-r1 {
    inset: -10%;
  }

  .es-land-v7 .es7-orb-ring.es7-r2 {
    inset: -18%;
  }

  .es-land-v7 .es7-orb-ring.es7-r3 {
    inset: -26%;
  }

  .es-land-v7 .es7-dash-hero {
    padding: 12px 0 4px;
    gap: 4px;
  }

  .es-land-v7 .es7-dash-hero h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .es-land-v7 .es7-hero-sub {
    font-size: 14px;
  }

  .es-land-v7 .es7-h-acts {
    flex-direction: column;
  }

  .es-land-v7 .es7-h-acts .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
