/* 30labs — hoja de estilo única. Tokens arriba, secciones abajo. */

:root {
  --bg: #0b0c0e;
  --bg-2: #101215;
  --bg-3: #14171b;
  --paper: #f5f5f3;
  --paper-2: #fcfcfb;
  --ink: #14161a;
  --ink-muted: #4c535d;
  --ink-dim: #6e7580;
  --line: #1e2126;
  --line-2: #22262c;
  --line-3: #2a2e35;
  --fg: #f2f3f5;
  --muted: #a7adb6;
  --dim: #6b727c;
  --faint: #575d66;
  --accent: #5fd3b4;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1240px;
  --pad: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 9vw, 104px);
  --radius: 4px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6.4vw, 82px); }
h2 { font-size: clamp(32px, 4.4vw, 52px); }
h3 { font-size: clamp(24px, 2.6vw, 30px); }

p { margin: 0; text-wrap: pretty; }

ul { margin: 0; padding: 0; list-style: none; }

figure, figcaption { margin: 0; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; text-align: left; }

strong { font-weight: 600; }

.mono {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 11.5px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* --- Botones --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 30px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16.5px;
  transition: background 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: #ffffff; color: var(--bg); }
.btn-ghost { border: 1px solid var(--line-3); }
.btn-ghost:hover { border-color: var(--muted); color: var(--fg); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000000; color: var(--paper); }
.btn-sm { height: 44px; padding: 0 22px; font-size: 15px; }

/* --- Nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 14, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 48px);
  padding-block: 18px;
}
.brand { display: flex; align-items: baseline; gap: 11px; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -0.04em; }
.brand-tag { color: var(--dim); font-size: 10.5px; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav-links a { color: var(--muted); }

@media (max-width: 1000px) { .nav-links { display: none; } }
@media (max-width: 560px) {
  .brand-tag { display: none; }
  .nav .btn { padding: 0 16px; font-size: 14px; }
}

/* --- Hero --- */

.hero { padding-block: clamp(56px, 8vw, 104px) 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(24px, 3vw, 34px); }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--dim); }
.dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); flex-shrink: 0; }
.hero h1 { max-width: 15ch; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--muted); max-width: 52ch; }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.rail { border-left: 1px solid var(--line); padding-left: 32px; }
.rail li { padding-block: 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.rail li:last-child { border-bottom: 0; }
.rail .mono { color: var(--accent); }
.rail span:last-child { font-size: 15px; color: var(--muted); line-height: 1.5; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
}

/* --- Secciones genéricas --- */

.section { padding-block: var(--section); }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 22px); max-width: 46ch; }
.section-head .mono { color: var(--dim); }
.section-head p { font-size: 18px; color: var(--muted); }

/* --- 01 Práctica --- */

.practice { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.practice-head { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; }
.practice-head .mono { color: var(--dim); }
.practice-head p { font-size: 18px; color: var(--muted); }
.practice-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.practice-list li { background: var(--bg); padding-block: 36px; display: flex; gap: clamp(20px, 2.6vw, 32px); align-items: start; }
.practice-list .mono { color: var(--accent); padding-top: 7px; flex-shrink: 0; }
.practice-list div { display: flex; flex-direction: column; gap: 10px; }
.practice-list p { font-size: 16.5px; color: var(--muted); }

@media (max-width: 900px) {
  .practice { grid-template-columns: 1fr; }
  .practice-head { position: static; }
}

/* --- 02 Ruta (tabs) --- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  margin-top: clamp(36px, 5vw, 56px);
}
.step {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--bg-3);
  color: #8e959e;
  transition: background 160ms ease-out, color 160ms ease-out;
}
.step:hover { background: #171a1f; }
.step[aria-selected="true"] { background: var(--bg); color: var(--fg); }
.step .mono { color: var(--faint); }
.step[aria-selected="true"] .mono { color: var(--accent); }
.step-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.step-time { font-size: 14px; color: var(--dim); }

.panel {
  border: 1px solid var(--line-2);
  border-top: 0;
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}
.panel[hidden] { display: none; }
.panel-copy { display: flex; flex-direction: column; gap: 16px; }
.panel-copy p { font-size: 17px; color: var(--muted); }
.panel-out { display: flex; flex-direction: column; gap: 14px; }
.panel-out .mono { color: var(--dim); }
.panel-out ul { display: flex; flex-direction: column; gap: 12px; }
.panel-out li { font-size: 16px; padding-left: 20px; border-left: 2px solid var(--line-3); }
.panel-out li:last-child { border-left-color: var(--accent); }
.panel-out em { font-family: var(--serif); font-size: 19px; font-style: italic; }

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .step { padding: 20px; }
}

/* --- 03 Capacidades --- */

.caps-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: clamp(32px, 5vw, 64px);
  flex-wrap: wrap;
}
.caps-head > div { display: flex; flex-direction: column; gap: 20px; max-width: 40ch; }
.caps-head .mono { color: var(--dim); }
.caps-head > p { font-size: 17px; color: var(--muted); max-width: 44ch; }

.grid-cells {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(36px, 5vw, 56px);
}
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cell { background: var(--bg); padding: clamp(26px, 3vw, 36px); display: flex; flex-direction: column; gap: 11px; }
.cell .mono { color: var(--accent); }
.cell h3 { font-family: var(--sans); font-size: 19.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.cell p { font-size: 15.5px; color: var(--muted); line-height: 1.55; }

@media (max-width: 1000px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .cols-3, .cols-4 { grid-template-columns: 1fr; }
}

/* --- 04 Clinso --- */

.clinso { background: var(--paper); color: var(--ink); border-top: 1px solid var(--line); }
.clinso-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.clinso-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.clinso-copy .mono { color: var(--ink-dim); }
.clinso-copy h2 { color: var(--ink); }
.clinso-copy p { font-size: 18px; color: var(--ink-muted); max-width: 50ch; }
.clinso-copy strong { color: var(--ink); }
.clinso-note { font-size: 15px; color: var(--ink-dim); }

.chat { background: #ffffff; border: 1px solid #e2e2de; border-radius: 6px; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid #ededea; }
.chat-head div { display: flex; flex-direction: column; }
.chat-name { font-weight: 600; font-size: 14.5px; }
.chat-time { font-size: 12.5px; color: var(--ink-dim); }
.chat-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; background: var(--paper-2); }
.msg { max-width: 88%; padding: 11px 14px; font-size: 14.5px; line-height: 1.5; }
.msg-in { align-self: flex-start; background: #efefec; border-radius: 10px 10px 10px 3px; }
.msg-out { align-self: flex-end; background: var(--ink); color: var(--paper); border-radius: 10px 10px 3px 10px; }
.chat-foot { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid #ededea; }
.tag { color: var(--ink); font-size: 10.5px; border: 1px solid #d8d8d4; border-radius: 3px; padding: 3px 8px; flex-shrink: 0; }
.chat-foot span:last-child { font-size: 13px; color: var(--ink-dim); line-height: 1.45; }

@media (max-width: 900px) { .clinso-grid { grid-template-columns: 1fr; } }

/* --- 06 FAQ --- */

.faq-wrap { max-width: 920px; margin: 0 auto; padding-inline: var(--pad); }
.faq-head { display: flex; flex-direction: column; gap: 20px; margin-bottom: clamp(32px, 4vw, 48px); }
.faq-head .mono { color: var(--dim); }
.faq-head h2 { font-size: clamp(30px, 4vw, 46px); }
.faq-item { border-top: 1px solid var(--line-2); }
.faq-item:last-child { border-bottom: 1px solid var(--line-2); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
  font-size: clamp(18px, 2vw, 21px);
  font-family: var(--serif);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.faq-q:hover { color: var(--accent); }
.faq-q svg { flex-shrink: 0; transition: transform 200ms ease-out; }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-a { padding-bottom: 28px; }
.faq-a[hidden] { display: none; }
.faq-a p { font-size: 16.5px; color: var(--muted); max-width: 66ch; }

/* --- CTA --- */

.cta { padding-block: clamp(72px, 10vw, 120px); }
.cta-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(40px, 6vw, 80px); align-items: end; }
.cta-copy { display: flex; flex-direction: column; gap: 24px; }
.cta-copy .mono { color: var(--accent); }
.cta-copy h2 { font-size: clamp(36px, 5vw, 62px); max-width: 17ch; }
.cta-copy p { font-size: 18px; color: var(--muted); max-width: 48ch; }
.contact { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contact a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}
.contact a span:first-child { font-size: 17px; font-weight: 600; }
.contact a span:last-child { font-size: 15px; color: var(--dim); }
.contact .btn { margin-top: 24px; }

@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr; } }

/* --- Footer --- */

.footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-block: 32px;
}
.footer .brand-name { font-size: 16px; }
.footer .mono { color: var(--faint); font-size: 10.5px; }
