/* ── NEBULA FOG ── */
.nebula-fog {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.fog-patch {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.fog-patch--1 {
  width: 700px; height: 500px;
  top: 5%; left: -5%;
  background: radial-gradient(circle, rgba(0,200,180,0.11) 0%, transparent 68%);
  filter: blur(70px);
  animation: fog-drift-1 32s ease-in-out infinite;
}
.fog-patch--2 {
  width: 550px; height: 450px;
  top: 35%; right: -8%;
  background: radial-gradient(circle, rgba(232,160,32,0.08) 0%, transparent 68%);
  filter: blur(80px);
  animation: fog-drift-2 42s ease-in-out infinite;
}
.fog-patch--3 {
  width: 800px; height: 400px;
  bottom: 5%; left: 20%;
  background: radial-gradient(circle, rgba(0,200,180,0.09) 0%, transparent 68%);
  filter: blur(75px);
  animation: fog-drift-3 38s ease-in-out infinite;
}
@keyframes fog-drift-1 {
  0%   { transform: translate(0px,   0px); }
  30%  { transform: translate(50px, -35px); }
  65%  { transform: translate(-30px,  45px); }
  100% { transform: translate(0px,   0px); }
}
@keyframes fog-drift-2 {
  0%   { transform: translate(0px,  0px); }
  40%  { transform: translate(-45px, 40px); }
  70%  { transform: translate(30px, -25px); }
  100% { transform: translate(0px,  0px); }
}
@keyframes fog-drift-3 {
  0%   { transform: translate(0px,  0px); }
  35%  { transform: translate(40px,  30px); }
  70%  { transform: translate(-50px, -20px); }
  100% { transform: translate(0px,  0px); }
}
@media (prefers-reduced-motion: reduce) {
  .fog-patch { animation: none; }
}

/* ── HERO ── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(4,10,6,0.0) 0%,
    rgba(4,10,6,0.4) 60%,
    rgba(4,10,6,0.92) 100%
  );
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 780px;
}
.hero-title {
  font-family: var(--font-hud);
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 900;
  color: var(--text-bright);
  letter-spacing: 3px;
  text-shadow: 0 0 60px rgba(0,200,180,0.2), 0 0 120px rgba(0,200,180,0.08);
  margin-bottom: 20px;
}
.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--text);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-punch {
  color: #FCA225;
  text-transform: uppercase;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
  font-size: inherit;
  letter-spacing: 2px;
  margin: 0 auto 36px;
}
.hero-ctas {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.hero-scroll-indicator {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2;
}
.scroll-arrow {
  width: 24px; height: 24px;
  border-right: 2px solid rgba(0,200,180,0.4);
  border-bottom: 2px solid rgba(0,200,180,0.4);
  transform: rotate(45deg);
  animation: scroll-bounce 1.8s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.4; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* ── CONTAINER (desktop-only override; mobile padding lives in components.css) ── */
@media (min-width: 769px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
  }
}

/* ── CONCEPT ── */
#concept {
  padding: 80px 0;
  position: relative; z-index: 2;
}
.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 64px 0;
}
.concept-card {
  --scan-distance: 320px;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.3s;
}
.concept-card:hover {
  border-color: rgba(0,200,180,0.3);
  transform: translateY(-4px);
}

/* HUD scan-line sweep on hover - top to bottom, ~1.1s, fades at the edges. */
.concept-card::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -2px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,200,180,0.0) 5%,
    rgba(0,200,180,0.7) 50%,
    rgba(0,200,180,0.0) 95%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(0,200,180,0.5);
  transform: translateY(0);
  opacity: 0;
  pointer-events: none;
  transition: none;
}
.concept-card:hover::before {
  animation: concept-scan 1.1s ease-out forwards;
}
@keyframes concept-scan {
  0%   { transform: translateY(0);      opacity: 0; }
  10%  {                                 opacity: 1; }
  90%  {                                 opacity: 1; }
  100% { transform: translateY(var(--scan-distance, 360px)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .concept-card:hover::before { animation: none; }
}
.concept-icon {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  color: var(--teal);
}
.concept-icon svg { width: 100%; height: 100%; }
.concept-title {
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-bright);
  margin-bottom: 14px;
}
.concept-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
}

/* ── FEATURES TEASER ── */
#features-teaser {
  padding: 120px 0;
  position: relative; z-index: 2;
  background: radial-gradient(ellipse at center, rgba(13,110,78,0.08) 0%, transparent 70%);
}
.features-teaser-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.features-teaser-heading {
  font-family: var(--font-hud);
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 900;
  color: var(--text-bright);
  line-height: 1.2;
  margin-bottom: 40px;
  max-width: 600px;
}

/* ── ROADMAP TEASER ── */
#roadmap-teaser {
  padding: 80px 0 0;
  position: relative; z-index: 2;
}
.roadmap-teaser-heading {
  font-family: var(--font-hud);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 28px;
  letter-spacing: 1px;
}
.overall-progress-bar {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 40px;
}
.overall-bar-track {
  width: 240px; height: 4px;
  background: rgba(0,200,180,0.2);
  border-radius: 2px; overflow: hidden;
}
.overall-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  border-radius: 2px;
  transition: width 0.8s ease;
}
.overall-pct {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
}
.teaser-phases {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 640px;
}
.teaser-phase {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  border-left: 3px solid var(--text-muted);
}
.teaser-phase.status-done { border-left-color: var(--emerald); }
.teaser-phase.status-active { border-left-color: var(--teal); }
.teaser-phase.status-next { border-left-color: var(--amber); }
.teaser-phase-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.teaser-phase-num {
  font-family: var(--font-hud);
  font-size: 16px;
  font-weight: 900;
  color: rgba(0,200,180,0.5);
  min-width: 32px;
}
.teaser-phase-name {
  font-family: var(--font-hud);
  font-size: 13px;
  color: var(--text-bright);
  letter-spacing: 1px;
  flex: 1;
}
.teaser-phase-bar {
  height: 3px;
  background: rgba(0,200,180,0.15);
  border-radius: 2px; overflow: hidden;
}
.teaser-phase-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  border-radius: 2px;
}

/* ── DISCORD CTA ── */
/* Layered background:
   1. Section bg-image = portal_invite_1080p.jpg (static)
   2. ::after = legibility gradient + top-edge fade
   3. (body-level) hex-grid canvas - renders over all of the above
   4. .container = text content on top
   No `z-index` on the section so the body-level hex-grid passes through. */
#discord-cta {
  padding: 120px 0;
  position: relative;
  text-align: center;
  background-color: #050913;
  background-image: url('/images/portal_invite_1080p.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
#discord-cta::after {
  /* legibility gradient - strong at very top so the transition from the
     previous section feels gradual; medium through the body so the image
     reads but text stays legible and hex-grid lines have contrast; deep
     at bottom where the footer joins. */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(4,10,6,0.99) 0%,
    rgba(4,10,6,0.85) 12%,
    rgba(4,10,6,0.65) 50%,
    rgba(4,10,6,0.78) 80%,
    rgba(4,10,6,0.95) 100%);
  z-index: 0;
}
#discord-cta > .container { position: relative; z-index: 2; }

/* Discord live server widget - only rendered when DISCORD_WIDGET_ENABLED=true
   AND DISCORD_SERVER_ID is set. The Discord widget endpoint serves a dark
   themed embed (#36393f bg) so we frame it with a teal-accented border that
   reads against the portal background without clashing. iframe is sized via
   aspect-ratio so it scales cleanly on mobile. */
.discord-widget-frame {
  margin: 28px auto 32px;
  max-width: 360px;
  width: 100%;
  border: 1px solid rgba(81, 233, 182, 0.25);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4) inset,
    0 12px 32px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(81, 233, 182, 0.08);
  background: #1f2125; /* matches Discord widget bg, hides any 1px gap */
}
.discord-widget-frame iframe {
  display: block;
  width: 100%;
  height: 460px;
  border: 0;
}
@media (max-width: 480px) {
  .discord-widget-frame { max-width: 320px; margin: 24px auto 28px; }
  .discord-widget-frame iframe { height: 400px; }
}

.discord-heading {
  font-family: var(--font-hud);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 16px;
}
.discord-sub {
  font-size: 17px;
  color: var(--text);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* ── NOTIFY FORM ── */
.notify-wrap {
  margin-top: 28px;
}
.notify-divider {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal-bright);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.notify-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.notify-input {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 18px;
  min-height: 44px;
  background: rgba(0,200,180,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-bright);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 260px;
}
.notify-input::placeholder { color: var(--text-muted); }
.notify-input:focus {
  border-color: rgba(0,200,180,0.4);
  box-shadow: 0 0 0 3px rgba(0,200,180,0.07);
}
.notify-btn { white-space: nowrap; }
.notify-msg {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
}
.notify-msg--success { color: var(--emerald); }
.notify-msg--error   { color: #e84040; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .concept-grid { grid-template-columns: 1fr; gap: 20px; }
  .features-teaser-inner { align-items: center; text-align: center; }
  .teaser-phases { max-width: 100%; }
  #discord-cta { padding: 80px 0; }
  #concept { padding: 60px 0; }
  .concept-card { padding: 28px 20px; --scan-distance: 280px; }
  #features-teaser { padding: 80px 0; }
  #roadmap-teaser { padding: 60px 0 0; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn { width: 100%; max-width: 280px; justify-content: center; }
  #concept { padding: 48px 0; }
  .concept-card { padding: 24px 16px; --scan-distance: 240px; }
  #features-teaser { padding: 60px 0; }
  .features-teaser-heading { font-size: clamp(20px, 6vw, 28px); }
  #discord-cta { padding: 60px 0; }
  .discord-heading { font-size: clamp(20px, 6vw, 28px); }
  .overall-bar-track { width: 160px; }
}
