/* ═══════════════════════════════════════════════════════════════
   schpen.net — style.css
   Dark-tech / hacker aesthetic
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Syne:wght@700;800&display=swap');

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg:           #07070a;
  --bg2:          #0d0d14;
  --purple:       #6d28d9;
  --purple-dim:   #3b1e6e;
  --purple-glow:  rgba(109, 40, 217, 0.35);
  --purple-faint: rgba(109, 40, 217, 0.07);
  --text:         #e8e6f0;
  --text-dim:     #8b87a8;
  --text-faint:   #44415a;
  --mono:         'Share Tech Mono', 'Courier New', monospace;
  --display:      'Syne', sans-serif;
  --radius:       10px;
  --terminal-bg:  rgba(8, 6, 18, 0.94);
  --terminal-border: rgba(109, 40, 217, 0.28);
  --terminal-glow:   0 0 40px rgba(109, 40, 217, 0.18),
                     0 0  0px 1px rgba(109, 40, 217, 0.10);
}

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

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  overflow: hidden;           /* single-page, no page scroll */
  -webkit-font-smoothing: antialiased;
}

/* ─── Ambient orbs ───────────────────────────────────────────── */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 18s ease-in-out infinite alternate;
}
.bg-orb--1 {
  width: 600px; height: 600px;
  top: -200px; left: -150px;
  background: radial-gradient(circle, rgba(109,40,217,0.13) 0%, transparent 70%);
  animation-duration: 22s;
}
.bg-orb--2 {
  width: 500px; height: 500px;
  bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(80,20,180,0.10) 0%, transparent 70%);
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}
@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.06); }
}

/* ─── Noise texture overlay ──────────────────────────────────── */
.noise-overlay {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: 0.028;
  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)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─── Stage / centre layout ──────────────────────────────────── */
.stage {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  /* leave room for terminal that slides down */
  padding-bottom: 120px;
}

/* ─── Logo ───────────────────────────────────────────────────── */
.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 7.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
  /* startup fade-in */
  opacity: 0;
  transform: translateY(14px);
  animation: logoIn 1s cubic-bezier(.22,1,.36,1) 0.3s forwards;
  /* subtle text glow */
  text-shadow:
    0 0 60px rgba(109, 40, 217, 0.22),
    0 0 12px rgba(109, 40, 217, 0.10);
}
@keyframes logoIn {
  to { opacity: 1; transform: translateY(0); }
}

.logo__text { color: var(--text); }

/* ─── The clickable dot ──────────────────────────────────────── */
.logo__dot {
  color: var(--purple);
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition:
    color 0.2s,
    text-shadow 0.2s,
    transform 0.18s;
  /* keep baseline aligned */
  vertical-align: baseline;
}
/* Hover: glow up */
.logo__dot:hover,
.logo__dot:focus-visible {
  color: #9f5cff;
  text-shadow:
    0 0 18px rgba(159, 92, 255, 0.80),
    0 0 40px rgba(109, 40, 217, 0.45);
  transform: scale(1.12);
  outline: none;
}
/* Pulse ring on focus (keyboard a11y) */
.logo__dot:focus-visible::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 4px;
  border: 2px solid rgba(109, 40, 217, 0.55);
  animation: ringPulse 1s ease-out forwards;
}
@keyframes ringPulse {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.5); }
}
/* Click press feedback */
.logo__dot:active { transform: scale(0.94); }

/* ─── Tagline ─────────────────────────────────────────────────── */
.tagline {
  font-family: var(--mono);
  font-size: clamp(0.7rem, 2.2vw, 1rem);
  color: var(--text-dim);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  opacity: 0;
  animation: taglineIn 1s ease 0.85s forwards;
}
@keyframes taglineIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   TERMINAL
   ═══════════════════════════════════════════════════════════════ */

/* Wrapper controls the slide-down reveal */
.terminal-wrap {
  width: min(600px, 92vw);
  /* clip so the terminal slides in from above */
  overflow: visible;
  margin-top: 18px;

  /* Hidden by default */
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    max-height 0.55s cubic-bezier(.22,1,.36,1),
    opacity    0.4s ease;
}
.terminal-wrap.is-open {
  max-height: 600px;   /* large enough to never clip */
  opacity: 1;
  pointer-events: all;
}

/* Terminal box */
.terminal {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius);
  box-shadow: var(--terminal-glow),
              inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* slide-up from slightly below */
  transform: translateY(10px);
  transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}
.terminal-wrap.is-open .terminal {
  transform: translateY(0);
}

/* ── Title bar ── */
.terminal__titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: rgba(109, 40, 217, 0.06);
  border-bottom: 1px solid var(--terminal-border);
  flex-shrink: 0;
}
.terminal__dots { display: flex; gap: 6px; }
.tdot {
  width: 11px; height: 11px;
  border-radius: 50%;
  opacity: 0.75;
}
.tdot--red    { background: #ff5f57; }
.tdot--yellow { background: #ffbd2e; }
.tdot--green  { background: #28c840; }

.terminal__title {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-left: 4px;
}

/* ── Output area ── */
.terminal__output {
  /* exactly 10 lines tall, computed from line-height */
  --lh: 1.55rem;
  max-height: calc(var(--lh) * 10);
  overflow-y: scroll;             /* scrollable */
  padding: 12px 16px 4px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: var(--lh);
  color: var(--text);
  /* hide the scrollbar visually */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}
.terminal__output::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* Output line types */
.tline { display: block; white-space: pre-wrap; word-break: break-word; }
.tline--prompt  { color: var(--purple); }
.tline--input   { color: var(--text); }
.tline--info    { color: var(--text-dim); }
.tline--success { color: #34d399; }
.tline--error   { color: #f87171; }
.tline--warn    { color: #fbbf24; }
.tline--system  { color: #818cf8; }
.tline--cmd     { color: #a78bfa; }

/* ── Input row ── */
.terminal__inputrow {
  display: flex;
  align-items: center;
  padding: 4px 16px 12px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55rem;
  flex-shrink: 0;
  gap: 0;
}
.terminal__prompt {
  color: var(--purple);
  white-space: pre;
  flex-shrink: 0;
}
.terminal__input-display {
  color: var(--text);
  white-space: pre;
  /* bullet characters inserted by JS */
}
.terminal__cursor {
  color: var(--purple);
  animation: blink 1.1s step-start infinite;
  line-height: 1;
  font-size: 0.9em;
  margin-left: 1px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── Lockout countdown line ─────────────────────────────────── */
.tline--countdown { color: #f87171; font-variant-numeric: tabular-nums; }

/* ─── Responsive tweaks ──────────────────────────────────────── */
@media (max-width: 480px) {
  .stage { padding-bottom: 80px; }
  .terminal-wrap { width: 95vw; }
  .terminal__output { font-size: 0.75rem; }
  .terminal__inputrow { font-size: 0.75rem; }
}
