/* ARESIA — AI Real Estate Solutions · hoja de estilos */

:root {
  /* Paleta del manual de marca ARESIA */
  --brown: #552b04;         /* texto y superficies invertidas */
  --gold: #998255;          /* acento */
  --bg: #f5f5f5;            /* fondo de toda la web */
  --gold-soft: rgba(85, 43, 4, 0.22);
  --gold-faint: rgba(85, 43, 4, 0.08);
  --radius: 18px;
  --max: 1100px;
  --hero-measure: 620px;   /* título y subtítulo del hero comparten anchura */
  --font-heading: "The Seasons", "Playfair Display", Georgia, serif;
  --font-body: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--brown);
  letter-spacing: 0.01em;
}

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

/* ---------- Header flotante ---------- */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  padding: 0 20px;
  margin-bottom: -84px;   /* la barra flota sobre el contenido */
}

.nav-row {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 14px 10px 16px;
  background: rgba(245, 245, 245, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(85, 43, 4, 0.10);
}

/* Logo con su propio recuadro */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 4px 10px;
}

.logo img {
  height: 42px;
  width: auto;
  display: block;
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.logo:hover img,
.logo:focus-visible img { transform: scale(1.14); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.main-nav a {
  text-decoration: none;
  color: var(--brown);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav a:hover { color: var(--gold); }

/* ---------- Menú hamburguesa ---------- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--brown);
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  max-width: var(--max);
  margin: 10px auto 0;
  padding: 12px;
  background: rgba(245, 245, 245, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--gold-soft);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(85, 43, 4, 0.14);
}

.mobile-menu a {
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--brown);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-menu a:active { background: var(--gold-faint); }

.mobile-menu .mobile-menu-cta {
  margin-top: 4px;
  background: var(--brown);
  color: var(--bg);
  text-align: center;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 13px 30px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--brown);
  color: #fff;
}

.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1.5px solid var(--brown);
  color: var(--brown);
}

.btn-ghost:hover {
  background: var(--gold-faint);
  color: var(--brown);
  border-color: var(--brown);
}

.btn-small {
  padding: 10px 24px;
  background: var(--brown);
  color: var(--bg) !important;
  font-size: 0.88rem;
  text-transform: none !important;
  border: 1px solid var(--brown);
  border-radius: 999px;
}

.btn-small:hover {
  background: transparent;
  color: var(--brown) !important;
  border-color: var(--brown);
}

.btn-large { font-size: 1.08rem; padding: 16px 40px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 150px 0 90px;
  text-align: center;
  overflow: hidden;
  background: #000;
  color: var(--bg);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.72));
}

.hero .container { position: relative; z-index: 2; }

.hero h1 { color: var(--bg); }

.hero .lead { color: rgba(245, 245, 245, 0.94); }

.hero .btn-primary {
  background: var(--bg);
  color: var(--brown);
}

.hero .btn-primary:hover {
  background: var(--gold);
  color: var(--bg);
}

.hero .btn-ghost {
  border-color: rgba(245, 245, 245, 0.8);
  color: var(--bg);
}

.hero .btn-ghost:hover {
  background: rgba(245, 245, 245, 0.15);
  border-color: var(--bg);
  color: var(--bg);
}

.hero-logo {
  width: min(230px, 50vw);
  height: auto;
  margin: 0 auto 34px;
  display: block;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3.3rem);
  line-height: 1.2;
  margin: 0 auto 24px;
  max-width: var(--hero-measure);
  text-wrap: balance;
}

.hero h1 em { font-style: italic; }

.lead {
  font-size: clamp(1rem, 1.9vw, 1.15rem);
  max-width: var(--hero-measure);
  margin: 0 auto 36px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 30px;
  font-size: 0.93rem;
  max-width: 820px;
}

.hero-points li::before {
  content: "✓";
  color: var(--brown);
  font-weight: 700;
  margin-right: 8px;
}

/* ---------- Secciones ---------- */
.section {
  padding: 84px 0;
  scroll-margin-top: 96px;   /* la barra flotante no tapa el título al usar anclas */
  border-top: 1px solid var(--gold-soft);
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-wrap: balance;
}

.section-intro {
  max-width: 58ch;
  margin: 0 0 44px;
  font-size: 1.04rem;
  text-wrap: pretty;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brown);
  margin: 0 0 10px;
}

/* ---------- Apilado: una sección cubre a la anterior ---------- */
/* El contenedor acota el anclaje: al terminar el par, la sección se suelta */
.stack { position: relative; }

/* La sección se ancla arriba y la siguiente la va cubriendo al bajar.
   Requiere que quepa en pantalla: por eso el timeline va compacto. */
.section-sticky {
  position: sticky;
  top: 0;
  z-index: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 96px;
  padding-bottom: 56px;
}

.section-cover {
  position: relative;
  z-index: 1;
  box-shadow: 0 -20px 45px rgba(0, 0, 0, 0.25);
}

/* ---------- Secciones con parallax ---------- */
.section-parallax {
  position: relative;
  overflow: hidden;
  color: var(--bg);
  border-top: none;
}

/* Capa de fondo desplazada por JS: mismo efecto en escritorio y en móvil
   (iOS ignora background-attachment: fixed, por eso no lo usamos) */
.parallax-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -18%;
  height: 136%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  z-index: 0;
}

.section-parallax::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(20, 10, 2, 0.62), rgba(20, 10, 2, 0.74));
}

.section-parallax .container { position: relative; z-index: 2; }

.section-parallax h2 { color: var(--bg); }

.section-parallax .section-intro { color: rgba(245, 245, 245, 0.92); }


/* ---------- Secciones invertidas (marrón sobre claro) ---------- */
.section-invert {
  background: var(--brown);
  color: var(--bg);
  border-top: none;
}

.section-invert h2,
.section-invert h3 { color: var(--bg); }

.section-invert .section-intro,
.section-invert .cta-note { color: rgba(245, 245, 245, 0.9); }

.section-invert .btn-primary {
  background: var(--bg);
  color: var(--brown);
}

.section-invert .btn-primary:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ---------- Galería horizontal con scroll (servicios) ---------- */
.section-gallery { padding-bottom: 0; }

.section-gallery .container { margin-bottom: 8px; }

/* Contenedor alto: su recorrido vertical alimenta el desplazamiento horizontal */
.scroll-container {
  position: relative;
  height: 320vh;
}

.sticky-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.gallery {
  display: flex;
  gap: 22px;
  padding: 0 max(32px, calc((100vw - var(--max)) / 2));
  will-change: transform;
}

.gallery-item {
  position: relative;
  flex: 0 0 clamp(300px, 34vw, 460px);
  height: min(66vh, 560px);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--brown);
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.item-1 { background-image: url("../assets/servicio-1.jpg"); }
.item-2 { background-image: url("../assets/servicio-2.jpg"); }
.item-3 { background-image: url("../assets/servicio-3.jpg"); }
.item-4 { background-image: url("../assets/servicio-4.jpg"); }

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 15, 2, 0.9) 0%, rgba(30, 15, 2, 0.45) 45%, rgba(30, 15, 2, 0.1) 100%);
}

.gallery-item:hover { transform: translateY(-6px); }

.item-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 32px 30px;
  color: var(--bg);
}

.item-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.4rem;
  line-height: 1;
  color: #fff;
  margin-bottom: 12px;
}

.item-content h3 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bg);
}

.item-content p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(245, 245, 245, 0.9);
  max-width: 38ch;
  text-wrap: pretty;
}

/* Barra de progreso del recorrido horizontal */
.gallery-progress {
  margin: 28px auto 0;
  width: min(240px, 40vw);
  height: 3px;
  border-radius: 999px;
  background: var(--gold-soft);
  overflow: hidden;
}

.gallery-progress span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--brown);
}

/* ---------- Timeline del proceso ---------- */
.timeline {
  position: relative;
  padding-left: 76px;
}

/* Raíl vertical con degradado a los extremos */
.timeline-line {
  position: absolute;
  left: 27px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--gold-soft);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
  overflow: hidden;
}

/* Relleno que avanza con el scroll */
.timeline-progress {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--gold), #d8c9a8);
  will-change: height;
}

.timeline-entry {
  position: relative;
  padding-bottom: clamp(20px, 3vh, 34px);
}

.timeline-entry:last-child { padding-bottom: 0; }

/* Marcador pegajoso: icono + título */
.timeline-marker {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}

.timeline-dot {
  position: absolute;
  left: -76px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--brown);
  color: var(--brown);
}

.timeline-dot svg {
  width: 24px;
  height: 24px;
}

.timeline-marker h3 {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brown);
}

.timeline-content {
  padding: 0 0 0 2px;
}

.timeline-content p {
  margin: 0;
  color: var(--brown);
  font-size: 1rem;
  max-width: 62ch;
  text-wrap: pretty;
}

/* Etiquetas de audiencia sobre una sección con foto */
.section-parallax .audience li {
  border-color: rgba(245, 245, 245, 0.75);
  color: var(--bg);
  background: rgba(85, 43, 4, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ---------- Audiencia ---------- */
.audience {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.audience li {
  border: 1px solid var(--brown);
  color: var(--brown);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 0.94rem;
  font-weight: 600;
}

/* ---------- FAQ ---------- */
details {
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

details:hover, details[open] { border-color: var(--brown); }

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brown);
  font-size: 1.02rem;
}

details p { margin: 12px 0 0; }

/* ---------- Formulario de contacto ---------- */
#contacto { text-align: center; }

#contacto .section-intro {
  margin-left: auto;
  margin-right: auto;
}

#contacto .contact-form { text-align: left; }


.contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brown);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--brown);
  background: #fff;
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  padding: 13px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--brown);
  opacity: 0.45;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brown);
  box-shadow: 0 0 0 3px var(--gold-faint);
}

.contact-form .btn {
  border: none;
  cursor: pointer;
  align-self: center;
  min-width: 260px;
  font-family: var(--font-body);
}

.cta-note {
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.75;
}

/* ---------- Patrones con el icono de marca ---------- */
/* Separador: cinta de iconos pequeños entre secciones claras */
.pattern-divider {
  height: 58px;
  background-image: url("../assets/patron-tesela.png");
  background-repeat: repeat-x;
  background-size: auto 26px;
  background-position: center;
  /* a plena opacidad: el icono va en el marrón de marca */
}

/* Marca de agua enorme para rellenar huecos laterales */
.pattern-watermark {
  position: absolute;
  top: 50%;
  width: min(460px, 38vw);
  aspect-ratio: 1540 / 934;
  background-image: url("../assets/icono.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.055;
  pointer-events: none;
  z-index: 0;
}

.pattern-right { right: -6%; transform: translateY(-50%); }
.pattern-left { left: -8%; transform: translateY(-50%) scaleX(-1); }

/* el contenido siempre por encima del patrón */
.section { position: relative; }
.section .container { position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--gold-soft);
  padding: 30px 0;
  font-size: 0.9rem;
  color: var(--brown);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: var(--brown);
  text-decoration: none;
  margin-left: 20px;
}

.site-footer a:hover { color: var(--brown); }

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }

  .container { padding: 0 22px; }

  .site-header { top: 10px; padding: 0 12px; margin-bottom: -76px; }
  .nav-row { padding: 8px 10px 8px 12px; gap: 10px; }
  .logo { padding: 4px 12px; }
  .logo img { height: 34px; }
  .btn-small { padding: 9px 18px; font-size: 0.84rem; }

  .hero { padding: 130px 0 64px; }


  /* El apilado funciona igual que en escritorio: la sección cabe en pantalla */
  .section-sticky {
    padding-top: 86px;
    padding-bottom: 40px;
  }

  /* Timeline compacto para caber en 100vh en móvil */
  .timeline { padding-left: 46px; }
  .timeline-line { left: 15px; top: 4px; bottom: 4px; }
  .timeline-dot { left: -46px; width: 34px; height: 34px; }
  .timeline-dot svg { width: 16px; height: 16px; }
  .timeline-marker { gap: 10px; margin-bottom: 4px; }
  .timeline-marker h3 { font-size: 0.95rem; letter-spacing: 0.02em; }
  .timeline-entry { padding-bottom: clamp(12px, 1.8vh, 20px); }
  .timeline-content p { font-size: 0.86rem; line-height: 1.5; }

  .section-sticky h2 { margin-bottom: 8px; }
  .section-sticky .section-intro { margin-bottom: 20px; font-size: 0.92rem; }

  :root { --hero-measure: 330px; }


  /* En móvil manda la hamburguesa: la nav y el botón viven en el desplegable */
  .main-nav { display: none; }

  .nav-toggle {
    display: flex;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    box-sizing: border-box;
  }

  .mobile-menu[data-open] { display: flex; }

  .nav-row { justify-content: space-between; padding: 8px 10px 8px 12px; }

  .pattern-divider { height: 46px; background-size: auto 20px; }
  .pattern-watermark { width: 58vw; opacity: 0.05; }
  .pattern-right { right: -18%; }
  .pattern-left { left: -20%; }

  .contact-form .btn { width: 100%; min-width: 0; }

  .logo img { height: 44px; }

  .section { padding: 60px 0; }

  .hero-actions .btn {
    width: 100%;
    max-width: 340px;
    text-align: center;
  }

  /* La galería mantiene el mismo desplazamiento por scroll que en escritorio */
  .gallery {
    padding: 0 22px;
    gap: 14px;
  }

  .gallery-item {
    flex: 0 0 78vw;
    height: min(74vh, 560px);
  }

  .item-content { padding: 24px 20px; }

  .item-number { font-size: 2rem; margin-bottom: 8px; }

  .acc-eyebrow,
  .acc-title,
  .acc-desc {
    opacity: 1;
    transform: none;
  }

  .hero-points {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    max-width: 340px;
  }

  .form-row { grid-template-columns: 1fr; }

  .contact-form .btn { width: 100%; text-align: center; }

  .footer-row {
    flex-direction: column;
    text-align: center;
  }

  .site-footer a { margin: 0 10px; }
}
