/* =========================================================
   Delinut: identidad v3 (aprobada el 19/10/2026)
   Mobile first: los estilos base son para celular y las
   media queries agrandan para tablet (48em) y escritorio (64em).
   ========================================================= */

:root {
  --pistacho: #C2D49E;   /* fondo principal */
  --salvia:   #93AA6E;   /* detalles, hojas */
  --hoja:     #7E9A52;   /* bloque de la palabra clave */
  --hoja-texto: #55702F; /* verde más oscuro para textos chicos (contraste AA) */
  --oliva:    #2F3622;   /* textos */
  --gris:     #EDE9E6;   /* fondo de lectura */
  --blanco:   #FFFFFF;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;

  /* Escala tipográfica (razón ~1.25, con clamp para pantallas grandes) */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  --display: clamp(2.9rem, 0.4rem + 12.6vw, 8.5rem);

  --gutter: clamp(1.25rem, 0.8rem + 2.5vw, 3rem);
  --space-section: clamp(4rem, 2.5rem + 7vw, 8.5rem);
  --measure: 38rem;
  --header-h: 3.75rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--oliva);
  background: var(--gris);
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--oliva);
  color: var(--pistacho);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: 48rem; }

/* ---------- Elementos de marca ---------- */

/* Palabra clave en bloque verde */
.keyblock {
  display: inline-block;
  background: var(--hoja);
  color: var(--blanco);
  padding: 0.02em 0.14em 0.06em;
  border-radius: 0.06em;
}

/* Comentario "a mano" */
.aside {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.45em;
  line-height: 1.15;
  color: var(--hoja-texto);
}

.section-title {
  font-weight: 850;
  font-stretch: 78%;
  font-size: var(--step-3);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  max-width: 16ch;
}

.section-intro {
  margin-top: 1.25rem;
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: var(--measure);
}

/* ---------- Botones y links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  background: var(--oliva);
  color: var(--pistacho);
  font-weight: 700;
  font-size: var(--step-0);
  text-decoration: none;
  border-radius: 999px;
  transition: transform 160ms ease, background-color 160ms ease;
}
.btn svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}
.btn:hover { background: #1F2416; }
.btn:active { transform: scale(0.97); }

.btn-small {
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  font-size: var(--step--1);
}

.btn-light {
  background: var(--pistacho);
  color: var(--oliva);
}
.btn-light:hover { background: var(--blanco); }

.link {
  display: inline-block;
  padding-block: 0.75rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--hoja);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.link:hover { text-decoration-color: currentColor; }

/* ---------- Barra superior ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--pistacho) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  min-height: 2.75rem;
}
.brand-leaf {
  width: 1.4rem;
  height: 1.4rem;
  fill: var(--hoja);
  stroke: var(--oliva);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

/* ---------- Inicio ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--pistacho);
  padding: 2.5rem var(--gutter) var(--space-section);
}

.hero-leaves {
  position: absolute;
  right: -5rem;
  bottom: -2rem;
  width: 17rem;
  fill: var(--salvia);
  opacity: 0.45;
  pointer-events: none;
}
.hero-leaves .vein {
  fill: none;
  stroke: var(--pistacho);
  stroke-width: 3;
}

.hero-inner {
  position: relative;
  max-width: 72rem;
  margin-inline: auto;
}

.eyebrow {
  display: block;
  margin-bottom: 1.25rem;
  font-size: var(--step--1);
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (min-width: 30em) {
  .eyebrow { font-stretch: 118%; letter-spacing: 0.14em; }
}

.display {
  display: block;
  font-weight: 900;
  font-stretch: 62%;
  font-size: var(--display);
  line-height: 0.88;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}
.display .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.display .line > span { display: inline-block; white-space: nowrap; }

.hero-aside {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  margin-top: 0.75rem;
  margin-left: 0.25rem;
  color: var(--oliva);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
}
.hand-arrow {
  flex: none;
  width: 3.25rem;
  transform: scaleX(-1) rotate(-8deg);
  fill: none;
  stroke: var(--oliva);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lead {
  margin-top: 2rem;
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 34rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}

/* Animación de entrada del inicio: el único momento orquestado */
.js .display .line > span {
  transform: translateY(105%);
  animation: rise 700ms cubic-bezier(.2, .7, .2, 1) forwards;
}
.js .display .line:nth-child(2) > span { animation-delay: 90ms; }
.js .display .line:nth-child(3) > span { animation-delay: 180ms; }

.js .display .line > .keyblock {
  clip-path: inset(0 100% 0 0);
  animation: rise 700ms cubic-bezier(.2, .7, .2, 1) 180ms forwards,
             wipe 650ms cubic-bezier(.6, 0, .2, 1) 700ms forwards;
}

.js .hand-arrow .draw {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: draw 600ms ease-out 1300ms forwards;
}
.js .hand-arrow .head { animation-delay: 1750ms; }

.js .hero-aside span {
  opacity: 0;
  animation: fade 500ms ease-out 1650ms forwards;
}

@keyframes rise { to { transform: translateY(0); } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- La semana ---------- */

.week {
  padding-block: var(--space-section);
  background: var(--gris);
}

.week-list {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.75rem;
}
.week-list li {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--salvia);
}
.day {
  font-size: var(--step--1);
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hoja-texto);
}
.said {
  font-size: var(--step-2);
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.2;
}

.week-answer {
  margin-top: 3rem;
  font-size: var(--step-1);
  max-width: var(--measure);
}
.week-answer strong {
  font-weight: 800;
  background: linear-gradient(transparent 62%, var(--pistacho) 62%);
}

/* ---------- Cómo trabajo ---------- */

.how {
  padding-block: var(--space-section);
  background: var(--blanco);
}

.principles {
  margin-top: 3rem;
  display: grid;
  gap: 2.25rem;
}
.principles li {
  position: relative;
  padding-left: 2.25rem;
  max-width: 30rem;
}
.principles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.3rem;
  height: 1.3rem;
  background: var(--hoja);
  border-radius: 0 70% 0 70%;
}
.principles h3 {
  font-size: var(--step-1);
  font-weight: 800;
  line-height: 1.25;
}
.principles p { margin-top: 0.35rem; }

/* ---------- La consulta ---------- */

.consult {
  padding-block: var(--space-section);
  background: var(--oliva);
  color: var(--gris);
}
.consult .section-title { color: var(--pistacho); }

.consult-grid {
  display: grid;
  gap: 3.5rem;
}

.includes {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.1rem;
  max-width: var(--measure);
}
.includes li {
  padding-left: 1.25rem;
  border-left: 2px solid var(--salvia);
}
.includes strong { color: var(--pistacho); }

.tape-title {
  font-size: var(--step-1);
  font-weight: 800;
  color: var(--pistacho);
}

/* La cinta métrica: cuenta las semanas del seguimiento */
.tape {
  position: relative;
  margin-top: 1.5rem;
  display: grid;
  gap: 1.75rem;
  padding-left: 3.25rem;
}
.tape::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2rem;
  border-radius: 3px;
  background:
    repeating-linear-gradient(to bottom, var(--oliva) 0 2px, transparent 2px 10px) left top / 35% 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--oliva) 0 2px, transparent 2px 50px) left top / 65% 100% no-repeat,
    var(--pistacho);
}
.tape-step {
  position: relative;
  display: grid;
  gap: 0.1rem;
}
.tape-step::before {
  content: "";
  position: absolute;
  left: -3.25rem;
  top: 0.7rem;
  width: 2.6rem;
  height: 3px;
  background: var(--hoja);
}
.tape-mark {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--pistacho);
}
.tape-step strong { font-size: var(--step-1); color: var(--blanco); }

.note {
  margin-top: 2rem;
  font-size: var(--step--1);
  max-width: 30rem;
  opacity: 0.85;
}

/* ---------- Dónde y cuándo ---------- */

.where {
  padding-block: var(--space-section);
  background: var(--pistacho);
}

.where-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.25rem;
}

.place {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--gris);
  border-radius: 28px 6px 28px 6px;
}
.place:nth-child(2) { background: var(--blanco); }
.place h3 {
  font-size: var(--step-2);
  font-weight: 850;
  font-stretch: 80%;
  line-height: 1.05;
  text-transform: uppercase;
}
.place-address { font-weight: 600; }

.hours {
  display: grid;
  gap: 0.35rem;
}
.hours div {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.hours dt { font-weight: 800; min-width: 5.5rem; }

/* ---------- Preguntas ---------- */

.faq {
  padding-block: var(--space-section);
  background: var(--gris);
}
.faq .section-title { margin-bottom: 2rem; }

.faq details {
  border-bottom: 2px solid color-mix(in srgb, var(--oliva) 18%, transparent);
}
.faq summary {
  position: relative;
  display: block;
  padding: 1.25rem 3rem 1.25rem 0;
  font-size: var(--step-1);
  font-weight: 750;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: -0.875rem;
  border-radius: 50%;
  background:
    linear-gradient(var(--oliva), var(--oliva)) center / 12px 2.5px no-repeat,
    linear-gradient(var(--oliva), var(--oliva)) center / 2.5px 12px no-repeat,
    var(--pistacho);
  transition: transform 250ms ease;
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details p {
  padding-bottom: 1.5rem;
  max-width: var(--measure);
}
.faq details[open] p { animation: open 280ms ease-out; }
@keyframes open {
  from { opacity: 0; transform: translateY(-6px); }
}

/* ---------- Cierre ---------- */

.closing {
  padding-block: var(--space-section);
  background: var(--oliva);
  color: var(--gris);
}
.closing-title {
  display: grid;
  justify-items: start;
  gap: 0.1em;
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(2.6rem, 1rem + 8vw, 6.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--pistacho);
}
.closing-key { line-height: 1.12; }
.closing-key .keyblock {
  display: inline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.closing-text {
  margin-top: 1.75rem;
  margin-bottom: 2rem;
  font-size: var(--step-1);
  max-width: var(--measure);
}

/* ---------- Pie ---------- */

.footer {
  padding-block: 2.5rem;
  background: #232918;
  color: var(--gris);
  font-size: var(--step--1);
}
.footer-inner {
  display: grid;
  gap: 1.25rem;
}
.footer-links { display: grid; gap: 0.25rem; }
.footer-links a {
  display: inline-block;
  padding-block: 0.7rem;
  text-underline-offset: 4px;
}


/* =========================================================
   Animaciones al hacer scroll (todas con transform/opacity,
   para que no le cueste al celular)
   ========================================================= */
.js [data-reveal] {
  opacity: 0;
  transition:
    opacity 600ms ease-out,
    transform 750ms cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.js [data-reveal="up"]    { transform: translateY(32px); }
.js [data-reveal="left"]  { transform: translateX(-44px); }
.js [data-reveal="right"] { transform: translateX(44px); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* La semana: el aparte se "escribe" después de que entra cada día */
.js .week-list .aside {
  display: inline-block;
  clip-path: inset(-10% 100% -10% 0);
  transition: clip-path 800ms ease-out;
  transition-delay: calc(var(--i, 0) * 110ms + 550ms);
}
.js .week-list .is-visible .aside { clip-path: inset(-10% -5% -10% 0); }

/* Cómo trabajo: la hojita de cada idea brota con un rebote */
.js .principles li::before {
  transform: scale(0) rotate(-120deg);
  transition: transform 650ms cubic-bezier(.3, 1.7, .5, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 250ms);
}
.js .principles li.is-visible::before { transform: none; }

/* La cinta métrica se desenrolla y las semanas van apareciendo */
.js .tape::before {
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1300ms cubic-bezier(.6, 0, .2, 1);
}
.js .tape.is-visible::before { transform: none; }
.js .tape-step { transition-delay: calc(var(--i, 0) * 280ms + 300ms); }
.js .tape-step::before {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms ease-out;
  transition-delay: calc(var(--i, 0) * 280ms + 350ms);
}
.js .tape-step.is-visible::before { transform: none; }

/* Dónde y cuándo: las tarjetas se levantan al pasar el mouse */
.place { transition: transform 250ms ease, box-shadow 250ms ease; }
.js .place[data-reveal] {
  transition:
    opacity 600ms ease-out,
    transform 750ms cubic-bezier(.2, .7, .2, 1),
    box-shadow 250ms ease;
}
@media (hover: hover) {
  .js .place.is-visible:hover {
    transform: translateY(-6px) rotate(-0.4deg);
    box-shadow: 0 18px 40px -22px rgba(47, 54, 34, .55);
  }
}

/* Cierre: el bloque verde se pinta de izquierda a derecha */
.closing-key .keyblock {
  background: linear-gradient(var(--hoja), var(--hoja)) left / 100% 100% no-repeat;
}
.js .closing-key .keyblock {
  background-size: 0% 100%;
  transition: background-size 900ms cubic-bezier(.6, 0, .2, 1) 250ms;
}
.js .closing-title.is-visible .keyblock { background-size: 100% 100%; }
.js .closing-title > span:first-child {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 500ms ease-out, transform 600ms cubic-bezier(.2, .7, .2, 1);
}
.js .closing-title.is-visible > span:first-child { opacity: 1; transform: none; }

/* El botón de WhatsApp: el ícono se mueve al pasar el mouse,
   y el del cierre hace un "toc toc" cuando aparece */
.btn:hover svg { animation: wiggle 500ms ease-in-out; }
.js .btn-nudge { opacity: 0; transform: scale(.9); transition: opacity 400ms, transform 400ms; }
.js .closing-title.is-visible ~ .btn-nudge {
  opacity: 1;
  transform: none;
  animation: knock 700ms ease-in-out 1300ms 2;
  transition-delay: 900ms;
}
@keyframes wiggle {
  25% { transform: rotate(-14deg); }
  50% { transform: rotate(10deg); }
  75% { transform: rotate(-6deg); }
}
@keyframes knock {
  0%, 100% { transform: none; }
  30% { transform: translateY(-5px) rotate(-2deg); }
  60% { transform: translateY(0) rotate(1.5deg); }
}

/* Hojas del inicio: entran al cargar y después se mecen despacio */
.hero-leaves .leaf {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.js .hero-leaves .leaf {
  opacity: 0;
  animation:
    leaf-in 1100ms cubic-bezier(.2, .7, .2, 1) forwards,
    sway 6s ease-in-out 1.2s infinite alternate;
}
.js .hero-leaves .leaf-1 { animation-delay: 300ms, 1.4s; }
.js .hero-leaves .leaf-2 { animation-delay: 500ms, 2.2s; transform-origin: 100% 100%; }
.js .hero-leaves .leaf-3 { animation-delay: 700ms, 1.8s; transform-origin: 100% 50%; }
@keyframes leaf-in {
  from { opacity: 0; transform: translateY(40px) rotate(-18deg) scale(.8); }
  to   { opacity: 1; transform: none; }
}
@keyframes sway {
  from { transform: rotate(-3deg); }
  to   { transform: rotate(3deg); }
}

/* Barra de progreso de lectura, debajo de la barra superior */
@supports (animation-timeline: scroll()) {
  .topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--hoja);
    transform-origin: left;
    transform: scaleX(0);
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* =========================================================
   Tablet (768 px en adelante)
   ========================================================= */
@media (min-width: 48em) {
  .hero { padding-top: 4rem; }
  .hero-leaves { width: 26rem; right: -4rem; opacity: 0.55; }

  .week-list { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

  .principles { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }

  .where-grid { grid-template-columns: 1.15fr 1fr; }
  .place { padding: 2.25rem; }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .footer-links { justify-items: end; }
}

/* =========================================================
   Escritorio (1024 px en adelante)
   ========================================================= */
@media (min-width: 64em) {
  .hero { padding-top: 5.5rem; }
  .hero-leaves { width: 34rem; right: 0; bottom: -3rem; }
  .lead { margin-top: 2.5rem; }

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

  .consult-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    margin-top: 1rem;
  }
}

/* Respetar a quien pide menos movimiento en su teléfono o computadora */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
  .topbar::after { animation-duration: auto !important; }
}
