/* ── Reset ───────────────────────────────────────────────────────────────────── */

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

/* ── Base ────────────────────────────────────────────────────────────────────── */

body {
  background: #111c27;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;     /* re-enabled on hero via body.on-hero */
  font-family: 'Exo 2', system-ui, -apple-system, sans-serif;
  color: #e8e4e0;
  cursor: crosshair;
}
body.on-hero { touch-action: auto; }

canvas {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 0;
}

/* ── Vertex label layer ──────────────────────────────────────────────────────── */

#label-layer {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.vlabel {
  position: absolute;
  top: 0; left: 0;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: #c9878e;
  text-shadow: 0 0 12px rgba(176, 96, 110, 0.75);
  white-space: nowrap;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ── Nav ─────────────────────────────────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 52px;
  background: linear-gradient(to bottom, rgba(10,17,26,0.75) 0%, transparent 100%);
}

.logo {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ecddd5;
  text-decoration: none;
  user-select: none;
}
.logo em { font-style: normal; color: #c9878e; }

/* ── Hero ────────────────────────────────────────────────────────────────────── */

.hero {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 0 24px;
  transition: opacity 0.4s ease;
}
.hero.dim { opacity: 0.08; }

.hero-eyebrow {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #c9878e;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 1s ease 0.4s forwards;
}

.hero-headline {
  font-size: clamp(32px, 4.5vw, 68px);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #f2eae4;
  max-width: 800px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
}
.hero-headline em { font-style: normal; color: #c9878e; }

.hero-sub {
  font-size: 15px;
  font-weight: 300;
  color: rgba(236, 221, 213, 0.5);
  letter-spacing: 0.03em;
  margin-bottom: 52px;
  max-width: 480px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
}

.hero-cta {
  pointer-events: auto;
  display: inline-block;
  padding: 13px 40px;
  border: 1px solid rgba(201, 135, 142, 0.45);
  color: #c9878e;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
  background: transparent;
}
.hero-cta:hover {
  background: rgba(201, 135, 142, 0.1);
  border-color: #c9878e;
  color: #e8bdb8;
}

/* ── Panel backdrop ──────────────────────────────────────────────────────────── */

.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 63;
  background: rgba(8, 14, 22, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.panel-backdrop.active {
  opacity: 1;
  pointer-events: auto;
  cursor: default;
}

/* ── Article panels ──────────────────────────────────────────────────────────── */

.panel {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.panel.active {
  opacity: 1;
  pointer-events: auto;
}

.panel-inner {
  position: relative;
  background: rgba(10, 18, 28, 0.97);
  border: 1px solid rgba(201, 135, 142, 0.18);
  padding: 52px 56px 48px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  touch-action: pan-y;
  transform: translateY(28px);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.4, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(201,135,142,0.25) transparent;
}
.panel.active .panel-inner { transform: translateY(0); }

.panel-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(236, 221, 213, 0.35);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
  font-family: inherit;
}
.panel-close:hover { color: #c9878e; }

.panel-eyebrow {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(201, 135, 142, 0.7);
  margin-bottom: 10px;
}

.panel-title {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: #f2eae4;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(201, 135, 142, 0.22);
  margin-bottom: 28px;
}

.panel-body p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(236, 221, 213, 0.72);
  margin-bottom: 20px;
}
.panel-body p:last-child { margin-bottom: 0; }

.panel-body blockquote {
  border-left: 2px solid #c9878e;
  margin: 24px 0 0;
  padding: 4px 0 4px 20px;
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.75;
  color: rgba(236, 221, 213, 0.88);
}

.punch {
  color: #c9878e;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 13px;
  text-transform: uppercase;
}

.panel-social {
  display: flex;
  gap: 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(201, 135, 142, 0.12);
}
.panel-social a {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 221, 213, 0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.panel-social a:hover { color: #c9878e; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */

.panel-form { margin-top: 4px; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.form-group.full { flex: none; width: 100%; margin-bottom: 16px; }
.form-group label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 135, 142, 0.6);
}
.form-group input,
.form-group textarea {
  background: rgba(201, 135, 142, 0.05);
  border: 1px solid rgba(201, 135, 142, 0.2);
  color: #ecddd5;
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: rgba(201, 135, 142, 0.55); }
.form-group textarea { height: 100px; }
.form-actions { display: flex; gap: 12px; margin-top: 4px; }

.btn-primary {
  padding: 11px 32px;
  border: 1px solid rgba(201, 135, 142, 0.5);
  background: rgba(201, 135, 142, 0.08);
  color: #c9878e;
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary:hover { background: rgba(201, 135, 142, 0.16); border-color: #c9878e; color: #e8bdb8; }
.btn-primary:disabled { opacity: 0.35; cursor: default; pointer-events: none; }

.btn-secondary {
  padding: 11px 24px;
  border: 1px solid rgba(236, 221, 213, 0.1);
  background: transparent;
  color: rgba(236, 221, 213, 0.3);
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: rgba(236, 221, 213, 0.25); color: rgba(236, 221, 213, 0.6); }

/* ── Click hint ──────────────────────────────────────────────────────────────── */

.click-hint {
  position: fixed;
  bottom: 32px;
  right: 52px;
  z-index: 10;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(236, 221, 213, 0.2);
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1s ease 2.2s forwards;
  transition: opacity 0.6s ease;
}

/* ── Ripple ──────────────────────────────────────────────────────────────────── */

.ripple {
  position: fixed;
  border-radius: 50%;
  border: 1px solid rgba(201, 135, 142, 0.7);
  pointer-events: none;
  z-index: 30;
  transform: translate(-50%, -50%) scale(0);
  animation: rippleOut 0.9s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

/* ── Intro suppression ───────────────────────────────────────────────────────── */

body.intro .hero > *,
body.intro .scroll-hint,
body.intro .click-hint {
  animation: none !important;
  opacity: 0 !important;
  transition: none !important;
}

/* ── Keyframes ───────────────────────────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1;   }
}
@keyframes rippleOut {
  to { transform: translate(-50%, -50%) scale(5); opacity: 0; }
}

/* ── Mobile (shared rules) ───────────────────────────────────────────────────── */

@media (max-width: 640px) {
  nav { padding: 20px 24px; }
  .click-hint { right: 20px; bottom: 24px; }
  .panel { padding: 12px; }
  .panel-inner { padding: 40px 24px 32px; }
  .form-row { flex-direction: column; }
}
