/* ─── Custom properties ─────────────────────────────────────────────────── */

:root {
  --color-bg:            #080810;
  --color-surface:       #12121f;
  --color-surface-2:     #1a1a35;
  --color-border:        rgba(160, 100, 255, 0.15);
  --color-border-active: rgba(160, 100, 255, 0.35);
  --color-text:          #ede8ff;
  --color-muted:         rgba(237, 232, 255, 0.45);
  --color-dim:           rgba(237, 232, 255, 0.2);
  --color-shimmer:       #c084fc;
  --color-deep:          #7c3aed;
  --color-darkest:       #4f46e5;
  --color-accent-orange: #fb923c;
  --color-accent-cyan:   #22d3ee;
  --color-accent-green:  #4ade80;
  --gradient:            135deg, #c084fc, #7c3aed, #4f46e5;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */

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

/* ─── Base ──────────────────────────────────────────────────────────────── */

body {
  background-color: #080810;
  background-image:
    radial-gradient(ellipse at center, transparent 30%, rgba(4,4,10,0.8) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 100% 100%, cover;
  background-repeat: no-repeat, repeat;
  background-attachment: fixed, fixed;
  color: var(--color-text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Nav ───────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 32px;
}

.nav-border {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-shimmer), transparent);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(var(--gradient));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(var(--gradient));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1;
}

.nav-right {
  display: flex;
  align-items: center;
}

/* ─── Login button & dropdown ────────────────────────────────────────────── */

.login-wrapper {
  position: relative;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: transparent;
  border: 1px solid var(--color-border-active);
  border-radius: 8px;
  color: var(--color-shimmer);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover,
.login-btn.open {
  border-color: var(--color-shimmer);
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.3);
}

.chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.login-btn.open .chevron {
  transform: rotate(180deg);
}

.login-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-active);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 58, 237, 0.15);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 101;
}

.login-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown-option {
  display: block;
  padding: 11px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.dropdown-option:hover {
  background: rgba(160, 100, 255, 0.1);
}

/* ─── Crack layer ───────────────────────────────────────────────────────── */

.crack-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.crack-layer svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Staggered reveal then per-group pulse — pure CSS, zero JS timing */
/* crackReveal fades each group in once. crackPulse then loops indefinitely. */
/* crackPulse starts from 1.0 so there is no opacity jump after the reveal ends. */
.crack-g1 {
  opacity: 0;
  animation:
    crackReveal 2s ease-in-out 0s  both,
    crackPulse  5s ease-in-out 11s infinite alternate;
}

.crack-g2 {
  opacity: 0;
  animation:
    crackReveal 2s ease-in-out 3s  both,
    crackPulse  7s ease-in-out 11s infinite alternate;
}

.crack-g3 {
  opacity: 0;
  animation:
    crackReveal 2s ease-in-out 6s  both,
    crackPulse  6s ease-in-out 11s infinite alternate;
}

.crack-g4 {
  opacity: 0;
  animation:
    crackReveal 2s ease-in-out 9s  both,
    crackPulse  9s ease-in-out 11s infinite alternate;
}

@keyframes crackReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes crackPulse {
  from { opacity: 1.0; }
  to   { opacity: 0.6; }
}

/* Glow bloom pulses independently on its own 4-second cycle */
.crack-glow {
  animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { opacity: 0.3; }
  to   { opacity: 0.75; }
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 58px;
}

.hero-card {
  position: relative;
  max-width: 580px;
  width: 90%;
  background: var(--color-surface);
  border-radius: 16px;
  padding: 48px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(124, 58, 237, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Gradient border via mask technique */
.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(var(--gradient));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Lit-from-above inner top highlight */
.hero-card::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-shimmer), transparent);
  pointer-events: none;
}

.status-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-muted);
}

.hero-heading {
  margin-top: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 54px;
  letter-spacing: 3px;
  line-height: 1.05;
  background: linear-gradient(var(--gradient));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 420px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-primary {
  padding: 10px 24px;
  background: linear-gradient(var(--gradient));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  box-shadow:
    0 0 22px rgba(192, 132, 252, 0.55),
    0 4px 18px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--color-shimmer);
  border-radius: 8px;
  color: var(--color-shimmer);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  border-color: #d8a8ff;
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.3);
  transform: translateY(-1px);
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 10;
  background: rgba(8, 8, 16, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-border {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-shimmer), transparent);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
}

.footer-col {
  flex: 1;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(var(--gradient));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.footer-logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  background: linear-gradient(var(--gradient));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-center {
  text-align: center;
}

.footer-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--color-muted);
}

.footer-right {
  text-align: right;
}

.footer-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--color-muted);
  font-style: italic;
}

