:root {
  /* Design System v2 — Lighter Palette */
  --color-bg: #0f1419;
  --color-surface: #1a2332;
  --color-surface-alt: #1e2838;
  --color-accent: #2dd4bf;
  --color-accent-warm: #fb923c;
  --color-accent-purple: #a78bfa;
  --color-text-primary: #f7f8f8;
  --color-text-secondary: #8a8f98;
  --color-text-muted: #62666d;
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-teal: rgba(45, 212, 191, 0.15);
  --color-border-teal-hover: rgba(45, 212, 191, 0.35);
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius-std: 8px;
  --radius-panel: 12px;
  --radius-btn: 6px;
  --radius-pill: 9999px;
  --max-width: 1200px;
  --section-pad: 140px;
  --section-pad-mobile: 80px;
  /* Glassmorphism tokens */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* Ambient warm body glow for glass depth */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse at 30% 20%, rgba(251, 146, 60, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -15%;
  right: -10%;
  width: 55%;
  height: 55%;
  background: radial-gradient(ellipse at 70% 80%, rgba(167, 139, 250, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-subtle);
}
.nav-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-prompt {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 23px;
}
.nav-name {
  font-family: var(--font-mono), var(--font-body);
  color: var(--color-text-primary, var(--text));
  font-weight: 400;
}
.cursor-blink {
  animation: cursorBlink 1.2s steps(2) infinite;
}
@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--color-accent); }
.nav-links a.active { color: var(--color-accent); }
.nav-cta {
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  transition: opacity 0.2s ease;
}
.nav-cta:hover { opacity: 0.9; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-direction: column;
  padding: 20px 40px;
  gap: 20px;
  z-index: 99;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 6px 0;
}
.mobile-menu a:hover { color: var(--color-accent); }
.mobile-menu a.active { color: var(--color-accent); }
.mobile-menu .nav-cta {
  align-self: flex-start;
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-btn);
  margin-top: 4px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 204px 24px 120px;
  background: var(--color-bg);
  text-align: center;
}
.page-header .section-inner { position: relative; z-index: 1; max-width: var(--max-width); margin: 0 auto; }
/* Warm peach glow behind hero */
.page-header::after {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 50%;
  height: 70%;
  background: radial-gradient(ellipse at 70% 30%, rgba(251, 146, 60, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.page-header h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin-bottom: 18px;
}
.page-header .header-sub {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 400;
  color: var(--color-text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== LAN PARTY HERO SVG ===== */
.lan-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
}

/* Screen flicker — different timing per monitor for organic feel */
.lan-screen-1 { animation: lanFlicker1 4.5s ease-in-out infinite; }
.lan-screen-2 { animation: lanFlicker2 5.3s ease-in-out infinite; }
.lan-screen-3 { animation: lanFlicker3 6.1s ease-in-out infinite; }
.lan-screen-4 { animation: lanFlicker4 4.8s ease-in-out infinite; }

@keyframes lanFlicker1 {
  0%, 100% { opacity: 0.28; }
  3% { opacity: 0.40; }
  6% { opacity: 0.24; }
  9% { opacity: 0.33; }
  12% { opacity: 0.28; }
  50% { opacity: 0.32; }
  53% { opacity: 0.22; }
  56% { opacity: 0.30; }
}
@keyframes lanFlicker2 {
  0%, 100% { opacity: 0.22; }
  7% { opacity: 0.18; }
  10% { opacity: 0.33; }
  40% { opacity: 0.26; }
  43% { opacity: 0.36; }
  46% { opacity: 0.22; }
  80% { opacity: 0.28; }
}
@keyframes lanFlicker3 {
  0%, 100% { opacity: 0.22; }
  15% { opacity: 0.30; }
  18% { opacity: 0.18; }
  60% { opacity: 0.28; }
  63% { opacity: 0.36; }
  66% { opacity: 0.22; }
}
@keyframes lanFlicker4 {
  0%, 100% { opacity: 0.22; }
  5% { opacity: 0.18; }
  8% { opacity: 0.31; }
  35% { opacity: 0.26; }
  38% { opacity: 0.34; }
  70% { opacity: 0.24; }
  73% { opacity: 0.30; }
}

/* Blinking terminal cursor */
.lan-cursor {
  animation: lanCursor 1.1s steps(2) infinite;
}
@keyframes lanCursor {
  0%, 50% { opacity: 0.8; }
  50.01%, 100% { opacity: 0; }
}

/* Ethernet cable glow pulse */
.lan-cable { animation: lanCableGlow 3.5s ease-in-out infinite; }
.lan-cable:nth-of-type(2) { animation-delay: 0.8s; }
.lan-cable:nth-of-type(3) { animation-delay: 1.5s; }
.lan-cable:nth-of-type(4) { animation-delay: 2.2s; }
@keyframes lanCableGlow {
  0%, 100% { opacity: 0.20; }
  50% { opacity: 0.40; }
}

/* Room ambient glow — slow breathing like monitors in a dark room */
.lan-room-glow { animation: lanRoomGlow 8s ease-in-out infinite; }
@keyframes lanRoomGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Switch LEDs blinking */
.lan-led-1 { animation: lanLed 1.5s ease-in-out infinite; }
.lan-led-2 { animation: lanLed 2.1s ease-in-out infinite 0.3s; }
.lan-led-3 { animation: lanLed 1.8s ease-in-out infinite 0.7s; }
.lan-led-4 { animation: lanLed 2.3s ease-in-out infinite 1.1s; }
@keyframes lanLed {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.3; }
}

/* Equalizer bars on monitor 4 — music visualizer feel */
.lan-eq-bar { animation: lanEq 1.2s ease-in-out infinite; }
.lan-eq-bar:nth-of-type(1)  { animation-delay: 0s;    }
.lan-eq-bar:nth-of-type(2)  { animation-delay: 0.1s;  }
.lan-eq-bar:nth-of-type(3)  { animation-delay: 0.25s; }
.lan-eq-bar:nth-of-type(4)  { animation-delay: 0.05s; }
.lan-eq-bar:nth-of-type(5)  { animation-delay: 0.3s;  }
.lan-eq-bar:nth-of-type(6)  { animation-delay: 0.15s; }
.lan-eq-bar:nth-of-type(7)  { animation-delay: 0.2s;  }
.lan-eq-bar:nth-of-type(8)  { animation-delay: 0.35s; }
.lan-eq-bar:nth-of-type(9)  { animation-delay: 0.1s;  }
.lan-eq-bar:nth-of-type(10) { animation-delay: 0.28s; }
.lan-eq-bar:nth-of-type(11) { animation-delay: 0.18s; }
.lan-eq-bar:nth-of-type(12) { animation-delay: 0.33s; }
.lan-eq-bar:nth-of-type(13) { animation-delay: 0.08s; }
.lan-eq-bar:nth-of-type(14) { animation-delay: 0.22s; }
@keyframes lanEq {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.65; }
}

/* ===== SHARED SECTION ===== */
section {
  padding: var(--section-pad) 24px;
  position: relative;
  z-index: 1;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent);
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 14px;
}
h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 40px);
  color: var(--color-text-primary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.section-subtitle {
  color: var(--color-text-secondary);
  font-size: 16px;
  font-weight: 400;
  margin-top: 14px;
  max-width: 540px;
}
.section-centered { text-align: center; }
.section-centered .section-subtitle { margin-left: auto; margin-right: auto; }

/* ===== ORIGIN STORY ===== */
.origin { background: var(--color-bg); }
/* Warm orange blob behind origin story */
.origin::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -5%;
  width: 45%;
  height: 60%;
  background: radial-gradient(ellipse at 80% 40%, rgba(251, 146, 60, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.origin-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.origin-text p {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-top: 20px;
}
.origin-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-panel);
  padding: 32px;
  box-shadow: var(--glass-shadow);
}
.lan-visual {
  width: 100%;
  max-width: 420px;
}
.lan-visual svg { width: 100%; height: auto; }

/* ===== WHY WISCOCODED ===== */
.why { background: var(--color-surface); }
/* Subtle teal-purple blob behind why section */
.why::before {
  content: '';
  position: absolute;
  top: 20%;
  left: -5%;
  width: 40%;
  height: 55%;
  background: radial-gradient(ellipse at 30% 50%, rgba(45, 212, 191, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.why-left p {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-top: 20px;
}
.why-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.why-list li {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--glass-bg);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-std);
  padding: 16px 20px;
  box-shadow: var(--glass-shadow);
  transition: border-color 0.3s ease, transform 0.2s ease;
}
.why-list li:hover {
  border-color: var(--color-border-teal-hover);
  transform: translateX(4px);
}
.why-list li .prefix {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.55;
}

/* ===== PRINCIPLES ===== */
.principles { background: var(--color-bg); }
/* Subtle purple blob behind principles */
.principles::before {
  content: '';
  position: absolute;
  top: 30%;
  right: -5%;
  width: 40%;
  height: 50%;
  background: radial-gradient(ellipse at 70% 50%, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 80px;
}
.principle-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-panel);
  padding: 32px;
  box-shadow: var(--glass-shadow);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.principle-card:hover {
  border-color: var(--color-border-teal-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.principle-card:nth-child(2) {
  border-color: rgba(167, 139, 250, 0.2);
}
.principle-card:nth-child(2):hover {
  border-color: rgba(167, 139, 250, 0.45);
}
.principle-card:nth-child(3) {
  border-color: rgba(251, 146, 60, 0.2);
}
.principle-card:nth-child(3):hover {
  border-color: rgba(251, 146, 60, 0.45);
}
.principle-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}
.principle-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ===== CTA ===== */
.cta { background: var(--color-bg); text-align: center; }
/* Warm peach glow behind CTA */
.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -5%;
  width: 45%;
  height: 70%;
  background: radial-gradient(ellipse at 30% 40%, rgba(251, 146, 60, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.cta h2 { font-size: clamp(34px, 4.5vw, 48px); }
.cta-sub {
  color: var(--color-text-secondary);
  font-size: 17px;
  margin: 16px auto 0;
  max-width: 560px;
  line-height: 1.6;
}
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-warm));
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  margin-top: 36px;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-btn:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(251, 146, 60, 0.3);
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-subtle);
  padding: 40px 24px 28px;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.footer-left {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 32px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-left .nav-prompt { font-size: 30px; }
.footer-center {
  display: flex;
  gap: 28px;
  justify-content: center;
}
.footer-center a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}
.footer-center a:hover { color: var(--color-accent); }
.footer-right {
  text-align: right;
  font-size: 14px;
  color: var(--color-text-secondary);
}
.footer-copy {
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-subtle);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; order: 1; }
  .nav-right .nav-cta { order: 2; }
  .nav-right { justify-content: flex-end; gap: 16px; }
  section { padding: var(--section-pad-mobile) 20px; }
  .page-header { padding: 174px 20px 86px; }
  .origin-grid { grid-template-columns: 1fr; gap: 40px; }
  .origin-visual { order: -1; }
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .principles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 18px; }
  .footer-left, .footer-right { justify-content: center; text-align: center; }
  .footer-left { display: inline-flex; }
}

@media (max-width: 480px) {
  .principle-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .cursor-blink { animation: none; }
  .lan-screen-1, .lan-screen-2, .lan-screen-3, .lan-screen-4 { animation: none !important; opacity: 0.28 !important; }
  .lan-cursor, .lan-cable, .lan-room-glow, .lan-led-1, .lan-led-2, .lan-led-3, .lan-led-4, .lan-eq-bar { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
