/* =========================================================
   MABEL MERELES · COUNSELOR
   Mobile-first. Base = mobile (<600px), luego se suma
   complejidad con min-width: 600 / 768 / 1024 / 1280 / 1440.
   Tokens: hueso + verde agua + verde oliva
   ========================================================= */

:root{
  --bone:        #F6F1E7;
  --bone-deep:   #ECE3D2;
  --paper:       #FBF8F2;
  --aqua:        #7FAE9C;
  --aqua-deep:   #4F8474;
  --aqua-soft:   #DCEAE3;
  --olive:       #7C8355;
  --olive-deep:  #565C39;
  --ink:         #2B2E22;
  --ink-soft:    #565A46;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --gap: 1.5rem;
  --edge: 1.15rem;          /* padding lateral mobile */
  --radius: 16px;
  --ease: cubic-bezier(.22,.8,.32,1);

  --fs-hero: 2.35rem;
  --fs-h2: 1.7rem;
  --fs-lead: 1rem;

  /* alto real del viewport en mobile (evita el salto por la barra de URL) */
  --vh: 1vh;
}

*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:var(--bone);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:15.5px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button, input, textarea{ font-family:inherit; }

/* accesibilidad: foco visible siempre */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline:2px solid var(--aqua-deep);
  outline-offset:3px;
  border-radius:4px;
}

::selection{ background:var(--olive); color:var(--bone); }

/* ---------- background canvas + grain ---------- */
#bg-canvas{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
  opacity:.4;
}

.grain{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  opacity:.035;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- reveal-on-scroll ---------- */
.reveal{
  opacity:0;
  transform:translateY(20px);
  transition:opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible{
  opacity:1;
  transform:translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  html{ scroll-behavior:auto; }
  .whatsapp-float{ animation:none !important; }
}

/* ---------- header ---------- */
.site-header{
  position:fixed;
  top:0; left:0; right:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:.9rem var(--edge);
  transition:background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.scrolled{
  background:rgba(246,241,231,.9);
  backdrop-filter:blur(10px);
  padding-top:.65rem;
  padding-bottom:.65rem;
  box-shadow:0 1px 0 rgba(43,46,34,.06);
}

.brand{
  display:flex;
  align-items:center;
  gap:.5rem;
  font-family:var(--font-display);
  font-size:1rem;
  letter-spacing:.01em;
  color:var(--olive-deep);
  min-width:0;
}
.brand-mark{ color:var(--aqua-deep); display:flex; flex:none; }
.brand-mark svg{ width:24px; height:24px; }
.brand-text{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* nav: por defecto (mobile) es un panel off-canvas */
.main-nav{
  position:fixed;
  top:0; right:0;
  height:100%;
  height:calc(var(--vh, 1vh) * 100);
  width:min(80vw, 320px);
  background:var(--paper);
  display:flex;
  flex-direction:column;
  gap:1.4rem;
  padding:5.5rem 2rem 2rem;
  font-size:1.05rem;
  font-weight:700;
  transform:translateX(100%);
  transition:transform .45s var(--ease);
  box-shadow:-10px 0 40px rgba(43,46,34,.15);
  z-index:49;
}
.main-nav.open{ transform:translateX(0); }
.main-nav a{
  position:relative;
  padding:.3rem 0;
  color:var(--ink-soft);
  transition:color .3s;
}
.main-nav a::after{
  content:"";
  position:absolute; left:0; right:100%; bottom:0;
  height:1.5px; background:var(--aqua-deep);
  transition:right .35s var(--ease);
}
.main-nav a:hover{ color:var(--ink); }
.main-nav a:hover::after{ right:0; }

.nav-toggle{
  display:flex;
  flex-direction:column;
  gap:5px;
  background:none; border:none; cursor:pointer;
  padding:10px;
  margin:-10px;
  flex:none;
  z-index:51;
}
.nav-toggle span{
  width:22px; height:2px; background:var(--ink); border-radius:2px;
  transition:transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ---------- layout helpers ---------- */
.section{
  position:relative;
  z-index:2;
  max-width:var(--container);
  margin:0 auto;
  padding:3.75rem var(--edge);
}

.eyebrow{
  display:inline-block;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--aqua-deep);
  margin-bottom:.9rem;
}

.section-title{
  font-family:var(--font-display);
  font-weight:500;
  font-size:var(--fs-h2);
  line-height:1.15;
  color:var(--olive-deep);
  margin:0 0 1.1rem;
  max-width:20ch;
}

.section-lead{
  max-width:56ch;
  color:var(--ink-soft);
  font-size:var(--fs-lead);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  min-height:48px;             /* target táctil */
  padding:.85rem 1.6rem;
  border-radius:100px;
  font-weight:700;
  font-size:.92rem;
  cursor:pointer;
  border:1.5px solid transparent;
  transition:transform .3s var(--ease), background .3s, border-color .3s, color .3s;
}
.btn-primary{
  background:var(--olive-deep);
  color:var(--bone);
}
.btn-primary:hover{ background:var(--aqua-deep); transform:translateY(-2px); }
.btn-ghost{
  border-color:var(--olive-deep);
  color:var(--olive-deep);
  background:transparent;
}
.btn-ghost:hover{ background:var(--olive-deep); color:var(--bone); transform:translateY(-2px); }

/* ============ HERO ============ */
.hero{
  min-height:calc(var(--vh, 1vh) * 100);
  display:flex;
  flex-direction:column;
  gap:2.2rem;
  padding-top:6rem;
  padding-bottom:4rem;
}

.hero-title{
  font-family:var(--font-display);
  font-weight:500;
  font-size:var(--fs-hero);
  line-height:1.06;
  color:var(--ink);
  margin:0 0 1.1rem;
}
.hero-title em{
  font-style:italic;
  color:var(--aqua-deep);
}

.hero-lead{
  max-width:46ch;
  font-size:1.02rem;
  color:var(--ink-soft);
  margin-bottom:1.8rem;
}

.hero-actions{ display:flex; gap:.85rem; flex-wrap:wrap; }
.hero-actions .btn{ flex:1 1 auto; }

.hero-portrait{ position:relative; order:-1; align-self:center; }
.portrait-frame{
  position:relative;
  width:min(240px, 62vw);
  aspect-ratio:320/420;
  border-radius:130px 130px 20px 20px;
  overflow:hidden;
  background:var(--aqua-soft);
  box-shadow:0 22px 44px -18px rgba(43,46,34,.35);
}
.portrait-frame img{
  width:100%; height:100%;
  object-fit:cover;
  filter:saturate(.92) contrast(1.02);
}
.portrait-path{
  position:absolute; inset:0;
  width:100%; height:100%;
  pointer-events:none;
  opacity:.5;
}
.portrait-caption{
  display:block;
  text-align:center;
  margin-top:.85rem;
  font-size:.74rem;
  letter-spacing:.03em;
  color:var(--ink-soft);
}

.scroll-cue{
  display:none; /* aparece desde tablet, en mobile sobra */
}

/* ============ SOBRE MI ============ */
.about-grid{
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.about-body{
  display:flex;
  flex-direction:column;
  gap:1.3rem;
}
.about-subtitle{
  font-family:var(--font-display);
  font-style:italic;
  font-weight:500;
  font-size:1.3rem;
  line-height:1.35;
  color:var(--olive-deep);
  max-width:22ch;
  margin:.4rem 0 0;
}
.about-text{
  font-size:1rem;
  color:var(--ink-soft);
  max-width:58ch;
  margin:0;
}
.about-intro{
  font-size:1.05rem;
  color:var(--ink);
  margin-bottom:.4rem;
}
.about-text strong,
.about-intro strong,
.about-closing strong{
  color:var(--olive-deep);
  font-weight:700;
}
.about-block{
  padding-top:1.1rem;
  border-top:1px solid var(--bone-deep);
}
.about-block h3{
  font-family:var(--font-display);
  font-weight:500;
  font-size:1.08rem;
  color:var(--aqua-deep);
  margin:0 0 .5rem;
}
.about-closing{
  margin:.6rem 0 0;
  padding-top:1.1rem;
  border-top:1px solid var(--bone-deep);
  font-family:var(--font-display);
  font-style:italic;
  font-size:1.05rem;
  line-height:1.5;
  color:var(--ink-soft);
  max-width:52ch;
}

/* ============ ENFOQUE ============ */
.approach-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
  margin-top:2rem;
}
.approach-card{
  background:var(--paper);
  border:1px solid var(--bone-deep);
  border-radius:var(--radius);
  padding:1.6rem 1.4rem;
  transition:transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.approach-card:hover{
  transform:translateY(-5px);
  border-color:var(--aqua-deep);
  box-shadow:0 18px 36px -22px rgba(79,132,116,.45);
}
.card-index{
  display:inline-block;
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--aqua-deep);
  background:var(--aqua-soft);
  padding:.28rem .65rem;
  border-radius:100px;
  margin-bottom:.9rem;
}
.approach-card h3{
  font-family:var(--font-display);
  font-weight:500;
  font-size:1.15rem;
  margin:0 0 .55rem;
  color:var(--olive-deep);
}
.approach-card p{
  margin:0;
  color:var(--ink-soft);
  font-size:.92rem;
}

/* ============ EBOOKS ============ */
.ebook-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
  margin-top:2rem;
}
.ebook-empty{
  grid-column:1/-1;
  border:1.5px dashed var(--bone-deep);
  border-radius:var(--radius);
  padding:2.4rem 1.6rem;
  text-align:center;
  color:var(--ink-soft);
}
.ebook-empty p{ margin:0 0 .4rem; font-weight:700; color:var(--olive-deep); }
.ebook-empty span{ font-size:.88rem; }

.ebook-card{
  background:var(--paper);
  border:1px solid var(--bone-deep);
  border-radius:var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:row;         /* mobile: cover chica a la izquierda */
  transition:transform .35s var(--ease), box-shadow .35s;
}
.ebook-card:hover{ transform:translateY(-4px); box-shadow:0 18px 36px -24px rgba(43,46,34,.35); }
.ebook-cover{
  flex:none;
  width:110px;
  aspect-ratio:3/4;
  background:linear-gradient(160deg, var(--aqua-soft), var(--bone-deep));
  display:flex; align-items:center; justify-content:center;
}
.ebook-cover img{ width:100%; height:100%; object-fit:cover; }
.ebook-body{ padding:1rem; display:flex; flex-direction:column; gap:.5rem; flex:1; min-width:0; }
.ebook-body h3{ margin:0; font-family:var(--font-display); font-size:1.02rem; color:var(--olive-deep); }
.ebook-body p{ margin:0; font-size:.85rem; color:var(--ink-soft); flex:1; }
.ebook-download{
  align-self:flex-start;
  font-size:.83rem;
  font-weight:700;
  color:var(--aqua-deep);
  border-bottom:1.5px solid var(--aqua-deep);
  padding-bottom:2px;
}
button.ebook-download{
  background:none;
  border:none;
  border-bottom:1.5px solid var(--aqua-deep);
  border-radius:0;
  font-family:inherit;
  cursor:pointer;
}
button.ebook-download:disabled{ opacity:.6; cursor:default; }

/* ============ TESTIMONIOS ============ */
.testimonial-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
  margin-top:2rem;
}
.testimonial-card{
  background:var(--paper);
  border:1px solid var(--bone-deep);
  border-radius:var(--radius);
  padding:1.6rem 1.5rem;
  transition:transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.testimonial-card:hover{
  transform:translateY(-4px);
  border-color:var(--aqua-deep);
  box-shadow:0 18px 36px -24px rgba(79,132,116,.4);
}
.testimonial-card blockquote{
  margin:0 0 1rem;
  font-family:var(--font-display);
  font-style:italic;
  font-size:1.05rem;
  line-height:1.5;
  color:var(--olive-deep);
}
.testimonial-card cite{
  display:block;
  font-family:var(--font-body);
  font-style:normal;
  font-size:.76rem;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--aqua-deep);
}

/* ============ CONTACTO ============ */
.contact-grid{
  display:flex;
  flex-direction:column;
  gap:2rem;
}
.contact-grid .btn{ width:100%; margin-top:.4rem; }
.contact-form{
  display:flex;
  flex-direction:column;
  gap:1rem;
  background:var(--paper);
  border:1px solid var(--bone-deep);
  border-radius:var(--radius);
  padding:1.5rem;
}
.contact-form label{ display:flex; flex-direction:column; gap:.4rem; font-size:.83rem; font-weight:700; color:var(--ink-soft); }
.contact-form input,
.contact-form textarea{
  font-family:var(--font-body);
  font-size:16px;              /* evita zoom automático en iOS */
  padding:.8rem .85rem;
  border-radius:10px;
  border:1.5px solid var(--bone-deep);
  background:var(--bone);
  color:var(--ink);
  resize:vertical;
  min-height:48px;
}
.contact-form textarea{ min-height:110px; }
.contact-form input:focus,
.contact-form textarea:focus{
  outline:none;
  border-color:var(--aqua-deep);
}
.contact-form button{ width:100%; }
.form-note{ margin:0; font-size:.74rem; color:var(--ink-soft); opacity:.75; }

/* ============ FOOTER ============ */
.site-footer{
  position:relative; z-index:2;
  display:flex;
  flex-direction:column;
  gap:.4rem;
  padding:1.8rem var(--edge) calc(2rem + env(safe-area-inset-bottom));
  font-size:.78rem;
  color:var(--ink-soft);
  border-top:1px solid var(--bone-deep);
  max-width:var(--container);
  margin:0 auto;
}

/* ============ WHATSAPP FLOTANTE ============ */
.whatsapp-float{
  position:fixed;
  right:calc(1.1rem + env(safe-area-inset-right));
  bottom:calc(1.1rem + env(safe-area-inset-bottom));
  z-index:60;
  width:54px; height:54px;
  border-radius:50%;
  background:#25D366;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 12px 28px -8px rgba(37,211,102,.65);
  animation:wa-pulse 2.6s ease-in-out infinite;
  transition:transform .3s var(--ease);
}
.whatsapp-float:hover{ transform:scale(1.08); }
.whatsapp-float svg{ width:27px; height:27px; }
@keyframes wa-pulse{
  0%,100%{ box-shadow:0 12px 28px -8px rgba(37,211,102,.65); }
  50%{ box-shadow:0 12px 34px -6px rgba(37,211,102,.9); }
}

/* =========================================================
   BREAKPOINT — small tablets / large phones  (>= 600px)
   ========================================================= */
@media (min-width:600px){
  :root{
    --edge: 2rem;
    --fs-hero: 3rem;
    --fs-h2: 2rem;
    --fs-lead: 1.05rem;
  }

  .hero-actions .btn{ flex:none; }
  .approach-grid{ grid-template-columns:repeat(2,1fr); }
  .testimonial-grid{ grid-template-columns:repeat(2,1fr); }
  .ebook-grid{ grid-template-columns:repeat(auto-fit, minmax(260px,1fr)); }
  .ebook-card{ flex-direction:column; }
  .ebook-cover{ width:100%; }
  .contact-grid .btn{ width:auto; }
  .contact-form button{ width:auto; align-self:flex-start; }
}

/* =========================================================
   BREAKPOINT — tablets  (>= 768px)
   ========================================================= */
@media (min-width:768px){
  body{ font-size:16px; }

  .about-grid{
    display:grid;
    grid-template-columns:.55fr 1.45fr;
    gap:var(--gap);
  }
  .hero-portrait{ align-self:flex-end; }
  .portrait-frame{ width:min(300px, 45vw); }
}

/* =========================================================
   BREAKPOINT — desktop  (>= 1024px)
   ========================================================= */
@media (min-width:1024px){
  :root{
    --edge: clamp(2rem, 4vw, 3.5rem);
    --fs-hero: clamp(3rem, 5.2vw, 4.6rem);
    --fs-h2: clamp(2rem, 3.4vw, 2.8rem);
    --gap: clamp(1.5rem, 3vw, 2.5rem);
  }

  .section{ padding-top:6.5rem; padding-bottom:6.5rem; }

  /* header pasa a modo horizontal */
  .site-header{ padding:1.4rem var(--edge); }
  .site-header.scrolled{ padding-top:.85rem; padding-bottom:.85rem; }
  .brand{ font-size:1.15rem; }
  .brand-mark svg{ width:30px; height:30px; }

  .main-nav{
    position:static;
    height:auto;
    width:auto;
    flex-direction:row;
    align-items:center;
    gap:clamp(1rem,2vw,2.2rem);
    padding:0;
    background:transparent;
    box-shadow:none;
    transform:none;
    font-size:.92rem;
  }
  .nav-toggle{ display:none; }

  /* hero vuelve a ser grid de dos columnas */
  .hero{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    padding-top:9rem;
    min-height:calc(var(--vh, 1vh) * 100);
  }
  .hero-inner{ max-width:640px; }
  .hero-portrait{ order:0; align-self:center; }
  .portrait-frame{ width:min(320px, 26vw); }
  .scroll-cue{
    display:flex; flex-direction:column; align-items:center; gap:.5rem;
    position:absolute; bottom:2.5rem; left:var(--edge);
  }
  .scroll-cue span{
    width:1px; height:38px;
    background:linear-gradient(var(--olive-deep), transparent);
    animation:scrollcue 1.8s ease-in-out infinite;
  }
  .scroll-cue small{
    writing-mode:vertical-rl;
    font-size:.7rem;
    letter-spacing:.12em;
    color:var(--ink-soft);
  }
  @keyframes scrollcue{
    0%,100%{ transform:scaleY(1); opacity:.6; }
    50%{ transform:scaleY(.55); opacity:1; }
  }

  .approach-grid{ grid-template-columns:repeat(3,1fr); }
  .testimonial-grid{ grid-template-columns:repeat(3,1fr); }

  .contact-grid{
    flex-direction:row;
    align-items:start;
  }
  .contact-grid > div,
  .contact-form{ flex:1; }

  .site-footer{ flex-direction:row; justify-content:space-between; }

  .whatsapp-float{ width:58px; height:58px; right:1.5rem; bottom:1.5rem; }
  .whatsapp-float svg{ width:30px; height:30px; }
}

/* =========================================================
   BREAKPOINT — desktop grande  (>= 1280px)
   ========================================================= */
@media (min-width:1280px){
  .about-grid{ grid-template-columns:.6fr 1.4fr; }
}

/* pantallas muy chicas (<360px): compactar un poco más */
@media (max-width:360px){
  :root{ --edge: .9rem; --fs-hero: 2.05rem; }
}

/* pantallas bajas en horizontal (mobile landscape) */
@media (max-height:480px) and (orientation:landscape){
  .hero{ min-height:auto; padding-top:5.5rem; padding-bottom:2.5rem; }
}
