/* ============================================
   HiRo Landing Page — Style System
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-deep: #050510;
  --bg-surface: rgba(255, 255, 255, 0.03);
  --bg-surface-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(10, 10, 30, 0.6);

  --primary: #7B2FFF;
  --primary-light: #9B5FFF;
  --primary-dark: #5A10DD;
  --accent: #00F0FF;
  --accent-dim: rgba(0, 240, 255, 0.15);

  --text-primary: #F0F0F8;
  --text-secondary: rgba(240, 240, 248, 0.55);
  --text-muted: rgba(240, 240, 248, 0.3);

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(123, 47, 255, 0.4);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---------- Canvas ---------- */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
}

.loader-bar-track {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.3s var(--ease-out);
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all 0.5s var(--ease-out);
}

#navbar.scrolled {
  padding: 0.6rem 2rem;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  transition: all 0.5s var(--ease-out);
}

#navbar.scrolled .nav-inner {
  padding: 0.5rem 1.25rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: opacity 0.3s;
}

.nav-logo:hover {
  opacity: 0.8;
}

.logo-hi {
  color: var(--text-primary);
}

.logo-ro {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-cta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(123, 47, 255, 0.4);
}

.nav-cta:hover::before {
  opacity: 1;
}

.nav-cta span {
  position: relative;
  z-index: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
}

.hero-content {
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 2.5rem;
  opacity: 0;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(0, 240, 255, 0); }
}

.hero-headline {
  margin-bottom: 1.75rem;
}

.hero-line {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  opacity: 0;
}

.hero-line-1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-line-2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text-secondary);
  -webkit-text-fill-color: unset;
  margin-top: 0.25rem;
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
}

.hero-highlight {
  color: var(--accent);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  opacity: 0;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 20px rgba(123, 47, 255, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light), #6020DD);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(123, 47, 255, 0.5);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary span,
.btn-primary svg {
  position: relative;
  z-index: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123, 47, 255, 0.15);
}

.btn-arrow {
  transition: transform 0.3s var(--ease-out);
}

.btn-ghost:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ---------- Social Proof ---------- */
.social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
}

.proof-avatars {
  display: flex;
}

.proof-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg-deep);
  margin-left: calc(var(--i) * -8px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.proof-avatar:nth-child(1) { background: linear-gradient(135deg, #7B2FFF, #5A10DD); }
.proof-avatar:nth-child(2) { background: linear-gradient(135deg, #00F0FF, #0088AA); }
.proof-avatar:nth-child(3) { background: linear-gradient(135deg, #FF6B6B, #C44040); }

.proof-avatar svg {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.8);
}

.proof-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.proof-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- Scroll Hint ---------- */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
}

.scroll-hint span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   COUNTDOWN SECTION
   ============================================ */
#countdown-section {
  position: relative;
  z-index: 1;
  padding: 8rem 2rem;
  text-align: center;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 3rem;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.countdown-unit {
  text-align: center;
  min-width: 100px;
}

.countdown-value {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 0.2s;
  position: relative;
}

.countdown-value.tick {
  color: var(--accent);
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.countdown-sep {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  animation: blink-sep 2s step-end infinite;
}

@keyframes blink-sep {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.countdown-caption {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================
   GUESS SECTION
   ============================================ */
#guess-section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 8rem;
}

.guess-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.guess-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), var(--accent), transparent);
}

.guess-header {
  text-align: center;
  margin-bottom: 2rem;
}

.guess-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.guess-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.guess-desc strong {
  color: var(--accent);
}

/* ---------- Form ---------- */
.guess-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.form-field textarea,
.form-field input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  resize: none;
  transition: all 0.3s var(--ease-out);
}

.form-field textarea:focus,
.form-field input:focus {
  border-color: var(--primary);
  background: var(--bg-surface-hover);
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.15);
}

.form-field textarea::placeholder,
.form-field input::placeholder {
  color: var(--text-muted);
}

/* ---------- Success State ---------- */
.guess-success {
  text-align: center;
  padding: 2rem 0;
}

.guess-success.hidden {
  display: none;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  margin-bottom: 1.5rem;
}

.success-icon svg {
  color: #22c55e;
}

.guess-success h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.guess-success p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.success-reward {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.success-reward strong {
  color: var(--accent);
}

.reward-badge {
  font-size: 1.2rem;
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.footer-email {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.3s;
}

.footer-email:hover {
  opacity: 0.7;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color 0.3s;
}

.footer-link:hover {
  color: var(--accent);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 1;
  transition: opacity 0.3s var(--ease-out);
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: rgba(15, 15, 35, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--text-primary);
}

#modal-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

#modal-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

#modal-body strong {
  color: var(--text-primary);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  #navbar {
    padding: 0.75rem 1rem;
  }

  .nav-inner {
    padding: 0.5rem 1rem;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .nav-cta {
    font-size: 0.7rem;
    padding: 0.4rem 0.9rem;
  }

  #hero-section {
    padding: 5rem 1.25rem 3rem;
  }

  .hero-badge {
    font-size: 0.6rem;
    margin-bottom: 2rem;
  }

  .hero-sub br {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .countdown-grid {
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .countdown-unit {
    min-width: 65px;
  }

  .countdown-sep {
    display: none;
  }

  .guess-container {
    padding: 1.5rem;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }

  .scroll-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .countdown-value {
    font-size: 2.5rem;
  }

  .countdown-unit {
    min-width: 55px;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(123, 47, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 47, 255, 0.5);
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(123, 47, 255, 0.3);
  color: var(--text-primary);
}
