/* ECHIVO — hero · "From the whole world to one street". OWNED BY: web agent 1 (hero). */

#hero {
  --hero-h: 100vh;
  --globe-d: calc(var(--hero-h) * 0.8);            /* cobe draws its sphere at 80% of canvas height */
  padding: 0;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--night);
  isolation: isolate;
}
@supports (height: 100svh) { #hero { --hero-h: 100svh; } }

#hero .hero__stage { position: absolute; inset: 0; overflow: hidden; }

/* ---------- Sky ---------- */
#hero .hero__sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 50% 78%, rgba(245, 200, 130, 0.13), transparent 70%),
    radial-gradient(50% 40% at 12% 8%, rgba(79, 179, 255, 0.09), transparent 70%),
    radial-gradient(45% 40% at 92% 18%, rgba(157, 123, 255, 0.07), transparent 70%),
    linear-gradient(180deg, #04060c 0%, #070b18 55%, #05070d 100%);
}
#hero .hero__sky::before { /* faint star field */
  content: ""; position: absolute; inset: 0; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 28% 64%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.4px 1.4px at 44% 12%, rgba(245,200,130,.8), transparent 60%),
    radial-gradient(1px 1px at 63% 38%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 78% 9%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 88% 52%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 6% 80%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 94% 86%, rgba(245,200,130,.5), transparent 60%);
  background-size: 520px 520px;
}

/* ---------- City (portal) ---------- */
#hero .hero__city {
  position: absolute; inset: 0; z-index: 1;
  clip-path: circle(0% at 50% 50%);
  opacity: 0;
}
#hero .hero__city-img {
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 58%;
  transform-origin: 50% 50%;
}
#hero .hero__city::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 50% 50%, rgba(5,7,13,0) 0%, rgba(5,7,13,.45) 100%),
    linear-gradient(180deg, rgba(5,7,13,.55) 0%, rgba(5,7,13,.12) 32%, rgba(5,7,13,.25) 62%, var(--night) 100%);
}

/* ---------- Globe ---------- */
#hero .hero__globe-par { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#hero .hero__globe { position: absolute; inset: 0; }
#hero .hero__canvas-wrap { position: absolute; inset: 0; mix-blend-mode: screen; }
#hero .hero__canvas { width: 100%; height: 100%; max-width: none; display: block; }

/* The night-blue body of the planet — cobe paints the gold dots, this paints the ocean */
#hero .hero__disc,
#hero .hero__fallback {
  position: absolute; left: 50%; top: 50%;
  width: var(--globe-d); height: var(--globe-d);
  margin: calc(var(--globe-d) / -2) 0 0 calc(var(--globe-d) / -2);
  border-radius: 50%;
  transform: translateY(16vh);
}
#hero .hero__disc {
  background:
    radial-gradient(circle at 36% 30%, rgba(79,179,255,.16), transparent 52%),
    radial-gradient(circle at 50% 50%, #0e1730 0%, #0a1124 58%, #060a16 100%);
  box-shadow:
    0 0 0 1px rgba(245,200,130,.06),
    0 0 120px 10px rgba(245,200,130,.07),
    inset -30px -40px 90px rgba(0,0,0,.55);
}

/* CSS fallback globe (no WebGL): dotted sphere that slowly drifts */
#hero .hero__fallback { display: none; overflow: hidden; }
#hero .hero__fallback-dots {
  position: absolute; inset: -10%;
  background:
    radial-gradient(circle, rgba(245,200,130,.75) 0 1.3px, transparent 1.9px) 0 0 / 11px 11px;
  -webkit-mask: radial-gradient(circle at 42% 38%, #000 0%, rgba(0,0,0,.65) 45%, transparent 72%);
          mask: radial-gradient(circle at 42% 38%, #000 0%, rgba(0,0,0,.65) 45%, transparent 72%);
  animation: hero-drift 40s linear infinite;
}
#hero .hero__fallback::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 58%, rgba(245,200,130,.18) 70%, transparent 72%);
}
@keyframes hero-drift { to { background-position: 0 0; transform: translateX(-11px); } }
#hero.is-fallback .hero__fallback { display: block; }
#hero.is-fallback .hero__canvas-wrap { display: none; }

/* ---------- Oradea pin ---------- */
#hero .hero__pin {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 0; height: 0; opacity: 0; visibility: hidden;
}
#hero .hero__pin-dot {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(245,200,130,.25), 0 0 30px 6px rgba(245,200,130,.7);
}
#hero .hero__pin-ring {
  position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; border-radius: 50%;
  border: 1.5px solid rgba(245,200,130,.7);
  animation: hero-ring 2.2s var(--ease-out) infinite;
}
#hero .hero__pin-ring--2 { animation-delay: 1.1s; }
@keyframes hero-ring { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
#hero .hero__pin-label {
  position: absolute; left: 0; top: -62px; transform: translateX(-50%); white-space: nowrap;
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text-2);
  padding: .45em .9em; border-radius: 999px;
  background: rgba(5,7,13,.55); border: 1px solid rgba(245,200,130,.3);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
#hero .hero__pin-label b { color: var(--gold); font-weight: 750; margin-right: .4em; }

/* ---------- Copy ---------- */
#hero .hero__copy-par { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
#hero .hero__copy {
  position: absolute; left: 0; right: 0; top: 0;
  padding: clamp(104px, 15vh, 150px) var(--gutter) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
#hero .hero__copy a { pointer-events: auto; }
#hero .hero__eyebrow {
  display: inline-flex; align-items: center; gap: .7em; margin: 0 0 clamp(18px, 2.6vh, 28px);
  padding: .55em 1.1em .55em .8em; border-radius: 999px;
  background: rgba(5,7,13,.35); border: 1px solid rgba(245,200,130,.22);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
#hero .hero__eyebrow img { width: 18px; height: 18px; }
#hero .hero__title {
  margin: 0;
  font-size: clamp(3rem, 8.4vw, 9rem);
  line-height: .9;
  letter-spacing: -0.005em;
  color: #fff;
  text-shadow: 0 6px 50px rgba(5,7,13,.65);
}
#hero .hero__title, #hero .hero__listen { transition: text-shadow 1.2s ease; }
#hero .hero__title.is-split, #hero .hero__title.is-split .hero__listen { text-shadow: none; }
#hero .hero__tag, #hero .hero__listen-row { display: block; }
#hero .hero__listen-row {
  display: flex; align-items: center; justify-content: center; gap: .18em;
  margin-top: .06em;
}
#hero .hero__listen {
  color: var(--gold);
  text-shadow: 0 0 40px rgba(245,200,130,.45), 0 6px 40px rgba(5,7,13,.6);
}
#hero .hero__wave { width: .42em; height: .3em; color: var(--gold); flex: none; overflow: visible; }
#hero .hero__wave rect { transform-box: fill-box; transform-origin: 50% 50%; animation: hero-eq 1.1s ease-in-out infinite alternate; }
#hero .hero__wave rect:nth-child(2) { animation-delay: -.3s; }
#hero .hero__wave rect:nth-child(3) { animation-delay: -.6s; }
#hero .hero__wave rect:nth-child(4) { animation-delay: -.15s; }
#hero .hero__wave rect:nth-child(5) { animation-delay: -.45s; }
@keyframes hero-eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }

#hero .hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(26px, 4vh, 44px); }
#hero .hero__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#hero .hero__play {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.14); padding-left: 2px;
}

/* ---------- Phone ---------- */
#hero .hero__phone-par { position: absolute; inset: 0; z-index: 5; pointer-events: none; perspective: 1400px; }
#hero .hero__phone {
  --pw: clamp(210px, 33vh, 300px);
  position: absolute; left: 50%; top: 50%;
  width: var(--pw);
  margin-left: calc(var(--pw) / -2);
  margin-top: calc(var(--pw) * -1.087);
  transform-style: preserve-3d;
  transform: translate3d(30vw, 40vh, 0) rotate(8deg); /* resting "peek" pose (JS takes over) */
}
#hero .hero__device { --phone-w: var(--pw); }
#hero .hero__phone::after { /* golden floor glow */
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -6%; height: 12%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(245,200,130,.35), transparent 70%);
  filter: blur(18px); z-index: -1;
}

/* ---------- Outro line ---------- */
#hero .hero__outro {
  position: absolute; inset: 0; z-index: 4; margin: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  gap: calc(clamp(210px, 33vh, 300px) + clamp(48px, 6vw, 110px));
  padding: 0 var(--gutter);
  font-size: clamp(2.2rem, 4.6vw, 4.8rem);
  text-shadow: 0 4px 40px rgba(5,7,13,.7);
}
#hero .hero__o { flex: 1 1 0; max-width: 7em; }
#hero .hero__o--l { text-align: right; }
#hero .hero__o--r { text-align: left; color: var(--gold); }
#hero .hero__outro .hero__ow-mask { padding-bottom: .06em; }

/* ---------- HUD ---------- */
#hero .hero__hud {
  position: absolute; left: var(--gutter); bottom: clamp(18px, 3.5vh, 34px); z-index: 6;
  display: flex; align-items: center; gap: 22px;
  font-size: .7rem; font-weight: 650; letter-spacing: .24em; text-transform: uppercase; color: var(--text-3);
}
#hero .hero__scroll { display: inline-flex; align-items: center; gap: 10px; }
#hero .hero__scroll-track {
  position: relative; width: 22px; height: 34px; border-radius: 12px;
  border: 1.5px solid rgba(243,241,236,.3);
}
#hero .hero__scroll-dot {
  position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px;
  background: var(--gold);
  animation: hero-scroll 1.8s var(--ease-out) infinite;
}
@keyframes hero-scroll { 0% { transform: translateY(0); opacity: 0; } 25% { opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
#hero .hero__coords { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); letter-spacing: .08em; color: var(--text-2); }
#hero .hero__coords svg { color: var(--gold); }

/* ---------- Pre-JS intro state (failsafe reveal if the module never runs) ---------- */
#hero:not(.is-ready) .hero__intro,
#hero:not(.is-ready) .hero__device { opacity: 0; animation: hero-failsafe .8s 2.2s forwards; }
#hero:not(.is-ready) .hero__outro { opacity: 0; }
@keyframes hero-failsafe { to { opacity: 1; } }

/* ---------- Mobile ---------- */
@media (max-width: 759px) {
  #hero { --globe-d: min(calc(var(--hero-h) * 0.8), 118vw); }
  #hero .hero__copy { padding-top: clamp(96px, 14vh, 130px); }
  #hero .hero__title { font-size: clamp(2.7rem, 15vw, 4.4rem); line-height: .92; }
  #hero .hero__br { display: none; }
  #hero .hero__eyebrow { font-size: .62rem; letter-spacing: .18em; }
  #hero .hero__ctas { flex-direction: column; align-items: stretch; width: min(100%, 320px); gap: 10px; }
  #hero .hero__phone { --pw: min(54vw, 28vh, 240px); margin-top: calc(var(--pw) * -1.087 + 6vh); transform: translate3d(0, 62vh, 0); }
  #hero .hero__outro {
    flex-direction: column; justify-content: flex-start; gap: 0;
    padding-top: clamp(82px, 11vh, 110px);
    font-size: clamp(1.9rem, 9.4vw, 2.6rem);
  }
  #hero .hero__o { flex: none; max-width: none; text-align: center; }
  #hero .hero__hud { display: none; } /* the peeking phone is the scroll cue on phones */
}
@media (max-height: 620px) and (min-width: 760px) {
  #hero .hero__copy { padding-top: 84px; }
  #hero .hero__title { font-size: clamp(2.6rem, 6.6vw, 6rem); }
}

/* ---------- Low power (html.lp — phones / weak hardware): same picture, cheaper pixels ---------- */
.lp #hero .hero__eyebrow { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(9, 12, 22, 0.72); }
.lp #hero .hero__pin-label { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(9, 12, 22, 0.82); }
.lp #hero .hero__phone::after { filter: none; background: radial-gradient(50% 50% at 50% 50%, rgba(245,200,130,.28), transparent 75%); }
.lp #hero .hero__device.is-floating { animation: hero-float 3.2s ease-in-out infinite alternate; }
@keyframes hero-float { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -12px, 0); } }

/* ---------- Reduced motion: static, complete composition ---------- */
@media (prefers-reduced-motion: reduce) {
  #hero .hero__intro, #hero .hero__device { opacity: 1 !important; animation: none !important; }
  #hero .hero__outro { display: none; }
  #hero .hero__fallback-dots, #hero .hero__pin-ring, #hero .hero__scroll-dot, #hero .hero__wave rect { animation: none; }
}
