/* ============================================================
   VitalEdge Lab — style.css
   Phase 0 · Foundations: tokens, reset, type, spacing, layout
   Art direction: warm minimalism / quiet luxury for healthcare.
   Serif display = Palatino (system font). Hanken Grotesk · Jost via <link>.
   ============================================================ */

/* ----------------------------------------------------------
   1. Design tokens  (briefing §4)
   ---------------------------------------------------------- */
:root {
  /* Color — warm neutral base + sage accent + espresso text */
  --bone:       #F4F0E8;   /* main background */
  --ivory:      #FBF8F2;   /* elevated sections / cards */
  --linen:      #E7E3D8;   /* cards, dividers, secondary fill */
  --clay:       #BBAE9C;   /* captions, inactive, hairlines */
  --sage:       #a3c6d1;   /* accent — CTAs, hover, signature (blue) */
  --sage-deep:  #38697a;   /* deep accent — hovers + small-text labels (AA on bone) */
  --espresso:   #2B2722;   /* primary text + headings */
  --espresso-soft: #6B6358;/* muted body text — passes AA on bone */

  /* Translucent helpers derived from the palette */
  --hairline:   rgba(187, 174, 156, 0.4);   /* clay @ 40% */
  --ivory-glass: rgba(251, 248, 242, 0.82);  /* nav scrolled bg */

  /* Typography */
  --font-display: 'Palatino', 'Palatino Linotype', 'Book Antiqua', 'URW Palladio L', Georgia, serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-util:    'Jost', system-ui, sans-serif;

  /* Fluid type scale (briefing §4.4) */
  --fs-hero:    clamp(2.8rem, 6vw, 5.5rem);
  --fs-h2:      clamp(2rem, 4vw, 3.25rem);
  --fs-h3:      1.5rem;
  --fs-thesis:  clamp(1.4rem, 2.2vw, 1.7rem);
  --fs-body:    clamp(1rem, 1.1vw, 1.125rem);
  --fs-eyebrow: 0.8rem;
  --fs-meta:    0.8rem;

  /* Spacing scale */
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Vertical rhythm for sections */
  --section-pad: clamp(6rem, 12vh, 10rem);

  /* Layout */
  --container:  1280px;
  --gutter:     clamp(1.25rem, 5vw, 4rem);
  --measure:    62ch;        /* comfortable body line length */

  /* Form / shape */
  --radius:     14px;
  --radius-sm:  8px;

  /* Motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);   /* ~ power3.out */
  --dur:        0.6s;
}

/* ----------------------------------------------------------
   2. Reset
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bone);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

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

h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

/* ----------------------------------------------------------
   3. Base typographic roles
   ---------------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-util);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  /* sage-deep keeps the accent but meets AA at this small size on bone */
  color: var(--sage-deep);
}

.section-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Brand "thesis" lines — treated as a design element (briefing §2) */
.thesis {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: italic;
  font-size: var(--fs-thesis);
  font-weight: 400;
  line-height: 1.25;
  color: var(--espresso);
}

.meta {
  font-family: var(--font-util);
  font-size: var(--fs-meta);
  letter-spacing: 0.04em;
  color: var(--clay);
}

/* Accent helpers */
.italic { font-style: italic; }
.accent { color: var(--sage); }

/* ----------------------------------------------------------
   4. Layout primitives
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

/* Lighter / elevated section surface */
.section--ivory { background-color: var(--ivory); }
.section--linen { background-color: var(--linen); }

.hairline {
  border: 0;
  border-top: 1px solid var(--hairline);
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100%;
  z-index: 200;
  background: var(--espresso);
  color: var(--bone);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--space-sm); }

/* ----------------------------------------------------------
   5. Signature — circular "lab lens" motif (briefing §4.2)
   Reusable building blocks; populated in later phases.
   ---------------------------------------------------------- */
.lens {
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--linen);
}

/* ----------------------------------------------------------
   6. Accessibility — focus + reduced motion
   ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
}

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

/* ============================================================
   PHASE 1 — Buttons · Navbar · Hero
   ============================================================ */

/* ----------------------------------------------------------
   Buttons (shared component)
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 0.9rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.btn--primary {
  background-color: var(--sage);
  color: var(--espresso);
}
.btn--primary:hover { background-color: #8db4c1; }

.btn--ghost {
  background-color: transparent;
  color: var(--espresso);
  padding-inline: 0.25rem;
}
.btn--ghost:hover { color: var(--sage-deep); }

.btn__arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}
.btn--ghost:hover .btn__arrow { transform: translateX(5px); }

/* ----------------------------------------------------------
   Navbar
   ---------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s var(--ease),
              border-color 0.5s var(--ease),
              backdrop-filter 0.5s var(--ease);
}

/* Scrolled state — ivory glass with hairline */
.site-header.is-scrolled {
  background-color: var(--ivory-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-block: 1.15rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav__logo-lab {
  font-style: italic;
  color: var(--sage);
  margin-left: 0.28em;
}

.nav__primary {
  margin-left: auto;
}
.nav__primary ul {
  display: flex;
  gap: var(--space-md);
}
.nav__primary a {
  position: relative;
  font-size: 0.95rem;
  padding-block: 0.25rem;
  color: var(--espresso);
}
/* Underline drawn left → right on hover (briefing §5) */
.nav__primary a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav__primary a:hover::after,
.nav__primary a:focus-visible::after { transform: scaleX(1); }

.nav__cta { white-space: nowrap; }

/* Hamburger — hidden on desktop */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: transparent;
  border: 0;
}
.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 1.5px;
  margin-inline: auto;
  background-color: var(--espresso);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
body.menu-open .nav__toggle-bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .nav__toggle-bar:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* Mobile overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background-color: var(--bone);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.mobile-menu a:not(.btn) {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 400;
  color: var(--espresso);
}
.mobile-menu a:not(.btn):hover { color: var(--sage); }
.mobile-menu nav { text-align: center; }

body.menu-open { overflow: hidden; }

/* ----------------------------------------------------------
   Hero
   ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 116svh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  background-color: var(--bone);
  /* photo anchored to the bottom so the marble table sits low, below the text */
  background-image: linear-gradient(to right, rgba(244, 240, 232, 0.9) 30%, rgba(244, 240, 232, 0.25) 80%), url('../assets/VitalEdge_Hero.png');
  background-size: cover;
  background-position: center bottom;
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(6rem, 13vh, 9rem) var(--space-2xl);
}

.hero__eyebrow { margin-bottom: var(--space-md); }

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
}
.hero__title .accent { font-weight: 400; }

.hero__sub {
  max-width: 46rem;
  color: var(--espresso);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

/* Signature — concentric "lab lens" rings, off to the right */
.signature-rings {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -8vw;
  transform: translateY(-50%);
  width: min(52vw, 640px);
  aspect-ratio: 1;
  pointer-events: none;
}
.lens-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1px solid var(--clay);
  opacity: 0.35;
}
.lens-ring--1 { width: 100%;  height: 100%; opacity: 0.18; }
.lens-ring--2 { width: 66%;   height: 66%;  opacity: 0.26; }
.lens-ring--3 {
  width: 34%;   height: 34%;
  border-color: var(--sage);
  opacity: 0.5;
}

/* Host the signature rings on the right of Metodología, behind content */
.metodologia { position: relative; overflow: hidden; }
.metodologia .container { position: relative; z-index: 1; }

/* ----------------------------------------------------------
   Navbar / hero responsive
   ---------------------------------------------------------- */
@media (max-width: 860px) {
  .nav__primary,
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .signature-rings { right: -30vw; width: min(80vw, 460px); }
  .hero__actions .btn { flex: 1 1 auto; }
}

/* ============================================================
   PHASE 2 — Intro / Quiénes somos + Diferencial
   ============================================================ */

/* Fill one screen: lead on top, differentiator rows spread to fill the rest */
.intro {
  min-height: 100svh;
  display: flex;
  padding-block: clamp(2.5rem, 5vh, 4rem);
}
.intro > .container {
  display: flex;
  flex-direction: column;
}

/* Editorial asymmetric lead: H2 left, copy offset right */
.intro__lead {
  display: grid;
  gap: var(--space-lg);
}
.intro__head .section-title { margin-top: var(--space-sm); max-width: 14ch; }
.intro__copy {
  display: grid;
  gap: var(--space-md);
  max-width: var(--measure);
  color: var(--espresso);
}
.intro__copy p:last-child { color: var(--espresso-soft); }

@media (min-width: 860px) {
  .intro__lead {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: var(--space-2xl);
  }
}

/* Differentiator — hairline-separated editorial list (no numbering;
   these are distinct points, not a sequence) */
.diff {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  border-bottom: 1px solid var(--hairline);
}
/* In the intro, give every row an equal share of the remaining height so
   the spacing is identical for all (including the last) */
.intro .diff {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.intro .diff__row {
  flex: 1 1 0;
  align-content: center;
}
.diff__row {
  display: grid;
  gap: var(--space-2xs);
  padding-block: var(--space-sm);
  border-top: 1px solid var(--hairline);
}
.diff__label {
  display: flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.4rem;
  font-weight: 400;
}
/* Lens-dot — a small echo of the signature ring */
.diff__dot {
  flex: none;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.7em;
  border: 1.5px solid var(--sage);
  border-radius: 50%;
  transform: translateY(-0.05em);
}
.diff__text { color: var(--espresso-soft); max-width: 56ch; }

@media (min-width: 760px) {
  .diff__row {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: baseline;
    gap: var(--space-lg);
    padding-block: var(--space-sm);
  }
}

/* ============================================================
   PHASE 3 — Servicios (blocks A–D)
   ============================================================ */
.servicios__head {
  position: relative;
  z-index: 2;
  max-width: 60rem;
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
}
.servicios__head .section-title { margin-top: var(--space-sm); }

/* Full-width tonal bands; content is centred to the container width */
.services-viewport { width: 100%; }
.services__list { display: grid; }

/* Placeholder note shared by all lens images */
.placeholder-note {
  font-family: var(--font-util);
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.5;
  color: var(--clay);
}

/* Single service panel — its own warm tone + zig-zag content */
.service {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
  padding-block: clamp(3rem, 7vh, 5rem);
  padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2));
}
.service:nth-child(1) { background-color: var(--ivory); }
.service:nth-child(2) { background-color: #F2EDE3; }
.service:nth-child(3) { background-color: #ECE6DA; }
.service:nth-child(4) { background-color: var(--linen); }

.service__media { margin: 0; }

/* Circular "lab lens" frame with a faint concentric echo ring */
.service__lens {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(100%, 460px);
  margin-inline: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.service__head {
  margin-bottom: var(--space-sm);
}
.service__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.15;
}

.service__lead {
  color: var(--espresso-soft);
  max-width: 52ch;
  margin-bottom: var(--space-md);
}

.service__list {
  display: grid;
  gap: 0.65rem;
  margin-bottom: var(--space-lg);
}
.service__list li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.98rem;
  color: var(--espresso);
}
/* Refined sage checkmark — signals an included capability */
.service__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 0.95rem;
  height: 0.95rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.6l3.1 3.1L13 4.6' fill='none' stroke='%2338697A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Closing thesis — treated as a brand asset */
.service__thesis {
  padding-top: var(--space-md);
  border-top: 1px solid var(--hairline);
  max-width: 40ch;
}

/* Desktop + motion: pinned horizontal-scroll track of full-screen panels,
   photo on the left and text on the right for every one. */
@media (min-width: 860px) and (prefers-reduced-motion: no-preference) {
  /* Slide the panel viewport up under the headline. The first panel's top
     is empty (content is centred), so this only closes the gap between the
     headline and the first slide — the centred margins stay intact. */
  .services-viewport { height: 100vh; overflow: hidden; margin-top: -5.5rem; }
  .services__list {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    height: 100%;
  }
  .service {
    flex: 0 0 100vw;
    height: 100%;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(3rem, 6vw, 6rem);
    /* content centred → equal margin top and bottom in the pinned panel */
    align-content: center;
  }
}

/* Desktop, reduced motion: same photo-left layout as a vertical stack */
@media (min-width: 860px) and (prefers-reduced-motion: reduce) {
  .service {
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(3rem, 6vw, 6rem);
  }
}

/* ============================================================
   PHASE 4 — Proyectos + Metodología
   ============================================================ */

/* Shared section header */
.section-head {
  max-width: 32rem;
  margin-bottom: clamp(2.5rem, 7vh, 5rem);
}
.section-head .section-title { margin-top: var(--space-sm); }

/* ---- Proyectos: a "wall of circles" (signature) ---- */
.projects {
  display: grid;
  gap: var(--space-lg);
}
.project__thumb {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
/* Project photo fills the frame; gentle zoom on hover */
.project__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.project:hover .project__img,
.project:focus-within .project__img { transform: scale(1.06); }

.project__cat {
  margin-top: var(--space-md);
  font-family: var(--font-util);
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--espresso-soft);
}
.project__title {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.2;
}

@media (min-width: 620px) {
  .projects { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-lg); row-gap: var(--space-xl); }
}
@media (min-width: 960px) {
  .projects { grid-template-columns: repeat(3, 1fr); }
}

/* Scroll-position dots — only shown on the mobile carousel */
.projects__dots {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-lg);
}
.projects__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--clay);
  opacity: 0.4;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
              background-color 0.35s var(--ease);
}
.projects__dot.is-active {
  opacity: 1;
  background-color: var(--sage);
  transform: scale(1.35);
}

/* Mobile: lay the cards out as a horizontal, snap-scrolling carousel */
@media (max-width: 619px) {
  .projects {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .projects::-webkit-scrollbar { display: none; }
  .project {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
  .projects__dots { display: flex; }
}

/* ---- Metodología: numbered vertical timeline ---- */
.method {
  --rail: 64px;
  position: relative;
}
/* Base connector line + sage progress overlay (drawn on scroll) */
.method::before {
  content: "";
  position: absolute;
  top: 0.2em;
  bottom: 0.6em;
  left: calc(var(--rail) / 2);
  width: 1px;
  background-color: var(--hairline);
  transform: translateX(-0.5px);
}
.method__progress {
  position: absolute;
  top: 0.2em;
  left: calc(var(--rail) / 2);
  width: 1px;
  height: calc(100% - 0.8em);
  background-color: var(--sage);
  transform: translateX(-0.5px) scaleY(0);
  transform-origin: top center;
}

.method__step {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  column-gap: var(--space-lg);
  align-items: start;
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
.method__step:last-child { padding-bottom: 0; }

/* The number doubles as the node — knocked out over the line */
.method__num {
  position: relative;
  z-index: 1;
  justify-self: center;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  color: var(--sage);
  background-color: var(--ivory);
  padding-block: 0.15em;
}
.method__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.1;
}
.method__desc {
  margin-top: 0.4rem;
  color: var(--espresso-soft);
  max-width: 46ch;
}

@media (min-width: 760px) {
  .method { --rail: 96px; }
  .method__num { font-size: 2.6rem; }
}

/* ============================================================
   PHASE 5 — Contacto + Footer
   ============================================================ */

/* ---- Contacto ---- */
/* Title + subtitle span the full section width */
.contacto__head { max-width: none; }
.contacto__sub {
  margin-top: var(--space-md);
  color: var(--espresso-soft);
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
  max-width: none;
}

.contact {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 880px) {
  .contact { grid-template-columns: 1.4fr 0.9fr; align-items: start; }
}

/* Form */
.contact-form { display: grid; gap: var(--space-lg); }

.field-row { display: grid; gap: var(--space-lg); }
@media (min-width: 540px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.field { display: grid; gap: 0.45rem; margin: 0; }
.field__label {
  font-family: var(--font-util);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--espresso-soft);
}
.field__opt { text-transform: none; letter-spacing: 0; color: var(--clay); }

.field__control {
  width: 100%;
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid var(--clay);
  border-radius: 0;
  padding: 0.6rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--espresso);
  transition: border-color var(--dur) var(--ease);
}
.field__control::placeholder { color: var(--clay); }
.field__control:focus { border-bottom-color: var(--sage); }

textarea.field__control { resize: vertical; min-height: 7rem; }

select.field__control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2338697A' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.1rem center;
}

.contact-form__submit { justify-self: start; margin-top: var(--space-2xs); }

.form-status {
  min-height: 1.4em;
  font-size: 0.95rem;
  color: var(--sage-deep);
}
.form-status.is-error { color: #9A5B4F; }

/* Direct contact details */
.contact-info {
  display: grid;
  gap: var(--space-lg);
  padding-top: var(--space-sm);
}
.contact-info__label {
  font-family: var(--font-util);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: var(--space-2xs);
}
.contact-info__line {
  display: block;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--espresso);
}
a.contact-info__line { transition: color var(--dur) var(--ease); }
a.contact-info__line:hover { color: var(--sage-deep); }

/* ---- Footer ---- */
.site-footer {
  background-color: var(--espresso);
  color: var(--bone);
  padding-block: clamp(3.5rem, 8vh, 6rem) var(--space-lg);
}
.site-footer__inner {
  display: grid;
  gap: var(--space-xl);
}
@media (min-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: var(--space-lg);
  }
}

.site-footer__logo {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--bone);
}
.site-footer__logo em { font-style: italic; color: var(--sage); margin-left: 0.28em; }

.site-footer__tagline {
  margin-top: var(--space-sm);
  color: var(--clay);
  max-width: 28ch;
}

.site-footer__heading {
  font-family: var(--font-util);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--space-md);
}
.site-footer__nav ul,
.site-footer__col ul { display: grid; gap: 0.6rem; }
.site-footer a { color: var(--linen); transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: var(--bone); }
.site-footer__col li { color: var(--clay); }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(244, 240, 232, 0.14);
  font-size: 0.85rem;
  color: var(--clay);
}

/* Keyboard focus on the dark footer */
.site-footer :focus-visible { outline-color: var(--sage); }

/* ============================================================
   PHASE 6 — About Us (about.html)
   ============================================================ */

/* Historia hero — calmer than the home hero */
.about-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(8rem, 18vh, 12rem) clamp(4rem, 9vh, 7rem);
}
.about-hero__signature {
  top: 0;
  right: -14vw;
  transform: none;
  width: min(48vw, 540px);
}
.about-hero__inner { position: relative; z-index: 1; }
.about-hero__title {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.04;
  margin-top: var(--space-sm);
}
.about-hero__lead {
  margin-top: var(--space-lg);
  max-width: 56ch;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  line-height: 1.6;
  color: var(--espresso);
}

/* Misión + Visión — two paused statement blocks */
.mv__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 760px) {
  .mv__grid { grid-template-columns: 1fr 1fr; }
}
.mv__statement {
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  /* same size + leading as the "Nuestra historia" lead */
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--espresso);
  /* width tuned so Misión and Visión wrap to the same number of lines */
  max-width: 38ch;
  text-wrap: pretty;
}

/* Closing CTA band */
.cta-band__inner {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--space-md);
}
.cta-band__inner .section-title { max-width: 18ch; }
.cta-band__sub { color: var(--espresso-soft); }
.cta-band__inner .btn { margin-top: var(--space-2xs); }

/* ============================================================
   PHASE 7 — Animation support (GSAP / Lenis)
   ============================================================ */

/* Hero headline line-by-line mask (lines wrapped by animations.js) */
.line-mask { display: block; overflow: hidden; }
.line-inner { display: block; will-change: transform; }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
