/* The night sky: hero atmosphere — stars, moon, horizon glow. */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--starlight);
  background: linear-gradient(180deg, var(--night-deep) 0%, var(--night-mid) 62%, var(--night-soft) 100%);
  overflow: hidden;
}

.sky, .sky > div { position: absolute; inset: 0; pointer-events: none; }

/* two star layers, offset twinkle */
.stars {
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 28% 9%,  var(--starlight) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 41% 31%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 57% 13%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 66% 27%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 78% 8%,  var(--starlight) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 89% 19%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 8% 46%,  var(--starlight) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 21% 58%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 36% 44%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 52%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 71% 47%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 84% 55%, var(--starlight) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 94% 41%, var(--starlight) 50%, transparent 51%);
  opacity: 0.8;
  animation: twinkle 5s ease-in-out infinite;
}
.stars-b {
  transform: translate(3%, 6%) scale(1.15);
  opacity: 0.45;
  animation-delay: 2.5s;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 0.35; }
}

/* crescent moon: circle carved by an offset shadow-circle.
   Selector must out-rank `.sky > div`, which sets inset: 0. */
.sky .moon {
  inset: auto;
  top: clamp(4rem, 10vh, 7rem);
  right: clamp(1.5rem, 8vw, 7rem);
  width: clamp(64px, 9vw, 104px);
  height: clamp(64px, 9vw, 104px);
  border-radius: 50%;
  background: transparent;
  box-shadow: inset -16px 8px 0 0 #e9e4f0, 0 0 44px 6px rgba(233, 228, 240, 0.28);
  animation: moonfloat 9s ease-in-out infinite;
}

/* phones: smaller moon, tucked into the clear sky between topbar and name */
@media (max-width: 48rem) {
  .sky .moon {
    top: 4.2rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    box-shadow: inset -11px 5px 0 0 #e9e4f0, 0 0 24px 3px rgba(233, 228, 240, 0.22);
  }
}

@keyframes moonfloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* soft light pooling at the bottom of the sky */
.horizon-glow {
  background: radial-gradient(120% 55% at 50% 108%, rgba(211, 217, 238, 0.35), transparent 70%);
}

/* ---- hero content ---- */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.6rem;
}
.topbar .brand-script { font-size: 1.9rem; color: var(--starlight); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-link {
  color: var(--starlight);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid rgba(238, 240, 250, 0.4);
  padding-bottom: 2px;
}

/* language switch: a small segmented pill that reads against the night sky */
.lang-toggle {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid rgba(238, 240, 250, 0.28);
  border-radius: 999px;
  background: rgba(238, 240, 250, 0.06);
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(238, 240, 250, 0.7);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-toggle button:hover { color: var(--starlight); }
.lang-toggle button.is-active {
  background: var(--lavender);
  color: var(--night-deep);
}

/* phones: tighten the bar so brand + toggle + link fit one row */
@media (max-width: 30rem) {
  .topbar { padding: 0.9rem 1rem; }
  .topbar-right { gap: 0.6rem; }
  .topbar .brand-script { font-size: 1.6rem; }
  .lang-toggle button { padding: 0.28rem 0.5rem; letter-spacing: 0.03em; }
  .topbar-link { font-size: 0.85rem; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 1.4rem 5rem;
  max-width: 52rem;
  margin: 0 auto;
}

.hero-script {
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  color: var(--lavender);
  text-shadow: 0 0 30px rgba(211, 217, 238, 0.35);
  line-height: 1;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0.8rem 0 1.6rem;
}

.hero h1 { color: #fff; }

.hero-sub {
  margin: 1.4rem 0 2.2rem;
  max-width: 38rem;
  color: rgba(238, 240, 250, 0.85);
}

.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; justify-content: center; }

.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.6rem;
  margin-top: 2.6rem;
}
.trust li {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lavender);
  border: 1px solid rgba(211, 217, 238, 0.35);
  border-radius: 999px;
  padding: 0.32rem 0.9rem;
  background: rgba(211, 217, 238, 0.08);
}

.scroll-cue {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(238, 240, 250, 0.5);
  border-radius: 999px;
  display: flex;
  justify-content: center;
}
.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--starlight);
  margin-top: 7px;
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}
