/* ===================================================================
   Asociación Maitri — hoja de estilos
   Paleta: Salvia · Tipografía: Editorial (Cormorant + Manrope + DM Mono)
   =================================================================== */

/* ── Fuentes locales (título ornamentado) ───────────────────────── */
@font-face {
  font-family: 'Aladdin Original';
  src: url('../fonts/aladdin.ttf') format('truetype');
  font-display: swap;
}

/* ── Tokens (paleta Salvia) ─────────────────────────────────────── */
:root {
  --bg: #f5f0e6;
  --bg-2: #ebe3d2;
  --ink: #1f2a22;
  --ink-soft: #4a5950;
  --primary: #2f4a3a;
  --primary-2: #3f5e4c;
  --accent: #b6643a;
  --line: #d6cdb8;
  --card: #fbf7ee;

  --maxw: 1240px;
  --pad: 32px;
  --radius: 14px;
}

/* ── Reset / base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3 { font-weight: 400; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Salto al contenido para lectores de pantalla / teclado */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── Helpers tipográficos ───────────────────────────────────────── */
.serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.mono {
  font-family: 'DM Mono', ui-monospace, monospace;
}
.italic { font-style: italic; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }

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

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

.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow__num { opacity: 0.55; }
.eyebrow__rule { width: 24px; height: 1px; background: var(--ink-soft); opacity: 0.4; }

/* eyebrow centrado (hero) */
.eyebrow-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}
.eyebrow-center span.rule { width: 60px; height: 1px; background: var(--ink-soft); opacity: 0.4; }

/* chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Botones ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: var(--bg); border: 1px solid var(--primary); }
.btn--ghost   { background: transparent;   color: var(--ink); border: 1px solid var(--ink); }
.btn--accent  { background: var(--accent);  color: #fff;       border: 1px solid var(--accent); }

/* ── Stats ──────────────────────────────────────────────────────── */
.stat__n {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 42px;
  line-height: 1;
  color: var(--primary);
}
.stat__l {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ── Decoración (SVG jazmín) ────────────────────────────────────── */
.deco { position: absolute; pointer-events: none; }
.deco svg { display: block; }

/* ── Cabecera / Nav ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand__name { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-style: italic; line-height: 1; }
.brand__sub { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.18em; color: var(--ink-soft); margin-top: 3px; display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav a { text-decoration: none; color: var(--ink-soft); transition: color 0.2s ease; }
.nav a:hover { color: var(--ink); }
.nav a.btn { color: var(--bg); }

/* Hamburguesa (oculta en escritorio) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateX(-50%) rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateX(-50%) rotate(-45deg); top: 0; }

/* ── Hero (marca) ───────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 60px 0 120px;
  text-align: center;
}
.hero__inner { position: relative; z-index: 1; }
.hero__halo {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__halo::before,
.hero__halo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.hero__halo::after { inset: 14px; border-style: dashed; opacity: 0.7; }
.hero__halo img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 4px 18px rgba(31, 42, 34, 0.1));
}
.hero__title {
  margin: 0 0 6px;
  font-family: 'Aladdin Original', 'Cormorant Garamond', cursive;
  font-size: clamp(72px, 10vw, 156px);
  line-height: 0.95;
  color: var(--primary);
  letter-spacing: 0.005em;
  font-weight: 400;
}
.hero__subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3vw, 40px);
  font-style: italic;
  color: var(--ink);
  margin-top: 10px;
  font-weight: 300;
}
.hero__lead {
  max-width: 620px;
  margin: 28px auto 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}
.hero__actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__stats {
  display: flex;
  gap: 48px;
  margin-top: 60px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Secciones genéricas ────────────────────────────────────────── */
.section { padding: 100px 0; position: relative; overflow: hidden; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line); }
.section--bordered { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 54px;
  line-height: 1.05;
  margin: 18px 0 0;
  letter-spacing: -0.01em;
}

/* ── Manifiesto ─────────────────────────────────────────────────── */
.manifiesto__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.manifiesto__aside { position: sticky; top: 96px; }
.manifiesto__aside img { width: 100%; max-width: 360px; margin-top: 40px; opacity: 0.95; }
.manifiesto__lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
  font-weight: 300;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.label-accent {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.quote {
  margin-top: 56px;
  padding: 32px 36px;
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 0 12px 12px 0;
}
.quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink);
  margin: 0;
}
.quote cite {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-top: 18px;
  font-style: normal;
}

/* ── Áreas ──────────────────────────────────────────────────────── */
.areas__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
}
.areas__intro { max-width: 360px; color: var(--ink-soft); margin: 0; }
.areas__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.area {
  padding: 32px 28px 28px;
  min-height: 220px;
  position: relative;
  transition: background 0.2s ease;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.area:hover { background: var(--bg-2); }
/* quitar bordes exteriores sobrantes (3 columnas) */
.areas__grid .area:nth-child(3n) { border-right: none; }
.areas__grid .area:nth-last-child(-n+3) { border-bottom: none; }
.area__top { display: flex; justify-content: space-between; align-items: flex-start; }
.area__num { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.18em; }
.area__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  margin: 22px 0 10px;
  line-height: 1.1;
  font-weight: 500;
}
.area__desc { font-size: 14.5px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* ── Equipo ─────────────────────────────────────────────────────── */
.team__member {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.team__member:nth-child(even) { grid-template-columns: 1.4fr 1fr; }
.team__photo-wrap { position: relative; }
.team__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px 12px 240px 240px;
  background: var(--card);
  border: 1px solid var(--line);
}
.team__photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95); }
.team__member:nth-child(even) .team__photo { border-radius: 240px 240px 12px 12px; }
/* en filas pares, la foto va a la derecha */
.team__member:nth-child(even) .team__photo-wrap { order: 1; }
.team__index {
  position: absolute;
  right: -8px;
  top: 14px;
  writing-mode: vertical-rl;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
  transform: rotate(180deg);
}
.team__member:nth-child(even) .team__index { left: -8px; right: auto; transform: none; }
.team__role { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.18em; color: var(--accent); text-transform: uppercase; }
.team__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 46px;
  line-height: 1.05;
  margin: 14px 0 18px;
  letter-spacing: -0.01em;
}
.team__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.team__bio { color: var(--ink-soft); line-height: 1.7; margin: 0; max-width: 560px; }

/* ── Contacto ───────────────────────────────────────────────────── */
.contact__bg { position: absolute; inset: 0; pointer-events: none; }
.contact__sun {
  position: absolute; left: 6%; top: 18%;
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--accent); opacity: 0.18;
  box-shadow: 0 0 80px 20px color-mix(in oklab, var(--accent) 30%, transparent);
}
.contact__horizon { position: absolute; left: -5%; right: -5%; top: calc(18% + 60px); height: 1px; background: var(--line); }
.contact__horizon--2 { left: 10%; top: calc(18% + 96px); opacity: 0.5; }
.contact__watermark {
  position: absolute; right: -3%; bottom: -2%;
  font-family: 'Cormorant Garamond', serif;
  font-size: min(34vw, 460px); line-height: 0.85; font-style: italic;
  color: var(--primary); opacity: 0.06; letter-spacing: -0.04em;
  font-weight: 500; user-select: none;
}
.contact__margin-note {
  position: absolute; left: 24px; top: 50%;
  transform: rotate(-90deg) translateY(-50%); transform-origin: left top;
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 0.3em; color: var(--ink-soft); opacity: 0.5;
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  position: relative;
}
.contact__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 64px; line-height: 1; margin: 18px 0 0; letter-spacing: -0.02em;
}
.contact__lead { color: var(--ink-soft); margin-top: 24px; max-width: 420px; }
.info-list { margin-top: 40px; display: flex; flex-direction: column; gap: 18px; }
.info {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 14px; gap: 16px;
}
.info__k { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.18em; color: var(--ink-soft); text-transform: uppercase; }
.info__v { font-size: 14px; text-align: right; }

.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px;
}
.field { display: block; margin-bottom: 18px; }
.field__label {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; color: var(--ink-soft);
  text-transform: uppercase; margin-bottom: 8px; display: block;
}
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 120px; }
/* El iframe de hCaptcha trae su propio tamaño; solo gestionamos el espaciado. */
.field--captcha { margin-bottom: 18px; min-height: 78px; }
.form__actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.form__note { font-size: 12px; color: var(--ink-soft); margin: 14px 0 0; }
.form__status { font-size: 14px; margin: 16px 0 0; }
.form__status:empty { display: none; }
.form__status--error { color: var(--accent); }
.form__success {
  text-align: center;
  padding: 48px 16px;
  outline: none;
}
.form__success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  font-size: 28px;
}
.form__success h3 { font-size: 32px; margin: 0; }
.form__success p { color: var(--ink-soft); margin: 8px 0 0; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  padding: 50px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.site-footer__brand { display: flex; align-items: center; gap: 14px; }
.site-footer__brand img { width: 40px; height: 40px; object-fit: contain; }
.site-footer__name { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-style: italic; }
.site-footer__sub { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.18em; color: var(--ink-soft); }
.site-footer__legal { display: flex; gap: 18px; flex-wrap: wrap; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.12em; }
.site-footer__legal a { color: var(--ink-soft); text-decoration: none; }
.site-footer__legal a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__copy { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.18em; color: var(--ink-soft); }

/* ── Páginas legales ────────────────────────────────────────────── */
.legal { padding: 80px 0; }
.legal .container { max-width: 820px; }
.legal h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(40px, 7vw, 64px); line-height: 1; margin: 0 0 8px; color: var(--primary); }
.legal h2 { font-family: 'Cormorant Garamond', serif; font-size: 28px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.7; }
.legal a { color: var(--primary); }
.legal .updated { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.12em; color: var(--ink-soft); }
.legal .placeholder { background: color-mix(in oklab, var(--accent) 12%, transparent); padding: 0 4px; border-radius: 4px; }
.back-link { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-decoration: none; color: var(--ink-soft); }

/* ── Animaciones (scroll reveal) ────────────────────────────────── */
/* El estado oculto solo se aplica si hay JS (clase .js en <html>),
   de modo que sin JavaScript todo el contenido permanece visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===================================================================
   Responsive
   =================================================================== */

/* Tablet */
@media (max-width: 980px) {
  :root { --pad: 24px; }

  .nav a:not(.btn) { display: none; }
  .nav { gap: 12px; }
  .nav-toggle { display: inline-block; }

  /* Menú móvil desplegable */
  .nav.is-open {
    position: fixed;
    inset: 72px 0 auto 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(31, 42, 34, 0.1);
    padding: 8px 0;
  }
  .nav.is-open a:not(.btn) {
    display: block;
    padding: 16px var(--pad);
    font-size: 16px;
    border-top: 1px solid var(--line);
  }
  .nav.is-open .btn { margin: 14px var(--pad); justify-content: center; }
  .nav.is-open .nav-toggle { display: none; }

  .section, .hero { padding-top: 70px; padding-bottom: 70px; }

  .manifiesto__grid,
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .manifiesto__aside { position: static; text-align: center; }
  .manifiesto__aside img { margin-left: auto; margin-right: auto; }

  .areas__grid { grid-template-columns: repeat(2, 1fr); }
  .areas__grid .area { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .areas__grid .area:nth-child(3n) { border-right: 1px solid var(--line); }
  .areas__grid .area:nth-child(2n) { border-right: none; }
  .areas__grid .area:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .areas__grid .area:nth-last-child(-n+2) { border-bottom: none; }

  .team__member,
  .team__member:nth-child(even) { grid-template-columns: 1fr; gap: 32px; }
  .team__member:nth-child(even) .team__photo-wrap { order: 0; }
}

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

  .site-header__inner { height: 60px; }
  .nav.is-open { inset: 60px 0 auto 0; }
  .brand__sub { display: none; }

  .hero__title { font-size: clamp(48px, 14vw, 80px); letter-spacing: 0; }
  .hero__halo { width: 180px; height: 180px; }
  .hero__halo img { width: 150px; height: 150px; }
  .hero__stats { gap: 28px; }

  .section-title, .contact__title { font-size: clamp(34px, 9vw, 48px) !important; }

  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .areas__grid { grid-template-columns: 1fr; }
  .areas__grid .area { border-right: none; }

  .team__photo { max-width: 320px; margin: 0 auto; border-radius: 12px 12px 120px 120px !important; }
  .team__index { display: none; }
  .team__name { font-size: 36px; }

  .contact__watermark, .contact__margin-note { display: none; }
  .form { padding: 24px; }
  .form__actions { justify-content: stretch; }
  .form__actions .btn { width: 100%; justify-content: center; }

  .stat__n { font-size: 34px; }

  .site-footer__inner { flex-direction: column; align-items: flex-start; }

  .hero__actions .btn { width: 100%; justify-content: center; }
}

/* Muy pequeño */
@media (max-width: 380px) {
  :root { --pad: 16px; }
  .hero__title { font-size: clamp(40px, 13vw, 64px); }
}

/* ── Reduce motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
