:root {
  --bg: #03050a;
  --surface: rgba(10, 15, 28, 0.52);
  --surface-strong: rgba(9, 14, 26, 0.80);
  --border: rgba(148, 163, 184, 0.14);
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #8b9bb4;
  --cyan: #00f5d4;
  --emerald: #10b981;
  --sky: #38bdf8;
  --violet: #818cf8;
  --magenta: #e879f9;
  --radius: 20px;
  --radius-sm: 12px;
  --max-width: 1080px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
  --ease-silk: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
}

/* Living Aurora & Neural Canvas */
#aurora-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.scanline-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 2px,
    rgba(0, 245, 212, 0.014) 3px,
    rgba(0, 0, 0, 0.05) 4px
  );
}

.scroll-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.scroll-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--sky), var(--violet), var(--magenta));
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.85);
  transition: width 0.08s linear;
}

.page-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.25s var(--ease-silk), text-shadow 0.25s var(--ease-silk);
}

a:hover {
  color: #8bfde9;
  text-shadow: 0 0 14px rgba(0, 245, 212, 0.45);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(3, 5, 10, 0.62);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(0, 245, 212, 0.4);
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.25);
  transition: transform 0.45s var(--ease-silk), box-shadow 0.45s var(--ease-silk);
}

.brand:hover img {
  transform: rotate(12deg) scale(1.06);
  box-shadow: 0 0 24px rgba(232, 121, 249, 0.5);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(10, 15, 28, 0.58);
  border: 1px solid var(--border);
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.87rem;
  font-weight: 500;
  padding: 6px 15px;
  border-radius: 999px;
  transition: color 0.25s var(--ease-silk), background 0.25s var(--ease-silk), box-shadow 0.25s var(--ease-silk);
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: rgba(0, 245, 212, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 245, 212, 0.28);
  text-shadow: none;
}

/* Hero */
.hero {
  padding: 96px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 245, 212, 0.07);
  border: 1px solid rgba(0, 245, 212, 0.26);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: breatheDot 3.2s ease-in-out infinite;
}

@keyframes breatheDot {
  0%, 100% { transform: scale(0.88); opacity: 0.6; box-shadow: 0 0 8px var(--cyan); }
  50% { transform: scale(1.28); opacity: 1; box-shadow: 0 0 18px var(--cyan); }
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 5vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #ffffff;
}

.aurora-text {
  background: linear-gradient(115deg, #ffffff 8%, var(--cyan) 38%, var(--sky) 64%, var(--magenta) 96%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: auroraShimmer 11s ease-in-out infinite;
}

@keyframes auroraShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-lead {
  margin: 0 0 34px;
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-silk), box-shadow 0.3s var(--ease-silk), background 0.3s var(--ease-silk), border-color 0.3s var(--ease-silk);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.22), rgba(56, 189, 248, 0.20));
  color: #ffffff;
  border-color: rgba(0, 245, 212, 0.52);
  box-shadow: 0 0 28px rgba(0, 245, 212, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-primary:hover {
  color: #ffffff;
  text-shadow: none;
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.34), rgba(232, 121, 249, 0.26));
  box-shadow: 0 10px 36px rgba(0, 245, 212, 0.3), 0 0 28px rgba(232, 121, 249, 0.2);
}

.btn-secondary {
  background: rgba(10, 15, 28, 0.58);
  color: var(--text-soft);
  border-color: var(--border);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  color: #ffffff;
  text-shadow: none;
  transform: translateY(-2px);
  border-color: rgba(232, 121, 249, 0.45);
  box-shadow: 0 10px 28px rgba(232, 121, 249, 0.16);
}

/* Ambient Living Sculpture (Zero Buttons / Zero Captions) */
.sculpture-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

.phi-sculpture {
  position: relative;
  width: 300px;
  height: 300px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.phi-aura {
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.24) 0%, rgba(56, 189, 248, 0.14) 36%, rgba(232, 121, 249, 0.12) 60%, transparent 76%);
  filter: blur(22px);
  animation: auraBreath 7s ease-in-out infinite;
}

@keyframes auraBreath {
  0%, 100% { transform: scale(0.92) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.1) rotate(18deg); opacity: 1; }
}

.phi-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 245, 212, 0.22);
}

.phi-ring.r1 {
  inset: 0;
  border-top-color: rgba(0, 245, 212, 0.85);
  border-right-color: rgba(232, 121, 249, 0.45);
  animation: spinOrbit 26s linear infinite;
}

.phi-ring.r2 {
  inset: 28px;
  border-style: dashed;
  border-color: rgba(129, 140, 248, 0.34);
  animation: spinOrbit 20s linear reverse infinite;
}

.phi-ring.r3 {
  inset: 58px;
  border-color: rgba(232, 121, 249, 0.28);
  border-bottom-color: rgba(56, 189, 248, 0.85);
  animation: spinOrbit 14s linear infinite;
}

@keyframes spinOrbit {
  to { transform: rotate(360deg); }
}

.phi-core {
  position: relative;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.38), rgba(0, 245, 212, 0.3) 34%, rgba(129, 140, 248, 0.24) 68%, rgba(3, 5, 10, 0.92) 100%);
  border: 1px solid rgba(0, 245, 212, 0.55);
  box-shadow: 0 0 48px rgba(0, 245, 212, 0.34), inset 0 0 28px rgba(232, 121, 249, 0.24);
  display: grid;
  place-items: center;
  will-change: transform;
}

.phi-glyph {
  font-size: 2.5rem;
  font-weight: 300;
  color: #ffffff;
  text-shadow: 0 0 22px rgba(0, 245, 212, 0.9), 0 0 38px rgba(232, 121, 249, 0.45);
}

/* Sections */
.section {
  padding: 68px 0;
  border-top: 1px solid var(--border);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  overflow: hidden;
  transition: transform 0.35s var(--ease-silk), border-color 0.35s var(--ease-silk), box-shadow 0.35s var(--ease-silk);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    rgba(0, 245, 212, 0.14),
    rgba(232, 121, 249, 0.06) 46%,
    transparent 72%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 212, 0.38);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.45), 0 0 32px rgba(0, 245, 212, 0.1);
}

.card:hover::before {
  opacity: 1;
}

.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  font-size: 1.24rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

/* Channels */
.channels-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}

.channels-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--magenta);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.channel-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease-silk), transform 0.25s var(--ease-silk), background 0.25s var(--ease-silk);
}

.channel-card:hover {
  border-color: rgba(0, 245, 212, 0.44);
  background: rgba(0, 245, 212, 0.06);
  transform: translateY(-2px);
}

.channel-role {
  font-size: 0.88rem;
  color: var(--text-soft);
}

.channel-addr {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--cyan);
}

/* Subpages */
.page-hero {
  padding: 64px 0 38px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.95rem, 3.8vw, 2.75rem);
  letter-spacing: -0.035em;
  color: #ffffff;
}

.page-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  margin: 0;
  letter-spacing: 0.06em;
}

.prose {
  padding: 44px 0 80px;
}

.prose-panel {
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 42px;
}

.prose h2 {
  margin: 34px 0 12px;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 22px 0 8px;
  font-size: 1.02rem;
  color: var(--cyan);
}

.prose p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-soft);
}

.prose li {
  margin-bottom: 8px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.24);
  color: var(--cyan);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.05);
}

.data-table td {
  color: var(--text-soft);
}

.callout {
  background: rgba(4, 8, 18, 0.68);
  border: 1px solid rgba(0, 245, 212, 0.26);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 24px 0 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Forms */
.support-form {
  background: rgba(4, 8, 18, 0.58);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 24px 0 36px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.form-grid .field {
  margin-bottom: 0;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(9, 13, 25, 0.88);
  color: #ffffff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5b6b86;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.16);
}

.form-note {
  margin: 12px 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(3, 5, 10, 0.76);
  backdrop-filter: blur(14px);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand strong {
  color: #ffffff;
  margin-right: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--cyan);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(3, 5, 10, 0.85);
}

.mobile-nav a {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.mobile-nav a.active,
.mobile-nav a:hover {
  color: #ffffff;
  border-color: rgba(0, 245, 212, 0.35);
  background: rgba(0, 245, 212, 0.1);
}

@media (max-width: 860px) {
  .hero-grid,
  .grid-2,
  .channel-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .phi-sculpture {
    width: 220px;
    height: 220px;
  }

  .phi-core {
    width: 96px;
    height: 96px;
  }

  .prose-panel {
    padding: 24px 20px;
  }

  .channel-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .nav-links {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
