/* Styles for the TSLC'IA fan-clone. Dark cyan/amber palette lifted from the
   original site; section 1 (hero) is decorative illustration, section 2
   (#story) pitches TSLC'IA to the TSLC AI Mastermind Group. */

:root {
  --bg: #04080f;
  --nebula-1: #122c43;
  --nebula-2: #0c1d30;
  --nebula-3: #07111f;
  --cyan: #00e5ff;
  --amber: #f5a623;
  --amber-bright: #ffd080;
  --gold: #c9a84c;
  --gold-bright: #e8c96a;
  --text: #f0ede8;
  --text-muted: rgba(240, 237, 232, 0.65);
  --font-sans: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Share Tech Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
}
body.has-cursor { cursor: none; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; color: var(--cyan); background: #04080f; padding: 8px 12px; }

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 999999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cursor-dot { width: 6px; height: 6px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.cursor-ring { width: 28px; height: 28px; border: 1px solid rgba(0, 229, 255, 0.6); }
body.has-cursor .cursor-dot, body.has-cursor .cursor-ring { opacity: 1; }
.cursor-ring.hovering { width: 40px; height: 40px; border-color: rgba(245, 166, 35, 0.75); }

/* Hero */
.hero { position: relative; height: 100vh; min-height: 680px; overflow: hidden; }
.nebula { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 95% 88% at 50% 42%, var(--nebula-1) 0%, var(--nebula-2) 38%, var(--nebula-3) 72%, var(--bg) 100%); }
#starfield { position: absolute; inset: 0; z-index: 1; opacity: 0.35; }
#waveCanvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0.22; mix-blend-mode: screen; pointer-events: none; transition: opacity 0.5s ease; }
.web { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; }

/* Large faint context rings centered on the core, behind everything —
   matches the reference's three background orbit circles. */
.web-ring { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid #1b5f78; opacity: 0.35; pointer-events: none; }
.web-ring-1 { width: 21.2vw; height: 21.2vw; }
.web-ring-2 { width: 37.6vw; height: 37.6vw; }
.web-ring-3 { width: 54.7vw; height: 54.7vw; }

/* Overview panel */
.overview-panel { position: absolute; top: 0; left: 0; z-index: 6; padding: 14px 16px 10px; cursor: pointer; user-select: none; }
.overview-bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(240, 237, 232, 0.08); overflow: hidden; }
.overview-bar span { display: block; width: 30%; height: 100%; background: linear-gradient(90deg, #a5f3fc, transparent); animation: sweep 3.4s ease-in-out infinite; }
.overview-label { display: block; font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.3em; color: rgba(165, 243, 252, 0.55); }
.overview-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-family: var(--font-mono); }
.overview-time { font-size: 1.4rem; font-weight: 500; color: var(--text); }
.overview-temp { font-size: 0.85rem; color: rgba(165, 243, 252, 0.8); }
.overview-row.muted { font-size: 0.62rem; letter-spacing: 0.08em; color: rgba(240, 237, 232, 0.4); text-transform: uppercase; }
.overview-sep { opacity: 0.5; }

.overview-menu { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease; margin-top: 0; }
.overview-panel.expanded .overview-menu { grid-template-rows: 1fr; opacity: 1; margin-top: 10px; }
.overview-menu-inner { overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.overview-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-family: var(--font-sans); font-size: 0.78rem; color: var(--text-muted); text-decoration: none; border: 1px solid rgba(240, 237, 232, 0.12); border-radius: 8px; background: rgba(240, 237, 232, 0.03); transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease; white-space: nowrap; }
.overview-item:hover { color: var(--text); border-color: rgba(0, 229, 255, 0.35); background: rgba(0, 229, 255, 0.06); }
.overview-item svg { width: 14px; height: 14px; flex-shrink: 0; color: rgba(0, 229, 255, 0.85); }

/* Agent nodes. The layer spans the full hero so nodes can be positioned by
   percentage, but it must not swallow clicks meant for the orb underneath —
   only the actual node buttons opt back into pointer-events. */
.agent-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.agent-node { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-sans); pointer-events: auto; }
.agent-node .ring { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid; flex-shrink: 0; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.agent-node .label { font-size: 0.95rem; color: #dfeaf3; white-space: nowrap; }
.agent-node.category-business .ring { border: 2.5px solid #00e5ff; box-shadow: 0 0 10px rgba(0, 229, 255, 0.35); }
.agent-node.category-business .label { color: #00e5ff; font-weight: 600; text-shadow: 0 0 12px rgba(0, 229, 255, 0.3); }

.agent-node.category-feature .ring { border: 2px solid #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.35); }
.agent-node.category-feature .label { color: #34d399; font-weight: 500; text-shadow: 0 0 10px rgba(52, 211, 153, 0.3); }

.agent-node.category-app .ring { border: 1.5px dashed #7f9bb3; width: 16px; height: 16px; opacity: 0.75; }
.agent-node.category-app .label { font-size: 0.82rem; color: #94a3b8; opacity: 0.85; }

.agent-node.category-agent .ring { border: 2.5px solid #f5a623; box-shadow: 0 0 10px rgba(245, 166, 35, 0.35); }
.agent-node.category-agent .label { color: #f5a623; font-weight: 600; text-shadow: 0 0 12px rgba(245, 166, 35, 0.3); }

.agent-node.is-orchestrator .ring { border: 3.5px solid #ffd080; width: 28px; height: 28px; box-shadow: 0 0 18px rgba(245, 166, 35, 0.7); }
.agent-node.is-orchestrator .label { font-weight: 700; color: #ffd080; text-shadow: 0 0 14px rgba(255, 208, 128, 0.5); }

.agent-node:hover .ring, .agent-node:focus-visible .ring { transform: scale(1.18); }
.agent-node.reversed { flex-direction: row-reverse; }

/* Central orb */
.orb-wrap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; width: min(300px, 30vw); aspect-ratio: 1; cursor: pointer; outline: none; }
.orb-ambient { position: absolute; inset: -25%; border-radius: 50%; background: radial-gradient(circle, rgba(245, 166, 35, 0.1) 0%, transparent 70%); animation: breathe 4.2s ease-in-out infinite; }
.orb-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(245, 166, 35, 0.14); }
.ring-1 { inset: 6%; }
.ring-2 { inset: -2%; border-color: rgba(245, 166, 35, 0.09); }
.ring-3 { inset: 12%; border: 2.5px solid rgba(255, 208, 128, 0.85); box-shadow: 0 0 24px rgba(245, 166, 35, 0.4); }
.ring-4 { inset: -10%; border-color: rgba(245, 166, 35, 0.07); }
.dashed { border-style: dashed; animation: spin 44s linear infinite; }
.ring-4.dashed { animation-direction: reverse; animation-duration: 64s; }
.orb-particles { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; z-index: 2; }
.orb-wrap.processing .ring-3 { box-shadow: 0 0 44px rgba(245, 166, 35, 0.75); }
.orb-wrap.processing .dashed { animation-duration: 8s; }
.orb-wrap.processing .orb-ambient { animation-duration: 1.4s; }
.orb-wrap.speaking .ring-3 { box-shadow: 0 0 56px rgba(245, 166, 35, 0.9); }
.orb-wrap.speaking .dashed { animation-duration: 5s; }
.orb-wrap.speaking .orb-ambient { animation-duration: 1s; transform: scale(1.08); }

.ring-5 { inset: -18%; border: 1px dashed rgba(0, 229, 255, 0.25); opacity: 0; transition: opacity 0.5s ease; animation: spin 52s linear infinite reverse; }
.ring-6 { inset: -26%; border: 1px dotted rgba(245, 166, 35, 0.25); opacity: 0; transition: opacity 0.5s ease; animation: spin 38s linear infinite; }
.ring-7 { inset: -34%; border: 1.5px dashed rgba(255, 208, 128, 0.3); opacity: 0; transition: opacity 0.5s ease; animation: spin 28s linear infinite reverse; }
.ring-8 { inset: -42%; border: 1px solid rgba(0, 229, 255, 0.2); opacity: 0; transition: opacity 0.5s ease; }
.ring-9 { inset: -50%; border: 1px dashed rgba(245, 166, 35, 0.25); opacity: 0; transition: opacity 0.5s ease; animation: spin 20s linear infinite; }

.orb-wrap.processing .ring-5, .orb-wrap.processing .ring-6 { opacity: 0.8; }
.orb-wrap.speaking .ring-5, .orb-wrap.speaking .ring-6, .orb-wrap.speaking .ring-7, .orb-wrap.speaking .ring-8, .orb-wrap.speaking .ring-9 { opacity: 1; }

.sound-wave { position: absolute; inset: 12%; border-radius: 50%; border: 1.5px solid rgba(255, 208, 128, 0.7); opacity: 0; pointer-events: none; }
.orb-wrap.speaking .sound-wave { animation: sonar 1.8s ease-out infinite; }
.orb-wrap.speaking .wave-1 { animation-delay: 0.5s; }
.orb-wrap.speaking .wave-2 { animation-delay: 1s; }
.orb-wrap.speaking .wave-3 { animation-delay: 1.4s; }

/* Vault Modal Styling */
.vault-modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.vault-modal.open { opacity: 1; pointer-events: auto; }
.vault-backdrop {
  position: absolute; inset: 0; background: rgba(3, 6, 12, 0.88); backdrop-filter: blur(16px);
}
.vault-card {
  position: relative; width: min(440px, 90vw);
  background: rgba(10, 18, 30, 0.95); border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 20px; padding: 32px;
  box-shadow: 0 0 60px rgba(245, 166, 35, 0.25), 0 20px 80px rgba(0,0,0,0.8);
  text-align: center; transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.vault-modal.open .vault-card { transform: scale(1) translateY(0); }
.vault-close {
  position: absolute; top: 16px; right: 18px; background: none; border: none;
  color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: color 0.2s;
}
.vault-close:hover { color: var(--text); }
.vault-badge {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.3em;
  color: var(--amber); text-transform: uppercase;
}
.vault-title {
  margin-top: 6px; font-size: 1.4rem; font-weight: 800; letter-spacing: 0.05em; color: var(--text);
}
.vault-subtitle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px;
}
.vault-subtitle {
  font-size: 0.92rem; color: rgba(165, 243, 252, 0.9);
  line-height: 1.5; font-family: var(--font-mono); text-align: left; flex: 1;
}
.vault-audio-btn {
  background: rgba(240, 237, 232, 0.08); border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--cyan); border-radius: 16px; padding: 4px 10px;
  font-family: var(--font-mono); font-size: 0.68rem; cursor: pointer;
  white-space: nowrap; transition: all 0.2s ease; flex-shrink: 0;
}
.vault-audio-btn:hover {
  background: rgba(0, 229, 255, 0.2); border-color: var(--cyan);
}
.vault-form { margin-top: 24px; }
.vault-input-wrap { display: flex; gap: 10px; }
.vault-input {
  flex: 1; padding: 12px 16px; border-radius: 30px; border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(4, 8, 15, 0.8); color: var(--text); font-family: var(--font-mono);
  font-size: 0.9rem; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.vault-input:focus { border-color: var(--cyan); box-shadow: 0 0 14px rgba(0, 229, 255, 0.4); }
.vault-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border: none; border-radius: 30px; padding: 12px 20px; color: #0a0a0a; font-weight: 800;
  font-size: 0.8rem; font-family: var(--font-mono); letter-spacing: 0.05em; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease; white-space: nowrap;
}
.vault-btn:hover { transform: scale(1.03); box-shadow: 0 0 16px rgba(245, 166, 35, 0.6); }
.vault-error {
  margin-top: 12px; font-family: var(--font-mono); font-size: 0.75rem; color: #f87171; min-height: 18px;
}
.vault-hint {
  margin-top: 16px; font-family: var(--font-mono); font-size: 0.7rem; color: rgba(240, 237, 232, 0.4);
}
.vault-code { color: var(--amber); font-weight: bold; }
.vault-card.shake { animation: shake 0.4s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

/* Mini status under the orb */
.mini-status { position: absolute; left: 50%; bottom: 68px; transform: translateX(-50%); z-index: 5; text-align: center; }
.status-row { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 26px; }
.status-row::before { content: ""; position: absolute; left: -120px; right: -120px; top: 50%; height: 0; border-top: 1px dashed rgba(245, 166, 35, 0.2); z-index: -1; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.eq span { display: block; width: 2.5px; border-radius: 1.5px; background: var(--amber); opacity: 0.3; animation: eq-bar 1.4s ease-in-out infinite; }
.status-icon { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--amber); display: flex; align-items: center; justify-content: center; background: #030200; }
.status-icon-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber-bright); box-shadow: 0 0 8px rgba(245, 166, 35, 0.85); animation: pulse-dot 2.4s ease-in-out infinite; }
.orb-status { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.4em; color: var(--amber); opacity: 0.75; }
.mini-status.processing .orb-status, .mini-status.speaking .orb-status { color: var(--amber-bright); opacity: 1; }
.mini-status.processing .eq span { opacity: 0.9; animation-duration: 0.5s; }
.mini-status.speaking .eq span { opacity: 1; animation-duration: 0.35s; }
.mini-status.processing .status-icon-dot, .mini-status.speaking .status-icon-dot { box-shadow: 0 0 16px rgba(245, 166, 35, 1); }
.orb-blinks { display: block; margin-top: 10px; }
.orb-blinks i { display: inline-block; width: 5px; height: 5px; margin: 0 3px; border-radius: 50%; background: var(--amber); animation: blink 1.6s ease-in-out infinite; }
.orb-blinks i:nth-child(2) { animation-delay: 0.2s; }
.orb-blinks i:nth-child(3) { animation-delay: 0.4s; }
.orb-hint { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); opacity: 0.35; }

.story-cue { position: absolute; left: clamp(20px, 3vw, 44px); bottom: 26px; z-index: 5; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(0, 229, 255, 0.85); text-decoration: none; text-shadow: 0 0 12px rgba(0, 229, 255, 0.4); }

/* Agent detail card */
.agent-card { position: absolute; z-index: 10; width: 320px; max-width: calc(100vw - 40px); background: rgba(8, 13, 22, 0.97); border: 1px solid rgba(0, 229, 255, 0.18); border-radius: 12px; padding: 18px 18px 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); text-align: left; }
.agent-card-header { display: flex; align-items: flex-start; gap: 10px; }
.agent-card-icon { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid; margin-top: 2px; flex-shrink: 0; }
.agent-card-title { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.agent-card-subtitle { display: block; margin-top: 2px; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.agent-card-close { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 2px 4px; }
.agent-card-close:hover { color: var(--text); }
.agent-card-label { margin: 16px 0 6px; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(240, 237, 232, 0.4); }
.agent-card-list { margin: 0; padding: 0; list-style: none; }
.agent-card-list li { position: relative; padding-left: 14px; font-size: 0.82rem; line-height: 1.6; color: var(--text-muted); }
.agent-card-list li::before { content: "•"; position: absolute; left: 0; color: var(--text-muted); }
.agent-card-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-card-pills span { font-size: 0.72rem; padding: 6px 12px; border-radius: 20px; border: 1px solid rgba(240, 237, 232, 0.15); color: var(--text-muted); }
.agent-card-footer { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(240, 237, 232, 0.08); font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.05em; color: rgba(240, 237, 232, 0.4); }
.agent-card-footer .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 6px #34d399; flex-shrink: 0; }
.agent-card-footer .dot.muted { background: rgba(200, 210, 220, 0.6); box-shadow: none; }

/* Story section */
.story { position: relative; padding: 90px 24px 110px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar { width: clamp(280px, 42vw, 560px); border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, #12324a, #1c2438); border: 1px solid rgba(0, 229, 255, 0.22); box-shadow: 0 0 60px rgba(245, 166, 35, 0.18), 0 0 120px rgba(0, 229, 255, 0.08); }
.avatar img { display: block; width: 100%; height: auto; }
.story-kicker { margin-top: 30px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(0, 229, 255, 0.8); text-decoration: none; }
.story-title { margin: 14px 0 0; font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase; }
.story-role { margin: 12px 0 0; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.story-body { max-width: 560px; margin: 22px 0 0; font-size: 1rem; line-height: 1.75; color: var(--text-muted); }
.story-cta { margin-top: 30px; display: inline-block; background: linear-gradient(135deg, var(--gold), var(--gold-bright)); color: #0a0a0a; border-radius: 50px; padding: 13px 34px; font-weight: 800; font-size: 14.5px; text-decoration: none; }
.story-note { margin: 18px 0 0; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(0, 229, 255, 0.7); }

/* Animations */
@keyframes breathe { 0%, 100% { opacity: 0.65; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 0%, 100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes eq-bar { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1.15); } }
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(360%); } }
@keyframes flow { to { stroke-dashoffset: -100; } }
@keyframes sonar { 0% { transform: scale(1); opacity: 0.6; border-width: 2px; } 100% { transform: scale(1.9); opacity: 0; border-width: 0.5px; } }

@media (max-width: 900px) {
  .agent-node .label { font-size: 0.72rem; }
  .agent-node.muted { display: none; }
}
@media (max-width: 640px) {
  .overview-panel { display: none; }
}
