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

:root {
  --black: #050810;
  --blue-deep: #0a0f1e;
  --blue-mid: #0d1b3e;
  --blue-accent: #1a6bff;
  --blue-glow: #2979ff;
  --blue-light: #64b5f6;
  --white: #e8eeff;
  --muted: #4a5980;
}

/* ── Base ── */
html, body {
  width: 100%;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: 'Space Mono', monospace;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
  opacity: 0.5;
}

/* ── Background ── */
.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(26,107,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(13,27,62,0.8) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(41,121,255,0.1) 0%, transparent 60%),
    linear-gradient(180deg, var(--black) 0%, var(--blue-deep) 50%, var(--black) 100%);
  z-index: 0;
}

.grid-lines {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,107,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,107,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
}

.orb {
  position: fixed;
  width: clamp(150px, 60vmin, 600px);
  height: clamp(150px, 60vmin, 600px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41,121,255,0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 6s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.4; }
}

/* ── Main Container ── */
.container {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  padding: clamp(1rem, 4vw, 2rem);
}

/* ── Tag ── */
.tag {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.55rem, 1.5vw, 0.7rem);
  letter-spacing: clamp(0.15em, 0.8vw, 0.3em);
  color: var(--blue-accent);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.2s;
  margin-bottom: clamp(0.75rem, 3vw, 1.5rem);
  border: 1px solid rgba(26,107,255,0.3);
  padding: clamp(0.3rem, 1vw, 0.4rem) clamp(0.8rem, 2.5vw, 1.2rem);
  border-radius: 100px;
  background: rgba(26,107,255,0.07);
}

/* ── Headline ── */
.headline {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.4s;
  margin-bottom: 0.5rem;
}

.headline .line1 {
  display: block;
  color: var(--white);
}

.headline .line2 {
  display: block;
  color: var(--blue-accent);
  position: relative;
}

.headline .line2::before,
.headline .line2::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.headline .line2::before {
  color: #00c8ff;
  animation: glitch1 4s infinite 2s;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translateX(-3px);
}

.headline .line2::after {
  color: #ff2d78;
  animation: glitch2 4s infinite 2.1s;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translateX(3px);
}

@keyframes glitch1 {
  0%, 90%, 100% { opacity: 0; transform: translateX(-3px); }
  92% { opacity: 0.6; transform: translateX(-6px); }
  94% { opacity: 0; transform: translateX(2px); }
}

@keyframes glitch2 {
  0%, 90%, 100% { opacity: 0; transform: translateX(3px); }
  92% { opacity: 0.5; transform: translateX(6px); }
  94% { opacity: 0; transform: translateX(-2px); }
}

/* ── Divider ── */
.divider {
  width: clamp(40px, 8vw, 80px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-accent), transparent);
  margin: clamp(1rem, 3vw, 2rem) auto;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.6s;
}

/* ── Subtitle ── */
.subtitle {
  font-size: clamp(0.65rem, 1.8vw, 0.95rem);
  color: var(--muted);
  letter-spacing: 0.05em;
  line-height: 1.8;
  max-width: min(420px, 90vw);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.8s;
}

.subtitle span {
  color: var(--blue-light);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--blue-accent);
  border-radius: 50%;
  margin-left: 8px;
  animation: blink 1.2s step-end infinite;
  box-shadow: 0 0 10px var(--blue-glow);
}

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

/* ── Corner text ── */
.corner-text {
  position: fixed;
  bottom: clamp(3rem, 5vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  font-size: clamp(0.5rem, 1.2vw, 0.65rem);
  color: rgba(74,89,128,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 10;
  opacity: 0;
  animation: fadeUp 1s ease forwards 1.5s;
}

.corner-left {
  left: clamp(1rem, 3vw, 2rem);
  right: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.corner-left::before {
  content: '';
  width: clamp(12px, 3vw, 20px);
  height: 1px;
  background: rgba(74,89,128,0.5);
}

/* ── Footer ── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: clamp(0.7rem, 2vw, 1.2rem);
  font-size: clamp(0.55rem, 1.6vw, 0.7rem);
  letter-spacing: clamp(0.06em, 0.4vw, 0.12em);
  color: rgba(74,89,128,0.45);
  text-transform: uppercase;
  z-index: 10;
  opacity: 0;
  animation: fadeUp 1s ease forwards 1.8s;
  border-top: 1px solid rgba(26,107,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.25rem, 1vw, 0.5rem);
}

.footer span {
  color: var(--blue-accent);
  opacity: 0.7;
}

.footer .claude-icon {
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
}

.footer .claude-icon svg {
  width: clamp(14px, 4vw, 18px);
  height: clamp(14px, 4vw, 18px);
}

/* ── Scan line ── */
.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(26,107,255,0.4), transparent);
  animation: scan 8s linear infinite;
  z-index: 50;
  pointer-events: none;
}

@keyframes scan {
  0% { top: -2px; }
  100% { top: 100vh; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive: Mobile small ── */
@media (max-width: 480px) {
  .grid-lines {
    background-size: 36px 36px;
  }

  .orb {
    width: clamp(120px, 50vmin, 400px);
    height: clamp(120px, 50vmin, 400px);
  }
}

@media (max-width: 380px) {
  .corner-text {
    display: none;
  }

  .headline {
    font-size: clamp(1.2rem, 10vw, 1.6rem);
  }
}

/* ── Responsive: Tablet ── */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }
}

/* ── Responsive: Mobile landscape (short screens) ── */
@media (max-height: 500px) {
  .tag {
    margin-bottom: 0.5rem;
  }

  .divider {
    margin: 0.5rem auto;
  }

  .container {
    padding: 1rem 1.5rem;
  }

  .headline {
    font-size: clamp(1.2rem, 8vh, 2.5rem);
  }
}

/* ── Responsive: Very narrow screens (extreme portrait mode) ── */
@media (max-width: 320px) {
  .container {
    padding: 0.75rem;
  }

  .tag {
    padding: 0.25rem 0.6rem;
  }
}

/* ── Responsive: Large screens / TV ── */
@media (min-width: 1800px) {
  .headline {
    font-size: clamp(5rem, 8vw, 10rem);
  }

  .tag {
    font-size: 0.85rem;
  }

  .footer {
    font-size: 0.85rem;
  }

  .grid-lines {
    background-size: 80px 80px;
  }
}

/* ── Responsive: Ultra-wide ── */
@media (min-width: 2560px) {
  .subtitle {
    max-width: 500px;
  }
}
