/* ==========================================================================
   PensarIA – versión cercana (no tech)
   Las paletas se eligen con el atributo data-paleta en <html>.
   Para fijar una paleta definitiva: deja data-paleta="..." en index.html
   y quita el selector (ver README).
   ========================================================================== */

:root,
[data-paleta="mar"] {
  --bg: #EEF3F8;
  --ink: #0F2236;
  --muted: #44566B;
  --accent: #1E5AA8;
  --tint: #DCE8F6;
  --soft: #E4ECF5;
  --soft-ink: #3B5674;
  --line: #C8D6E5;
}

[data-paleta="coral"] {
  --bg: #FFF5F0;
  --ink: #2B1A16;
  --muted: #5F4943;
  --accent: #B23A26;
  --tint: #FCE1D7;
  --soft: #FBEAE3;
  --soft-ink: #8A3F2E;
  --line: #EDCFC4;
}

[data-paleta="lavanda"] {
  --bg: #F5F3FC;
  --ink: #1E1A2E;
  --muted: #55506E;
  --accent: #5B3FC4;
  --tint: #E7E1FB;
  --soft: #EDE9FA;
  --soft-ink: #533F9E;
  --line: #D7D0EE;
}

[data-paleta="original"] {
  --bg: #F7F3EC;
  --ink: #1F2421;
  --muted: #4F5752;
  --accent: #1F5C4A;
  --tint: #E3EEE8;
  --soft: #F2EDE4;
  --soft-ink: #6B5E4B;
  --line: #D8D0C3;
}

:root {
  --white: #FFFFFF;
  --serif: Fraunces, Georgia, serif;
  --sans: Figtree, system-ui, sans-serif;
  --wrap: 1160px;
}

/* Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  transition: background-color .25s ease, color .25s ease;
}

img, svg { display: block; }

h1, h2, h3 { margin: 0; }
p, ul { margin: 0; }

a { color: var(--accent); }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.band { background: var(--white); }

.serif { font-family: var(--serif); }

.h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.15;
}

.muted { color: var(--muted); }
.lead { font-size: 19px; color: var(--muted); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--accent);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 16px; }

/* Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: var(--white); }
.btn--ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn--white { background: var(--white); color: var(--ink); }
.btn--lg { padding: 16px 26px; }

/* Cabecera ------------------------------------------------------------- */
.site-header {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 24px; }
.brand__name span { color: var(--accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  font-weight: 500;
  font-size: 16px;
}
.nav { margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.nav a:hover { color: var(--accent); }
.header-cta { padding: 12px 20px; }

@media (max-width: 640px) {
  .site-header { gap: 8px 16px; }
  .header-cta { order: 2; }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 0 14px;
    font-size: 15px;
  }
}

/* Hero ------------------------------------------------------------------ */
.hero {
  padding-top: 56px;
  padding-bottom: 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}
.hero__text {
  flex: 1 1 500px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.pill {
  align-self: flex-start;
  background: var(--tint);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero__lead { font-size: 20px; color: var(--muted); max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.example {
  flex: 1 1 400px;
  min-width: 0;
  background: var(--white);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 30px 60px -36px rgba(31, 36, 33, 0.4);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.example__title { font-weight: 700; font-size: 15px; color: var(--muted); }
.bubble { border-radius: 18px; padding: 16px 18px; }
.bubble__who { margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.bubble--user { background: var(--soft); }
.bubble--user .bubble__who { color: var(--soft-ink); }
.bubble--ai { background: var(--tint); }
.bubble--ai .bubble__who { color: var(--accent); }
.example__note { font-size: 15px; color: var(--muted); }

/* Herramientas -------------------------------------------------------- */
.tools {
  padding-bottom: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.tools__label { font-weight: 600; color: var(--muted); }
.tools__list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; }
.tool {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px 8px 8px;
  font-weight: 700;
}
.tool img { width: 30px; height: 30px; }
.tool img.rounded { border-radius: 8px; }

/* Secciones ----------------------------------------------------------- */
.section {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.section--tight { padding-top: 80px; padding-bottom: 80px; }

.section__head { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }

.grid {
  display: grid;
  gap: 24px;
}
.grid--quotes { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--courses { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; }

.quote { background: var(--bg); border-radius: 22px; padding: 28px; }
.quote p { font-family: var(--serif); font-size: 22px; line-height: 1.3; }

/* Cursos */
.course {
  background: var(--white);
  border-radius: 26px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.course svg { stroke: var(--accent); }
.course h3 { font-family: var(--serif); font-weight: 600; font-size: 26px; }
.course ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.course__note { font-size: 15px; color: var(--muted); }
.course .btn { margin-top: auto; align-self: flex-start; }

/* Pasos */
.step { display: flex; flex-direction: column; gap: 10px; }
.step__num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.step h3 { font-size: 20px; font-weight: 700; }

/* Lab */
.lab-wrap { padding-top: 88px; padding-bottom: 88px; }
.lab {
  background: var(--accent);
  color: var(--white);
  border-radius: 32px;
  padding: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}
.lab__text { flex: 1 1 440px; display: flex; flex-direction: column; gap: 14px; }
.lab__eyebrow { font-weight: 700; font-size: 15px; color: rgba(255, 255, 255, 0.85); }
.lab h2 { font-size: clamp(30px, 3.6vw, 42px); }
.lab__lead { font-size: 19px; color: rgba(255, 255, 255, 0.92); }
.lab__list { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.lab__item {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 16px 20px;
  font-weight: 600;
}
.lab .btn { align-self: flex-start; margin-top: 6px; padding: 14px 24px; }

@media (max-width: 560px) {
  .lab { padding: 32px 24px; }
}

/* Preguntas */
.faq {
  max-width: 860px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq h2 { margin-bottom: 12px; }
.faq details { background: var(--white); border-radius: 18px; padding: 20px 24px; }
.faq summary { font-weight: 700; font-size: 18px; cursor: pointer; }
.faq details p { margin-top: 10px; color: var(--muted); }

/* Contacto */
.contact {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.contact__text { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.contact__text a { font-weight: 600; }
.strong { font-weight: 600; }

.form {
  flex: 1 1 440px;
  background: var(--bg);
  border-radius: 26px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.form input,
.form select {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.form .btn { font-weight: 700; padding: 16px 24px; }
.form__status { font-size: 15px; color: var(--muted); }

/* Pie */
.site-footer {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  color: var(--muted);
}
.site-footer strong { font-family: var(--serif); color: var(--ink); font-size: 19px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }

/* ==========================================================================
   Selector de paleta (TEMPORAL – solo mientras se decide el color)
   ========================================================================== */
.paleta-switcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 16px;
  background: var(--white);
  color: #1F2421;
  border: 1px solid #D0D0D0;
  border-radius: 999px;
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.45);
  font-size: 14px;
  font-weight: 600;
}
.paleta-switcher fieldset { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; }
.paleta-switcher legend {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.paleta-switcher label { position: relative; cursor: pointer; }
.paleta-switcher input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.paleta-switcher .swatch {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px #C4C4C4;
}
.paleta-switcher input:checked + .swatch { box-shadow: 0 0 0 2px #1F2421; }
.paleta-switcher input:focus-visible + .swatch { outline: 3px solid #1F2421; outline-offset: 2px; }
/* Hueco al final para que el selector no tape el pie */
body:has(.paleta-switcher) { padding-bottom: 72px; }

@media (max-width: 560px) {
  .paleta-switcher { right: 12px; bottom: 12px; padding: 6px; }
  .paleta-switcher > span { display: none; }
  .paleta-switcher .swatch { width: 28px; height: 28px; }
}

.swatch--mar { background: #1E5AA8; }
.swatch--coral { background: #B23A26; }
.swatch--lavanda { background: #5B3FC4; }
.swatch--original { background: #1F5C4A; }
