/* MultiCoach — identidad: ink azul profundo + acento ámbar, serif expresiva. */
:root {
  --ink: #0c1b2a;
  --ink-2: #0f2436;
  --surface: #10283b;
  --surface-2: #16324a;
  --line: rgba(255, 255, 255, 0.10);
  --text: #eaf1f6;
  --text-dim: #9db1c2;
  --amber: #f0a441;
  --amber-strong: #e8912a;
  --teal: #4fd1c5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-display: 'Fraunces', Georgia, serif;
  --font-ui: 'Sora', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 78% -10%, #1b3d59 0%, rgba(27, 61, 89, 0) 60%),
    radial-gradient(900px 600px at 8% 8%, #143047 0%, rgba(20, 48, 71, 0) 55%),
    linear-gradient(180deg, var(--ink) 0%, #08131e 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.bg-atmos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.10), transparent 60%),
    radial-gradient(2px 2px at 70% 60%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(79, 209, 197, 0.18), transparent 60%);
  opacity: 0.6;
  z-index: 0;
}

/* Header */
.site-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 56px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  color: var(--amber);
  font-size: 1.1rem;
  transform: translateY(-1px);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--text); }

.site-nav-cta {
  color: var(--ink) !important;
  background: var(--amber);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
}

/* Hero */
main { position: relative; z-index: 2; }

.hero {
  padding: clamp(40px, 9vw, 110px) clamp(16px, 5vw, 56px) clamp(30px, 6vw, 60px);
  max-width: 980px;
}

.hero-eyebrow {
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

.hero-title em {
  font-style: italic;
  color: var(--amber);
}

.hero-sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 620px;
  line-height: 1.55;
  margin: 0 0 32px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(180deg, var(--amber) 0%, var(--amber-strong) 100%);
  color: #211403;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 24px rgba(240, 164, 65, 0.28);
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: default; transform: none; }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 13px 24px;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

/* Sections */
.section-head { margin-bottom: 26px; }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.section-head p { color: var(--text-dim); margin: 0; }

.coaches, .steps {
  padding: clamp(24px, 5vw, 60px) clamp(16px, 5vw, 56px);
  max-width: 1100px;
}

/* Coach grid */
.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.coach-loading { color: var(--text-dim); }

.coach-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.coach-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--teal));
  opacity: 0.9;
}

.coach-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 164, 65, 0.5);
}

.coach-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 6px 0 0;
}

.coach-card p {
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.coach-card-meta {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 600;
}

.coach-card-go {
  margin-top: auto;
  color: var(--amber);
  font-weight: 600;
}

/* Steps */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.steps-list li {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--text);
  font-size: 1.05rem;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.steps-list span {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  background: var(--amber);
}

.site-foot {
  position: relative;
  z-index: 2;
  padding: 40px clamp(16px, 5vw, 56px) calc(40px + var(--safe-b));
  color: var(--text-dim);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

/* ============ Coach / session page ============ */
.coach-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  padding: 12px clamp(16px, 4vw, 40px) 24px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.coach-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--ink-2) 100%);
  padding: 22px;
  position: sticky;
  top: 12px;
}

.coach-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  margin: 0 0 8px;
}

.coach-desc { color: var(--text-dim); margin: 0 0 18px; line-height: 1.5; font-size: 0.92rem; }

.side-h {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin: 0 0 12px;
}

.escenario-list { display: grid; gap: 10px; }

.escenario {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  color: var(--text);
  display: grid;
  gap: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.escenario:hover { background: rgba(255, 255, 255, 0.05); }

.escenario.active {
  border-color: var(--amber);
  background: rgba(240, 164, 65, 0.10);
}

.escenario-name { font-weight: 600; }
.escenario-desc { color: var(--text-dim); font-size: 0.85rem; line-height: 1.4; }

.session {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--ink-2) 100%);
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.session-empty {
  margin: auto;
  color: var(--text-dim);
  padding: 40px;
  text-align: center;
}

.session-live { display: flex; flex-direction: column; height: 78vh; }

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.session-scenario { font-weight: 600; color: var(--text); }

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.msg-assistant, .msg-system-note { justify-content: flex-start; }

.msg-bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 16px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.msg-assistant .msg-bubble {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.msg-user .msg-bubble {
  background: linear-gradient(180deg, var(--amber) 0%, var(--amber-strong) 100%);
  color: #211403;
  border-bottom-right-radius: 4px;
}

.msg-system-note .msg-bubble {
  background: transparent;
  color: var(--text-dim);
  font-style: italic;
  border: 1px dashed var(--line);
}

.composer {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  align-items: flex-end;
}

.session-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.voice-player,
.voice-hint,
.btn-msg-hear {
  display: none !important;
}

#btn-voice-toggle.active {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-mic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.btn-mic.recording {
  border-color: #e85d4c;
  background: rgba(232, 93, 76, 0.2);
  box-shadow: 0 0 0 2px rgba(232, 93, 76, 0.35);
}

.composer textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.4;
  max-height: 140px;
}

.composer textarea:focus {
  outline: none;
  border-color: var(--amber);
}

/* Eval */
.eval { padding: 26px; overflow-y: auto; }

.eval-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
}

.eval-score-num { font-size: 3.4rem; font-weight: 700; color: var(--amber); }
.eval-score-max { color: var(--text-dim); font-size: 1.2rem; }

.eval-resumen { color: var(--text); line-height: 1.55; margin: 8px 0 22px; }

.eval-criterios { display: grid; gap: 12px; margin-bottom: 22px; }

.eval-crit {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.eval-crit-top {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 6px;
}

.eval-crit-top b { color: var(--teal); }
.eval-crit p { margin: 0; color: var(--text-dim); font-size: 0.9rem; line-height: 1.45; }

.eval-h {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 10px;
}

.eval-consejos { margin: 0 0 22px; padding-left: 18px; color: var(--text); line-height: 1.6; }

@media (max-width: 820px) {
  .coach-main { grid-template-columns: 1fr; }
  .coach-side { position: static; }
  .session-live { height: 70vh; }
}
