/* =========================================================
   Ases Legal Properties SPA — Hoja de estilos principal

   Sistema visual construido a partir del logo real (images/aseslegal.png):
   azul marino #102037 + parchment/latón como acento cálido, tipografía
   editorial (Playfair Display + Inter). Ver PLANTILLA-GUIA.md del proyecto
   hermano (Arrebol) para la lógica general de la plantilla — este archivo
   es específico de Ases Legal Properties.
   ========================================================= */

:root {
  /* Paleta de marca — extraída del logo real */
  --color-primary: #102037;        /* azul marino del logo */
  --color-primary-dark: #0a1526;   /* azul marino profundo — footer, panel del sello */
  --color-primary-soft: #2c3f63;   /* azul medio — bordes/degradado sutil sobre marino */
  --color-parchment: #ece6d6;      /* crema/parchment — superficies cálidas */
  --color-brass: #a9895b;          /* latón/bronce — único acento cálido, uso escaso */
  --white: #ffffff;

  --color-bg: #faf8f4;
  --color-surface: #f2ede1;
  --color-text: #12192b;
  --color-text-muted: #5c6478;
  --color-text-soft: #8b93a3;
  --color-border: #ded9c9;

  --gradient-brand: linear-gradient(160deg, #102037 0%, #182c4d 100%);
  --gradient-card: linear-gradient(150deg, #ffffff 0%, #f8f5ee 100%);

  --shadow-sm: 0 2px 8px rgba(16, 32, 55, 0.08);
  --shadow-md: 0 10px 30px rgba(16, 32, 55, 0.12);
  --shadow-lg: 0 24px 56px rgba(16, 32, 55, 0.22);

  --radius-sm: 8px;
  --radius-md: 14px;

  --font-heading: "Playfair Display", "Georgia", serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --header-h: 76px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
}

.section {
  padding: 100px 0;
  position: relative;
}

.section--tint {
  background: var(--color-surface);
}

/* ---------- Encabezados de sección ---------- */
/* Reemplaza el patrón de "eyebrow" (label suelto arriba del H2): el
   identificador de sección va al margen izquierdo del H2 en pantallas
   grandes, como una referencia marginal de documento, y se apila arriba
   en móvil. Solo se usa donde el H2 realmente lo necesita. */
.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head p.lead {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-top: 14px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

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

.btn-ghost:hover {
  border-color: var(--color-primary);
  background: var(--white);
}

.btn-whatsapp {
  background: #1f3a2e;
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-whatsapp:hover {
  background: #16291f;
  box-shadow: var(--shadow-md);
}

.btn-light {
  background: var(--white);
  color: var(--color-primary);
}

.btn-light:hover {
  background: var(--color-parchment);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(250, 248, 244, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border);
  background: rgba(250, 248, 244, 0.97);
}

.nav-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
}

.brand-text .name {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 2px;
  line-height: 1.3;
}

.brand-text .sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-links a {
  position: relative;
  padding: 10px 12px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links a.active {
  font-weight: 600;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-cta .btn .short {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  flex-shrink: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
  position: relative;
}

.nav-toggle span::before {
  position: absolute;
  top: -7px;
}

.nav-toggle span::after {
  position: absolute;
  top: 7px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 64px) 0 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 64px;
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

/* "Membrete" — reemplaza el eyebrow genérico en el hero con un
   tratamiento de letterhead/membrete legal: versalitas, tracking
   amplio, una regla delgada — no una píldora de color. */
.hero-letterhead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.hero-letterhead::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--color-brass);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.3rem);
  margin-bottom: 22px;
  max-width: 15ch;
}

/* Tratamiento del ángulo legal: una regla bajo la frase clave, como el
   subrayado del logotipo real — no una palabra suelta en cursiva. */
.hero h1 .legal-accent {
  font-style: normal;
  border-bottom: 3px solid var(--color-brass);
  padding-bottom: 2px;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.hero-stats .stat {
  min-width: 0;
}

.hero-stats .stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--color-primary);
  line-height: 1;
}

.hero-stats .stat span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  display: block;
}

/* ---------- Logo completo (hero y Sobre mí) ---------- */
/* La imagen se muestra sola, sin marco ni fondo: tamaño natural (660×659)
   y solo se reduce proporcionalmente si la columna es más angosta. */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-full {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  box-shadow: 0 28px 64px rgba(16, 32, 55, 0.42), 0 10px 24px rgba(16, 32, 55, 0.28);
}

/* ---------- Cards genéricas ---------- */
.grid {
  display: grid;
  gap: 28px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Especialidades — sellos editoriales, no cards SaaS ---------- */
.specialty {
  padding-top: 4px;
}

.specialty-seal {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1.5px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  position: relative;
}

.specialty-seal::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--color-brass);
  border-radius: 50%;
  opacity: 0.5;
}

.specialty-seal svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-primary);
  position: relative;
}

.specialty h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.specialty p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.zone-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.zone-tag {
  padding: 8px 18px;
  background: var(--white);
  border: 1px solid var(--color-border);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-primary);
}

.property-types-note {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--color-text-soft);
}

/* ---------- Sobre mí ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 64px;
  align-items: center;
}

.about-grid > * {
  min-width: 0;
}

.about-copy p {
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
  margin-top: 34px;
}

/* Sin numeración 01/02/03/04: una regla vertical marca cada diferenciador,
   como una cita al margen de un documento. */
.value-item {
  padding-left: 16px;
  border-left: 2px solid var(--color-brass);
}

.value-item h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.value-item p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.about-subhead {
  font-size: 1.15rem;
  margin-top: 30px;
  margin-bottom: 10px;
}

.about-tags {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

/* ---------- CTA banda final ---------- */
.cta-band {
  background: var(--gradient-brand);
  padding: 68px 48px;
  text-align: center;
  color: var(--white);
  position: relative;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(169, 137, 91, 0.4);
  pointer-events: none;
}

.cta-band h2 {
  color: var(--white);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin-bottom: 14px;
}

.cta-band p {
  max-width: 520px;
  margin: 0 auto 30px;
  color: var(--color-parchment);
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: start;
}

.contact-grid > * {
  min-width: 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--color-border);
  padding: 22px;
}

.info-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-card .icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-primary);
}

.info-card h3 {
  font-size: 0.98rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 4px;
}

.info-card p,
.info-card a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.info-card a:hover {
  color: var(--color-primary);
}

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.social-row a svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-primary);
}

.social-row a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.social-row a:hover svg {
  stroke: var(--white);
}

.whatsapp-panel {
  background: var(--gradient-brand);
  padding: 40px;
  color: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  position: relative;
}

.whatsapp-panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(169, 137, 91, 0.4);
  pointer-events: none;
}

.whatsapp-panel h3 {
  color: var(--white);
  font-size: 1.35rem;
}

.whatsapp-panel p {
  color: var(--color-parchment);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: var(--color-parchment);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(236, 230, 214, 0.14);
}

.footer-grid > * {
  min-width: 0;
}

.footer-brand .brand {
  margin-bottom: 16px;
}

.footer-brand .brand .name {
  color: var(--white);
  border-bottom-color: rgba(236, 230, 214, 0.5);
}

.footer-brand .brand .sub {
  color: rgba(236, 230, 214, 0.6);
}

.footer-brand p {
  color: #a3aec4;
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: #a3aec4;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--color-brass);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.8rem;
  color: #76839c;
}

.footer-bottom a {
  color: #76839c;
}

.footer-bottom a:hover {
  color: var(--color-brass);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-primary);
  color: var(--white);
  padding: 12px 20px;
  z-index: 2000;
  transition: top 0.2s ease;
  font-weight: 600;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 16px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .about-logo { justify-self: center; }
  .about-copy { text-align: left; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-bar.open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: 18px 24px 28px;
    box-shadow: var(--shadow-md);
    gap: 2px;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-bar.open .nav-links a {
    width: 100%;
    padding: 14px 16px;
  }

  .nav-cta .btn .long { display: none; }
  .nav-cta .btn .short { display: inline; }
}

@media (max-width: 720px) {
  .section { padding: 76px 0; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .cta-band { padding: 48px 26px; }
  .hero-stats { gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .about-values { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .hero { padding-top: calc(var(--header-h) + 36px); }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions .btn { width: 100%; }
  .whatsapp-panel { padding: 28px; }
}

/* ---------- Utilidades de accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
