/* =========================================================
   Carolina Sepúlveda · Identidad "Cielo abierto"
   CSS puro, sin frameworks. Mobile-first.
   ========================================================= */

/* ---------- Fuentes locales (subset latino, variables) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --sky: #CFE3F2;
  --sky-soft: #E6F0F8;
  --navy: #173A5C;
  --navy-deep: #0F2A44;
  --sun: #F3CF4E;
  --sun-strong: #E7BC2C;
  --leaf: #5C8A45;
  --cloud: #FBFCFD;
  --ink-soft: #3E5A75;
  --line: #D5E2EC;

  --display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --radius: 14px;
  --container: 1160px;
  --gutter: clamp(18px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--cloud);
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(17px, 1.1vw + 12px, 19px);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--sun-strong); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1; margin: 0; text-wrap: balance; }
h1 em, h2 em {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-stretch: normal; letter-spacing: 0;
}
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: var(--cloud); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

.eyebrow {
  font-family: var(--display); font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--leaf);
}

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1;
  padding: 17px 26px; border-radius: 12px; border: 0; cursor: pointer;
  text-decoration: none; transition: background-color .2s, transform .2s;
}
.btn-sun { background: var(--sun); color: var(--navy); }
.btn-sun:hover { background: var(--sun-strong); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 11px 16px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-arrow {
  font-family: var(--display); font-weight: 600; font-size: 17px;
  text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--sun-strong);
}
.link-arrow::after { content: " →"; }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color .25s, box-shadow .25s;
}
.site-header.is-scrolled { background: rgba(251, 252, 253, .94); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand {
  font-family: var(--display); font-weight: 700; font-size: 21px; font-stretch: 85%;
  letter-spacing: -.01em; text-decoration: none;
}
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.nav-list a:not(.btn) { font-family: var(--display); font-weight: 500; font-size: 16px; text-decoration: none; }
.nav-list a:not(.btn):hover { text-decoration: underline; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: transparent; border: 0; color: var(--navy); cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -7px; } .bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav-list {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cloud); padding: 8px var(--gutter) 20px; box-shadow: 0 12px 24px -16px rgba(15, 42, 68, .4);
  }
  .nav-list:not(.is-open) { display: none; }
  .nav-list li a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .nav-list .btn { margin-top: 16px; width: 100%; }
}

/* ---------- Portada ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(620px, 92vh, 860px);
  background: var(--sky);
  padding-top: 120px;
}
.hero-bg img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 40% 72%;
}
/* Velo de cielo a la izquierda: mantiene legible el texto sin tapar a Carolina */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(214, 231, 244, .94) 0%, rgba(214, 231, 244, .82) 34%, rgba(214, 231, 244, 0) 62%);
}
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero h1 {
  font-size: clamp(44px, 7.4vw, 96px); font-weight: 800; font-stretch: 78%;
  line-height: .92; letter-spacing: -.025em; max-width: 12ch;
}
.lead { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; max-width: 40ch; color: var(--navy-deep); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 6px; }
.hero-badge {
  position: absolute; right: var(--gutter); bottom: 32px;
  background: var(--cloud); border-radius: var(--radius); padding: 16px 20px;
  max-width: 250px; font-size: 15px; line-height: 1.35;
  box-shadow: 0 20px 40px -24px rgba(15, 42, 68, .45);
}
.hero-badge b { display: block; font-family: var(--display); font-size: 32px; font-stretch: 80%; line-height: 1; margin-bottom: 4px; }
@media (max-width: 640px) {
  .hero { min-height: 760px; padding-top: 104px; }
  .hero-bg img { object-position: 30% 100%; }
  .hero::before { background: linear-gradient(180deg, rgba(214, 231, 244, .95) 0%, rgba(214, 231, 244, .88) 52%, rgba(214, 231, 244, 0) 72%); }
  .hero-badge { left: var(--gutter); right: auto; bottom: 22px; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-y); }
.section-cloud { background: var(--sky-soft); }
.section-sky { background: var(--sky); }
.section-navy { background: var(--navy); color: var(--cloud); }
.section-navy .eyebrow { color: var(--sun); }

.section-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 780px; }
.section-head h2, .about h2, .contact h2 {
  font-size: clamp(34px, 4.6vw, 58px); font-weight: 800; font-stretch: 80%; letter-spacing: -.02em; line-height: .98;
}
.section-intro { color: var(--ink-soft); max-width: 58ch; }

/* Para quién */
.situations { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.situations li { background: var(--cloud); padding: 28px 26px; display: grid; gap: 10px; align-content: start; }
.situations li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.situations li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
@media (max-width: 1080px) { .situations li { border-radius: 0 !important; } .situations { border-radius: var(--radius); overflow: hidden; } }
.situations h3 { font-size: 22px; font-weight: 700; font-stretch: 88%; line-height: 1.1; }
.situations p { color: var(--ink-soft); font-size: 17px; }

.not-for {
  margin-top: 40px; padding: 28px; border: 2px dashed #A9C2D6; border-radius: var(--radius);
  display: grid; gap: 14px; max-width: 760px;
}
.not-for h3 { font-size: 22px; font-weight: 700; }
.not-for ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.not-for li { padding-left: 28px; position: relative; color: var(--ink-soft); }
.not-for li::before { content: "×"; position: absolute; left: 4px; top: -2px; font-family: var(--display); font-weight: 700; font-size: 22px; color: #B5523B; }

/* Servicios */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--navy); }
.pillar { padding: 26px 26px 30px 0; display: grid; gap: 10px; }
.pillar + .pillar { padding-left: 26px; border-left: 1px solid var(--line); }
.pillar h3 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; font-stretch: 78%; }
.pillar p { color: var(--ink-soft); }
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

.offers { margin-top: clamp(40px, 6vw, 72px); display: grid; gap: 18px; grid-template-columns: 1.2fr 1fr 1fr; }
@media (max-width: 960px) { .offers { grid-template-columns: 1fr; } }
.offer { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.offer h3 { font-size: 26px; font-weight: 700; font-stretch: 85%; }
.offer p:not(.offer-tag) { color: var(--ink-soft); font-size: 17px; }
.offer .btn, .offer .link-arrow { justify-self: start; margin-top: 6px; }
.offer-tag { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--leaf); }
.offer-featured { background: var(--navy); color: var(--cloud); border-color: var(--navy); }
.offer-featured p:not(.offer-tag) { color: #D6E3EF; }
.offer-featured .offer-tag { color: var(--sun); }

.steps {
  counter-reset: step; list-style: none; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0;
  display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; font-size: 17px; color: var(--ink-soft); }
.steps li::before {
  content: counter(step); font-family: var(--display); font-weight: 800; font-size: 18px;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun); color: var(--navy);
}
.steps b { color: var(--navy); font-family: var(--display); font-weight: 700; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Testimonios */
.testimonials { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .testimonials { grid-template-columns: 1fr; } }
.testimonial { margin: 0; background: var(--cloud); border-radius: var(--radius); padding: 30px 28px; display: grid; gap: 22px; align-content: space-between; }
.testimonial blockquote { margin: 0; font-size: 20px; line-height: 1.45; font-style: italic; }
.testimonial figcaption { display: grid; gap: 2px; font-family: var(--display); font-size: 15px; }
.testimonial figcaption span { color: var(--ink-soft); }
.clients { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: baseline; font-family: var(--display); font-size: 15px; color: var(--ink-soft); }
.clients span { font-weight: 700; font-size: 18px; color: var(--navy); }
.disclaimer { margin-top: 18px; font-size: 14px; color: var(--ink-soft); max-width: 70ch; }

/* Sobre mí */
.about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-photo { margin: 0; border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden; background: var(--sky); }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-text { display: grid; gap: 18px; justify-items: start; }
.role { font-family: var(--display); font-weight: 600; color: var(--leaf); }
.about-text > p:not(.eyebrow):not(.role) { color: var(--ink-soft); max-width: 56ch; }
.facts { margin: 8px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 100%; }
.facts div { border-top: 2px solid var(--sun); padding-top: 12px; }
.facts dt { font-family: var(--display); font-size: 30px; font-weight: 800; font-stretch: 80%; }
.facts dd { margin: 4px 0 0; font-size: 15px; color: var(--ink-soft); line-height: 1.35; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
}
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* Preguntas */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--cloud); border-radius: 12px; padding: 0 22px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 32px 20px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 19px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 22px; color: var(--ink-soft); max-width: 62ch; }

/* Contacto */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: 18px; }
.contact-info > p:not(.eyebrow) { color: #D6E3EF; max-width: 44ch; }
.channels { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 18px; }
.channels li { display: grid; gap: 2px; }
.channels .label { font-family: var(--display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--sun); }
.channels a, .channels span:not(.label) { font-family: var(--display); font-size: 20px; font-weight: 600; word-break: break-word; }

.form { background: var(--cloud); color: var(--navy); border-radius: 18px; padding: clamp(22px, 4vw, 36px); display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-family: var(--display); font-weight: 600; font-size: 15px; }
.opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit; font-size: 17px; color: var(--navy);
  width: 100%; padding: 13px 14px; border: 1.5px solid #B9CCDB; border-radius: 10px; background: #fff;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #B5523B; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; font-size: 15px; line-height: 1.45; color: var(--ink-soft); align-items: start; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); }
.check.is-invalid span { color: #B5523B; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-family: var(--display); font-size: 16px; min-height: 1.2em; }
.form-status.is-error { color: #B5523B; }
.form-success { display: grid; gap: 14px; text-align: left; }
.form-success h3 { font-size: 30px; font-weight: 800; font-stretch: 82%; }
.form-success p { color: var(--ink-soft); }

/* Pie */
.site-footer { background: var(--navy-deep); color: #B9CCDB; padding-block: 36px 96px; font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; justify-content: space-between; }
.site-footer .brand { color: var(--cloud); }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: #fff; box-shadow: 0 10px 24px -8px rgba(15, 42, 68, .5);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }

/* Aparición suave al hacer scroll (solo si JS está activo y el usuario no pidió reducir movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}
