/* ==========================================================================
   Abogada de la Tierra — Lucía Rico González
   style.css — Mobile-first, earthy/warm palette
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  /* Palette — Earth tones */
  --color-cream:       #FAF7F2;
  --color-cream-dark:  #F2ECE2;
  --color-sand:        #E8DCC8;
  --color-sand-dark:   #C4B49A;
  --color-sage:        #5B6C4E;
  --color-sage-dark:   #4E6044;
  --color-sage-pale:   #E8EDE5;
  --color-earth:       #8B7355;
  --color-earth-dark:  #6B5740;
  --color-bark:        #3D3229;
  --color-bark-light:  #6B6156;
  --color-gold:        #B8956A;
  --color-gold-dark:   #8A6D2F; /* ~4.9:1 on white — AA-compliant for rating stars */
  --color-white:       #FFFFFF;
  --color-black:       #1A1612;
  --color-error:       #B8444A;
  --color-success:     #4A7F5E;

  /* Form-field validity feedback — universal palette (input-color-feedback).
     The idle/default border deliberately stays on the site's --color-sand so the
     resting state matches the page; focus/valid/warning/invalid are universal. */
  --color-focus:       #0080ff;
  --color-valid:       #00d112;
  --color-warning:     #f7b500;
  --color-invalid:     #e60000;
  --shadow-strength:   0.75;

  /* Typography */
  --font-heading: 'Lora', 'Georgia', serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;
  --font-accent:  'Caveat', cursive;

  --fs-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --fs-sm:   clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
  --fs-base: clamp(0.9375rem, 0.875rem + 0.3vw, 1.0625rem);
  --fs-md:   clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  --fs-lg:   clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
  --fs-xl:   clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --fs-2xl:  clamp(1.875rem, 1.4rem + 2.4vw, 3rem);
  --fs-3xl:  clamp(2.25rem, 1.6rem + 3.2vw, 3.75rem);

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  --lh-tight:  1.2;
  --lh-snug:   1.35;
  --lh-normal: 1.6;
  --lh-loose:  1.8;

  /* Spacing */
  --space-3xs: clamp(0.25rem, 0.2rem + 0.15vw, 0.375rem);
  --space-2xs: clamp(0.375rem, 0.3rem + 0.25vw, 0.5rem);
  --space-xs:  clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-sm:  clamp(0.75rem, 0.6rem + 0.75vw, 1.125rem);
  --space-md:  clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --space-lg:  clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --space-xl:  clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --space-2xl: clamp(3rem, 2rem + 4vw, 5rem);
  --space-3xl: clamp(4rem, 3rem + 5vw, 7rem);

  /* Layout */
  --container-max:  1200px;
  --container-pad:  clamp(1.25rem, 1rem + 1.25vw, 2.5rem);
  --border-radius:  0.5rem;
  --border-radius-lg: 1rem;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(61, 50, 41, 0.06), 0 1px 2px rgba(61, 50, 41, 0.04);
  --shadow-md:  0 4px 12px rgba(61, 50, 41, 0.08), 0 2px 4px rgba(61, 50, 41, 0.04);
  --shadow-lg:  0 12px 32px rgba(61, 50, 41, 0.1), 0 4px 8px rgba(61, 50, 41, 0.04);
  --shadow-xl:  0 20px 48px rgba(61, 50, 41, 0.12);

  /* Transitions */
  --ease-out:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-base: 350ms;
  --duration-slow: 600ms;

  /* Header */
  --header-height: 4.5rem;
}


/* --------------------------------------------------------------------------
   0b. FONTS — self-hosted (latin subset, woff2)
   -------------------------------------------------------------------------- */
/* Lora — headings */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('../fonts/lora-v37-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('../fonts/lora-v37-latin-700.woff2') format('woff2');
}

/* DM Sans — body */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/dm-sans-v17-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('../fonts/dm-sans-v17-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('../fonts/dm-sans-v17-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('../fonts/dm-sans-v17-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/dm-sans-v17-latin-italic.woff2') format('woff2');
}

/* Caveat — handwritten accent */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/caveat-v23-latin-regular.woff2') format('woff2');
}


/* --------------------------------------------------------------------------
   1. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-bark);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--color-sage-pale);
  color: var(--color-sage-dark);
}

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

a {
  color: var(--color-sage);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-sage-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 3px;
  /* No border-radius here: the outline follows each element's own radius,
     so rounded fields/buttons keep their corners on focus. */
}

ul, ol {
  list-style: none;
}

address {
  font-style: normal;
}

abbr[title] {
  text-decoration: none;
  border-bottom: 1px dotted var(--color-sand-dark);
  cursor: help;
}

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


/* --------------------------------------------------------------------------
   2. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}


/* --------------------------------------------------------------------------
   3. TYPOGRAPHY — SHARED
   -------------------------------------------------------------------------- */
.section-kicker {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-sage);
  margin-bottom: var(--space-xs);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semi);
  line-height: var(--lh-tight);
  color: var(--color-bark);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--color-bark-light);
  line-height: var(--lh-normal);
  max-width: 42rem;
}

.section-header--centered {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header--centered .section-subtitle {
  margin-inline: auto;
}


/* --------------------------------------------------------------------------
   4. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  line-height: 1;
  padding: 0.875rem 1.75rem;
  border-radius: var(--border-radius);
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background-color: var(--color-sage);
  color: var(--color-white);
  border: 2px solid var(--color-sage);
}

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

.btn--outline {
  background-color: transparent;
  color: var(--color-sage);
  border: 2px solid var(--color-sage);
}

.btn--outline:hover {
  background-color: var(--color-sage);
  color: var(--color-white);
}

.btn--white {
  background-color: var(--color-white);
  color: var(--color-sage-dark);
  border: 2px solid var(--color-white);
}

.btn--white:hover {
  background-color: var(--color-cream);
  border-color: var(--color-cream);
  box-shadow: var(--shadow-md);
}

.btn--text {
  background: none;
  border: none;
  color: var(--color-sage);
  padding: 0.5rem 0;
  font-weight: var(--fw-semi);
}

.btn--text:hover {
  color: var(--color-sage-dark);
}

.btn--full {
  width: 100%;
}


/* --------------------------------------------------------------------------
   5. HEADER
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--duration-base) var(--ease-out);
}

.header--scrolled {
  box-shadow: 0 1px 8px rgba(61, 50, 41, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--color-bark);
  flex-shrink: 0;
}

.header__logo:hover {
  color: var(--color-bark);
}

.logo__icon {
  font-size: 1.6rem;
  line-height: 1;
}

.logo__text {
  display: flex;
  flex-direction: column;
}

.logo__brand {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-bark);
}

.logo__name {
  font-size: var(--fs-xs);
  color: var(--color-bark-light);
  line-height: var(--lh-tight);
}

/* Hamburger */
.header__menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  z-index: 1001;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-bark);
  border-radius: 2px;
  transition:
    transform var(--duration-base) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
  transform-origin: center;
}

/* Hamburger → X animation */
.header__menu-toggle[aria-expanded="true"] .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__menu-toggle[aria-expanded="true"] .hamburger__line:nth-child(2) {
  opacity: 0;
}

.header__menu-toggle[aria-expanded="true"] .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav — mobile */
.header__nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100dvh - var(--header-height));
  background-color: var(--color-cream);
  padding: var(--space-md) var(--container-pad);
  transform: translateX(100%);
  transition: transform var(--duration-base) var(--ease-out);
  z-index: 999;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.header__nav.is-open {
  transform: translateX(0);
}

.nav__list {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: var(--space-sm);
  padding-bottom: 12dvh;
}

.nav__link {
  display: block;
  padding: var(--space-xs) var(--space-lg);
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  color: var(--color-bark);
  border-radius: var(--border-radius);
  text-align: center;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-sage);
  background-color: var(--color-sage-pale);
}

.nav__link--cta {
  background-color: var(--color-sage);
  color: var(--color-white);
  text-align: center;
  margin-top: var(--space-md);
  font-weight: var(--fw-semi);
}

.nav__link--cta:hover {
  background-color: var(--color-sage-dark);
  color: var(--color-white);
}

/* Overlay */
.nav-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 22, 18, 0.4);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open {
  overflow: hidden;
}


/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-3xl);
  background-color: var(--color-cream-dark);
  overflow: hidden;
}

/* Subtle texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(107, 127, 94, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(184, 149, 106, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.hero__content {
  max-width: 38rem;
}

.hero__kicker {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-sage);
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-bark);
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-size: var(--fs-md);
  color: var(--color-bark-light);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-lg);
  text-align: justify;
}

.hero__subtitle strong {
  color: var(--color-bark);
  font-weight: var(--fw-semi);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero__handwritten {
  font-family: var(--font-accent);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  color: var(--color-earth);
  transform: rotate(-2deg);
  display: inline-block;
  opacity: 0.85;
}

/* Hero image area */
.hero__image {
  position: relative;
  max-width: 360px;
  margin-inline: auto;
}

.hero__photo {
  display: block;
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(135deg, var(--color-sand) 0%, var(--color-sand-dark) 100%);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero__photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__image-accent {
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  width: 60%;
  height: 60%;
  background: var(--color-sage-pale);
  border-radius: var(--border-radius-lg);
  z-index: -1;
}

/* Wave divider */
.section-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
}

.section-divider svg {
  width: 100%;
  height: auto;
}


/* --------------------------------------------------------------------------
   7. ABOUT
   -------------------------------------------------------------------------- */
.about {
  padding-block: var(--space-3xl);
  background-color: var(--color-cream);
}

.about__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.about__image-col {
  max-width: 360px;
  margin-inline: auto;
}

.about__photo {
  display: block;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--color-sand) 0%, var(--color-cream-dark) 100%);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about__photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about__text {
  font-size: var(--fs-base);
  color: var(--color-bark-light);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-md);
  text-align: justify;
}

.about__text strong {
  color: var(--color-bark);
  font-weight: var(--fw-semi);
}

.about__credentials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-sand);
}

.credential {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.credential__icon {
  color: var(--color-sage);
  flex-shrink: 0;
}

.credential__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-bark);
}


/* --------------------------------------------------------------------------
   8. SERVICES
   -------------------------------------------------------------------------- */
.services {
  padding-block: var(--space-3xl);
  background-color: var(--color-cream-dark);
}

.services__grid {
  display: grid;
  gap: var(--space-lg);
}

.service-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-sand);
  transition:
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--color-sage-pale);
  border-radius: var(--border-radius);
  color: var(--color-sage);
  margin-bottom: var(--space-md);
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
  color: var(--color-bark);
  margin-bottom: var(--space-sm);
}

.service-card__text {
  font-size: var(--fs-sm);
  color: var(--color-bark-light);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-md);
  text-align: justify;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.service-card__tags li {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-sage-dark);
  background-color: var(--color-sage-pale);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.service-card__link {
  display: inline-block;
  margin-top: var(--space-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--color-sage);
}


/* --------------------------------------------------------------------------
   9. URBANISMO RURAL (apartado destacado)
   -------------------------------------------------------------------------- */
.rural {
  background: linear-gradient(160deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
  padding-block: var(--space-3xl);
}

.rural__content {
  max-width: 46rem;
}

.rural__kicker {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-xs);
}

.rural__heading {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.rural__text {
  font-size: var(--fs-md);
  color: rgba(255, 255, 255, 0.88);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-lg);
  text-align: justify;
}

.rural__points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-sm);
  margin-bottom: var(--space-xl);
}

.rural__points li {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.14);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
}


/* --------------------------------------------------------------------------
   10. TESTIMONIALS
   -------------------------------------------------------------------------- */
.testimonials {
  padding-block: var(--space-3xl);
  background-color: var(--color-cream);
}

.testimonials__grid {
  display: grid;
  gap: var(--space-lg);
}

.testimonial-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-sand);
  border-left: 4px solid var(--color-sage);
}

.testimonial-card__stars {
  color: var(--color-gold-dark);
  font-size: var(--fs-base);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.15em;
}

.testimonial-card__quote {
  font-size: var(--fs-base);
  color: var(--color-bark-light);
  line-height: var(--lh-loose);
  font-style: italic;
  margin-bottom: var(--space-md);
  text-align: justify;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial-card__avatar {
  width: 2.75rem;
  height: 2.75rem;
  background-color: var(--color-sage-pale);
  color: var(--color-sage);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.testimonial-card__name {
  font-weight: var(--fw-semi);
  font-style: normal;
  color: var(--color-bark);
  font-size: var(--fs-sm);
  display: block;
}

.testimonial-card__detail {
  font-size: var(--fs-xs);
  color: var(--color-bark-light);
}


/* --------------------------------------------------------------------------
   11. CONTACT
   -------------------------------------------------------------------------- */
.contact {
  padding-block: var(--space-3xl);
  background-color: var(--color-cream-dark);
}

.contact__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.contact__text {
  font-size: var(--fs-base);
  color: var(--color-bark-light);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-lg);
  text-align: justify;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.contact__detail {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.contact__detail-icon {
  color: var(--color-sage);
  flex-shrink: 0;
}

.contact__detail a {
  color: var(--color-bark);
  font-weight: var(--fw-medium);
}

.contact__detail a:hover {
  color: var(--color-sage);
}

.contact__social {
  display: flex;
  gap: var(--space-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--color-sand);
  color: var(--color-bark);
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring);
}

.social-link:hover {
  background-color: var(--color-sage);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Contact form */
.contact__form {
  background-color: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--space-md);
}

.form__label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-bark);
  margin-bottom: var(--space-2xs);
}

.form__input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--color-bark);
  background-color: var(--color-cream);
  border: 1.5px solid var(--color-sand);
  border-radius: var(--border-radius);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
  appearance: none;
}

.form__input::placeholder {
  color: var(--color-sand-dark);
}

.form__input:hover {
  border-color: var(--color-sand-dark);
}

/* ----- Field validity feedback ("input-color-feedback") -----------------
   Palette + glow from the input-color-feedback library, now defined as
   :root tokens (--color-focus/valid/warning/invalid + --shadow-strength).
   Only the resting border keeps the site's --color-sand so the default state
   matches the page. Outline is removed (per the library) — the coloured glow
   is the focus indicator. .is-invalid (set by the JS validator) is the red
   fallback for submit-time, since the form is novalidate.
   --------------------------------------------------------------------- */
.form__input,
.form__input:focus,
.form__input:focus-visible {
  outline: none;
}

/* Focus + placeholder (typing hasn't started) */
.form__input:focus:placeholder-shown {
  border-color: var(--color-focus) !important;
  box-shadow: 0 2px 10px 0.1px color-mix(in srgb, var(--color-focus) calc(var(--shadow-strength) * 100%), transparent) !important;
}

/* Focus but invalid input */
.form__input:focus:invalid {
  border-color: var(--color-warning);
  box-shadow: 0 2px 10px 0.1px color-mix(in srgb, var(--color-warning) calc(var(--shadow-strength) * 100%), transparent);
}

/* Unfocused invalid (or failed submit) */
.form__input.is-invalid,
.form__input:not(:focus):user-invalid {
  border-color: var(--color-invalid);
}

/* Valid */
.form__input:user-valid,
.form__input:valid {
  border-color: var(--color-valid) !important;
}
.form__input:focus:user-valid,
.form__input:focus:valid {
  box-shadow: 0 2px 10px 0.1px color-mix(in srgb, var(--color-valid) calc(var(--shadow-strength) * 100%), transparent) !important;
}

/* Optional fields (e.g. phone): an empty value technically counts as :valid,
   which would show green. While empty, keep them neutral — a sand border when
   idle, and the blue focus glow (not green) on focus. */
.form__input--optional:not(:focus):placeholder-shown {
  border-color: var(--color-sand) !important;
}
.form__input--optional:focus:placeholder-shown {
  box-shadow: 0 2px 10px 0.1px color-mix(in srgb, var(--color-focus) calc(var(--shadow-strength) * 100%), transparent) !important;
}

.form__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6156' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form__textarea {
  resize: vertical;
  min-height: 8rem;
}

.form__error {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-error);
  margin-top: var(--space-3xs);
  min-height: 1.25rem;
}

.form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: var(--fs-sm);
  color: var(--color-bark-light);
  cursor: pointer;
  line-height: var(--lh-normal);
}

.form__checkbox {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  accent-color: var(--color-sage);
  flex-shrink: 0;
  cursor: pointer;
}

.form__checkbox-label a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Submit button states */
.btn__loading {
  display: none;
}

.btn.is-loading .btn__text {
  display: none;
}

.btn.is-loading .btn__loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn.is-loading .btn__loading::before {
  content: '';
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Form feedback panel */
.form__status {
  grid-column: 1 / -1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.form__status:empty {
  display: none;
}

.form__status--success,
.form__status--error {
  text-align: left;
  padding: var(--space-md);
  border-radius: var(--border-radius);
  animation: form-status-in var(--duration-base) var(--ease-out);
}

.form__status--success {
  background-color: var(--color-sage-pale);
  border: 1px solid rgba(91, 108, 78, 0.22);
}

.form__status--error {
  background-color: #FBEEEF;
  border: 1px solid rgba(184, 68, 74, 0.25);
  color: #7a1f1f;
}

.form__status-title {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
  margin-bottom: var(--space-3xs);
}

.form__status--success .form__status-title {
  color: var(--color-sage-dark);
}

.form__status--error .form__status-title {
  color: var(--color-error);
}

.form__status-text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-bark-light);
}

.form__status-text a {
  color: var(--color-sage-dark);
  font-weight: var(--fw-semi);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

/* The status panel background is the same colour as the global ::selection
   highlight, which makes selected text invisible inside it. Give these panels a
   contrasting highlight so the selection is actually visible. */
.form__status--success ::selection,
.form__status--success::selection,
.form__status--error ::selection,
.form__status--error::selection {
  background-color: var(--color-sage-dark);
  color: var(--color-white);
}

@keyframes form-status-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}


/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--color-bark);
  padding-block: var(--space-xl);
  color: rgba(255, 255, 255, 0.7);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
}

.footer__brand .logo__icon {
  font-size: 1.4rem;
  filter: grayscale(0.3);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2xs) var(--space-sm);
}

.footer__nav a {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.72);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__nav a:hover {
  color: var(--color-white);
}

.footer__copyright {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__copy {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.72);
}

.footer__credit {
  margin-top: 0.25rem;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.62);
}

.footer__credit a {
  text-decoration: underline;
  color: #16c60c;
  font-weight: var(--fw-semi);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__credit a:hover,
.footer__credit a:focus-visible {
  color: #1CFF0F;
}


/* --------------------------------------------------------------------------
   13. WHATSAPP FAB
   -------------------------------------------------------------------------- */
.whatsapp-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 3.5rem;
  height: 3.5rem;
  background-color: #25D366;
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 12px rgba(37, 211, 102, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.1);
  transition:
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) var(--ease-out);
}

.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow:
    0 6px 20px rgba(37, 211, 102, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.12);
  color: var(--color-white);
}

.whatsapp-fab:active {
  transform: scale(0.96);
}


/* --------------------------------------------------------------------------
   13b. ERROR 404 — PÁGINA NO ENCONTRADA
   -------------------------------------------------------------------------- */
.error {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100dvh;
  padding-top: calc(var(--header-height) + var(--space-2xl));
  padding-bottom: var(--space-2xl);
  background-color: var(--color-cream-dark);
  overflow: hidden;
}

/* Same soft, earthy glow as the hero, for visual continuity. */
.error::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 78%, rgba(107, 127, 94, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 82% 22%, rgba(184, 149, 106, 0.07) 0%, transparent 50%);
  pointer-events: none;
}

.error__inner {
  position: relative;
  max-width: 38rem;
  margin-inline: auto;
  text-align: center;
}

.error__code {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: clamp(5.5rem, 3rem + 16vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--color-sage);
}

/* The "lindero": a surveyor's boundary line marking the edge of the map. */
.error__rule {
  position: relative;
  width: min(15rem, 65%);
  margin: var(--space-sm) auto var(--space-lg);
  border-top: 2px dashed var(--color-sand-dark);
}

.error__rule::before,
.error__rule::after {
  content: '';
  position: absolute;
  top: 0;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--color-sage);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.error__rule::before { left: 0; }
.error__rule::after  { left: 100%; }

.error__handwritten {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  color: var(--color-earth);
  transform: rotate(-2deg);
  margin-bottom: var(--space-sm);
}

.error__title {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-bark);
  margin-bottom: var(--space-md);
}

.error__text {
  font-size: var(--fs-md);
  color: var(--color-bark-light);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-lg);
}

.error__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.error__links {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-sand);
}

.error__links-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-bark-light);
  margin-bottom: var(--space-sm);
}

.error__links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2xs) var(--space-sm);
}

.error__links-list a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--color-sage-dark);
  background-color: var(--color-sage-pale);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.error__links-list a:hover {
  background-color: var(--color-sage);
  color: var(--color-white);
}


/* --------------------------------------------------------------------------
   13c. LEGAL / DOCUMENT PAGES (cookies · privacidad · aviso legal)
   -------------------------------------------------------------------------- */
.legal {
  padding-top: calc(var(--header-height) + var(--space-2xl));
  padding-bottom: var(--space-3xl);
  background-color: var(--color-cream);
}

.legal__inner {
  max-width: 46rem;
  margin-inline: auto;
}

.legal__header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-sand);
}

.legal__kicker {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-sage);
  margin-bottom: var(--space-xs);
}

.legal__title {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-bark);
  margin-bottom: var(--space-sm);
}

.legal__meta {
  font-size: var(--fs-sm);
  color: var(--color-bark-light);
}

.legal__lead {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--color-bark-light);
}

/* Signature callout — the honest, plain-spoken headline of the page. */
.legal__callout {
  background-color: var(--color-sage-pale);
  border-left: 4px solid var(--color-sage);
  border-radius: var(--border-radius);
  padding: var(--space-md) var(--space-lg);
  margin-block: var(--space-lg);
}

.legal__callout p {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
  color: var(--color-sage-dark);
  margin: 0;
}

/* Long-form body copy */
.legal__body > * + * {
  margin-top: var(--space-md);
}

.legal__body h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
  color: var(--color-bark);
  margin-top: var(--space-xl);
}

.legal__body h3 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  color: var(--color-bark);
  margin-top: var(--space-lg);
}

.legal__body p,
.legal__body li {
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
  color: var(--color-bark-light);
}

.legal__body strong {
  color: var(--color-bark);
  font-weight: var(--fw-semi);
}

.legal__body code {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 0.9em;
  color: var(--color-sage-dark);
  background-color: var(--color-sage-pale);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.legal__body a {
  color: var(--color-sage-dark);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal__body a:hover {
  color: var(--color-sage);
}

.legal__body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.legal__body li {
  position: relative;
  padding-left: var(--space-md);
}

.legal__body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.4rem;
  height: 0.4rem;
  background-color: var(--color-sage);
  border-radius: 50%;
}

.legal__note {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-sand);
  font-size: var(--fs-sm);
  color: var(--color-bark-light);
}


/* --------------------------------------------------------------------------
   14. SCROLL REVEAL ANIMATIONS
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

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

/* Staggered children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 120ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 360ms; }

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ==========================================================================
   15. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* --- Tablet (≥ 640px) --- */
@media (min-width: 640px) {

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

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

  /* Third testimonial spans full on 2-col */
  .testimonials__grid .testimonial-card:last-child {
    grid-column: 1 / -1;
    max-width: 36rem;
    justify-self: center;
  }

  .contact__form {
    grid-template-columns: 1fr 1fr;
  }

  .form__group--full {
    grid-column: 1 / -1;
  }
}


/* --- Desktop (≥ 960px) --- */
@media (min-width: 960px) {

  :root {
    --header-height: 5rem;
  }

  /* Nav — desktop */
  .header__menu-toggle {
    display: none;
  }

  .header__nav {
    display: block;
    position: static;
    width: auto;
    height: auto;
    background: none;
    padding: 0;
    transform: none;
    box-shadow: none;
    overflow: visible;
  }

  .nav__list {
    flex: 0 1 auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-2xs);
    padding-bottom: 0;
  }

  .nav__link {
    font-size: var(--fs-sm);
    padding: 0.5rem 0.75rem;
  }

  .nav__link--cta {
    margin-top: 0;
    padding: 0.625rem 1.25rem;
  }

  /* Hero — side by side */
  .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xl);
  }

  .hero__content {
    flex: 1.2;
  }

  .hero__image {
    flex: 0.8;
    max-width: 420px;
  }

  /* About — side by side */
  .about__inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xl);
  }

  .about__image-col {
    flex: 0 0 340px;
    margin: 0;
  }

  .about__content {
    flex: 1;
  }

  /* Services — 3 columns */
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Testimonials — 3 columns */
  .testimonials__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials__grid .testimonial-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  /* Contact — side by side */
  .contact__inner {
    flex-direction: row;
    gap: var(--space-2xl);
  }

  .contact__info {
    flex: 0 0 38%;
  }

  .contact__form {
    flex: 1;
  }
}


/* --- Large desktop (≥ 1200px) --- */
@media (min-width: 1200px) {

  .hero__image {
    max-width: 460px;
  }

  .about__image-col {
    flex: 0 0 400px;
  }
}


/* ==========================================================================
   Accessibility & contact-form helpers
   ========================================================================== */

/* Skip-to-content link — off-screen until it receives keyboard focus. */
.skip-link {
  position: absolute;
  top: -200px;
  left: 1rem;
  z-index: 2000;
  padding: 0.7rem 1.1rem;
  background: #2f5d3a;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Honeypot — hidden from people; bots that fill it are rejected server-side. */
.form__hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
