/* ==========================================================
   Radices Estudio Inmobiliario — design system
   Tokens en :root. Reusarlos; no hardcodear colores ni tamaños.
   ========================================================== */

:root {
  /* Paleta: verde de marca (del logo) + crema cálido */
  --green-900: #1B3421;
  --green-800: #23422B;
  --green-700: #2E5435; /* verde del logo */
  --green-600: #3B6A44;
  --green-300: #9DB7A1;

  --cream-50:  #F7F5F0;
  --cream-100: #EEEAE3; /* fondo del mock */
  --cream-200: #E2DCD1;
  --sand-400:  #B9A98C; /* hairlines y acentos mínimos (no para texto) */
  --sand-600:  #7A6A4E; /* sand para texto: AA sobre crema */

  --ink-900: #1D2620;
  --ink-700: #3D4740;
  --ink-500: #5A625B;

  --on-green: #F3EFE7;
  --on-green-muted: rgba(243, 239, 231, .74);
  --line-on-green: rgba(243, 239, 231, .22);

  /* Tipografía */
  --font: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-xs:   0.78rem;
  --fs-sm:   0.92rem;
  --fs-base: 1.05rem;
  --fs-lg:   clamp(1.12rem, 1.05rem + .35vw, 1.3rem);
  --fs-xl:   clamp(1.4rem, 1.2rem + .9vw, 1.9rem);
  --fs-2xl:  clamp(1.9rem, 1.5rem + 2vw, 3rem);
  --fs-hero: clamp(2.5rem, 1.6rem + 4.4vw, 5rem);

  --tracking-wide: .24em;

  /* Layout */
  --container: 1160px;
  --narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 3rem + 6vw, 8rem);
  --header-h: 72px;

  --radius: 14px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms;
  --t-med: 260ms;
  --t-slow: 600ms;
}

/* ---------- Reset mínimo ---------- */
*, *::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);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--cream-50);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--sand-400); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--cream-50); color: var(--green-800);
  padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--narrow); }

.icon { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  padding: .8rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 500; font-size: var(--fs-sm); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn--lg { padding: 1rem 1.9rem; font-size: var(--fs-base); }
.btn--block { width: 100%; }
.btn--light { background: var(--on-green); color: var(--green-800); }
.btn--light:hover { background: #fff; }
.btn--ghost { border-color: var(--line-on-green); color: var(--on-green); }
.btn--ghost:hover { border-color: var(--on-green); }
.btn:active { transform: translateY(1px); }
.btn .icon--arrow { transition: transform var(--t-med) var(--ease); }
.btn:hover .icon--arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--green-700);
  color: var(--on-green);
  transition: box-shadow var(--t-med) var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line-on-green), 0 8px 24px rgba(0, 0, 0, .12); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { color: var(--on-green); display: inline-flex; }
.brand__logo { height: 30px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__list { display: flex; gap: 1.75rem; }
.site-nav__list a {
  text-decoration: none; font-size: var(--fs-sm); color: var(--on-green-muted);
  transition: color var(--t-fast) var(--ease);
}
.site-nav__list a:hover { color: var(--on-green); }
.site-nav__cta { padding: .55rem 1.2rem; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; align-items: flex-end; justify-content: center; gap: 7px;
}
.menu-toggle span { display: block; width: 28px; height: 1.5px; background: var(--on-green); transition: transform var(--t-med) var(--ease), opacity var(--t-fast); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

@media (max-width: 880px) {
  .menu-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 1.5rem;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--green-700);
    border-top: 1px solid var(--line-on-green);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a { display: block; padding: .9rem 0; font-size: var(--fs-lg); color: var(--on-green); border-bottom: 1px solid var(--line-on-green); }
  .site-nav__cta { align-self: flex-start; padding: .8rem 1.5rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 0%, var(--green-600) 0%, transparent 55%),
    var(--green-700);
  color: var(--on-green);
  padding-block: clamp(4.5rem, 3rem + 7vw, 9rem) clamp(5rem, 3rem + 8vw, 10rem);
}
.hero__inner { position: relative; z-index: 1; }
.hero__title {
  font-size: var(--fs-hero); font-weight: 300;
  line-height: 1.08; letter-spacing: .01em;
  max-width: 14ch;
}
.hero__lead {
  margin-top: 1.75rem; max-width: 44ch;
  font-size: var(--fs-lg); font-weight: 300; color: var(--on-green-muted);
}
.hero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__roots {
  position: absolute; right: -4%; bottom: 0; width: min(56%, 640px); height: 70%;
  fill: none; stroke: var(--on-green); stroke-width: 1; opacity: .1;
  pointer-events: none;
}
@media (max-width: 640px) {
  .hero__roots { width: 100%; right: -30%; opacity: .07; }
  .hero__actions .btn { width: 100%; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-y); }
.section--cream { background: var(--cream-100); }
.section--green { background: var(--green-800); color: var(--on-green); }

.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--ink-700);
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.eyebrow::before, .eyebrow::after { content: ""; height: 1px; width: clamp(2rem, 8vw, 5rem); background: var(--sand-400); }

.kicker {
  font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 1rem;
}
.kicker--light { color: var(--green-300); }
.section-title { font-size: var(--fs-2xl); font-weight: 300; line-height: 1.15; letter-spacing: .005em; max-width: 18ch; }
.section-lead { margin-top: 1.25rem; font-size: var(--fs-lg); font-weight: 300; color: var(--ink-700); max-width: 46ch; }
.section--green .section-lead { color: var(--on-green-muted); }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.service { display: flex; flex-direction: column; align-items: flex-start; }
.service__icon {
  width: 52px; height: 52px; color: var(--green-700);
  margin-bottom: 1.25rem;
  transition: transform var(--t-med) var(--ease);
}
.service:hover .service__icon { transform: translateY(-3px); }
.service__title { font-size: var(--fs-xl); font-weight: 400; color: var(--ink-900); }
.service__text { margin-top: .6rem; color: var(--ink-700); font-size: var(--fs-base); flex: 1; }
.service__link {
  margin-top: 1.25rem;
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--fs-sm); font-weight: 500; color: var(--green-700);
  text-decoration: none; padding-bottom: 2px;
  border-bottom: 1px solid var(--sand-400);
  transition: border-color var(--t-fast) var(--ease), gap var(--t-med) var(--ease);
}
.service__link:hover { border-color: var(--green-700); gap: .75rem; }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; } }
@media (max-width: 520px) { .services { grid-template-columns: 1fr; } }

/* ---------- Split (intro + contenido) ---------- */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.split__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split__intro { position: static; }
}

/* ---------- Pasos ---------- */
.steps { border-top: 1px solid var(--cream-200); }
.step {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem;
  padding-block: 2rem; border-bottom: 1px solid var(--cream-200);
}
.step__num { font-size: var(--fs-sm); font-weight: 500; letter-spacing: .12em; color: var(--sand-600); padding-top: .35rem; }
.step__title { font-size: var(--fs-xl); font-weight: 400; }
.step__text { margin-top: .4rem; color: var(--ink-700); max-width: 48ch; }

/* ---------- Tasación ---------- */
.checks { margin-top: 2rem; display: grid; gap: .75rem; }
.checks li { position: relative; padding-left: 1.9rem; color: var(--on-green); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 14px; height: 8px;
  border-left: 1.5px solid var(--green-300); border-bottom: 1.5px solid var(--green-300);
  transform: rotate(-45deg);
}

.quote-form {
  background: var(--green-700);
  border: 1px solid var(--line-on-green);
  border-radius: calc(var(--radius) * 1.5);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid; gap: 1.25rem;
}
.field { display: grid; gap: .45rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-size: var(--fs-sm); color: var(--on-green-muted); }
.field__opt { opacity: .7; }
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(0, 0, 0, .14);
  border: 1px solid var(--line-on-green);
  border-radius: 10px;
  padding: .8rem .95rem;
  color: var(--on-green);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(243, 239, 231, .62); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--on-green); background: rgba(0, 0, 0, .2);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23F3EFE7' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .95rem center; background-size: 12px;
  padding-right: 2.5rem;
}
.field select option { color: var(--ink-900); }
.field textarea { resize: vertical; min-height: 5.5rem; }
.quote-form .btn { margin-top: .5rem; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--cream-200); }
.faq__item { border-bottom: 1px solid var(--cream-200); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding-block: 1.5rem;
  font-size: var(--fs-lg); font-weight: 400;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 1.5px solid var(--green-700); border-bottom: 1.5px solid var(--green-700);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform var(--t-med) var(--ease);
}
.faq__item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq__item p { padding-bottom: 1.5rem; color: var(--ink-700); max-width: 60ch; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.contact__list { display: grid; gap: 1rem; }
.contact__item {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--cream-200); border-radius: var(--radius);
  background: #fff; text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-med) var(--ease);
}
.contact__item:hover { border-color: var(--green-700); transform: translateX(4px); }
.contact__item .icon { width: 28px; height: 28px; color: var(--green-700); }
.contact__item strong { font-weight: 500; }
.contact__item span { line-height: 1.45; color: var(--ink-700); }
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--cream-100); border-top: 1px solid var(--cream-200); padding-block: 2rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.site-footer__ig { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink-700); font-size: var(--fs-sm); }
.site-footer__ig:hover { color: var(--green-700); }
.site-footer__brand, .site-footer__legal { font-size: var(--fs-xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--ink-500); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-700); color: var(--on-green);
  box-shadow: 0 10px 30px rgba(27, 52, 33, .35);
  transition: transform var(--t-med) var(--ease), background var(--t-fast);
}
.wa-float svg { width: 28px; height: 28px; }
.wa-float:hover { transform: translateY(-3px); background: var(--green-800); }

/* ---------- Reveal al scrollear (solo con JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
@media (max-width: 520px) { .step { grid-template-columns: 2.75rem 1fr; } }

/* ---------- Contacto: dirección y horario ---------- */
.contact__info { margin: 2rem 0 0; display: grid; gap: 1rem; }
.contact__info dt { font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--green-600); }
.contact__info dd { margin: .2rem 0 0; color: var(--ink-700); }
.contact__info a { text-decoration-color: var(--sand-400); text-underline-offset: 3px; }
.contact__info a:hover { color: var(--green-700); text-decoration-color: var(--green-700); }
