/* ==================================================================
   Ignacio Imbarack Garib — Psicólogo Clínico · Psicoanálisis
   Portada tipo menú-revista (bento) — referencia Canva
   ================================================================== */

:root {
  --paper: #F4EFE9;      /* crema principal */
  --paper-2: #ECE7E1;    /* crema banda */
  --sand: #EAE3D8;       /* arena suave */
  --ink: #2B2825;        /* grafito */
  --ink-soft: #565049;   /* grafito suave */
  --dark: #222021;       /* bloque oscuro */
  --terra: #A26B36;      /* terracota / ocre */
  --terra-deep: #8A5A2C;
  --line: #D8D0C4;       /* líneas / bordes */
  --line-soft: #E3DCD0;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, sans-serif;
  --maxw: 1240px;
  --nav-h: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.08; }
p { margin: 0 0 1em; line-height: 1.6; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }

/* ---------- Número editorial ---------- */
.block-num {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-weight: 400; letter-spacing: .04em;
  font-size: .95rem; color: var(--ink); margin-bottom: 10px;
}
.block-num .rule { display: block; width: 42px; height: 1px; background: var(--ink); opacity: .55; }

.eyebrow {
  font-family: var(--sans); font-weight: 400; letter-spacing: .18em; text-transform: uppercase;
  font-size: .72rem; color: var(--terra); margin-bottom: 16px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 400; font-size: .95rem;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 2px;
  padding: 15px 26px; transition: all .22s ease; cursor: pointer;
}
.btn .arrow { transition: transform .22s ease; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.dark { border-color: var(--ink); }
.btn.dark:hover { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn.light { border-color: rgba(255,255,255,.6); color: #fff; }
.btn.light:hover { background: #fff; color: var(--dark); border-color: #fff; }
.wa { flex: none; display: inline-block; vertical-align: middle; }
.btn .wa { width: 18px; height: 18px; }

/* ---------- Botón flotante (WhatsApp / Agendar) ---------- */
.fab {
  position: fixed; right: clamp(16px, 2.5vw, 28px); bottom: clamp(16px, 2.5vw, 28px);
  z-index: 70; display: inline-flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff;
  padding: 14px 20px 14px 16px; border-radius: 999px;
  font-family: var(--sans); font-weight: 400; font-size: .95rem;
  box-shadow: 0 10px 30px rgba(37,211,102,.35), 0 2px 8px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.fab:hover { transform: translateY(-2px); background: #1FB859; box-shadow: 0 14px 36px rgba(37,211,102,.45), 0 3px 10px rgba(0,0,0,.2); }
.fab .wa { width: 26px; height: 26px; }
.fab-label { white-space: nowrap; }

.more {
  display: inline-flex; align-items: center; gap: 7px; margin-top: auto;
  font-family: var(--sans); font-size: .85rem; color: var(--ink);
  padding-top: 8px; border-bottom: 1px solid transparent; align-self: flex-start;
  transition: color .2s, border-color .2s;
}
.more .arrow { transition: transform .2s ease; }
.more:hover { color: var(--terra); }
.more:hover .arrow { transform: translateX(3px); }

/* ================================================================
   NAVBAR
   ================================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h); display: flex; align-items: center;
  background: rgba(244, 239, 233, 0);
  transition: background .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(244, 239, 233, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw); width: 100%; margin: 0 auto; position: relative;
  padding: 0 clamp(20px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-mark { display: flex; flex-direction: column; line-height: 1.05; }
.nav-name { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--ink); letter-spacing: .01em; }
.nav-sub { font-family: var(--sans); font-weight: 300; font-size: .74rem; letter-spacing: .06em; color: var(--ink-soft); margin-top: 3px; }
.nav-links { display: flex; gap: clamp(20px, 3vw, 44px); }
.nav-links a {
  font-family: var(--sans); font-weight: 400; font-size: .92rem; color: var(--ink);
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--terra); transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 6px; position: relative; z-index: 60; }
.burger-svg line { stroke: currentColor; stroke-width: 1.6; transition: transform .3s, opacity .2s; transform-origin: center; }
.burger-svg.is-open .b1 { transform: translateY(5px) rotate(45deg); }
.burger-svg.is-open .b2 { opacity: 0; }
.burger-svg.is-open .b3 { transform: translateY(-5px) rotate(-45deg); }

/* ================================================================
   PORTADA — BENTO
   ================================================================ */
.home { padding-top: var(--nav-h); }
.mobile-hero { display: none; }

/* ================================================================
   HERO
   ================================================================ */
.hero2 {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.02fr; align-items: stretch;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(24px, 3.5vw, 48px) clamp(20px, 5vw, 56px) clamp(28px, 4vw, 52px);
}
.hero2-body { display: flex; flex-direction: column; justify-content: center; }
.hero2 .block-num { margin-bottom: 20px; }
.hero2-title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 3.4vw, 3.4rem); line-height: 1.06; letter-spacing: -.01em; margin: 0 0 20px; max-width: 16ch; }
.hero2-title .accent { color: var(--terra); }
.hero2-sub { font-family: var(--sans); font-weight: 300; font-size: clamp(1.02rem, 1.3vw, 1.2rem); color: var(--ink-soft); line-height: 1.55; margin: 0 0 28px; max-width: 34ch; }
.hero2-sub i { color: var(--terra); font-style: italic; }
.hero2-body .btn { align-self: flex-start; }
.hero2-media { border-radius: 8px; overflow: hidden; min-height: 460px; box-shadow: 0 20px 50px rgba(43,40,37,.16); }
.hero2-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }

/* botón terracota lleno */
.btn.solid { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn.solid:hover { background: var(--terra-deep); border-color: var(--terra-deep); color: #fff; }

/* chips de features */
.hero2-feats { display: flex; gap: clamp(16px, 2.4vw, 38px); margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.hf { display: flex; align-items: center; gap: 11px; }
.hf-ic { color: var(--terra); width: 26px; height: 26px; flex: none; }
.hf-ic svg { width: 100%; height: 100%; }
.hf-tx { font-family: var(--sans); font-weight: 300; font-size: .82rem; color: var(--ink); line-height: 1.25; }

/* La primera sección después del hero va más pegada (menos espacio) */
.home + .section { padding-top: clamp(28px, 3.5vw, 56px); }

@media (max-width: 860px) {
  .hero2 { grid-template-columns: 1fr; gap: 24px; align-items: stretch; }
  .hero2-media { order: -1; min-height: 0; aspect-ratio: 4 / 3; }
  .hero2-title { font-size: clamp(2rem, 7vw, 2.6rem); max-width: none; }
  .hero2-feats { flex-wrap: wrap; gap: 16px 22px; }
}
/* Filas de altura AUTOMÁTICA (sin 100vh ni 1fr): cada celda crece con su
   contenido (no se corta) y todo escala parejo con el zoom (la foto no se recorta). */
.bento {
  max-width: 1440px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr .82fr .82fr 1.1fr;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "hero  hero     photo    photo"
    "tex1  about    about    quote"
    "psico consulta contacto water";
  gap: 1px; background: var(--line);
  border-bottom: 1px solid var(--line);
}
.cell { background: var(--paper); padding: clamp(20px, 1.9vw, 30px); position: relative; }
.cell.block, .hero-cell, .quote-cell { display: flex; flex-direction: column; }

.hero-cell { grid-area: hero; justify-content: center; }
.hero-title {
  font-size: clamp(2rem, 2.8vw, 2.9rem); line-height: 1.1; letter-spacing: -.01em;
  margin-bottom: clamp(20px, 2.2vw, 28px); max-width: 24ch;
}
.hero-title em { font-style: italic; color: var(--terra); font-weight: 500; }
.hero-cell .btn { align-self: flex-start; }

/* Las imágenes van en absoluto para NO dictar la altura de su fila (si no,
   con filas auto se muestran a su alto intrínseco y estiran el bento). */
.photo-cell { grid-area: photo; padding: 0; overflow: hidden; min-height: 22rem; }
.photo-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.tex-cell { padding: 0; overflow: hidden; min-height: 14rem; }
.tex-cell:not(.water) { grid-area: tex1; }
.tex-cell.water { grid-area: water; }
.tex-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }

.about-cell { grid-area: about; background: var(--paper-2); }
.quote-cell {
  grid-area: quote; background: var(--dark); color: #EDE7DF; justify-content: center;
}
.quote-cell .quote-mark { font-family: var(--serif); font-size: 4rem; line-height: .5; color: var(--terra); margin-bottom: 18px; }
.quote-cell p { font-family: var(--serif); font-size: clamp(1.5rem, 2.1vw, 2.05rem); line-height: 1.22; margin: 0; font-style: italic; }

.block-icon { color: var(--terra); width: 26px; height: 26px; margin-bottom: 10px; }
.block-icon svg { width: 100%; height: 100%; }
.block-title { font-size: clamp(1.4rem, 1.8vw, 1.75rem); margin-bottom: 8px; }
.block-body { font-family: var(--sans); font-weight: 300; font-size: .9rem; color: var(--ink-soft); line-height: 1.55; }
.block-body p { margin: 0 0 .5em; }

/* ================================================================
   SECCIONES DE DETALLE
   ================================================================ */
.section { padding: clamp(64px, 9vw, 130px) 0; }
.section.paper { background: var(--paper); }
.section.sand { background: var(--sand); }
.section.dark { background: var(--dark); color: #EDE7DF; }
.section .head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); margin-bottom: 22px; letter-spacing: -.01em; }
.section .lede { font-size: 1.12rem; color: var(--ink-soft); line-height: 1.62; }
.section.dark .lede { color: #C9C2B8; }

/* Sobre mí (solo texto) — contenedor full-width como las demás secciones,
   columna de lectura alineada a la izquierda (no centrada). */
.about-wrap { max-width: var(--maxw); }
.about-body { max-width: 820px; }
.about-mini { width: 118px; height: 118px; border-radius: 50%; object-fit: cover; object-position: center 25%; margin: 18px 0 16px; box-shadow: 0 6px 20px rgba(43,40,37,.12); }
.about-meta { font-family: var(--sans); font-weight: 300; font-size: .82rem; color: var(--terra); margin: 0 0 26px; letter-spacing: .06em; text-transform: uppercase; }
.about-body h2 { margin-bottom: 10px; max-width: 22ch; }
.about-body p { color: var(--ink-soft); font-size: 1.05rem; max-width: 66ch; }
.about-invite { color: var(--ink) !important; font-style: italic; font-family: var(--serif); font-size: 1.25rem !important; margin-top: 8px; }
.creds { list-style: none; padding: 0; margin: 30px 0 34px; }
.creds li { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 12px;
  background: var(--paper-2); border-radius: 4px;
  font-family: var(--sans); font-weight: 300; font-size: .95rem; color: var(--ink); }
.cred-logo { width: 38px; height: 38px; object-fit: contain; flex: none; }
.creds strong { font-weight: 500; color: var(--ink); }
.creds .muted { color: var(--ink-soft); font-size: .85rem; }

/* Psicoanálisis */
.psico-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 48px); }
.psico-item h3 { font-size: 1.5rem; margin: 8px 0 14px; }
.psico-item p { color: var(--ink-soft); font-size: .98rem; line-height: 1.62; }

/* La consulta */
.consulta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 48px); }
.consulta-item { padding: clamp(26px, 2.5vw, 36px); background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: 3px; }
.consulta-item h3 { font-size: 1.4rem; margin: 8px 0 14px; }
.consulta-item p { color: var(--ink-soft); font-size: .95rem; line-height: 1.6; margin: 0; }
.consulta-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: clamp(40px, 5vw, 60px); }
.cta-note { font-family: var(--sans); font-weight: 300; font-size: .9rem; color: var(--ink-soft); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.contact-grid h2 { color: #F4EFE9; margin-bottom: 20px; }
.contact-grid .btn { margin-top: 10px; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-family: var(--sans); font-weight: 300; }
.contact-list .k { color: var(--terra); letter-spacing: .08em; text-transform: uppercase; font-size: .74rem; align-self: center; }
.contact-list a:hover { color: #fff; }

/* Footer */
.footer { background: #1B1917; color: #C9C2B8; padding: clamp(40px, 5vw, 64px) 0 30px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer-name { font-family: var(--serif); font-size: 1.5rem; color: #F4EFE9; }
.footer-sub { font-family: var(--sans); font-weight: 300; font-size: .8rem; letter-spacing: .05em; margin-top: 4px; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { font-family: var(--sans); font-weight: 300; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-family: var(--sans); font-weight: 300; font-size: .78rem; color: #8A837A; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 980px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "hero   hero"
      "photo  photo"
      "about  about"
      "tex1   quote"
      "psico  consulta"
      "contacto water";
  }
  .photo-cell { min-height: 340px; }
  .quote-cell { min-height: 220px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 380px; }
  .psico-grid, .consulta-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .nav-burger { display: block; order: 3; }
  .nav-name { font-size: 1.1rem; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: rgba(244,239,233,.98);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft);
    padding: 8px clamp(20px,5vw,56px) 18px;
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height .3s, opacity .3s;
  }
  .nav.menu-open .nav-links { max-height: 340px; opacity: 1; pointer-events: auto; }
  .nav.menu-open { background: rgba(244,239,233,.98); }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links a::after { display: none; }

  /* En celular el bento pierde funcionalidad: se elimina y se muestra un hero simple */
  .bento { display: none; }
  .mobile-hero { display: flex; flex-direction: column; }
  .mobile-hero-photo { width: 100%; aspect-ratio: 4/3; overflow: hidden; }
  .mobile-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
  .mobile-hero-body { padding: clamp(28px, 8vw, 40px) clamp(20px, 6vw, 34px) clamp(34px, 9vw, 48px); }
  .mobile-hero-body h1 { font-size: clamp(2rem, 8vw, 2.7rem); line-height: 1.06; margin-bottom: 14px; }
  .mobile-hero-body h1 em { font-style: italic; color: var(--terra); }
  .mobile-hero-body p { font-family: var(--sans); font-weight: 300; font-size: .92rem; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 24px; }

  .contact-list li { flex-direction: column; gap: 4px; }
  .contact-list .k { align-self: flex-start; }

  /* FAB compacto: solo el ícono */
  .fab { padding: 15px; }
  .fab-label { display: none; }
}
