/* ============================================
   Breeze — Live Sky hero (embedded Event Horizon)
   Adapted from horizon.css for use as a 100vh
   section inside the scrollable landing page.
   ============================================ */

.sky-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #0a0f1a;
}

#sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease;
}
body.scene-ready #sky { opacity: 1; }
body.scene-switching #sky { opacity: 0.25; transition: opacity 0.3s ease; }

#fallback {
  position: absolute;
  inset: 0;
  display: none;
}
#fallback.visible { display: block; }
#fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.fallback-mode .horizon-bar,
body.fallback-mode .scene-status,
body.fallback-mode .scroll-cue,
body.fallback-mode .city-toggle { display: none; }

/* Clean-scene capture mode (?ui=0) for marketing screenshots and posters. */
body.no-ui .nav,
body.no-ui .horizon-copy,
body.no-ui .scene-status,
body.no-ui .city-toggle,
body.no-ui .scroll-cue,
body.no-ui .horizon-bar { display: none; }

/* --- City toggle (sits below the site nav) --- */

.city-toggle {
  position: absolute;
  z-index: 15;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(10,15,26,0.35);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.city-toggle:empty { display: none; }
.city-toggle button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.city-toggle button.active {
  background: rgba(255,255,255,0.9);
  color: #0a0f1a;
}

/* --- Hero copy --- */

.horizon-copy {
  position: absolute;
  z-index: 10;
  left: clamp(20px, 5vw, 72px);
  top: 50%;
  transform: translateY(-56%);
  max-width: 540px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease 0.4s, transform 1s ease 0.4s;
}
body.scene-ready .horizon-copy,
body.fallback-mode .horizon-copy {
  opacity: 1;
  transform: translateY(-50%);
}
.horizon-copy a { pointer-events: auto; }

.kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
  margin-bottom: 14px;
}

.horizon-copy h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.55);
  margin-bottom: 18px;
}
/* Gradient glyphs can't carry a text-shadow (it bleeds through the
   transparent fill), but drop-shadow filters the rendered glyphs, giving
   the cyan text a dark halo so it stays readable against a blue sky. */
.horizon-copy h1 .gradient-text {
  text-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(4, 12, 28, 0.75))
          drop-shadow(0 4px 22px rgba(4, 12, 28, 0.55));
  /* Lighter start stop than the brand gradient: the default blue-400 sits
     too close to the midday sky color and the leading glyphs vanish. */
  background-image: linear-gradient(135deg, #bae6fd, #67e8f9, #5eead4);
}

.horizon-copy .sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 1px 14px rgba(0,0,0,0.6);
  max-width: 46ch;
  margin-bottom: 28px;
}

.copy-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.sky-hero .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0a0f1a;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sky-hero .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.45); }

.sky-hero .btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.2s ease;
}
.sky-hero .btn-ghost:hover { background: rgba(255,255,255,0.2); }

/* --- Live scene status pill --- */

.scene-status {
  position: absolute;
  z-index: 15;
  right: clamp(20px, 4vw, 48px);
  bottom: 218px;   /* clears the horizon bar and its raised bottom offset */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.92);
  background: rgba(10,15,26,0.38);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 1s ease 0.7s;
}
body.scene-ready .scene-status { opacity: 1; }

.status-divider {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.3);
}

.wind-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 64px;   /* keeps the pill from jittering as the value changes */
}
.wind-label svg { opacity: 0.75; }

/* --- Event Horizon bar --- */

.horizon-bar {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: max(58px, calc(env(safe-area-inset-bottom) + 44px));
  transform: translateX(-50%) translateY(12px);
  width: min(860px, calc(100vw - 40px));
  padding: 14px 26px 30px;
  border-radius: 24px;
  background: rgba(10,15,26,0.42);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 18px 60px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 1s ease 0.9s, transform 1s ease 0.9s;
}
body.scene-ready .horizon-bar {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bar-hint {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
  user-select: none;
}

.horizon-track {
  position: relative;
  height: 44px;
  cursor: ew-resize;
  touch-action: none;
}

.horizon-line {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(129,140,248,0.55) 0%,     /* midnight */
    rgba(251,146,60,0.85) 24%,     /* sunrise */
    rgba(96,165,250,0.9) 45%,      /* day */
    rgba(148,163,184,0.9) 66%,     /* storm */
    rgba(244,114,182,0.85) 84%,    /* sunset */
    rgba(129,140,248,0.55) 100%);  /* night */
}

.horizon-puck {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  color: #7c4a03;
  background: radial-gradient(circle at 32% 30%, #fff7e0, #fbbf24);
  box-shadow: 0 0 22px rgba(251,191,36,0.75), 0 4px 14px rgba(0,0,0,0.4);
  pointer-events: none;
  user-select: none;
  transition: background 0.6s ease, box-shadow 0.6s ease, color 0.6s ease;
}
.horizon-puck.night {
  color: #cbd5f5;
  background: radial-gradient(circle at 32% 30%, #f1f5f9, #64748b);
  box-shadow: 0 0 18px rgba(148,163,255,0.6), 0 4px 14px rgba(0,0,0,0.5);
}

.horizon-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  z-index: 1;
}
.horizon-marker::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 10px rgba(255,255,255,0.55);
  transition: transform 0.2s ease;
}
.horizon-marker:hover::before { transform: scale(1.5); }

.marker-icon { display: none; }

.marker-label {
  position: absolute;
  top: 100%;
  margin-top: 7px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  user-select: none;
}

/* Alternate labels above/below the line so close-together events don't collide. */
.horizon-marker:nth-child(even) .marker-label {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 7px;
}

/* Calendar events: diamond pins, visually distinct from the sky-event dots. */
.horizon-marker.cal::before {
  border-radius: 2.5px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}
.horizon-marker.cal:hover::before { transform: rotate(45deg) scale(1.4); }
.horizon-marker.cal .marker-label { color: rgba(165, 224, 255, 0.9); }

/* --- Calendar event pop-up card (floats in the sky, top right) --- */

.event-card {
  position: absolute;
  z-index: 15;
  top: 96px;
  right: clamp(20px, 4vw, 48px);
  width: max-content;
  max-width: 290px;
  padding: 13px 17px 14px;
  border-radius: 18px;
  text-align: left;
  background: rgba(10, 15, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.event-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.event-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.event-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2.5px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.55);
}

.event-card-time {
  margin-left: auto;
  padding-left: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.event-card p {
  margin: 7px 0 9px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

.event-verdict {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.event-verdict.good { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.35); }
.event-verdict.warn { background: rgba(251, 191, 36, 0.16); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.35); }
.event-verdict.bad  { background: rgba(248, 113, 113, 0.16); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.35); }

/* --- Scroll cue --- */

.scroll-cue {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: rgba(255,255,255,0.7);
  opacity: 0;
  transition: opacity 1s ease 1.4s, color 0.2s ease;
  animation: cue-bob 2.4s ease-in-out infinite;
}
body.scene-ready .scroll-cue { opacity: 1; }
.scroll-cue:hover { color: #fff; }

@keyframes cue-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* --- Responsive --- */

@media (max-width: 860px) {
  .horizon-copy {
    left: 20px;
    right: 20px;
    top: auto;
    bottom: 230px;
    transform: none;
    max-width: none;
  }
  body.scene-ready .horizon-copy,
  body.fallback-mode .horizon-copy { transform: none; }
  .horizon-copy .sub { display: none; }
  .scene-status {
    bottom: auto;
    top: 130px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 8px 14px;
  }
  .horizon-bar { padding: 12px 18px 26px; }
  .marker-label { display: none; }
  .city-toggle { top: 78px; }
}

@media (max-width: 860px) {
  /* Below the centered status pill on small screens. */
  .event-card {
    top: 182px;
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    max-width: calc(100vw - 40px);
  }
  .event-card.visible { transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #sky, .horizon-copy, .horizon-bar, .scene-status, .scroll-cue, .event-card { transition: none; }
  .scroll-cue { animation: none; }
}
