/* === tokens.css === */
:root {
  /* ─── Color: superficies (capas) ──────────────────────────────── */
  --bg:        #F4EFE6;
  --bg-deep:   #ECE4D2;
  --surface:   #FFFCF7;

  /* ─── Color: tinta y texto ────────────────────────────────────── */
  --ink:       #1F2A22;
  --ink-mute:  #5C6B5F;
  --ink-faint: #6B7A6E;

  /* ─── Color: líneas y bordes ──────────────────────────────────── */
  --line-soft: #D7CFBC;
  --line:      #B8B0A0;

  /* ─── Color: acento (verde bosque = identidad) ────────────────── */
  --accent:        #2F6B4A;
  --accent-hover:  #255939;
  --accent-active: #1C4530;
  --accent-soft:   #E5EFE8;

  /* ─── Color: acento secundario (terracota = calidez) ──────────── */
  --accent-2:        #B8743A;
  --accent-2-hover:  #9F6230;
  --accent-2-soft:   #F2E4D3;

  /* ─── Color: estado (solo errores de formulario) ────────────── */
  --danger: #B33A1F;

  /* ─── Tipografía: familias ────────────────────────────────────── */
  --font-display: 'Fraunces', 'Iowan Old Style', georgia, serif;
  --font-body:    'Inter', -apple-system, blinkmacsystemfont, system-ui, sans-serif;
  --font-mono:    ui-monospace, 'JetBrains Mono', 'SF Mono', monospace;

  /* ─── Tipografía: escala (fluida con clamp) ─────────────────────── */
  --text-xs:   clamp(11px, 1.2vw, 12px);
  --text-sm:   clamp(12.5px, 1.3vw, 13.5px);
  --text-base: clamp(14px, 1.5vw, 15px);
  --text-md:   clamp(16px, 1.7vw, 17px);
  --text-lg:   clamp(18px, 2vw, 20px);
  --text-xl:   clamp(20px, 2.4vw, 24px);
  --text-2xl:  clamp(28px, 3.2vw, 32px);
  --text-3xl:  clamp(36px, 4vw, 40px);
  --text-4xl:  clamp(48px, 5.6vw, 56px);
  --text-hero: clamp(46px, 15vw, 66px);

  /* ─── Tipografía: pesos ───────────────────────────────────────── */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    900;

  /* ─── Tipografía: line-height y tracking ──────────────────────── */
  --leading-tight: 1.02;
  --leading-snug:  1.15;
  --leading-body:  1.6;
  --tracking-display: -0.03em;
  --tracking-tight:   -0.02em;
  --tracking-wide:    0.10em;

  /* ─── Espaciado (escala 4px) ──────────────────────────────────── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  --space-20:  80px;

  /* ─── Espaciado: secciones (mobile-first) ─────────────────────── */
  --section-y: 40px;
  --pad-x:     20px;

  /* ─── Radio (esquinas) ────────────────────────────────────────── */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   18px;
  --radius-xl:   22px;
  --radius-2xl:  32px;
  --radius-pill: 9999px;

  /* ─── Sombras (3 niveles) ─────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgb(31 42 34 / 6%);
  --shadow-md: 0 8px 24px -10px rgb(31 42 34 / 18%);
  --shadow-lg: 0 22px 48px -18px rgb(31 42 34 / 35%);
  --shadow-accent: 0 8px 20px -4px rgb(47 107 74 / 45%);
  --shadow-tape:   0 18px 40px -14px rgb(31 42 34 / 35%);

  /* ─── Anillo de focus (accesibilidad) ─────────────────────────── */
  --focus-ring: 0 0 0 2px var(--accent-2);
  --focus-offset: 3px;

  /* ─── Motion (curvas y duraciones) ────────────────────────────── */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-base:  cubic-bezier(0.2, 0, 0, 1);
  --motion-fast:  150ms;
  --motion-base:  220ms;
  --motion-slow:  650ms;

  /* ─── Layout (mobile-first) ───────────────────────────────────── */
  --container-max: 100%;
  --container-gutter: 20px;

  /* ─── Breakpoints (mobile-first, content-based) ───────────────── */
  --bp-tablet: 600px;
  --bp-desktop: 1024px;
  --bp-wide: 1280px;

  /* ─── Z-index (escala explícita) ──────────────────────────────── */
  --z-base:    1;
  --z-sticky:  45;
  --z-dock:    50;
  --z-menu:    55;
  --z-toggle:  60;
  --z-modal:   65;
  --z-skip:    1000;

  /* ─── Color: sobre fondo oscuro (footer) ──────────────────────── */
  --ink-inverse:     #E9E3D6;
  --ink-muted-dark:  #C9C6B8;
  --ink-faint-dark:  #9C9A8C;

  /* ─── Gradientes placeholder (propiedades) ────────────────────── */
  --grad-a: linear-gradient(160deg, #D8C49C 0%, #8E6A41 100%);
  --grad-b: linear-gradient(160deg, #C8B89A 0%, #6F563B 100%);
  --grad-c: linear-gradient(160deg, #E0CDB0 0%, #A98358 100%);

  /* ─── Sombras adicionales ─────────────────────────────────────── */
  --shadow-app:      0 0 90px -24px rgb(31 42 34 / 35%);
  --shadow-dock:     0 14px 34px -10px rgb(31 42 34 / 55%);
  --shadow-accent-sm: 0 6px 14px -4px rgb(47 107 74 / 50%);
}

/* ─── Tablet (≥ 600px) ───────────────────────────────────────────── */
@media (width >= 600px) {
  :root {
    --container-max: 100%;
    --container-gutter: 32px;
    --section-y: 64px;
    --pad-x: 40px;
  }
}

/* ─── Desktop (≥ 1024px) ─────────────────────────────────────────── */
@media (width >= 1024px) {
  :root {
    --container-max: 1280px;
    --container-gutter: 48px;
    --section-y: 80px;
    --pad-x: 56px;
  }
}

/* ─── Wide (≥ 1440px) ────────────────────────────────────────────── */
@media (width >= 1440px) {
  :root {
    --container-max: 1600px;
    --pad-x: 80px;
  }
}

/* ─── Ultra-wide (≥ 1920px) ──────────────────────────────────────── */
@media (width >= 1920px) {
  :root {
    --container-max: 1800px;
    --pad-x: 96px;
  }
}


/* === fonts.css === */
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/fraunces-normal.woff2') format('woff2');
}

@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/fraunces-italic.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/inter-normal.woff2') format('woff2');
}


/* === base.css === */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.6vw, 16px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--surface); padding: 12px 20px; font-weight: 600; z-index: var(--z-skip); }
.skip-link:focus { left: 12px; top: 12px; }

.app {
  max-width: var(--container-max); margin: 0 auto; min-height: 100vh;
  background: var(--bg); position: relative;
  padding-bottom: 4px; overflow: hidden;
}
.pad { padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* ─── Tablet+ (≥ 600px) ─────────────────────────────────────────── */
@media (width >= 600px) {
  .app {
    box-shadow: var(--shadow-app);
  }
}

.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;
}


/* === shared.css === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 22px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--accent); background: transparent; color: var(--accent);
  transition: transform 0.12s, background 0.15s, color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--surface); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.section { padding: var(--section-y) 0; border-top: 1px solid var(--line-soft); }
.section-head { margin-bottom: 24px; }
.section-head .kicker { display: inline-block; font-family: var(--font-display); font-style: italic; font-size: clamp(14px, 1.6vw, 16px); color: var(--accent); margin-bottom: 6px; }

.section-head h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 8.5vw, 40px); line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 10px; text-wrap: balance;
}
.section-head h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.section-head p { color: var(--ink-mute); font-size: clamp(14px, 1.5vw, 15px); margin: 0; }

/* ─── Tablet+ (≥ 600px) ─────────────────────────────────────────── */
@media (width >= 600px) {
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: clamp(32px, 6vw, 44px); }
  .section-head p { font-size: clamp(15px, 1.6vw, 16px); }
}

/* ─── Desktop (≥ 1024px) ─────────────────────────────────────────── */
@media (width >= 1024px) {
  .section-head h2 { font-size: clamp(36px, 4.5vw, 48px); }
  .btn { width: auto; }
}

/* ─── Hover ──────────────────────────────────────────────────────── */
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn.primary:hover { background: var(--accent-hover); }
}


/* === nav.css === */
.appbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 28px var(--pad-x);
  background: rgb(244 239 230 / 82%);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.appbar.scrolled { border-bottom-color: var(--line-soft); }

@media (width >= 600px) {
  .appbar { border-bottom: 1px solid var(--line-soft); }
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-logo { height: 115px; width: auto; display: block; mix-blend-mode: multiply; }

.nav-toggle {
  width: 44px; height: 44px; flex: 0 0 auto;
  background: var(--surface); border: 1.5px solid var(--line-soft);
  border-radius: 12px; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; z-index: var(--z-toggle);
  transition: border-color 0.15s;
}
.nav-toggle:active { border-color: var(--accent); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.nav-toggle .bars { position: relative; width: 18px; height: 13px; display: block; }

.nav-toggle .bars::before, .nav-toggle .bars::after, .nav-toggle .bars > span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), top 0.2s ease, opacity 0.15s ease;
}
.nav-toggle .bars::before { top: 0; }
.nav-toggle .bars > span { top: 5.5px; display: block; }
.nav-toggle .bars::after { top: 11px; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 5.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars > span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars::after { top: 5.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  max-width: var(--container-max); margin: 0 auto;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: 84px var(--pad-x) 32px;
  transform: translateY(-100%);
  transition: transform 0.42s cubic-bezier(0.16,1,0.3,1);
  overflow-y: auto;
}
.menu.open { transform: translateY(0); }

.menu-close {
  position: absolute; top: 20px; right: var(--pad-x);
  width: 44px; height: 44px;
  background: var(--surface); border: 1.5px solid var(--line-soft);
  border-radius: 12px; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
  z-index: 1;
}
.menu-close:active { border-color: var(--accent); }
.menu-close:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.menu-close svg { width: 18px; height: 18px; }

.menu a.link {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 9vw, 40px); letter-spacing: -0.03em; line-height: 1.1;
  padding: 16px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.menu a.link:first-of-type { border-top: 1px solid var(--line-soft); }
.menu a.link:active { color: var(--accent); }

.menu .menu-cta {
  margin-top: 28px; align-self: flex-start;
  background: var(--accent); color: var(--surface);
  padding: 15px 26px; border-radius: var(--radius-pill); font-size: 15px; font-weight: 500;
}
body.menu-open { overflow: hidden; }
.menu a.link:focus-visible { outline: 2px solid var(--accent-2); outline-offset: var(--focus-offset); }
.menu .menu-cta:focus-visible { outline: 2px solid var(--accent-2); outline-offset: var(--focus-offset); }

/* ─── Tablet+ (≥ 600px): nav inline ──────────────────────────────── */
@media (width >= 600px) {
  .brand-logo { height: 154px; }
  .nav-toggle { display: none; }
  .menu-close { display: none; }

  .menu {
    flex: 1;
    position: static;
    max-width: none;
    background: transparent;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    transform: none;
    transition: none;
    overflow-y: visible;
  }
  .menu.open { transform: none; }

  .menu a.link {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-pill);
    line-height: 1.3;
    color: var(--ink-mute);
  }
  .menu a.link:first-of-type { border-top: none; }
  .menu a.link:active { color: var(--ink); }

  .menu .menu-cta {
    margin-top: 0;
    padding: 8px 18px;
    font-size: 13px;
  }
  body.menu-open { overflow: auto; }
}

/* ─── Desktop (≥ 1024px) ─────────────────────────────────────────── */
@media (width >= 1024px) {
  .appbar { padding: 40px var(--pad-x); }
  .brand-logo { height: 173px; }
  .menu { gap: 8px; }
  .menu a.link { font-size: 15px; padding: 8px 18px; }
  .menu .menu-cta { padding: 9px 22px; font-size: 14px; }
}

/* ─── Hover states (solo pointer fino) ────────────────────────────── */
@media (hover: hover) {
  .menu a.link:hover { color: var(--ink); background: var(--surface); }
  .menu .menu-cta:hover { background: var(--accent-hover); }
  .menu-close:hover { border-color: var(--accent); }
}


/* === hero.css === */
.hero { padding-top: 20px; padding-bottom: 32px; }

.hero h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(46px, 12vw, 66px);
  line-height: 0.92; letter-spacing: -0.04em;
  margin: 0 0 18px; text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--accent); }
.hero h1 .scribble { display: inline-block; position: relative; }

.hero h1 .scribble::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -4%;
  height: 14%; background: var(--accent-2); opacity: 0.3; z-index: -1;
  border-radius: 50% 30%;
}

.hero .lede {
  font-family: var(--font-display); font-size: clamp(16px, 1.8vw, 18px); font-style: italic;
  line-height: 1.45; color: var(--ink); margin: 0 0 24px;
}

.hero-card {
  position: relative; border-radius: 22px; overflow: hidden;
  aspect-ratio: 4/5; margin-bottom: 24px;
  border: 6px solid var(--bg);
  box-shadow: 0 22px 48px -18px rgb(31 42 34 / 40%);
}
.hero-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-card::after { display: none; }

.hero-loc {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: rgb(31 42 34 / 42%);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border: 1px solid rgb(255 252 247 / 20%);
  border-radius: var(--radius-pill);
  color: var(--surface);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1;
}
.hero-loc .leaf-mini { width: 8px; height: 8px; flex: 0 0 8px; margin: 0; background: var(--surface); }

.hero-stamp {
  position: absolute; top: 14px; right: 14px; width: 78px; height: 78px; z-index: 2;
  background: var(--accent); color: var(--surface); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-display); font-style: italic; font-weight: 700;
  font-size: 12px; line-height: 1.1; transform: rotate(-10deg);
  box-shadow: var(--shadow-accent);
}
.hero-actions { display: flex; flex-direction: column; gap: 10px; }

/* ─── Tablet+ (≥ 600px) ─────────────────────────────────────────── */
@media (width >= 600px) {
  .hero { padding-top: 32px; padding-bottom: 48px; }
  .hero h1 { font-size: clamp(48px, 10vw, 68px); }
  .hero .lede { font-size: clamp(18px, 2vw, 20px); }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
  }
  .hero-card { margin-bottom: 0; aspect-ratio: 3/4; }
  .hero-actions { justify-content: flex-start; }
}

/* ─── Desktop (≥ 1024px) ─────────────────────────────────────────── */
@media (width >= 1024px) {
  .hero { padding-top: 40px; padding-bottom: 56px; }
  .hero h1 { font-size: clamp(52px, 6vw, 76px); }
  .hero .lede { font-size: clamp(20px, 2.2vw, 22px); }
  .hero-grid { gap: 48px; }
  .hero-actions { flex-direction: row; gap: 14px; }
  .hero-actions .btn { width: auto; }
}

/* ─── Hover ──────────────────────────────────────────────────────── */
@media (hover: hover) {
  .hero-actions .btn:hover { transform: translateY(-1px); }
  .hero-actions .btn.primary:hover { background: var(--accent-hover); }
}


/* === animations.css === */
.js-anim .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1), transform 0.65s cubic-bezier(0.16,1,0.3,1); }
.js-anim .reveal.in { opacity: 1; transform: none; }
.js-anim .reveal-fade { opacity: 0; transition: opacity 0.8s ease; }
.js-anim .reveal-fade.in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal, .js-anim .reveal-fade { opacity: 1 !important; transform: none !important; transition: none !important; }
  .swipe-hint .ar { animation: none; }
}


