/* bal.do — hoja de estilos única, sin dependencias */

/* Tipografías autoalojadas (OFL): Newsreader para títulos, Inter para texto */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8f6fc;
  --surface: #f0ebf8;     /* secciones alternas */
  --surface-2: #e2d8f4;   /* iconos, disco del hero */
  --ink: #1a1530;         /* texto y secciones oscuras */
  --ink-deep: #110d20;    /* pie de página */
  --ink-soft: #4f4866;
  --line: #e2dbef;
  --primary: #6d3fd8;
  --primary-dark: #5630b5;
  --primary-light: #b9a3f5;
  --on-dark: #c8c1dc;
  --radius: 14px;
  --max: 1120px;
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

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

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 40em; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

.text-link { font-weight: 600; color: var(--primary); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Cabecera */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 246, 252, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { font-weight: 800; letter-spacing: .04em; text-decoration: none; font-size: 1.1rem; }
.brand span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.nav .lang { font-weight: 650; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; }
.nav .btn { padding: 9px 18px; font-size: .92rem; color: #fff; }

@media (max-width: 860px) {
  .nav .nav-link { display: none; }
  .nav { gap: 12px; }
}

/* Hero */
.hero { background: var(--surface); overflow: hidden; }
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: end;
  gap: 40px;
  min-height: 620px;
}
.hero-text { padding: 80px 0; align-self: center; }
.hero-text .lead { color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 34px; }
.hero-photo { position: relative; width: min(440px, 100%); justify-self: end; align-self: end; }
/* disco de color detrás de la foto recortada */
.hero-photo::before {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 104%; aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ece5f8, var(--surface-2) 72%);
}
.hero-photo img { position: relative; width: 100%; }
.trust { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.trust a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.trust img { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .hero-text { padding: 56px 0 16px; }
  .hero-photo { width: min(320px, 85%); justify-self: center; }
}

/* Secciones */
section { padding: 96px 0; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.alt { background: var(--surface); }
.dark { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.dark > .container { position: relative; }
/* brillo morado de fondo en las secciones oscuras */
.dark::before {
  content: "";
  position: absolute;
  width: 720px; aspect-ratio: 1;
  right: -200px; top: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 63, 216, .35), transparent 65%);
  pointer-events: none;
}
.dark h2, .dark h3 { color: #fff; }
.dark .lead, .dark p, .dark li { color: var(--on-dark); }
.dark .eyebrow { color: var(--primary-light); }

/* Servicios: cada área con su caso de uso */
.services { display: flex; flex-direction: column; gap: 20px; }
.service {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}
.service-head { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.service-head h3 { margin: 0; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.icon {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--primary-dark);
}
.icon svg { width: 24px; height: 24px; }
.service p { color: var(--ink-soft); }
.service ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); font-size: .95rem; }
.service ul li { margin-bottom: 6px; }
.proof { font-size: .9rem; color: var(--ink-soft); }
.proof strong { color: var(--ink); }
.proof a { color: var(--primary); }

.usecase {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 4px solid var(--primary);
}
.usecase .label { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.usecase h4 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.25; margin: 0 0 8px; }
.usecase p { font-size: .95rem; margin-bottom: 14px; }
.dark .usecase { background: rgba(255, 255, 255, .06); border-left-color: var(--primary-light); }
.dark .usecase .label { color: var(--primary-light); }
.dark .usecase .text-link { color: var(--primary-light); }

.other {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  background: var(--ink);
  color: #fff;
  border-radius: 18px;
  padding: 26px 32px;
}
.other h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; margin: 0 0 4px; }
.other p { color: var(--on-dark); margin: 0; }

@media (max-width: 860px) {
  .service { grid-template-columns: 1fr; padding: 24px; gap: 22px; }
}

/* Formación */
.training { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.training ul { padding-left: 1.1em; margin: 0; }
.training ul li { margin-bottom: 6px; }
@media (max-width: 860px) { .training { grid-template-columns: 1fr; gap: 28px; } }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
}
.steps p { color: var(--ink-soft); font-size: .96rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Sobre mí */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about p { color: var(--ink-soft); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 32px; } }

.creds { display: flex; flex-direction: column; gap: 12px; }
.cred { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; text-decoration: none; }
.cred img { width: 52px; height: 52px; flex: none; }
.cred-ico { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--primary-dark); display: grid; place-items: center; }
.cred-ico svg { width: 26px; height: 26px; }
.cred strong { display: block; font-size: .98rem; line-height: 1.35; }
.cred span:not(.cred-ico) { display: block; font-size: .88rem; line-height: 1.45; color: var(--ink-soft); margin-top: 2px; }
a.cred:hover { border-color: var(--primary); }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); margin: 12px 0 0; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; }
.contact-links a { color: var(--on-dark); font-size: .95rem; }
.contact-links a:hover { color: #fff; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

.form { background: #fff; color: var(--ink); border-radius: 18px; padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: .85rem; font-weight: 650; margin-bottom: 6px; }
.opt { font-weight: 400; }
.form input, .form select, .form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #d7cfe6;
  border-radius: 10px;
  padding: 12px 14px;
}
.form input, .form select { height: 50px; }
.form select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d3fd8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
.form .check input { width: auto; height: auto; margin-top: 4px; accent-color: var(--primary); }
.form .check a { color: var(--ink); }
.form .hp { position: absolute; left: -9999px; }
.form button { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.form button[disabled] { opacity: .6; cursor: wait; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 600; }
.form-status.ok { color: #1f7a4d; }
.form-status.err { color: #b3261e; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; padding: 22px; } }

footer { background: var(--ink-deep); color: #8d86a6; font-size: .85rem; padding: 24px 0 40px; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer a { color: #8d86a6; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* Páginas legales */
.legal { padding: 64px 0 96px; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.6rem; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal h3 { margin-top: 28px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal a { color: var(--primary); }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 1em; }
.legal dt { font-weight: 650; }
.legal dd { margin: 0; color: var(--ink-soft); }
.legal .updated { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 520px) { .legal dl { grid-template-columns: 1fr; } .legal dd { margin-bottom: 8px; } }

@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding: 68px 0; }
  .container { padding: 0 18px; }
  .other { padding: 22px; }
}

/* Parallax sutil con animaciones ligadas al scroll (sin JS).
   Navegadores sin soporte o con movimiento reducido ven la página estática. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-photo img {
      animation: parallax-photo linear both;
      animation-timeline: scroll(root);
      animation-range: 0 700px;
    }
    .hero-photo::before {
      animation: parallax-disc linear both;
      animation-timeline: scroll(root);
      animation-range: 0 700px;
    }
    .dark::before {
      animation: parallax-glow linear both;
      animation-timeline: view();
    }
  }
}
@keyframes parallax-photo { to { transform: translateY(70px); } }
@keyframes parallax-disc { to { transform: translateX(-50%) translateY(150px) scale(1.06); } }
@keyframes parallax-glow { from { transform: translateY(-80px); } to { transform: translateY(260px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Página 404 */
.not-found .container { min-height: calc(100vh - 68px - 70px); display: flex; align-items: center; }
.not-found .hero-text { padding: 64px 0; }
.not-found-en { margin-top: 28px; color: var(--ink-soft); font-size: .95rem; }
