/*
  PastePilot – hacker aesthetic styles
  Stack: custom CSS with CSS variables
*/

:root {
  --bg-0: #05080f;
  --bg-1: #070b14;
  --bg-2: #0a0f1a;
  --fg-0: #d9e7ff;
  --fg-dim: #9bb3d1;
  --blue-0: #1e3a8a;
  --blue-1: #2563eb;
  --blue-2: #60a5fa;
  --cyan: #00d4ff; /* site neon blue */
  --glow: 0 0 24px rgba(37, 99, 235, 0.35), 0 0 48px rgba(34, 211, 238, 0.15);
  --card-glow: 0 0 20px rgba(96, 165, 250, 0.18);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--fg-0);
  background: radial-gradient(1200px 600px at 10% 10%, rgba(30, 58, 138, 0.12), transparent 70%),
              radial-gradient(1200px 800px at 90% 20%, rgba(34, 211, 238, 0.12), transparent 70%),
              linear-gradient(180deg, var(--bg-1), var(--bg-0));
  overflow-x: hidden;
}

/* Back to home link */
.back-link {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 60;
  color: var(--cyan);
  text-decoration: none;
  font-size: 14px;
}
.back-link:hover { text-decoration: underline; }

/* Page transitions (used when navigating to Privacy/Pricing) */
.page-mount { animation: pageIn 260ms ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-unmount { opacity: 0; transform: translateY(8px); transition: opacity 220ms ease, transform 220ms ease; }

/* Background layers: static hacker grid + faint glows */
.bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    /* base gradient */
    radial-gradient(1400px 800px at 15% 15%, rgba(30, 58, 138, 0.12), transparent 70%),
    radial-gradient(1200px 800px at 85% 20%, rgba(34, 211, 238, 0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

/* Pricing page background variant: deep purple/teal orbs + angular sheen */
.bg-pricing {
  background:
    radial-gradient(1200px 800px at 80% 10%, rgba(147, 51, 234, 0.18), transparent 70%),
    radial-gradient(900px 700px at 10% 20%, rgba(20, 184, 166, 0.16), transparent 70%),
    conic-gradient(from 210deg at 50% 0%, rgba(59,130,246,0.08), transparent 40%),
    linear-gradient(180deg, #0b0f1a, #05070d);
}

/* Hacker grid (subtle) and glyphs via pseudo-elements */
.bg-overlay::before,
.bg-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Thin grid lines */
.bg-overlay::before {
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.05) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  mask-image: radial-gradient(closest-side, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

/* Dim scattered glyphs / hex clusters */
.bg-overlay::after {
  pointer-events: none;
  background-image:
    radial-gradient(120px 80px at 20% 30%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(100px 70px at 75% 35%, rgba(96, 165, 250, 0.10), transparent 60%),
    radial-gradient(140px 100px at 35% 75%, rgba(37, 99, 235, 0.10), transparent 60%);
  opacity: 0.9;
}

.bg-pricing::after {
  background-image:
    radial-gradient(160px 110px at 20% 35%, rgba(147, 51, 234, 0.20), transparent 60%),
    radial-gradient(120px 90px at 78% 30%, rgba(20, 184, 166, 0.20), transparent 60%),
    radial-gradient(200px 140px at 40% 78%, rgba(34, 197, 94, 0.14), transparent 60%);
}

/* Minimal pulse glow: very slow, very subtle */
@keyframes slowPulse {
  0%, 100% { opacity: 0.9; filter: drop-shadow(0 0 0 rgba(34, 211, 238, 0)); }
  50% { opacity: 1; filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.10)); }
}

.bg-overlay::after {
  animation: slowPulse 12s ease-in-out infinite;
}

.site {
  position: relative;
}

/* Section nav (top-left) */
.section-nav {
  position: fixed;
  top: 14px;
  left: auto;
  right: 16px;
  z-index: 50;
  background: rgba(2, 6, 12, 0.45);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  backdrop-filter: blur(6px);
}
.section-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 14px;
}
.section-nav a {
  color: var(--fg-0);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.9;
  padding: 6px 10px;
  border-radius: 6px;
}
.section-nav a:hover {
  background: rgba(37, 99, 235, 0.15);
}
.section-nav a.active {
  color: var(--cyan);
  background: rgba(37, 99, 235, 0.15);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 96px 0;
}

.section-title {
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--fg-0);
  margin: 0 0 28px;
  text-align: center;
}

/* Section-specific backgrounds */
#features.section {
  position: relative;
  background: linear-gradient(180deg, #060b16, #04060c);
}
#features.section::before,
#features.section::after {
  display: none;
}

#about.section { position: relative; background: linear-gradient(180deg, #060b16, #04060c); }
#about.section::before,
#about.section::after { display: none; }

#screenshots.section { position: relative; background: linear-gradient(180deg, #060b16, #04060c); }
#screenshots.section::before { display: none; }

.footer { position: relative; }
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(400px 260px at 0% 100%, rgba(34, 211, 238, 0.10), transparent 70%),
    radial-gradient(340px 220px at 100% 100%, rgba(96, 165, 250, 0.08), transparent 70%);
}

/* (Removed) CTA Rotator Footer styles */

/* Visually hidden utility for a11y */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
/* Hero */
.hero {
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
}

.hero-inner {
  padding-top: 28px;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.05;
  margin: 0 0 12px;
  text-shadow: 0 0 24px rgba(37, 99, 235, 0.25);
}

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(aria-label);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  text-shadow: -2px 0 rgba(96, 165, 250, 0.5);
  top: 0;
  clip-path: polygon(0 2%, 100% 2%, 100% 12%, 0 12%);
  animation: glitch 4s infinite linear alternate-reverse;
  opacity: 0.3;
}

.glitch::after {
  text-shadow: 2px 0 rgba(34, 211, 238, 0.5);
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  animation-duration: 3.5s;
}

@keyframes glitch {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0, 0); }
}

.typewriter {
  display: inline-block;
  min-width: 1ch;
}
.hero-title.typing {
  display: inline-block;
  white-space: nowrap;
}
.glitch.typing::before,
.glitch.typing::after {
  display: none;
}

.caret {
  margin-left: 4px;
  color: var(--cyan);
  animation: blink 1.1s steps(1) infinite;
}

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

.tagline {
  font-size: clamp(16px, 2.8vw, 22px);
  color: var(--cyan);
  margin: 8px 0 10px;
}

.subtitle {
  color: var(--fg-dim);
  margin: 0 auto 22px;
  max-width: 720px;
}

.cta-group {
  display: inline-flex;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  text-decoration: none;
  color: var(--fg-0);
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  will-change: transform;
}

.btn-primary {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.05));
  box-shadow: var(--glow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25), var(--glow);
}

.scroll-hint {
  display: inline-block;
  margin-top: 24px;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 28px;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.scroll-hint:hover { opacity: 1; transform: translateY(2px); }

/* Hero matrix canvas */
#matrix-hero, #orbs-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.6;
}

/* Full-screen hacker style background: extend with binary particles */
.binary-particles { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0.5; }

.headline-glow {
  color: var(--fg-0);
  text-shadow: 0 0 22px rgba(0, 212, 255, 0.35), 0 0 60px rgba(0, 212, 255, 0.18);
  animation: headlinePulse 3.8s ease-in-out infinite;
}
@keyframes headlinePulse {
  0%, 100% { text-shadow: 0 0 18px rgba(0, 212, 255, 0.30), 0 0 40px rgba(0,212,255,0.18); }
  50% { text-shadow: 0 0 26px rgba(0, 212, 255, 0.55), 0 0 80px rgba(0,212,255,0.28); }
}

.subhead { color: rgba(0, 212, 255, 0.85); margin: 8px 0 6px; }
.lead { color: var(--fg-dim); max-width: 820px; margin: 8px auto 10px; }

.coming-soon-wrap { margin-top: 10px; }
.coming-soon { color: var(--cyan); letter-spacing: 0.22em; display: inline-block; }
.coming-soon::after { content: "_"; margin-left: 4px; animation: blink 1s steps(1) infinite; }

.fade-up { opacity: 0; transform: translateY(8px); animation: fadeUp 700ms ease forwards; }
.fade-up:nth-child(2) { animation-delay: 120ms; }
.fade-up:nth-child(3) { animation-delay: 240ms; }
.fade-up:nth-child(4) { animation-delay: 360ms; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-card {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.16), rgba(2, 6, 12, 0.35));
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--card-glow);
  backdrop-filter: blur(4px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2), var(--card-glow);
}

.icon-wrap {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: radial-gradient(120px 80px at 30% 20%, rgba(34, 211, 238, 0.2), rgba(37, 99, 235, 0.05));
  margin-bottom: 10px;
}

.icon {
  width: 22px;
  height: 22px;
  color: var(--fg-0);
}

.feature-card h3 {
  margin: 8px 0 6px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--fg-dim);
}

/* Terminal */
.terminal {
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(2,6,12,0.55), rgba(2,6,12,0.35));
  box-shadow: var(--card-glow);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.14);
  background: linear-gradient(180deg, rgba(30,58,138,0.15), rgba(2,6,12,0.2));
}

.terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.terminal-header .red { background: #ef4444; opacity: 0.9; }
.terminal-header .yellow { background: #f59e0b; opacity: 0.9; }
.terminal-header .green { background: #22c55e; opacity: 0.9; }
.terminal-header .title { margin-left: auto; color: var(--fg-dim); font-size: 12px; }

.terminal-body {
  padding: 16px 18px 22px;
  min-height: 180px;
  font-size: 14px;
  line-height: 1.6;
}

.terminal-line { margin: 0; white-space: pre-wrap; }
.terminal-body p { margin: 0 0 10px; color: var(--fg-0); }
.terminal-body p:last-child { margin-bottom: 0; }

/* removed screenshots grid styles */

/* Footer Typing Demo */
#footer-typing {
  background: linear-gradient(180deg, #060b16, #04060c);
  border-top: 1px solid rgba(96, 165, 250, 0.15);
}

#footer-typing .footer-typing-inner { }

.ft-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.ft-heading {
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.2;
  margin: 0 0 12px;
}
.ft-heading .ft-slot { display: inline-block; position: relative; }
.ft-heading .ft-measure { visibility: hidden; position: absolute; }
.ft-heading .ft-word { color: var(--cyan); text-shadow: 0 0 18px rgba(34, 211, 238, 0.22); }

.ft-btn { margin-top: 8px; }

.ft-right { position: relative; }
.footer-demo {
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 12px;
  min-height: 220px;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.12), rgba(2, 6, 12, 0.3));
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12), 0 12px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

/* Demo variants */
.demo-email, .demo-dm, .demo-essay, .demo-report { padding: 12px; font-size: 13px; color: var(--fg-0); }
.demo-email .bar { display: grid; gap: 6px; margin-bottom: 10px; }
.demo-email .field { background: rgba(255,255,255,0.04); border: 1px solid rgba(96,165,250,0.2); border-radius: 6px; padding: 8px; color: var(--fg-dim); }
.demo-email .body { white-space: pre-wrap; min-height: 90px; }

.demo-dm { display: grid; gap: 8px; }
.dm-bubble { max-width: 75%; padding: 8px 10px; border-radius: 12px; }
.dm-bubble.me { margin-left: auto; background: rgba(37, 99, 235, 0.25); border: 1px solid rgba(96,165,250,0.25); }
.dm-bubble.them { background: rgba(255,255,255,0.04); border: 1px solid rgba(96,165,250,0.15); }

.demo-essay .para { margin: 8px 0; opacity: 0.9; }

.demo-report .item { display: flex; gap: 8px; align-items: baseline; }
.demo-report .dot { width: 6px; height: 6px; background: var(--cyan); border-radius: 999px; margin-top: 8px; }

@media (max-width: 820px) {
  .ft-grid { grid-template-columns: 1fr; }
  .ft-right { order: -1; }
  .ft-btn { width: 100%; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(8px); }
.reveal.in-view { opacity: 1; transform: translateY(0); transition: opacity 700ms ease, transform 700ms ease; }

/* Section enter transitions */
.section { opacity: 0.98; transform: translateY(0); transition: background 600ms ease; }
.section.enter { animation: sectionFadeSlide 700ms ease both; }
@keyframes sectionFadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-group { flex-direction: column; }
  .shots-grid { grid-template-columns: 1fr; }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .glitch::before,
  .glitch::after,
  .caret {
    animation: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .page-mount, .page-unmount { animation: none !important; transition: none !important; transform: none !important; }
}

