/* ============================================================
   Kuadri - hojas de aterrizaje (sectores y guías). Mismos tokens
   que el sitio principal; el color de acento del sector se pasa
   por --sector en un <style> corto de cada página.
   ============================================================ */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
:root {
  /* Aligned 1:1 with the main site's refreshed system (index.html): brighter
     shift accents, real surface-elevation tiers, warm-biased neutrals. */
  --m: #f6ad3d;
  --m-soft: #ffcf87;
  --t: #19c2b0;
  --n: #3b82f6;
  --n-lift: #6ea8ff;
  --d: #5a6377;
  --void: #0b1020;
  --ground: #0f1528;
  --card: #161e3a;
  --raised: #1b2645;
  --raised-2: #222e52;
  --line: #2b3660;
  --line-soft: #212b4e;
  --line-bright: #3b4878;
  --chalk: #f2f4fa;
  --mut: #9ba6c4;
  --faint: #737e9d;
  --ink-on-accent: #0b1020;
  --accent: #5b95f7;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --code: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --sector: var(--t);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --sh-sm: 0 2px 10px -3px rgba(0, 0, 0, 0.5);
  --sh: 0 22px 50px -26px rgba(0, 0, 0, 0.75);
  --sh-lg: 0 44px 96px -44px rgba(0, 0, 0, 0.85);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  /* Sector-tinted aurora at the top — each profession page gets its own
     coloured atmosphere (nursing = teal, emergencies = red, …). */
  background:
    radial-gradient(
      78% 40% at 50% -6%,
      color-mix(in srgb, var(--sector) 13%, transparent),
      transparent 62%
    ),
    var(--void);
  background-repeat: no-repeat;
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
img {
  max-width: 100%;
  display: block;
}
.shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 22px;
}
h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.bar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  color: var(--chalk);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.bar .back {
  font-size: 0.9rem;
  color: var(--mut);
  text-decoration: none;
  font-weight: 600;
}
.bar .back:hover {
  color: var(--chalk);
}

.hero {
  padding: 60px 0 20px;
}
.crumbs {
  font-size: 0.78rem;
  color: var(--faint);
  margin-bottom: 20px;
}
.crumbs a {
  color: var(--mut);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--chalk);
}
.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sector);
  border: 1px solid color-mix(in srgb, var(--sector) 40%, transparent);
  border-radius: 999px;
  padding: 5px 13px;
  margin-bottom: 20px;
}
h1 {
  font-size: clamp(2.2rem, 6.4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.038em;
}
h1 em {
  font-style: normal;
  color: var(--sector);
}
.lead {
  margin: 20px 0 26px;
  color: var(--mut);
  font-size: clamp(1.05rem, 2.4vw, 1.22rem);
  max-width: 62ch;
}
.lead b {
  color: var(--chalk);
  font-weight: 600;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--r);
  background: var(--n);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow:
    0 10px 30px -10px rgba(59, 130, 246, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition:
    transform 0.18s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    background 0.2s,
    border-color 0.2s;
}
.btn:hover {
  background: #4b8dff;
  transform: translateY(-2px);
  box-shadow:
    0 18px 42px -12px rgba(59, 130, 246, 1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn:active {
  transform: scale(0.97);
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--chalk);
  border: 1px solid var(--line-bright);
  box-shadow: none;
}
.btn.ghost:hover {
  border-color: var(--mut);
  background: rgba(255, 255, 255, 0.05);
}
.free-line {
  margin: 18px 0 0;
  font-size: 0.86rem;
  color: var(--faint);
}

.sec {
  padding: 40px 0 8px;
}
.sec > .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sector);
  margin: 0 0 18px;
}
.sec h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.sec .sub {
  color: var(--mut);
  margin: 0 0 26px;
  max-width: 58ch;
}

.fits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.fit {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--sh-sm);
  transition:
    transform 0.25s var(--ease-out),
    background 0.25s,
    box-shadow 0.25s var(--ease-out);
}
.fit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sector);
}
@media (hover: hover) {
  .fit:hover {
    transform: translateY(-4px);
    background: var(--raised);
    box-shadow: var(--sh);
  }
}
.fit h3 {
  font-size: 1.08rem;
  font-weight: 750;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.fit p {
  margin: 0;
  color: var(--mut);
  font-size: 0.96rem;
}
.fit p b {
  color: var(--chalk);
  font-weight: 650;
}
@media (max-width: 720px) {
  .fits {
    grid-template-columns: 1fr;
  }
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}
.split ul {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.split li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--line-soft);
  font-size: 1rem;
}
.split li:first-child {
  border-top: 0;
}
.split li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 17px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--sector);
  border-bottom: 2px solid var(--sector);
  transform: rotate(-45deg);
}
.split li b {
  font-weight: 650;
}
.shot {
  justify-self: center;
  width: min(280px, 78vw);
  flex: none;
  position: relative;
}
.shot::before {
  content: '';
  position: absolute;
  inset: -14% -10%;
  z-index: -1;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.5;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--sector) 55%, transparent),
    transparent 68%
  );
}
.shot .glass {
  border-radius: 32px;
  border: 1px solid var(--line-bright);
  padding: 8px;
  background: linear-gradient(160deg, #232e56, #141b32);
  box-shadow:
    var(--sh-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.shot img {
  width: 100%;
  /* height:auto is REQUIRED: the <img> carries width/height attributes, and
     without this the height="2160" presentational hint overrides aspect-ratio,
     stretching the phone frame to 2160px tall (a broken, super-skinny mockup).
     With height:auto, aspect-ratio drives the box to a correct ~2:1 phone. */
  height: auto;
  display: block;
  border-radius: 24px;
  aspect-ratio: 1080/2160;
  object-fit: cover;
  object-position: top;
}
@media (max-width: 720px) {
  .split {
    grid-template-columns: 1fr;
  }
  .shot {
    order: -1;
  }
  /* .hero and .sec zero the horizontal padding (for the full-bleed desktop
     look inside the centred 900px .shell). On mobile the section fills the
     viewport, so restore side gutters — otherwise cards, buttons and the phone
     frame press their borders and rounded corners against the screen edge. */
  .hero,
  .sec {
    padding-left: 20px;
    padding-right: 20px;
  }
}
/* Phone-first CTA: full-width, thumb-sized download on small screens. */
@media (max-width: 560px) {
  .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
  }
  .btn {
    justify-content: center;
    width: 100%;
    padding: 17px 24px;
    font-size: 1.06rem;
  }
}

/* Prosa para las guías (GEO/AEO). */
.prose {
  max-width: 68ch;
}
.prose h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 40px 0 12px;
}
.prose h3 {
  font-size: 1.15rem;
  font-weight: 750;
  margin: 28px 0 8px;
}
.prose p {
  color: var(--mut);
  margin: 0 0 16px;
}
.prose p b,
.prose li b {
  color: var(--chalk);
  font-weight: 650;
}
.prose ul {
  color: var(--mut);
  margin: 0 0 16px;
  padding-left: 22px;
}
.prose li {
  margin: 6px 0;
}
.prose .callout {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ground);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 22px 0;
  color: var(--mut);
}
.prose .callout::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--sector);
}
.prose .callout b {
  color: var(--chalk);
}

details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--ground);
  margin-bottom: 10px;
  overflow: hidden;
}
details[open] {
  background: var(--raised);
}
details:hover {
  border-color: #38446a;
}
summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 52px 17px 20px;
  position: relative;
  font-weight: 650;
  font-size: 1.02rem;
  color: var(--chalk);
  letter-spacing: -0.01em;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--mut);
  border-bottom: 2px solid var(--mut);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
  border-color: var(--sector);
}
details p {
  margin: 0;
  padding: 0 20px 19px;
  color: var(--mut);
  font-size: 0.97rem;
}
details p b {
  color: var(--chalk);
  font-weight: 650;
}

.cta {
  margin: 44px 0 8px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, var(--raised), var(--ground));
  text-align: center;
}
.cta h2 {
  font-size: 1.5rem;
  font-weight: 800;
}
.cta p {
  color: var(--mut);
  margin: 10px auto 20px;
  max-width: 46ch;
}

.foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 48px;
  padding: 30px 0 60px;
}
.foot .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.foot a {
  color: var(--mut);
  text-decoration: none;
  font-size: 0.9rem;
}
.foot a:hover {
  color: var(--chalk);
}
.foot .tiny {
  color: var(--faint);
  font-size: 0.8rem;
  width: 100%;
}
.sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}
.sectors a {
  font-size: 0.82rem;
  color: var(--mut);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
.sectors a:hover {
  border-color: var(--sector);
  color: var(--chalk);
}
.sectors a[aria-current='page'] {
  border-color: var(--sector);
  color: var(--chalk);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* ============================================================
   Modo día. La misma marca a plena luz: papel frío, tinta void,
   acentos oscurecidos hasta AA para texto. Se activa por sistema
   (prefers-color-scheme) o forzado con html[data-theme='light'];
   html[data-theme='dark'] gana siempre al sistema.
   ============================================================ */
@media (prefers-color-scheme: light) {
  html:not([data-theme='dark']) {
    --m: #b97a12;
    --m-soft: #8a5a0a;
    --t: #0e8e80;
    --n: #1e73e8;
    --n-lift: #1a5fc0;
    --d: #66708c;
    --void: #f5f6fb;
    --ground: #fbfcff;
    --card: #ffffff;
    --raised: #ffffff;
    --raised-2: #eef2fa;
    --line: #d9deee;
    --line-soft: #e4e8f3;
    --line-bright: #c3cbe2;
    --chalk: #141a2e;
    --mut: #4e5878;
    --faint: #6b7590;
    --ink-on-accent: #ffffff;
    --accent: #1e73e8;
    --sh-sm: 0 2px 10px -3px rgba(20, 26, 46, 0.1);
    --sh: 0 22px 50px -30px rgba(20, 26, 46, 0.22);
    --sh-lg: 0 44px 96px -52px rgba(20, 26, 46, 0.28);
  }
  html:not([data-theme='dark']) .btn.ghost {
    background: rgba(20, 26, 46, 0.03);
  }
  html:not([data-theme='dark']) .btn.ghost:hover {
    background: rgba(20, 26, 46, 0.07);
  }
  html:not([data-theme='dark']) details:hover {
    border-color: var(--line-bright);
  }
}
html[data-theme='light'] {
  --m: #b97a12;
  --m-soft: #8a5a0a;
  --t: #0e8e80;
  --n: #1e73e8;
  --n-lift: #1a5fc0;
  --d: #66708c;
  --void: #f5f6fb;
  --ground: #fbfcff;
  --card: #ffffff;
  --raised: #ffffff;
  --raised-2: #eef2fa;
  --line: #d9deee;
  --line-soft: #e4e8f3;
  --line-bright: #c3cbe2;
  --chalk: #141a2e;
  --mut: #4e5878;
  --faint: #6b7590;
  --ink-on-accent: #ffffff;
  --accent: #1e73e8;
  --sh-sm: 0 2px 10px -3px rgba(20, 26, 46, 0.1);
  --sh: 0 22px 50px -30px rgba(20, 26, 46, 0.22);
  --sh-lg: 0 44px 96px -52px rgba(20, 26, 46, 0.28);
}
html[data-theme='light'] .btn.ghost {
  background: rgba(20, 26, 46, 0.03);
}
html[data-theme='light'] .btn.ghost:hover {
  background: rgba(20, 26, 46, 0.07);
}
html[data-theme='light'] details:hover {
  border-color: var(--line-bright);
}

/* ── Cluster de cabecera: idioma + tema ── */

.bar-tools { display: flex; align-items: center; gap: 10px; }
.lang-wrap { display: inline-flex; align-items: center; gap: 7px; color: var(--chalk-dim, var(--mut, #9ba6c4)); }
.lang-wrap .globe { width: 16px; height: 16px; flex: none; opacity: 0.85; }
select.lang {
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--chalk-dim, var(--mut, #9ba6c4));
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 26px 6px 10px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398A2BC' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color 0.2s;
}
select.lang:hover { border-color: var(--chalk-dim, var(--mut, #9ba6c4)); }
select.lang option { background: var(--ground); color: var(--chalk); }
.tbtn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  color: var(--chalk-dim, var(--mut, #9ba6c4)); cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tbtn:hover { color: var(--chalk); border-color: var(--line-bright); }
.tbtn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out, ease); }
.tbtn:active svg { transform: rotate(35deg) scale(0.92); }
@media (prefers-reduced-motion: reduce) { .tbtn svg, .tbtn:active svg { transition: none; transform: none; } }
@media (max-width: 560px) {
  .lang-wrap .globe { display: none; }
  .bar-tools { gap: 7px; }
  .bar .back { white-space: nowrap; font-size: 0.85rem; }
  select.lang { font-size: 12px; padding: 5px 22px 5px 8px; background-position: right 7px center; }
}
