/* ===== ANESTHESIE.CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;0,900;1,400;1,700&family=Inconsolata:wght@300;400;500;700&family=Raleway:wght@300;400;500;600&display=swap');

:root {
  --void:        #03050f;
  --deep:        #080d22;
  --panel:       #0e1535;
  --card:        #121b3e;
  --indigo:      #3d5af1;
  --violet:      #7c5cbf;
  --lavender:    #a78bfa;
  --glow-indigo: rgba(61,90,241,0.18);
  --glow-violet: rgba(124,92,191,0.15);
  --text:        #e2e8f8;
  --muted:       #6b7fa8;
  --subtle:      #2a3460;
  --border:      rgba(61,90,241,0.2);
  --font-head:   'Playfair Display', serif;
  --font-body:   'Raleway', sans-serif;
  --font-mono:   'Inconsolata', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--void);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
}

/* Starfield bg */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 20%, rgba(167,139,250,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 60%, rgba(167,139,250,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 15%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 75%, rgba(167,139,250,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 85%, rgba(255,255,255,0.15) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 55% 40%, rgba(167,139,250,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 50%, rgba(255,255,255,0.15) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Ambient glow blobs */
body::after {
  content: '';
  position: fixed;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(61,90,241,0.08) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
  z-index: 0;
  animation: drift 12s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-60px, 80px); }
}

/* ── PROGRESS ── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--lavender));
  width: 0%; z-index: 200;
  box-shadow: 0 0 12px var(--indigo);
  transition: width .1s;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  background: rgba(3,5,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-head);
  font-size: 1rem; font-style: italic;
  color: var(--lavender);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--muted); text-decoration: none;
  letter-spacing: .1em; transition: color .2s;
}
.nav-links a:hover { color: var(--lavender); }

.nav-pill {
  font-family: var(--font-mono); font-size: .7rem;
  background: var(--glow-indigo); border: 1px solid var(--border);
  color: var(--lavender); padding: .28rem .75rem; border-radius: 100px;
}

/* ── HERO ── */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem 3rem 4rem;
  overflow: hidden;
}

/* ECG line */
.hero-ecg {
  position: absolute; bottom: 3rem; left: 0; right: 0;
  height: 60px; opacity: .18;
  pointer-events: none;
}

.hero-label {
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--indigo); letter-spacing: .22em; text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .7rem;
}
.hero-label::before {
  content: ''; width: 28px; height: 1px; background: var(--indigo);
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 900; line-height: 1.0;
  letter-spacing: -.02em; margin-bottom: 1.4rem;
  background: linear-gradient(135deg, var(--text) 30%, var(--lavender) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: .95rem; color: var(--muted); max-width: 560px;
  line-height: 1.85; margin-bottom: 2.5rem; font-weight: 300;
}

.hero-kpis {
  display: flex; gap: 3rem; flex-wrap: wrap;
}
.kpi { display: flex; flex-direction: column; }
.kpi-val {
  font-family: var(--font-head); font-size: 2.4rem; font-weight: 700;
  color: var(--lavender); line-height: 1;
}
.kpi-lbl {
  font-family: var(--font-mono); font-size: .68rem; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase; margin-top: .3rem;
}

/* ── SECTION ── */
.sec { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 5rem 3rem; }

.sec-hd { display: flex; align-items: center; gap: 1rem; margin-bottom: 3rem; }
.sec-num { font-family: var(--font-mono); font-size: .72rem; color: var(--indigo); letter-spacing: .18em; }
.sec-title { font-family: var(--font-head); font-size: clamp(1.5rem,2.8vw,2.3rem); font-weight: 700; }
.sec-line { flex: 1; height: 1px; background: var(--border); margin-left: .8rem; }

/* ── TYPE CARDS ── */
.types-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5px;
  background: var(--border); border: 1px solid var(--border);
}
.type-card {
  background: var(--card); padding: 2rem;
  position: relative; overflow: hidden;
  transition: background .25s;
}
.type-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--lavender));
  transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.type-card:hover::after { transform: scaleX(1); }
.type-card:hover { background: var(--panel); }
.type-badge {
  font-family: var(--font-mono); font-size: .65rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--lavender);
  background: var(--glow-violet); border: 1px solid rgba(167,139,250,.2);
  padding: .2rem .6rem; border-radius: 2px; display: inline-block; margin-bottom: .8rem;
}
.type-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; margin-bottom: .6rem; }
.type-desc { font-size: .86rem; color: var(--muted); line-height: 1.75; }
.type-agents { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.agent-tag {
  font-family: var(--font-mono); font-size: .65rem; padding: .18rem .55rem;
  border: 1px solid var(--border); color: var(--muted); border-radius: 2px;
}

/* ── MONITORING TABLE ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 4px; margin-top: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
thead { background: var(--panel); }
th {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--lavender);
  padding: .9rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border);
}
td { padding: .9rem 1.2rem; border-bottom: 1px solid rgba(61,90,241,.07); color: var(--text); vertical-align: top; }
tr:hover td { background: var(--glow-indigo); }
tr:last-child td { border-bottom: none; }

.dot-green  { color: #4ade80; font-size: .9rem; }
.dot-amber  { color: #fbbf24; font-size: .9rem; }
.dot-red    { color: #f87171; font-size: .9rem; }

/* ── PHASES TIMELINE ── */
.phases { display: flex; flex-direction: column; gap: 0; margin-top: 2rem; }
.phase-item {
  display: grid; grid-template-columns: 60px 1fr;
  gap: 1.5rem; padding: 1.8rem 0;
  border-bottom: 1px solid rgba(61,90,241,.08);
  opacity: 0; transform: translateX(-16px);
  transition: opacity .5s, transform .5s;
}
.phase-item.visible { opacity: 1; transform: translateX(0); }
.phase-time {
  font-family: var(--font-mono); font-size: .75rem; color: var(--indigo);
  font-weight: 700; padding-top: .1rem; text-align: right;
}
.phase-body {}
.phase-title { font-family: var(--font-head); font-size: 1rem; font-weight: 600; margin-bottom: .4rem; }
.phase-desc { font-size: .87rem; color: var(--muted); line-height: 1.75; }

/* ── AGENTS GRID ── */
.agents-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 2rem;
}
.agent-card {
  background: var(--card); border: 1px solid var(--border); padding: 1.5rem;
  transition: border-color .25s, transform .25s;
}
.agent-card:hover { border-color: var(--lavender); transform: translateY(-3px); }
.agent-class { font-family: var(--font-mono); font-size: .65rem; color: var(--indigo); letter-spacing: .14em; text-transform: uppercase; margin-bottom: .5rem; }
.agent-name { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.agent-info { font-size: .8rem; color: var(--muted); line-height: 1.65; }
.agent-dose { margin-top: .6rem; font-family: var(--font-mono); font-size: .7rem; color: var(--lavender); }

/* ── SCORE CARD ── */
.score-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 2rem; margin-top: 2rem;
}
.score-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; }
.asa-list { display: flex; flex-direction: column; gap: .8rem; }
.asa-row { display: flex; gap: 1rem; align-items: flex-start; }
.asa-grade {
  flex-shrink: 0; width: 52px; height: 52px;
  border-radius: 4px; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 900;
}
.asa-1 { background: rgba(74,222,128,.12); color: #4ade80; border: 1px solid rgba(74,222,128,.25); }
.asa-2 { background: rgba(163,230,53,.1); color: #a3e635; border: 1px solid rgba(163,230,53,.25); }
.asa-3 { background: rgba(251,191,36,.1); color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.asa-4 { background: rgba(251,113,133,.1); color: #fb7185; border: 1px solid rgba(251,113,133,.25); }
.asa-5 { background: rgba(248,113,113,.15); color: #f87171; border: 1px solid rgba(248,113,113,.3); }
.asa-e { background: rgba(167,139,250,.1); color: var(--lavender); border: 1px solid rgba(167,139,250,.25); }
.asa-body {}
.asa-def { font-size: .87rem; font-weight: 600; color: var(--text); margin-bottom: .2rem; }
.asa-desc { font-size: .8rem; color: var(--muted); line-height: 1.6; }

/* ── FADE IN ── */
.fi { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.fi.visible { opacity: 1; transform: translateY(0); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  z-index: 1; position: relative;
}
.ft-l { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }
.ft-r { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }

/* ── ALERT ── */
.alert {
  background: rgba(248,113,113,.07); border: 1px solid rgba(248,113,113,.25);
  border-left: 3px solid #f87171;
  padding: 1rem 1.4rem; border-radius: 4px;
  font-size: .87rem; color: #fca5a5; line-height: 1.7; margin-top: 1rem;
}
.alert strong { color: #f87171; }

/* ── RESPONSIVE ── */
@media(max-width:768px){
  nav { padding: 0 1.2rem; }
  .nav-links { display: none; }
  .sec { padding: 3rem 1.2rem; }
  .hero { padding: 7rem 1.2rem 3rem; }
  .asa-row { flex-wrap: wrap; }
}
