:root {
  --bg1: #040404;
  --bg2: #0c0c0c;

  --accent: #f09c3a;
  --accent-light: #f6c26d;

  --text: #f5f5f5;
  --muted: rgba(255,255,255,0.68);
}

/* =========================================
   BASE
   ========================================= */

* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;

  font-family: Inter, Arial, Helvetica, sans-serif;

  background: #050505;
  overflow: hidden;
}

body.landing {
  background: #ffffff;
}

/* =========================================
   INTRO STAGE
   ========================================= */

#introStage {
  position: fixed;
  inset: 0;

  z-index: 2;
  opacity: 1;

  background:
    radial-gradient(circle at 50% 42%, rgba(240,156,58,0.12), transparent 26%),
    linear-gradient(180deg, var(--bg1), var(--bg2));

  transition: opacity 0.8s ease;
}

#introStage.hidden {
  opacity: 0;
  pointer-events: none;
}

#fx {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  display: block;
}

/* =========================================
   INTRO OVERLAY
   ========================================= */

.overlay {
  position: absolute;
  inset: 0;

  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}

/* =========================================
   BRANDING
   ========================================= */

.title-wrap {
  text-align: center;

  filter: drop-shadow(0 0 22px rgba(240,156,58,0.18));
}

.eyebrow {
  color: var(--muted);

  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;

  margin-bottom: 16px;

  opacity: 0;
  animation: fadeInUp 0.8s ease 0.15s forwards;
}

.brand {
  margin: 0;

  display: inline-flex;
  gap: 0.02em;
  align-items: center;

  font-size: clamp(54px, 10vw, 130px);
  font-weight: 800;
  line-height: 1;

  letter-spacing: 0.06em;

  position: relative;
}

.brand::after {
  content: "";

  position: absolute;
  left: 50%;
  bottom: -18px;

  width: min(360px, 60vw);
  height: 2px;

  transform: translateX(-50%) scaleX(0.35);
  transform-origin: center;

  opacity: 0;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(246,194,109,0.92),
    rgba(240,156,58,0.96),
    transparent
  );

  box-shadow: 0 0 18px rgba(240,156,58,0.45);

  animation: lineIn 0.9s ease 1.1s forwards;
}

.letter {
  display: inline-block;

  opacity: 0;
  transform: translateY(24px);

  animation: letterIn 0.5s cubic-bezier(.2,.8,.2,1) forwards;

  color: transparent;

  background-clip: text;
  -webkit-background-clip: text;
}

.helix-letter {
  background-image: linear-gradient(180deg, #ffffff, #ece8e2);
}

.os-letter {
  background-image: linear-gradient(
    180deg,
    #ffd59a 0%,
    #f09c3a 60%,
    #d9821b 100%
  );
}

/* =========================================
   SUBTITLE
   ========================================= */

.sub {
  margin-top: 28px;

  color: rgba(255,255,255,0.88);

  font-size: clamp(16px, 2vw, 28px);

  letter-spacing: 0.10em;

  opacity: 0;
  animation: fadeInUp 0.8s ease 1.35s forwards;
}

.sub .ai {
  color: var(--accent);

  font-weight: 700;

  text-shadow: 0 0 14px rgba(240,156,58,0.32);
}

/* =========================================
   SKIP INTRO
   ========================================= */

.skip-wrap {
  position: absolute;

  left: 50%;
  top: calc(50% + 128px);

  transform: translateX(-50%);

  z-index: 4;

  opacity: 0;
  animation: fadeInUpButton 0.8s ease 1.8s forwards;
}

.skip-btn {
  border: 1px solid rgba(240,156,58,0.46);

  background: rgba(255,255,255,0.04);

  color: rgba(255,255,255,0.92);

  padding: 10px 18px;

  border-radius: 999px;

  font-size: 13px;
  letter-spacing: 0.18em;

  text-transform: uppercase;

  cursor: pointer;
}

.skip-btn:hover {
  background: rgba(240,156,58,0.12);
}

.intro-fade {
  animation: introFadeOut 0.7s ease forwards;
}

/* =========================================
   MAIN SCREEN
   ========================================= */

#mainScreen {
  position: fixed;
  inset: 0;

  z-index: 1;

  background: #ffffff;

  opacity: 0;
  visibility: hidden;

  transition: opacity 0.8s ease;
}

#mainScreen.visible {
  opacity: 1;
  visibility: visible;
}

/* =========================================
   TOP BAR
   ========================================= */

#topBar {
  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  height: 64px;

  background: linear-gradient(180deg, #1a1a1a, #101010);

  color: #fff;

  display: flex;
  align-items: center;

  padding: 0 32px;

  border-bottom: 1px solid rgba(255,255,255,0.08);

  font-weight: 700;
  letter-spacing: 0.08em;
}

/* =========================================
   LANDING
   ========================================= */

.landing-center {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 18px;

  text-align: center;

  padding: 24px;
}

.landing-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;

  justify-content: center;

  margin-top: 8px;
}

.landing-actions button {
  width: 190px;
  min-width: 190px;

  padding: 14px 34px;

  font-size: 16px;
  font-weight: 700;

  border-radius: 8px;

  cursor: pointer;
}

.login-btn {
  border: none;

  background: var(--accent);

  color: #fff;

  box-shadow: 0 10px 24px rgba(240,156,58,0.25);
}

.learn-btn {
  border: 1px solid var(--accent);

  background: #fff;

  color: #111;
}

/* =========================================
   MODAL BASE
   ========================================= */

.modal-overlay {
  position: fixed;
  inset: 0;

  background: rgba(4,4,4,0.68);

  backdrop-filter: blur(10px);

  display: none;

  align-items: center;
  justify-content: center;

  z-index: 40;

  padding: 24px;
}

.modal-overlay.visible {
  display: flex;
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUpButton {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes letterIn {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes lineIn {
  from {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.35);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes introFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

#appShellMount {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}