/* =========================================================
   CF Service · Mantenimiento integral de casas en Canning
   ========================================================= */

:root {
  --ink: #12301F;          /* verde bosque, fondo oscuro */
  --ink-2: #1D4430;        /* verde bosque claro, tarjetas sobre oscuro */
  --line-dark: #2C5640;    /* bordes sobre oscuro */
  --sage: #B5CABB;         /* texto secundario sobre oscuro */
  --mist: #DCE8DF;         /* texto claro sobre oscuro */
  --paper: #F1F4EE;        /* fondo claro */
  --white: #FFFFFF;
  --line: #D3DDD2;         /* bordes sobre claro */
  --muted: #47574D;        /* texto secundario sobre claro */
  --green: #2E6B45;        /* verde medio, detalles sobre claro */
  --accent: #8FD16A;       /* verde brote, acento de marca */
  --no: #F7A585;           /* cruces de la comparativa */
  --no-bg: #5A2E22;

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --wrap: 1240px;
  --gutter: 24px;
  --section-y: clamp(64px, 10vw, 112px);
  --header-h: 80px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.on-light :focus-visible, .on-light:focus-visible { outline-color: var(--green); }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--ink); padding: 12px 18px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--white { background: var(--white); }

/* ---------- Tipografía ---------- */
.display {
  font-weight: 900; font-stretch: 75%; text-transform: uppercase;
  line-height: 0.95; letter-spacing: -0.01em;
}
.h2 { font-size: clamp(38px, 4.5vw, 60px); line-height: 1; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--green); }
.section--dark .kicker, .hero .kicker { color: var(--accent); }
.lead { font-size: 18px; line-height: 1.55; color: var(--muted); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 56px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 28px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 17px; text-decoration: none; line-height: 1.2;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #A6DE85; }
.btn--ghost { border: 1px solid #5E8A70; color: var(--paper); background: transparent; }
.btn--ghost:hover { background: var(--ink-2); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-2); }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; white-space: nowrap; }
.btn:active { transform: translateY(1px); }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 40; background: var(--ink); color: var(--paper); border-bottom: 1px solid var(--line-dark); transition: box-shadow .25s ease; }
.header.is-scrolled { box-shadow: 0 8px 24px rgba(8, 24, 15, .35); }
.header__bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__logo { height: 44px; width: auto; transition: height .25s ease; }
.header.is-scrolled .brand__logo { height: 38px; }
.brand__place { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--sage); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__link { color: var(--mist); text-decoration: none; font-size: 15px; padding: 10px 0; position: relative; }
.nav__link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 4px; height: 2px; background: var(--accent); transition: right .25s ease; }
.nav__link:hover::after, .nav__link:focus-visible::after { right: 0; }

.burger { display: none; width: 48px; height: 48px; background: transparent; border: 1px solid #5E8A70; cursor: pointer; padding: 0; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--paper); transition: transform .25s ease, opacity .2s ease; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger span:nth-child(3) { top: 30px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; background: var(--ink); border-bottom: 4px solid var(--accent); }
.mobile-menu__inner { padding: 8px var(--gutter) 28px; display: flex; flex-direction: column; }
.mobile-menu__link { display: flex; align-items: center; min-height: 56px; font-size: 20px; font-weight: 700; color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.mobile-menu .btn { margin-top: 20px; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: var(--paper); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: center; padding-block: clamp(56px, 9vw, 96px); }
.hero__copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.hero__title { font-size: clamp(34px, 9.4vw, 76px); hyphens: manual; }
@media (min-width: 901px) { .hero__title { font-size: clamp(44px, 5.4vw, 76px); } }
.hero__title-sub { display: block; margin-top: 10px; font-size: 0.42em; line-height: 1.1; letter-spacing: 0.01em; color: var(--accent); }
.hero__subtitle { font-size: clamp(20px, 2vw, 26px); line-height: 1.3; font-weight: 600; }
.hero__text { font-size: 18px; line-height: 1.55; color: var(--mist); max-width: 44ch; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.price-card { background: var(--paper); color: var(--ink); padding: 36px; display: flex; flex-direction: column; gap: 24px; box-shadow: 12px 12px 0 var(--accent); }
.price-card__top { display: flex; flex-direction: column; gap: 6px; border-bottom: 2px solid var(--ink); padding-bottom: 20px; }
.price-card__label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; font-weight: 600; }
.price-card__price { font-size: clamp(44px, 4.4vw, 56px); line-height: 1; }
.price-card__note { font-size: 16px; color: var(--green); font-weight: 700; }
.spec-list { display: flex; flex-direction: column; font-size: 17px; }
.spec-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec-list li:last-child { border-bottom: 0; }
.spec-list span:first-child { color: var(--muted); }
.spec-list span:last-child { font-weight: 700; text-align: right; }

/* Entrada del hero: el único movimiento automático de la página */
@keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translate(-12px, 24px); } to { opacity: 1; transform: none; } }
.hero__copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero__copy > *:nth-child(2) { animation-delay: .08s; }
.hero__copy > *:nth-child(3) { animation-delay: .16s; }
.hero__copy > *:nth-child(4) { animation-delay: .24s; }
.hero__copy > *:nth-child(5) { animation-delay: .32s; }
.price-card { animation: card-in .9s .35s cubic-bezier(.2,.7,.2,1) both; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.service { background: var(--white); border: 1px solid var(--line); padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.service__head { display: flex; align-items: center; gap: 18px; }
.service__icon { width: 60px; height: 60px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service__title { font-size: 24px; font-weight: 800; line-height: 1.2; }
.service__list { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.service__list strong { color: var(--ink); }

.custom-work { margin-top: 24px; background: var(--ink); color: var(--paper); padding: 36px 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.custom-work__body { display: flex; align-items: center; gap: 20px; flex: 1 1 420px; min-width: 0; }
.custom-work__icon { width: 60px; height: 60px; border-radius: 16px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.custom-work h3 { font-size: 24px; font-weight: 800; }
.custom-work p { font-size: 17px; color: var(--mist); margin-top: 6px; }

/* ---------- Beneficios ---------- */
.benefits__title { font-size: clamp(48px, 6.5vw, 96px); margin-bottom: 56px; }
.value { background: var(--accent); color: var(--ink); padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; gap: 20px; }
.value__text { font-weight: 800; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.15; letter-spacing: -0.01em; max-width: 26ch; }
.value__mark { background: var(--ink); color: var(--accent); padding: 0 10px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.value__under { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.value__close { font-size: 20px; font-weight: 600; }

.compare { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: center; }
.compare__card { flex: 1 1 360px; min-width: 0; align-self: stretch; padding: 36px; display: flex; flex-direction: column; }
.compare__card--no { background: var(--ink-2); border: 1px solid #3A5F4B; }
.compare__card--yes { background: var(--paper); color: var(--ink); box-shadow: 10px 10px 0 var(--accent); }
.compare__tag { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; }
.compare__card--no .compare__tag { color: var(--no); }
.compare__card--yes .compare__tag { color: var(--green); font-weight: 600; }
.compare__title { min-height: 48px; display: flex; align-items: center; margin: 8px 0 12px; }
.compare__card--no .compare__title { font-size: 26px; font-weight: 800; color: var(--mist); }
.compare__card--yes .compare__title { font-size: 34px; }
.compare__item { display: flex; gap: 14px; align-items: center; min-height: 92px; padding: 14px 0; border-top: 1px solid #3A5F4B; font-size: 17px; line-height: 1.45; color: var(--sage); }
.compare__card--yes .compare__item { border-top-color: var(--line); font-size: 18px; font-weight: 700; color: var(--ink); }
.compare__mark { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.compare__card--no .compare__mark { background: var(--no-bg); }
.compare__card--yes .compare__mark { background: var(--accent); }
.compare__vs { width: 72px; height: 72px; border-radius: 50%; background: var(--paper); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 30px; flex-shrink: 0; }

/* Al llegar a la comparativa, los tildes se marcan uno por uno (solo una vez) */
.js .compare__card--yes .compare__mark svg path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.js .compare.is-visible .compare__card--yes .compare__mark svg path { animation: tick .45s ease forwards; }
.js .compare.is-visible .compare__card--yes li:nth-child(2) path { animation-delay: .15s; }
.js .compare.is-visible .compare__card--yes li:nth-child(3) path { animation-delay: .3s; }
.js .compare.is-visible .compare__card--yes li:nth-child(4) path { animation-delay: .45s; }
.js .compare.is-visible .compare__card--yes li:nth-child(5) path { animation-delay: .6s; }
@keyframes tick { to { stroke-dashoffset: 0; } }

.plan-head { margin: 96px 0 0; display: flex; flex-direction: column; gap: 14px; }
.plan-head .h2 { font-size: clamp(36px, 4.2vw, 56px); }
.pillars { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.pillar { background: var(--ink); padding: 36px; display: flex; flex-direction: column; gap: 12px; }
.pillar__num { font-size: 44px; line-height: 1; color: var(--accent); }
.pillar h3 { font-size: 24px; font-weight: 800; line-height: 1.2; }
.pillar p { font-size: 16px; line-height: 1.55; color: var(--sage); }

/* ---------- Alerta materiales ---------- */
.alert { background: var(--accent); color: var(--ink); }
.alert__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px; align-items: center; padding-block: 64px; }
.alert__head { display: flex; align-items: center; gap: 18px; }
.alert__head svg { flex-shrink: 0; }
.alert h2 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1; }
.alert p { font-size: 19px; line-height: 1.5; font-weight: 500; }

/* ---------- FAQ ---------- */
.faq__grid { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.faq__intro { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.faq__list { flex: 2 1 560px; min-width: 0; border-bottom: 1px solid var(--line); }
.faq__item { border-top: 1px solid var(--line); }
.faq__q { list-style: none; cursor: pointer; min-height: 44px; padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 20px; font-weight: 800; line-height: 1.3; }
.faq__q::-webkit-details-marker { display: none; }
.faq__icon { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); flex-shrink: 0; position: relative; transition: transform .3s ease; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); }
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__a { overflow: hidden; }
.faq__a p { padding-bottom: 24px; max-width: 70ch; font-size: 17px; line-height: 1.6; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 64px; align-items: start; }
.contact__info { display: flex; flex-direction: column; gap: 24px; }
.contact__info .spec-list { border-top: 2px solid var(--ink); }
.contact__info .spec-list li:last-child { border-bottom: 1px solid var(--line); }
.contact__info .btn { align-self: flex-start; }
.form { background: var(--paper); border: 1px solid var(--line); padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 20px; }
.form h3 { font-size: 26px; font-weight: 800; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea, .field select { font-size: 16px; padding: 14px; min-height: 48px; border: 1px solid #86978B; background: var(--white); border-radius: 0; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--green); outline-offset: 0; border-color: var(--green); }
.field input[aria-invalid="true"] { border-color: #B3361B; }
.field__error { font-size: 14px; color: #B3361B; min-height: 0; }
.form__status { font-size: 15px; font-weight: 600; color: var(--green); }
.form__hint { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--sage); }
.footer__grid { padding-block: 56px 32px; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-end; }
.footer__logo { height: 64px; width: auto; align-self: flex-start; }
.footer__brand { display: flex; flex-direction: column; gap: 10px; }
.footer__meta { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 14px; text-align: right; }
.footer__meta a { color: var(--mist); }
.footer__bottom { padding-block: 20px 96px; border-top: 1px solid var(--line-dark); display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; font-size: 13px; }

/* ---------- WhatsApp flotante ---------- */
.wa-fab { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 14px 20px; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 800; font-size: 16px; text-decoration: none; box-shadow: 0 6px 20px rgba(8, 24, 15, .3); transition: transform .2s ease; }
.wa-fab:hover { transform: translateY(-2px); }

/* ---------- Planes ---------- */
.plans { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px; align-items: stretch; }
.plan { position: relative; background: var(--ink-2); border: 1px solid var(--line-dark); color: var(--paper); padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.plan--featured { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 10px 10px 0 var(--accent); }
.plan__badge { align-self: flex-start; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; background: var(--ink); color: var(--accent); padding: 6px 10px; }
.plan__name { font-size: 28px; font-weight: 800; line-height: 1.1; }
.plan__price { font-size: 18px; font-weight: 600; color: var(--sage); }
.plan--featured .plan__price { color: var(--muted); }
.plan__price .display { font-size: clamp(44px, 4.4vw, 56px); line-height: 1; color: var(--accent); }
.plan--featured .plan__price .display { color: var(--ink); }
.plan__visits { font-size: 18px; font-weight: 700; line-height: 1.35; padding-bottom: 16px; border-bottom: 1px solid var(--line-dark); }
.plan--featured .plan__visits { border-bottom-color: var(--line); }
.plan__list { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.45; }
.plan__list li { display: flex; gap: 10px; align-items: flex-start; }
.plan__list svg { flex: none; margin-top: 3px; color: var(--accent); }
.plan--featured .plan__list svg { color: var(--green); }
.plan__cta { margin-top: auto; align-self: flex-start; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .nav__link { display: none; }
  .nav { gap: 12px; }
  .burger { display: inline-block; }
  .mobile-menu.is-open { display: block; }
  .brand__logo, .header.is-scrolled .brand__logo { height: 34px; }
  .brand__place { display: none; }
  .header__cta { padding: 10px 14px; font-size: 14px; }
  .price-card { padding: 28px; }
  .plan { padding: 28px; }
  .compare__vs { width: 60px; height: 60px; font-size: 24px; }
  .compare__card { padding: 28px; }
  .compare__item { min-height: 0; }
  .custom-work { padding: 28px; }
  .footer__meta { text-align: left; }
  .wa-fab span { display: none; }
  .wa-fab { padding: 14px; width: 56px; height: 56px; justify-content: center; }
}
@media (min-width: 761px) {
  .mobile-menu { display: none !important; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .js .compare__card--yes .compare__mark svg path { stroke-dashoffset: 0; }
}
