/* Late Hours — style.css */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

:root {
  --bg: #0a0a0f;
  --bg-lift: #12121a;
  --text: #e8e8f0;
  --text-mute: rgba(232, 232, 240, 0.55);
  --text-dim: rgba(232, 232, 240, 0.35);
  --accent-violet: #b464ff;
  --accent-cyan: #64c8ff;
  --accent-purple: #7a3fff;
  --positive: #4ade80;
  --border-soft: rgba(232, 232, 240, 0.08);
  --border-medium: rgba(232, 232, 240, 0.16);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-feature-settings: "ss01" on, "cv11" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ============ Background layers ============ */

.grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 80, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 80, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 90%);
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.glow-a {
  width: 640px; height: 640px;
  top: -220px; right: -160px;
  background: radial-gradient(circle, rgba(180, 100, 255, 0.28) 0%, transparent 60%);
}
.glow-b {
  width: 520px; height: 520px;
  bottom: -180px; left: -160px;
  background: radial-gradient(circle, rgba(50, 200, 255, 0.18) 0%, transparent 60%);
}

.scanline {
  position: fixed;
  left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, rgba(180, 100, 255, 0.06) 50%, transparent 100%);
  z-index: 1;
  pointer-events: none;
  top: 0;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ Motion ============ */

@media (prefers-reduced-motion: no-preference) {
  @keyframes grid-drift {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 40px 40px, 40px 40px; }
  }
  @keyframes glow-a-breathe {
    0%, 100% { opacity: 0.85; transform: translate(0, 0) scale(1); }
    50%      { opacity: 1;    transform: translate(-30px, 30px) scale(1.12); }
  }
  @keyframes glow-b-breathe {
    0%, 100% { opacity: 0.6; transform: translate(0, 0) scale(1); }
    50%      { opacity: 0.95; transform: translate(40px, -30px) scale(1.18); }
  }
  @keyframes scanline-sweep {
    0%   { transform: translateY(-100%); opacity: 0; }
    10%  { opacity: 0.5; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(100vh); opacity: 0; }
  }
  @keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
  }
  @keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 8px var(--positive), 0 0 0 0 rgba(74, 222, 128, 0.5); }
    50%      { box-shadow: 0 0 12px var(--positive), 0 0 0 8px rgba(74, 222, 128, 0); }
  }
  @keyframes violet-pulse {
    0%, 100% { box-shadow: 0 0 12px var(--accent-violet), 0 0 0 0 rgba(180, 100, 255, 0.5); }
    50%      { box-shadow: 0 0 16px var(--accent-violet), 0 0 0 8px rgba(180, 100, 255, 0); }
  }
  @keyframes btn-shimmer {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
  }
  @keyframes fade-up {
    0%   { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
  }
  @keyframes type-in-once {
    0%   { width: 0; }
    100% { width: 12ch; }
  }

  .grid       { animation: grid-drift 10s linear infinite; }
  .glow-a     { animation: glow-a-breathe 9s ease-in-out infinite; }
  .glow-b     { animation: glow-b-breathe 11s ease-in-out infinite; }
  .scanline   { animation: scanline-sweep 8s linear infinite; }

  .nav        { animation: fade-up 0.8s ease-out both; }
  .tag        { animation: fade-up 0.9s ease-out 0.2s both; }
  .title-line-1 { animation: type-in-once 1.5s steps(12, end) 0.4s both; width: 12ch; }
  .sub        { animation: fade-up 0.9s ease-out 2.5s both; }
  .cta-row    { animation: fade-up 0.9s ease-out 2.8s both; }
  .footer     { animation: fade-up 0.9s ease-out 3s both; }

  .logo-dot   { animation: violet-pulse 2.2s ease-in-out infinite; }
  .status-dot { animation: status-pulse 1.8s ease-in-out infinite; }
  .title-accent { animation: gradient-shift 4s linear infinite; }
  .btn-primary  { animation: btn-shimmer 3.5s linear infinite; }
}

/* ============ Nav ============ */

.nav {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 5vw, 56px);
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
}
.logo:hover { color: var(--accent-violet); }

.logo-dot {
  width: 7px; height: 7px;
  background: var(--accent-violet);
  border-radius: 50%;
  display: inline-block;
}

.mid-dot { color: var(--accent-violet); }

.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-mute);
  letter-spacing: 0.1em;
}
.nav-links a {
  color: var(--text-mute);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-login:hover { color: var(--accent-violet); }

/* ============ Hero ============ */

.hero {
  position: relative;
  z-index: 3;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 56px);
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(180, 100, 255, 0.14);
  border: 0.5px solid rgba(180, 100, 255, 0.4);
  border-radius: 100px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #d4a4ff;
  margin-bottom: clamp(24px, 4vw, 36px);
  letter-spacing: 0.08em;
}
.tag-dot {
  width: 6px; height: 6px;
  background: #d4a4ff;
  border-radius: 50%;
  display: inline-block;
}

.title {
  font-size: clamp(48px, 11vw, 120px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(20px, 3vw, 32px);
  background: linear-gradient(180deg, #ffffff 0%, #a0a0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  height: 1.15em;
  line-height: 1;
  padding-bottom: 0.15em;
}
.title-line-2 {
  width: 0;
}

.title-accent {
  background: linear-gradient(90deg, #b464ff 0%, #64c8ff 40%, #b464ff 60%, #64c8ff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  font-weight: 400;
}

.sub {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-mute);
  max-width: 540px;
  line-height: 1.55;
  margin: 0 0 clamp(28px, 4vw, 40px);
}

.cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  padding: 13px 24px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(90deg, #7a3fff 0%, #b464ff 50%, #7a3fff 100%);
  background-size: 200% 100%;
  color: #ffffff;
  box-shadow: 0 4px 24px rgba(180, 100, 255, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 32px rgba(180, 100, 255, 0.55);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 0.5px solid var(--border-medium);
  font-family: var(--font-mono);
  padding: 12px 22px;
}
.btn-ghost:hover {
  border-color: var(--accent-violet);
  color: var(--accent-violet);
}
.mono { font-family: var(--font-mono); }

/* ============ Footer ============ */

.footer {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(16px, 3vw, 24px) clamp(20px, 5vw, 56px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-left { color: var(--text-dim); }
.footer-right {
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--positive);
  border-radius: 50%;
  display: inline-block;
}

/* ============ Selection ============ */

::selection {
  background: rgba(180, 100, 255, 0.35);
  color: #ffffff;
}

/* ============ Manifesto page ============ */

.manifesto {
  position: relative;
  z-index: 3;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) clamp(20px, 5vw, 56px);
  flex: 1;
}

.manifesto h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 clamp(32px, 5vw, 48px);
  background: linear-gradient(180deg, #ffffff 0%, #a0a0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.manifesto p {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(232, 232, 240, 0.72);
  margin: 0 0 24px;
  max-width: 65ch;
}

.manifesto p.lede {
  font-size: 20px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 40px;
}

.manifesto .divider {
  width: 40px;
  height: 1px;
  background: rgba(180, 100, 255, 0.6);
  border: none;
  margin: 40px 0;
}

.manifesto .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  text-decoration: none;
  margin-top: 48px;
  padding: 10px 16px;
  border: 0.5px solid var(--border-medium);
  border-radius: 8px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.manifesto .back:hover {
  color: var(--accent-violet);
  border-color: var(--accent-violet);
}

/* ============ Responsive ============ */

@media (max-width: 640px) {
  .nav-links { gap: 14px; font-size: 11px; }
  .title-line-1 { width: 12ch; }
  .sub { max-width: 100%; }
  .footer { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .grid, .glow-a, .glow-b, .scanline,
  .logo-dot, .status-dot, .title-accent, .btn-primary {
    animation: none !important;
  }
}
