:root {
  --bg: #0a0a0a;
  --surface: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.07);
  --text: #f2f2f2;
  --muted: rgba(242, 242, 242, 0.5);
  --magenta: #ff00aa;
  --cyan: #00f0ff;
  --lime: #b8ff00;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  cursor: none;
}

.mono {
  font-family: var(--font-mono);
}

@keyframes neon-snap-on {
  0%   { opacity: 0; text-shadow: none; transform: scale(0.97); }
  15%  { opacity: 1; text-shadow: 0 0 20px var(--cyan); }
  25%  { opacity: 0.35; text-shadow: none; }
  40%  { opacity: 1; text-shadow: 0 0 28px var(--magenta), 0 0 48px var(--cyan); }
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow:
      0 0 4px #fff,
      0 0 12px #fff,
      0 0 24px var(--magenta),
      0 0 48px var(--magenta),
      0 0 72px var(--cyan);
  }
}

@keyframes sign-hum {
  0%, 100% { opacity: 1; }
  94%      { opacity: 0.94; }
  96%      { opacity: 0.9; }
  97%      { opacity: 1; }
}

/* ── Background ── */

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
  animation: drift 20s ease-in-out infinite alternate;
}

.glow--magenta {
  width: 400px;
  height: 400px;
  background: var(--magenta);
  top: -12%;
  left: -8%;
}

.glow--cyan {
  width: 360px;
  height: 360px;
  background: var(--cyan);
  bottom: -10%;
  right: -6%;
  animation-delay: -7s;
}

.glow--lime {
  width: 280px;
  height: 280px;
  background: var(--lime);
  top: 40%;
  right: 20%;
  opacity: 0.12;
  animation-delay: -3s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(50px, 30px) scale(1.12); }
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(2.5rem, 6vh, 4rem) 1.5rem 3rem;
  gap: clamp(2rem, 5vh, 2.75rem);
}

/* ── Hero ── */

.hero {
  text-align: center;
  width: 100%;
  max-width: 680px;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--lime);
  margin-bottom: 1.25rem;
}

.hero__title-wrap {
  position: relative;
  display: inline-block;
  padding: 0.1em 0.2em;
}

.hero__title {
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 18vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text);
  text-shadow:
    0 0 4px #fff,
    0 0 12px #fff,
    0 0 24px var(--magenta),
    0 0 48px var(--magenta),
    0 0 72px var(--cyan);
  animation: sign-hum 6s ease-in-out infinite;
}

.hero__title.is-snapping {
  animation: neon-snap-on 0.65s ease forwards;
}

.hero__title.is-snapping.is-done {
  animation: sign-hum 6s ease-in-out infinite;
}

.hero__brand {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-top: 0.5rem;
}

.hero__tagline {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
}

.hero__tagline-sub {
  color: var(--muted);
  font-weight: 300;
}

/* ── Terminal ── */

.terminal {
  margin-top: 2rem;
  text-align: left;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.06);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.terminal__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal__dot--magenta { background: var(--magenta); box-shadow: 0 0 6px var(--magenta); }
.terminal__dot--cyan     { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.terminal__dot--lime     { background: var(--lime); box-shadow: 0 0 6px var(--lime); }

.terminal__label {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--muted);
}

.terminal__body {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--cyan);
  min-height: 2.4em;
}

.terminal__prompt {
  color: var(--lime);
}

.terminal__caret {
  animation: blink 1s step-end infinite;
  color: var(--lime);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Wordplay ── */

.wordplay {
  text-align: center;
  max-width: 560px;
  min-height: 4.5rem;
}

.wordplay__quote {
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
  transition: opacity 0.4s ease;
}

.wordplay__quote.is-fading {
  opacity: 0;
}

.wordplay__hint {
  margin-top: 0.6rem;
  font-size: 0.65rem;
  color: rgba(242, 242, 242, 0.25);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Design showcase ── */

.showcase {
  width: 100%;
  max-width: 720px;
}

.showcase__label {
  font-size: 0.72rem;
  color: var(--lime);
  text-align: center;
  margin-bottom: 0.35rem;
}

.showcase__desc {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.showcase__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.showcase-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.showcase-card--preview {
  cursor: default;
}

.showcase-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.showcase-card--preview:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 15%, transparent);
}

.showcase-card--preview:hover::before {
  opacity: 0.6;
}

.showcase-card__browser {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #111;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}

.browser-chrome__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.browser-chrome__url {
  margin-left: auto;
  font-size: 0.58rem;
  color: var(--muted);
}

.preview {
  padding: 1rem 1rem 1.1rem;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.preview--courier {
  background: linear-gradient(160deg, #1a2744 0%, #0f1829 55%, #1a1030 100%);
}

.preview--megatrends {
  background: linear-gradient(160deg, #0c1222 0%, #12102a 50%, #0a1628 100%);
}

.preview__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview__logo {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.preview--courier .preview__logo { color: #ff6b2c; }
.preview--megatrends .preview__logo { color: #e2e8f0; }
.preview--megatrends .preview__logo span { color: #3b82f6; }

.preview__pill {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  padding: 0.2rem 0.45rem;
  border-radius: 99px;
  background: rgba(255, 107, 44, 0.2);
  color: #ff8f5a;
  border: 1px solid rgba(255, 107, 44, 0.35);
}

.preview__pill--blue {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.preview__headline {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  color: #f8fafc;
}

.preview__headline--sm {
  font-size: 0.95rem;
}

.preview__track {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0.15rem;
}

.preview__track-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b2c;
  box-shadow: 0 0 8px #ff6b2c;
  flex-shrink: 0;
}

.preview__track-dot--end {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.preview__track-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #ff6b2c, #22c55e);
  opacity: 0.7;
}

.preview__grid {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.1rem;
}

.preview__tile {
  width: 1.65rem;
  height: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.preview__tile--hit {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.preview__tile--near {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.preview__cta {
  align-self: flex-start;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  background: #ff6b2c;
  color: #fff;
  font-weight: 600;
}

.preview__cta--blue {
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
}

.showcase-card__meta {
  padding: 0 0.15rem 0.15rem;
}

.showcase-card__name {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.showcase-card__url {
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 0.15rem;
}

.showcase-card__tag {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.showcase-card__badge {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

/* ── Subdomain grid ── */

.subdomains {
  width: 100%;
  max-width: 360px;
}

.subdomains__label {
  font-size: 0.72rem;
  color: var(--lime);
  margin-bottom: 0.75rem;
  text-align: center;
}

.subdomain-grid {
  list-style: none;
}

.subdomain-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.35rem 1.45rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.subdomain-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--accent-glow, rgba(255,0,170,0.14)) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.subdomain-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent, var(--magenta)), transparent 50%, var(--cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.subdomain-card:hover::before,
.subdomain-card:focus-visible::before,
.subdomain-card:hover::after,
.subdomain-card:focus-visible::after {
  opacity: 1;
}

.subdomain-card:hover,
.subdomain-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent, var(--magenta));
  box-shadow:
    0 0 20px var(--accent-shadow, rgba(255, 0, 170, 0.3)),
    0 0 40px rgba(0, 240, 255, 0.12),
    inset 0 0 20px rgba(255, 0, 170, 0.04);
  outline: none;
}

.subdomain-card__icon {
  font-size: 1rem;
  color: var(--cyan);
  line-height: 1;
}

.subdomain-card__name {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.subdomain-card__url {
  font-size: 0.72rem;
  color: var(--muted);
}

.subdomain-card__arrow {
  position: absolute;
  top: 1.35rem;
  right: 1.35rem;
  font-size: 0.9rem;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  color: var(--accent, var(--magenta));
}

.subdomain-card:hover .subdomain-card__arrow,
.subdomain-card:focus-visible .subdomain-card__arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* ── Footer ── */

.footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer__pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}

.footer__copy {
  font-size: 0.72rem;
  color: rgba(242, 242, 242, 0.28);
}

/* ── Custom cursor ── */

.cursor-ring {
  position: fixed;
  width: 28px;
  height: 28px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  mix-blend-mode: difference;
  opacity: 0;
}

.cursor-ring.is-active {
  opacity: 1;
}

.cursor-ring.is-hovering {
  width: 50px;
  height: 50px;
  border-color: var(--magenta);
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor-ring { display: none; }
}
