/* Cuidanza — landing. Concepto «Un solo hilo»: el trazo del isotipo une lo que está disperso.
   Sin dependencias ni scripts: fuentes e imágenes servidas desde el mismo sitio (CSP estricta). */

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("fonts/nunito-sans.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --navy: #173a55;
  --navy-deep: #122f45;
  --ink: #1b3347;
  --muted: #52657a;
  --green: #2b7f67;          /* botones (texto blanco: 4,8:1) */
  --green-hover: #226652;
  --green-ink: #236b57;      /* texto verde sobre crema (5,7:1) */
  --green-logo: #3a9d80;     /* solo decoración: hilo y detalles */
  --cream: #f7f3ee;
  --cream-2: #efe8df;
  --paper: #fffdf9;
  --line: #e3d9cd;
  --on-navy: #ffffff;
  --on-navy-muted: #c5d3de;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(23 58 85 / 0.06), 0 24px 48px -28px rgb(23 58 85 / 0.35);
  --display: "Outfit", "Nunito Sans", system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 20px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 18px; line-height: 1.65; color: var(--ink); background: var(--cream); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
h1, h2, h3 { font-family: var(--display); color: var(--navy); line-height: 1.12; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green-logo); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1160px, 100% - var(--gutter) * 2); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* ── Tipografía de secciones ── */
.eyebrow { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.04em; color: var(--green-ink); margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--green-logo); flex: none; }
.section-title { font-size: clamp(30px, 4.2vw, 46px); font-weight: 500; }
.section-lead { font-size: 19px; color: var(--muted); margin-top: 18px; max-width: 58ch; }
.intro { max-width: 760px; }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 12px; font-family: var(--body); font-weight: 700; font-size: 17px; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); }
.btn-quiet { color: var(--navy); padding-inline: 10px; }
.btn-quiet:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--green-logo); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--cream); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 32px; }

/* ── Encabezado ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(247 243 238 / 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid rgb(227 217 205 / 0.7); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 8px; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 27px; color: var(--navy); letter-spacing: -0.025em; }
.brand.small span { font-size: 22px; }
.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 16px; padding: 6px 0; }
.nav a:hover { color: var(--navy); }
.menu { display: none; }

@media (max-width: 920px) {
  .site-header { position: relative; }
  .nav, .header-cta { display: none; }
  .menu { display: block; margin-left: auto; }
  .menu summary { list-style: none; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); font-weight: 700; color: var(--navy); cursor: pointer; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--navy); position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  .menu[open] .menu-icon { background: transparent; }
  .menu[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
  .menu[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
  .menu-panel { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 4px); z-index: 60; display: grid; gap: 4px; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
  .menu-panel a:not(.btn) { display: flex; align-items: center; min-height: 52px; padding: 0 12px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 18px; color: var(--navy); }
  .menu-panel a:not(.btn):hover { background: var(--cream); }
  .menu-panel .btn { margin-top: 6px; }
}

/* ── Hilo (trazo del isotipo) ── */
.thread { overflow: visible; }
.thread path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.thread .t-navy { stroke: var(--navy); }
.thread .t-green { stroke: var(--green-logo); }
.thread .t-dot { fill: var(--green-logo); }

/* ── Hero ── */
.hero { padding: 48px 0 56px; }
.scatter-section { padding-top: 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 4.2vw, 54px); font-weight: 500; letter-spacing: -0.03em; }
.hero h1 span { display: block; color: var(--green-ink); }
.hero .lead { font-size: clamp(19px, 1.6vw, 21px); color: var(--muted); margin-top: 24px; max-width: 34em; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-logo); }

/* El isotipo dibujado en grande abraza la tarjeta real: la marca que contiene la información. */
.hero-visual { position: relative; aspect-ratio: 1; width: 100%; max-width: 580px; justify-self: end; }
.hero-thread { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-thread path { stroke-width: 4px; }
.shot { position: relative; z-index: 1; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--cream); }
/* La tarjeta tapa el hilo que pasa por detrás; se desvanece hacia el crema en lugar de volverse transparente. */
.hero-shot { position: absolute; top: 22%; left: 14%; width: 72%; height: 66%; box-shadow: none; border-radius: var(--radius) var(--radius) 0 0; }
.hero-shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 34%; background: linear-gradient(to bottom, rgb(247 243 238 / 0), var(--cream) 85%); }
.phone { position: relative; z-index: 2; padding: 9px; border-radius: 38px; background: var(--navy-deep); box-shadow: 0 30px 60px -30px rgb(18 47 69 / .55); }
.phone img { border-radius: 30px; }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ── Cómo es hoy ── */
.section { padding: 104px 0; }
.tint { background: var(--cream-2); }
.scatter { margin-top: 56px; }
.notes { list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.notes li { flex: 1 1 170px; max-width: 210px; padding: 18px 18px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; font-family: var(--display); font-size: 18px; line-height: 1.25; color: var(--navy); box-shadow: 0 10px 24px -18px rgb(23 58 85 / .4); background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgb(23 58 85 / .07) 27px 28px); background-position: 0 12px; }
.notes li:nth-child(1) { transform: rotate(-2.5deg); }
.notes li:nth-child(2) { transform: rotate(1.5deg) translateY(14px); }
.notes li:nth-child(3) { transform: rotate(-1deg); }
.notes li:nth-child(4) { transform: rotate(2deg) translateY(12px); }
.notes li:nth-child(5) { transform: rotate(-1.8deg); }
.scatter-thread { display: block; width: 100%; height: 80px; margin-top: 18px; }
.scatter-thread path { stroke-width: 3px; }
.scatter-end { line-height: 1.2; display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 10px; font-family: var(--display); font-size: clamp(24px, 3vw, 32px); font-weight: 500; color: var(--navy); letter-spacing: -0.02em; }

/* ── Preguntas ── */
.qa-list { display: grid; gap: 88px; margin-top: 64px; }
.qa { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.qa:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.qa:nth-of-type(even) .qa-text { order: 2; }
.qa-area { font-weight: 700; font-size: 15px; color: var(--green-ink); text-transform: uppercase; letter-spacing: .08em; }
.qa h3 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 500; margin-top: 10px; }
.qa-text p:last-child { margin-top: 16px; color: var(--muted); max-width: 42ch; }
.shot-fade { -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%); mask-image: linear-gradient(to bottom, #000 75%, transparent 100%); box-shadow: none; border-radius: var(--radius) var(--radius) 0 0; }
.also { padding: 26px 0 0; border-top: 1px solid var(--line); color: var(--muted); max-width: 70ch; }
.also strong { color: var(--navy); }

/* ── Varias residencias ── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.path { list-style: none; counter-reset: paso; margin-top: 36px; display: grid; gap: 0; }
.path li { counter-increment: paso; position: relative; padding: 0 0 26px 58px; color: var(--muted); }
.path li strong { display: block; color: var(--navy); font-family: var(--display); font-weight: 600; font-size: 20px; }
.path li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--green-logo); background: var(--cream); color: var(--navy); font-family: var(--display); font-weight: 600; }
.path li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 42px; bottom: 4px; width: 2px; background: var(--line); }
/* Todas juntas (tarjeta) y una por una (celular), superpuestas. */
.multi-visual { position: relative; justify-self: center; width: min(600px, 100%); padding: 0 190px 150px 0; }
.shot-compare { width: 100%; }
.multi-phone { position: absolute; right: 0; bottom: 0; width: 210px; }
.multi-note { position: absolute; left: 0; bottom: 60px; max-width: 250px; font-size: 15px; color: var(--muted); }

/* ── Equipo ── */
.split.reverse > :first-child { justify-self: center; }
.phone-team { width: 260px; }
.roles { margin-top: 34px; display: grid; }
.roles div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.roles dt { font-family: var(--display); font-weight: 600; color: var(--navy); font-size: 18px; }
.roles dd { color: var(--muted); }

/* ── Seguridad ── */
.security { background: var(--navy); color: var(--on-navy); }
.security .section-title { color: var(--on-navy); }
.security .section-lead { color: var(--on-navy-muted); }
.security .eyebrow { color: #9fd9c5; }
.security-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; margin-top: 56px; }
.security-list li { padding: 26px 0 30px; border-top: 1px solid rgb(255 255 255 / .16); }
.security-list h3 { color: var(--on-navy); font-size: 22px; font-weight: 500; }
.security-list p { color: var(--on-navy-muted); margin-top: 8px; max-width: 46ch; }

/* ── Cómo empezamos ── */
.steps { list-style: none; counter-reset: paso; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 56px; position: relative; }
.steps::before { content: ""; position: absolute; top: 22px; left: 22px; right: calc((100% - 80px) / 3 - 23px); height: 2px; background: linear-gradient(to right, var(--navy) 0 50%, var(--green-logo) 50% 100%); }
.steps li { counter-increment: paso; position: relative; padding-top: 68px; }
.steps li::before { content: counter(paso); position: absolute; top: 0; left: 0; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); border: 2px solid var(--navy); color: var(--navy); font-family: var(--display); font-weight: 600; font-size: 19px; }
.steps li:nth-child(n+2)::before { border-color: var(--green-logo); }
.steps h3 { font-size: 24px; font-weight: 500; }
.steps p { color: var(--muted); margin-top: 8px; max-width: 32ch; }

/* ── Contacto ── */
.cta { background: var(--navy-deep); color: var(--on-navy); padding: 104px 0 96px; overflow: hidden; }
.cta-inner { position: relative; text-align: center; display: grid; justify-items: center; }
.cta-thread { position: absolute; width: 520px; height: 520px; top: -150px; right: -120px; opacity: .22; }
.cta-thread path { stroke-width: 2px; }
.cta-thread .t-navy { stroke: #6f92ad; }
.cta h2 { color: var(--on-navy); font-size: clamp(32px, 4.4vw, 50px); font-weight: 500; max-width: 18em; position: relative; }
.cta p { color: var(--on-navy-muted); margin-top: 16px; font-size: 20px; position: relative; }
.cta .actions { justify-content: center; position: relative; }
.cta-mail { color: var(--on-navy); font-weight: 600; text-underline-offset: 5px; text-decoration-color: var(--green-logo); padding: 12px 6px; }
.cta .signature { margin-top: 48px; font-family: var(--display); font-size: 18px; color: #9fd9c5; letter-spacing: .01em; }

/* ── Pie ── */
.site-footer { padding: 48px 0 40px; background: var(--cream); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; }
.footer-brand p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; align-content: start; justify-content: flex-end; }
.footer-nav a { color: var(--navy); font-weight: 600; font-size: 16px; text-decoration: none; padding: 10px 0; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-note { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ── Aviso de privacidad ── */
.legal-back { margin-left: auto; }
.legal-body { max-width: 760px; }
.legal h1 { font-size: clamp(32px, 4.4vw, 48px); }
.legal-date { margin-top: 12px; font-size: 16px; color: var(--muted); }
.legal h2 { font-size: 26px; font-weight: 500; margin: 48px 0 12px; }
.legal h3 { font-size: 20px; font-weight: 600; margin: 28px 0 8px; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 14px; }
.legal ul { padding-left: 22px; display: grid; gap: 8px; }
.legal a:not(.btn) { color: var(--green-ink); font-weight: 600; text-underline-offset: 3px; }
.legal-note { padding: 18px 20px; border-left: 3px solid var(--green-logo); background: var(--cream-2); border-radius: 0 12px 12px 0; font-size: 16px; color: var(--muted); }

/* ── Movimiento: poco y con motivo. Nada depende de él para leerse. ── */
@media (prefers-reduced-motion: no-preference) {
  .hero-thread path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s .2s cubic-bezier(.55, .1, .25, 1) forwards; }
  .hero-thread .t-green { animation-delay: 1.1s; }
  .hero-thread .t-dot { opacity: 0; animation: appear .5s 2.2s ease-out forwards; }
  .hero-shot { animation: rise .8s .15s cubic-bezier(.2, .7, .2, 1) both; }

  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
    .scatter-thread path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw linear forwards; animation-timeline: view(); animation-range: entry 30% cover 45%; }
  }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ── Tablet ── */
@media (max-width: 960px) {
  .section { padding: 80px 0; }
  .hero { padding: 36px 0 72px; }
  .hero-grid, .split, .qa { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-visual { justify-self: center; max-width: 440px; margin-top: -8px; }
  .qa:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .qa:nth-of-type(even) .qa-text { order: 0; }
  .qa-list { gap: 72px; }
  .split.reverse > :first-child { order: 2; }
  .security-list { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps::before { top: 22px; bottom: 22px; left: 22px; right: auto; width: 2px; height: auto; background: linear-gradient(to bottom, var(--navy) 0 40%, var(--green-logo) 40% 100%); }
  .steps li { padding: 8px 0 0 72px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { justify-content: flex-start; }
}

/* ── Celular ── */
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .header-inner { min-height: 68px; }
  .brand span { font-size: 24px; }
  .brand img { width: 34px; height: 34px; }
  .hero h1 { font-size: 38px; }
  .actions .btn-primary { flex: 1 1 100%; }
  .hero .actions { margin-top: 28px; }
  .facts { margin-top: 20px; padding-top: 18px; font-size: 15px; gap: 6px 18px; }
  .hero { padding-bottom: 32px; }
  .scatter-section { padding-top: 48px; }
  .notes { gap: 12px; }
  .notes li { flex: 1 1 calc(50% - 6px); max-width: none; font-size: 16px; padding: 14px 14px 18px; }
  .notes li:nth-child(5) { flex-basis: 100%; }
  .notes li:nth-child(2), .notes li:nth-child(4) { transform: rotate(1.5deg) translateY(6px); }
  .scatter-thread { height: 56px; }
  .scatter-end { justify-content: flex-start; font-size: 24px; }
  .scatter-end img { width: 36px; height: 36px; }
  .roles div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .phone-team { width: 230px; }
  .multi-visual { padding: 0 104px 72px 0; }
  .multi-phone { width: 140px; padding: 6px; border-radius: 26px; }
  .multi-phone img { border-radius: 21px; }
  .multi-note { position: static; margin-top: 16px; max-width: none; }
  .cta { padding: 80px 0 72px; }
  .cta .btn { width: 100%; }
  .cta-thread { width: 340px; height: 340px; top: -120px; right: -140px; }
}
