/* =========================================================
   ESTILOS DE LA TAZA ROJA
   Orden del archivo:
   1. Variables (colores, tipografías y medidas)
   2. Fuentes
   3. Estilos base y piezas comunes (botones, títulos, cintas, desplegables)
   4. Una sección de estilos por cada parte de la página, en el mismo orden que index.html
   5. Entrada al hacer scroll
   6. Movimiento reducido

   Mobile first: primero se escriben los estilos para móvil y
   después, dentro de @media (min-width: ...), los de pantallas grandes.
   ========================================================= */


/* =========================================================
   1. VARIABLES
   Para cambiar un color o una tipografía en toda la web,
   basta con cambiarlo aquí.
   ========================================================= */
:root {
  /* Colores de marca (los del diseño aprobado) */
  --blue: #1C2348;         /* titulares, textos y fondo de Preguntas */
  --red: #C71617;          /* logo, botones y acentos */
  --orange-dark: #D2551A;  /* frase manuscrita de la intro */
  --cream: #F3EDE9;        /* fondo de Hora del café */

  /* Colores de apoyo */
  --white: #FFFFFF;
  --paper: #FAF8F6;        /* fondo de la portada (blanco roto) */
  --cream-light: #F8F3EF;  /* fondo de Somos */
  --night: #11162A;        /* fondo de Clientes, la cinta y el pie */
  --text-soft: #4A5072;    /* textos secundarios */
  --text-on-night: #B9BEDA;  /* texto suave sobre fondo oscuro */
  --text-dark: #1F1F1F;    /* texto de la etiqueta "¿Hablamos?" */
  --line: #BFC2CE;         /* líneas de los desplegables sobre fondo claro */
  --line-gray: #E4E6EE;    /* líneas del menú del móvil */
  --line-on-dark: rgba(255, 255, 255, 0.35);  /* líneas sobre fondo azul */
  --line-footer: rgba(255, 255, 255, 0.7);    /* línea del final del pie */
  --label-background: rgba(255, 255, 255, 0.9);  /* fondo de la etiqueta "¿Hablamos?" */
  --skip-border: rgba(28, 35, 72, 0.5);       /* borde del botón "Saltar intro" */
  --smoke: rgba(255, 255, 255, 0.8);          /* vapor del café */
  --ripple: rgba(255, 235, 215, 0.2);         /* ondas del café */
  --step-line: #E8B4B4;    /* línea que une los pasos de "¿Qué sigue?" (rojo muy suave) */

  /* Sombras */
  --shadow-nav-button: 0 8px 20px rgba(28, 35, 72, 0.25);
  --shadow-main-button: 0 12px 26px rgba(199, 22, 23, 0.28);
  --shadow-main-button-hover: 0 16px 32px rgba(199, 22, 23, 0.36);
  --shadow-panel: 0 24px 48px rgba(28, 35, 72, 0.3);    /* panel de Servicios del menú */
  --shadow-menu: 0 20px 40px rgba(28, 35, 72, 0.15);    /* menú del móvil */
  --shadow-whatsapp: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));

  /* Velo de color encima de la foto de cada proyecto, para que el logo resalte.
     Cada proyecto lo elige con su clase en index.html (project-axtra, project-sierra...) */
  --tint-axtra: rgba(22, 22, 22, 0.78);
  --tint-sierra: rgba(34, 52, 18, 0.88);
  --tint-malaga: rgba(17, 50, 107, 0.85);

  /* Tipografías */
  --font-title: Impact, 'Anton', 'Arial Narrow', sans-serif;
  --font-script: 'Great Vibes', cursive;
  --font-text: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Medidas */
  --gutter: 20px;                              /* margen a los lados de cada sección */
  --section-space: clamp(72px, 9vw, 120px);    /* espacio arriba y abajo de cada sección */
  --logo-cup-height: clamp(30px, 9.5vw, 36px); /* taza del logo */
  --logo-text-height: clamp(17px, 5.2vw, 21px);/* texto "La Taza Roja" del logo */
}

/* En pantallas más grandes, márgenes laterales más amplios y logo más grande */
@media (min-width: 769px) {
  :root {
    --gutter: clamp(20px, 8vw, 150px);
    --logo-cup-height: 46px;
    --logo-text-height: 28px;
  }
}


/* =========================================================
   2. FUENTES
   Están en la carpeta fonts/ (no se cargan desde Google,
   para no enviar datos de los visitantes a terceros).
   ========================================================= */
@font-face {
  font-family: 'Anton';
  src: url('../fonts/anton-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Great Vibes';
  src: url('../fonts/great-vibes-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* =========================================================
   3. ESTILOS BASE Y PIEZAS COMUNES
   ========================================================= */

/* El ancho de las cajas incluye el borde y el relleno */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Al pulsar un enlace del menú, la página baja suavemente (solo si no se ha pedido reducir movimiento) */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--blue);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  /* Evita que las cintas y la taza de Somos creen una barra de desplazamiento horizontal */
  overflow-x: hidden;
}

/* Las imágenes nunca se salen de su caja */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

/* Marco visible al moverse con el teclado (Tab) */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* Sobre los fondos azules el rojo no se distingue bien: allí el marco es blanco */
#faq :focus-visible,
.site-footer :focus-visible,
.services-panel :focus-visible {
  outline-color: var(--white);
}

/* Enlace "Saltar al contenido": escondido hasta que se pulsa Tab */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--blue);
  color: var(--white);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Texto invisible en pantalla pero que sí leen los lectores de pantalla */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Botón principal rojo "Pide un café", con una flecha que se mueve al pasar el ratón */
.main-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  background: var(--red);
  color: var(--white);
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow-main-button);
  transition: transform 0.2s, box-shadow 0.2s;
}

.main-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-main-button-hover);
}

.main-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.main-button:hover svg {
  transform: translateX(4px);
}

/* Espacio común de las secciones (arriba, abajo y a los lados) */
#about,
#services,
#work,
#ideas,
#faq {
  position: relative;
  padding: var(--section-space) var(--gutter);
}

/* Título grande de sección (Impact, mayúsculas), como en el diseño aprobado */
.section-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(60px, 7.4vw, 112px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* Frase roja en negrita que va debajo del título */
.section-lead {
  margin: 10px 0 0;
  max-width: 15em;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--red);
}

/* Frase y botón "Pide un café" al final de Servicios y Preguntas */
.section-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: clamp(48px, 6vw, 80px);
  text-align: center;
}

.section-cta p {
  margin: 0;
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 700;
  color: var(--red);
}

/* Cintas que pasan solas (Clientes y cinta "La Taza Roja").
   La pista lleva su contenido dos veces seguidas y se desplaza la mitad de su ancho:
   en ese momento la segunda copia está justo donde empezó la primera, así que el bucle no se nota.
   Cada elemento lleva el hueco a su derecha (margin-right) para que las dos mitades midan lo mismo */
.marquee {
  overflow: hidden;
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 60s linear infinite;
}

/* La segunda cinta va en sentido contrario */
.marquee-reverse {
  animation-direction: reverse;
}

/* Al pasar el ratón por encima, la cinta se para (para poder leer los logos con calma).
   Es una norma de accesibilidad: lo que se mueve solo se tiene que poder detener */
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Desplegables (Servicios y Preguntas). Usan la etiqueta <details>: el navegador
   los abre y los cierra solo. Aquí solo se les da el aspecto, con un + que se convierte en − */
.accordion {
  margin-top: clamp(40px, 6vw, 88px);
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-item summary {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2vw, 28px);
  padding: clamp(18px, 2vw, 28px) 44px clamp(18px, 2vw, 28px) 0;
  font-size: clamp(23px, 2.9vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  list-style: none;     /* quita el triángulo que pone el navegador */
  cursor: pointer;
}

/* Quita el triángulo en Safari */
.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-number {
  flex: none;
  min-width: 1.7em;
}

/* Signo +: dos rayitas rojas; al abrir, la vertical gira y queda un − */
.accordion-item summary::before,
.accordion-item summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 20px;
  height: 3px;
  background: var(--red);
  transition: transform 0.3s ease;
}

.accordion-item summary::after {
  transform: rotate(90deg);
}

.accordion-item[open] summary::after {
  transform: rotate(0);
}

.accordion-item p {
  max-width: 60em;
  margin: 0 0 clamp(20px, 2.4vw, 32px);
  font-size: 18px;
  line-height: 1.65;
}

@media (min-width: 601px) {
  .accordion-item p {
    padding-left: clamp(50px, 6.2vw, 90px);
  }
}


/* =========================================================
   4. SECCIONES
   ========================================================= */

/* ---------- Intro de la taza ---------- */

/* Fases (las cambia js/main.js poniendo clases en <html>):
   - intro-on:     se ve la capa clara y la taza se forma en el centro
   - intro-moving: la capa se vuelve transparente y la taza viaja al logo de la cabecera
   Sin la clase intro-on (sin JavaScript o con "reducir movimiento") la intro no se ve. */

.intro {
  display: none;
}

/* Capa que tapa toda la pantalla. Se usa position: fixed porque tiene
   que quedarse encima de todo, aunque la página se mueva */
.intro-on .intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: var(--paper);
  transition: background-color 1.1s ease;
}

/* Mientras dura la intro no se puede bajar por la página */
.intro-on body {
  overflow: hidden;
}

/* Taza grande en el centro. Al viajar, JavaScript le pone la posición y el tamaño exactos del logo */
.intro-cup {
  position: absolute;
  left: 50%;
  top: 40%;
  height: clamp(120px, 17vw, 200px);
  width: auto;
  overflow: visible;
  fill: var(--red);
  transform: translate(-50%, -50%);
  transition: left 1.1s cubic-bezier(0.65, 0, 0.35, 1),
              top 1.1s cubic-bezier(0.65, 0, 0.35, 1),
              height 1.1s cubic-bezier(0.65, 0, 0.35, 1),
              transform 1.1s cubic-bezier(0.65, 0, 0.35, 1);
}

/* 1. El bocadillo aparece */
.intro-bubble {
  transform-box: fill-box;
  transform-origin: center;
  animation: intro-bubble 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 2. Los tres puntos "escriben", uno detrás de otro, y se apagan */
.intro-dot {
  fill: var(--white);
  transform-box: fill-box;
  transform-origin: center;
}

.intro-dot-1 { animation: intro-dot 1.1s ease-in-out 0.4s both, intro-fade 0.35s ease 1.4s forwards; }
.intro-dot-2 { animation: intro-dot 1.1s ease-in-out 0.55s both, intro-fade 0.35s ease 1.4s forwards; }
.intro-dot-3 { animation: intro-dot 1.1s ease-in-out 0.7s both, intro-fade 0.35s ease 1.4s forwards; }

/* 3. El cuerpo de la taza crece hacia abajo */
.intro-body {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: intro-body 1s cubic-bezier(0.22, 1, 0.36, 1) 1.5s both;
}

/* La frase "Echemos un café juntos" aparece debajo de la taza */
.intro-phrase {
  position: absolute;
  left: 50%;
  top: calc(40% + clamp(80px, 11vw, 130px));
  width: min(90%, 900px);
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.15;
  text-align: center;
  color: var(--orange-dark);
  transform: translateX(-50%);
  transition: opacity 0.5s ease;
}

/* El texto de dentro es el que aparece con animación (el <p> de fuera es el que se esconde) */
.intro-phrase-text {
  display: block;
  animation: intro-phrase 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}

/* Botón "Saltar intro" */
.intro-skip {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: transparent;
  border: 1px solid var(--skip-border);
  border-radius: 999px;
  color: var(--blue);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.intro-skip:hover {
  border-color: var(--blue);
}

/* Fase de viaje: la capa se vuelve transparente, la frase y el botón se van
   y la capa deja pasar los clics a la página */
.intro-moving .intro {
  background-color: transparent;
  pointer-events: none;
}

.intro-moving .intro-phrase,
.intro-moving .intro-skip {
  opacity: 0;
}

/* Mientras la taza de la intro viaja, la del logo está escondida
   (aparece en su sitio justo cuando la otra llega) */
.intro-on .site-header .logo-cup {
  opacity: 0;
}

/* El texto del logo entra desde la izquierda cuando la taza empieza a viajar */
.intro-on .logo-wordmark {
  opacity: 0;
  transform: translateX(-16px);
}

.intro-moving .logo-wordmark {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@keyframes intro-bubble {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes intro-dot {
  0%       { opacity: 0; }
  25%      { opacity: 1; transform: translateY(0); }
  45%      { transform: translateY(-3px); }
  65%,
  100%     { opacity: 1; transform: translateY(0); }
}

@keyframes intro-fade {
  to { opacity: 0; }
}

@keyframes intro-body {
  from { opacity: 0; transform: scaleY(0.4) translateY(-6px); }
  to   { opacity: 1; transform: scaleY(1) translateY(0); }
}

@keyframes intro-phrase {
  from { opacity: 0; translate: 0 12px; }
  to   { opacity: 1; translate: 0 0; }
}


/* ---------- Cabecera ---------- */

/* Va encima de la portada, transparente */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gutter);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-cup {
  display: block;
  height: var(--logo-cup-height);
  width: auto;
  fill: var(--red);
  transform-origin: 60% 85%;
}

.logo-wordmark {
  height: var(--logo-text-height);
  width: auto;
}

/* Al pasar el ratón por el logo, la taza "da un sorbo" */
.logo-link:hover .logo-cup {
  animation: logo-sip 0.9s ease-in-out;
}

@keyframes logo-sip {
  0%, 100% { transform: rotate(0); }
  30%      { transform: rotate(-14deg); }
  60%      { transform: rotate(6deg); }
}

/* Botón del menú (móvil): tres rayas o aspa según esté cerrado o abierto */
.menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 2px solid var(--blue);
  border-radius: 12px;
  color: var(--blue);
  cursor: pointer;
}

.menu-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.menu-icon-close,
.menu-button[aria-expanded="true"] .menu-icon-open {
  display: none;
}

.menu-button[aria-expanded="true"] .menu-icon-close {
  display: block;
}

/* Menú en el móvil: panel blanco que se despliega debajo del logo */
.site-nav {
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  gap: 2px;
  padding: 8px 16px 16px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-menu);
  font-size: 18px;
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-gray);
  color: var(--blue);
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Botón "Servicios" del menú: abre el panel con los servicios */
.services-menu-button {
  display: block;
  width: 100%;
  padding: 12px 4px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-gray);
  font: inherit;
  color: var(--blue);
  text-align: left;
  cursor: pointer;
}

.services-menu-button:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Panel azul de Servicios: oculto hasta que se abre */
.services-panel {
  display: none;
  margin: 8px 0;
  padding: 18px 24px 22px;
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
}

.services-menu.is-open .services-panel {
  display: block;
}

.services-panel-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.services-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
}

.services-panel-heading {
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.25;
}

.services-panel ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav .services-panel a {
  display: block;
  padding: 4px 0;
  border-bottom: 0;
  color: var(--white);
}

/* Botón "Pide un café" del menú: con borde, para no competir con el rojo de la portada */
.site-nav .nav-button {
  margin-top: 14px;
  padding: 10px 20px;
  border: 2px solid var(--blue);
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}

.site-nav .nav-button:hover {
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
}

/* Ordenador (desde 1181 px): menú en una sola fila y botón "Pide un café" azul relleno */
@media (min-width: 1181px) {
  .menu-button {
    display: none;
  }

  .site-nav {
    display: flex;
    flex: 1;
    flex-basis: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-left: 24px;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 14px;
  }

  .site-nav a,
  .services-menu-button {
    padding: 0;
    border-bottom: 0;
  }

  .site-nav .nav-button {
    margin: 0 0 0 auto;
    padding: 9px 16px;
    background: var(--blue);
    color: var(--white);
    box-shadow: var(--shadow-nav-button);
  }

  .site-nav .nav-button:hover {
    background: var(--white);
    color: var(--blue);
  }

  /* El panel de Servicios flota debajo del botón y también se abre al pasar el ratón */
  .services-menu {
    position: relative;
  }

  .services-panel {
    position: absolute;
    top: 100%;
    left: -16px;
    width: 620px;
    margin: 14px 0 0;
    font-size: 13px;
    box-shadow: var(--shadow-panel);
  }

  /* Puente invisible entre "Servicios" y el panel, para que no se cierre al bajar el ratón */
  .services-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
  }

  .services-menu:hover .services-panel {
    display: block;
  }

  .services-panel-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Pantallas grandes (desde 1361 px): menú con más aire */
@media (min-width: 1361px) {
  .site-nav {
    gap: clamp(16px, 2vw, 28px);
    margin-left: clamp(24px, 4vw, 56px);
    font-size: 15px;
  }

  .site-nav .nav-button {
    padding: 10px 20px;
  }

  .services-panel {
    width: min(760px, 62vw);
  }
}


/* ---------- Portada ---------- */

/* Móvil y tableta: texto arriba y la foto de la taza debajo, a todo el ancho */
#hero {
  position: relative;
  display: grid;
  align-items: center;
  gap: 24px;
  min-height: 100vh;
  padding: 130px var(--gutter) 64px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 640px;
}

.hero-label {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 78px);
  line-height: 1.05;
}

/* Frase que se escribe sola: en su propia línea y en rojo */
.typed-text {
  display: block;
  min-height: 1.05em;
  white-space: nowrap;
  color: var(--red);
}

/* Cursor que parpadea detrás de la frase */
.typed-cursor {
  display: inline-block;
  width: 0.07em;
  height: 0.85em;
  margin-left: 0.06em;
  vertical-align: -0.05em;
  background: var(--blue);
  animation: cursor-blink 1s steps(1) infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

.hero-text {
  max-width: 520px;
  margin: 0;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 6px;
}

.hero-note {
  max-width: 420px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* Escenas de la taza (móvil y tableta): debajo del texto, de borde a borde de la pantalla */
.hero-scenes {
  position: relative;
  margin: 0 calc(var(--gutter) * -1) -64px;
  pointer-events: none;
}

/* El filtro SVG del vapor no ocupa sitio */
.smoke-filter {
  position: absolute;
}

/* Hueco de las fotos. "container-type: size" permite medir las escenas en proporción
   a este hueco (unidades cqw = % del ancho y cqh = % del alto) */
.hero-photo {
  position: relative;
  aspect-ratio: 1536 / 1024;
  container-type: size;
  /* El borde de arriba de la foto se difumina con el fondo de la página */
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%);
  mask-image: linear-gradient(to bottom, transparent, black 12%);
}

/* Cada escena está invisible; la activa aparece con un fundido ENCIMA de la anterior,
   que se queda quieta debajo (así nunca se ven dos fotos medio transparentes a la vez).
   Las clases is-active e is-prev las pone js/main.js */
.hero-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1536 / 1024;
  opacity: 0;
}

.hero-scene.is-active {
  z-index: 2;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.hero-scene.is-prev {
  z-index: 1;
  opacity: 1;
}

.hero-scene img {
  width: 100%;
  height: 100%;
}

/* Capa del café (vapor y ondas): encima de las escenas, siempre visible, porque el café no se mueve */
.hero-scene.hero-coffee {
  z-index: 3;
  opacity: 1;
}

/* Vapor: nubecillas blancas difuminadas que salen del café y suben.
   El filtro SVG "smoke-filter" (en index.html) las deforma para que parezcan volutas */
.smoke {
  position: absolute;
  left: 46.7%;
  bottom: 56.2%;
  width: 23%;
  height: 44%;
  filter: url(#smoke-filter);
  pointer-events: none;
}

.smoke span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--smoke), transparent);
  filter: blur(4px);
  opacity: 0;
  transform: translate(-50%, 0) scale(0.4);
  animation: smoke-puff 7s ease-out infinite;
}

/* Cada nubecilla sale 1,75 s después de la anterior y se desvía hacia un lado (--dx) */
.smoke span:nth-child(2) { animation-delay: 1.75s; --dx: -34px; }
.smoke span:nth-child(3) { animation-delay: 3.5s;  --dx: 30px; }
.smoke span:nth-child(4) { animation-delay: 5.25s; --dx: -16px; }

@keyframes smoke-puff {
  0%   { opacity: 0;   transform: translate(-50%, 0) scale(0.4); }
  15%  { opacity: 0.9; }
  55%  { opacity: 0.6; }
  100% { opacity: 0;   transform: translate(calc(-50% + var(--dx, 10px)), -300%) scale(2); }
}

/* Ondas en el café: cada 6 s salen tres anillos desde el centro, como si cayera una gota */
.coffee-ripples {
  position: absolute;
  left: 48.96%;
  top: 31.05%;
  width: 19.01%;
  height: 22.17%;
  border-radius: 50%;
  overflow: hidden;
}

.coffee-ripples span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid var(--ripple);
  border-radius: 50%;
  filter: blur(1.5px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.05);
  animation: coffee-ripple 6s ease-out infinite;
}

.coffee-ripples span:nth-child(2) { animation-delay: 0.35s; }
.coffee-ripples span:nth-child(3) { animation-delay: 0.7s; }

@keyframes coffee-ripple {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.05); }
  6%   { opacity: 1; }
  40%  { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@media (min-width: 769px) {
  #hero {
    padding-top: 120px;
    padding-bottom: 80px;
  }
}

/* Ordenador (desde 1101 px): el texto a la izquierda y la foto ocupa la portada de arriba abajo
   por detrás, pegada a la derecha. Así la franja roja cruza la portada entera */
@media (min-width: 1101px) {
  .hero-content {
    max-width: min(640px, 44vw);
  }

  .hero-scenes {
    position: absolute;
    inset: 0;
    z-index: 1;
    margin: 0;
  }

  /* Se desplaza un poco con el ratón (--mouse-x y --mouse-y van de -1 a 1, las pone js/main.js) */
  .hero-photo {
    position: absolute;
    top: 0;
    bottom: 0;
    right: -16px;
    width: calc(100% + 16px);
    aspect-ratio: auto;
    -webkit-mask-image: none;
    mask-image: none;
    transform: translate(calc(var(--mouse-x, 0) * 12px), calc(var(--mouse-y, 0) * 8px));
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* La foto ocupa toda la altura y se coloca con el café al 72,5 % del ancho de la portada
     (el café está al 58,2 % del ancho de la foto). Solo se difumina su borde izquierdo, que es crema */
  .hero-scene {
    width: max(150cqh, 55cqw);
    left: max(calc(100cqw - max(150cqh, 55cqw)), calc(72.5cqw - max(150cqh, 55cqw) * 0.582));
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%);
    mask-image: linear-gradient(to right, transparent, black 8%);
  }

  .hero-scene.hero-coffee {
    -webkit-mask-image: none;
    mask-image: none;
  }
}


/* ---------- Clientes ---------- */

/* Fondo azul muy oscuro: la frase va hacia un lado y los logos hacia el otro */
#clients {
  position: relative;
  padding: 18px 0 34px;
  background: var(--night);
  color: var(--white);
}

.clients-phrase {
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.clients-phrase span {
  margin-right: 48px;
}

.clients-logos {
  margin-top: 26px;
  animation-duration: 70s;
}

.clients-logos li {
  margin-right: clamp(48px, 6vw, 88px);
}

.clients-logos img {
  height: clamp(40px, 4.4vw, 64px);
  width: auto;
}

/* Logos casi cuadrados (Axtra, Málaga Esport): algo más altos para que se vean igual de grandes */
.clients-logos img.is-tall {
  height: clamp(54px, 6vw, 88px);
}


/* ---------- Somos ---------- */

/* Va por encima de Servicios para que la taza pueda asomar sobre ella */
#about {
  z-index: 2;
  padding-bottom: clamp(120px, 15vw, 230px);
  background: var(--cream-light);
}

.about-grid {
  display: grid;
  gap: 40px;
}

.about-text p {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.7;
}

/* La taza se sale por la izquierda y por abajo: la mitad queda sobre la sección siguiente */
.about-cup {
  position: absolute;
  left: -4vw;
  bottom: 0;
  width: clamp(130px, 22vw, 360px);
  transform: translateY(50%);
  pointer-events: none;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 72px;
    align-items: start;
  }
}


/* ---------- Servicios ---------- */

/* Más espacio arriba para que la taza de Somos no pise el texto */
#services {
  padding-top: clamp(120px, 14vw, 220px);
  background: var(--white);
}

.services-head {
  display: grid;
  gap: 32px;
  align-items: end;
}

.services-intro {
  max-width: 30em;
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
}

.services-title .section-lead {
  margin-top: 8px;
  line-height: 1.25;
}

@media (min-width: 900px) {
  .services-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }

  .services-title,
  .services-title .section-lead {
    text-align: right;
    margin-left: auto;
  }
}


/* ---------- Proyectos ---------- */

#work {
  background: var(--white);
}

.work-head {
  display: grid;
  gap: 24px;
  align-items: center;
}

.work-cup {
  width: clamp(150px, 20vw, 300px);
  justify-self: center;
}

.work-subtitle {
  margin: clamp(32px, 4vw, 56px) 0 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.1;
}

/* Cuadrícula: 2 columnas en el móvil, 3 en pantallas grandes */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 1vw, 14px);
  margin-top: clamp(16px, 2vw, 26px);
}

/* Cada casilla: foto de fondo, velo de color y logo delante.
   Sin foto, la casilla es azul con el logo en blanco */
.project-card {
  position: relative;
  display: block;
  aspect-ratio: 147 / 101;
  overflow: hidden;
  background: var(--blue);
}

.project-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Al pasar el ratón por un proyecto con web, la foto se acerca un poco */
a.project-card:hover .project-photo {
  transform: scale(1.05);
}

/* Velo de color de cada proyecto (los colores están en :root) */
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-axtra::after  { background: var(--tint-axtra); }
.project-sierra::after { background: var(--tint-sierra); }
.project-malaga::after { background: var(--tint-malaga); }

.project-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: auto;
  max-width: 62%;
  max-height: 52%;
  transform: translate(-50%, -50%);
}

@media (min-width: 769px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .work-head {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}


/* ---------- Hora del café ---------- */

#ideas {
  display: grid;
  gap: 32px;
  align-items: center;
  background: var(--cream);
}

.coffee-cup {
  position: relative;
  width: clamp(200px, 28vw, 440px);
  justify-self: center;
}

/* El vapor de esta taza: el mismo de la portada, colocado sobre su café,
   con el centro más blanco para que se note sobre el fondo crema */
.coffee-cup .smoke {
  left: 23.9%;
  bottom: 57%;
  width: 36%;
  height: 44%;
}

.coffee-cup .smoke span {
  background: radial-gradient(closest-side, var(--white) 35%, transparent);
  filter: blur(2px);
}

.coffee-text p:not(.section-lead) {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.7;
}

@media (min-width: 900px) {
  #ideas {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 64px;
  }

  .coffee-text .section-title,
  .coffee-text .section-lead {
    text-align: right;
  }

  .coffee-text .section-lead {
    max-width: none;
  }
}


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

/* Fondo azul con textos y líneas en blanco */
#faq {
  background: var(--blue);
  color: var(--white);
}

.faq-head {
  text-align: center;
}

.faq-subtitle {
  margin: 10px 0 0;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 700;
  line-height: 1.25;
}

#faq .accordion,
#faq .accordion-item {
  border-color: var(--line-on-dark);
}

/* En Preguntas el signo + va a la izquierda y en blanco */
#faq .accordion-item summary {
  padding-left: clamp(40px, 4.4vw, 60px);
  padding-right: 0;
  font-size: clamp(20px, 2.1vw, 30px);
}

#faq .accordion-item summary::before,
#faq .accordion-item summary::after {
  left: 2px;
  right: auto;
  background: var(--white);
}

#faq .accordion-item p {
  padding-left: clamp(40px, 4.4vw, 60px);
  font-size: 17px;
}

#faq .section-cta p {
  color: var(--white);
}


/* ---------- Página de contacto (contact.html) ---------- */

/* Cabecera de la página: "PIDE UN CAFÉ", la frase en dos líneas y el formulario.
   Móvil: todo seguido. Ordenador: texto a la izquierda y formulario a la derecha, a la misma altura */
#contact-form {
  display: grid;
  gap: 28px 72px;
  padding: 150px var(--gutter) clamp(72px, 8vw, 110px);
  background: var(--paper);
}

/* "PIDE UN CAFÉ": como los títulos de sección, pero algo más pequeño */
.contact-title {
  font-size: clamp(50px, 6.2vw, 92px);
}

/* "Todo empieza con una / conversación": cada línea en su sitio, para que ninguna palabra
   salte de línea a mitad de escribirse (lo hace js/main.js) */
.typed-two-lines {
  display: block;
  min-height: 2.1em;
  margin: 14px 0 0;
  font-family: var(--font-title);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  color: var(--red);
}

.typed-line {
  display: block;
  min-height: 1.05em;
}

.contact-lead {
  margin: 22px 0 0;
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.5;
}

/* Formulario con una línea debajo de cada campo */
.coffee-form {
  display: flex;
  flex-direction: column;
}

.coffee-form label {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

/* Asterisco rojo de los campos obligatorios */
.required {
  color: var(--red);
}

.coffee-form input[type="text"],
.coffee-form input[type="tel"],
.coffee-form textarea {
  margin: 0 0 26px;
  padding: 10px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--blue);
  border-radius: 0;
  font: inherit;
  font-size: 17px;
  color: var(--blue);
}

.coffee-form textarea {
  margin-bottom: 4px;
  resize: vertical;
}

/* Contador de caracteres del mensaje ("0 / 2000") */
.char-count {
  align-self: flex-end;
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--text-soft);
}

/* Campo trampa contra robots: fuera de la pantalla, invisible para las personas */
.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Casilla de la política de privacidad */
.coffee-form .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
}

.form-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--red);
}

.form-check a {
  color: var(--red);
}

.form-legal {
  margin: 10px 0 26px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* El botón de enviar usa el estilo del botón rojo "Pide un café" */
.coffee-form .main-button {
  align-self: flex-start;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

/* ¿Qué sigue?: los 4 pasos en una línea vertical a la izquierda y el titular a la derecha
   (en el móvil, el titular va primero) */
#next-steps {
  display: grid;
  gap: 48px;
  padding: var(--section-space) var(--gutter);
  background: var(--paper);
  border-top: 1px solid var(--line-gray);
}

.steps-kicker {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  color: var(--red);
}

.steps-heading {
  margin: 8px 0 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.08;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-list li {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 20px;
  padding-bottom: 34px;
}

.steps-list li:last-child {
  padding-bottom: 0;
}

/* Línea que une los números */
.steps-list li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: var(--step-line);
}

/* Número del paso: círculo rojo */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
}

.steps-list h3 {
  margin: 4px 0 6px;
  font-size: 19px;
  line-height: 1.3;
}

.steps-list p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

@media (min-width: 900px) {
  #contact-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    row-gap: 22px;
    align-items: start;
  }

  .contact-intro {
    grid-column: 1;
    grid-row: 1;
  }

  #contact-form .contact-lead {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
  }

  .contact-form-wrap {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  #next-steps {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
  }

  .steps-title {
    order: 2;
  }
}


/* ---------- Cinta "La Taza Roja" ---------- */

.tape {
  padding: clamp(22px, 2.6vw, 38px) 0 0;
  background: var(--night);
}

.tape-row {
  animation-duration: 80s;
}

.tape .marquee + .marquee {
  margin-top: clamp(12px, 1.5vw, 22px);
}

.tape-row img {
  height: clamp(40px, 5.4vw, 84px);
  width: auto;
  margin-right: clamp(36px, 5vw, 76px);
}


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

.site-footer {
  padding: clamp(48px, 5vw, 76px) var(--gutter) 32px;
  background: var(--night);
  color: var(--white);
}

.footer-grid {
  display: grid;
  gap: 40px;
  font-size: 14px;
  line-height: 1.5;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.footer-logo svg {
  height: 36px;
  width: auto;
  fill: var(--white);
}

.footer-logo img {
  height: 22px;
  width: auto;
}

.footer-text {
  max-width: 24em;
  margin: 20px 0 0;
}

.footer-title {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.site-footer ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Los 15 servicios van en dos columnas: los 8 primeros a la izquierda y el resto a la derecha */
.footer-services ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(8, auto);
  grid-auto-flow: column;
  gap: 7px 24px;
}

.site-footer .footer-people {
  gap: 20px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line-footer);
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1.25fr 1.7fr 0.9fr 1.1fr;
  }
}


/* ---------- Botón flotante de WhatsApp ---------- */

/* Pegado al borde derecho de la pantalla; en el móvil, sin la etiqueta "¿Hablamos?" */
.whatsapp-button {
  position: fixed;
  right: 0;
  bottom: 24px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-decoration: none;
}

.whatsapp-text {
  display: none;
  margin-right: 6px;
  padding: 3px 10px;
  background: var(--label-background);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.whatsapp-button img {
  width: 64px;
  filter: var(--shadow-whatsapp);
  transform-origin: right center;
  transition: transform 0.25s ease;
}

.whatsapp-button:hover img,
.whatsapp-button:focus-visible img {
  transform: scale(1.08);
}

@media (min-width: 601px) {
  .whatsapp-text {
    display: block;
  }

  .whatsapp-button img {
    width: 84px;
  }
}


/* ---------- Páginas sencillas: legales (aviso legal, privacidad, cookies), gracias, error del formulario y 404 ---------- */

/* La página ocupa al menos toda la pantalla, para que el pie quede siempre abajo
   aunque haya poco texto (por ejemplo, en la página de gracias) */
.legal-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.legal-page main {
  flex: 1;
}

/* Cabecera sencilla: logo y enlace para volver a la web */
.legal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gutter);
  border-bottom: 1px solid var(--line-gray);
}

.legal-back {
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Texto en una columna estrecha, cómoda de leer */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) 20px;
}

.legal-content h1 {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  text-transform: uppercase;
}

.legal-content h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  line-height: 1.3;
}

.legal-content p,
.legal-content li {
  font-size: 17px;
  line-height: 1.7;
}

.legal-updated {
  color: var(--text-soft);
}

/* Pie de las páginas legales: solo la línea de abajo del pie de la web */
.legal-footer {
  padding: 0 var(--gutter) 32px;
  background: var(--night);
  color: var(--white);
}

.legal-footer .footer-bottom {
  margin-top: 0;
  border-top: 0;
}

.legal-footer a {
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-footer :focus-visible {
  outline-color: var(--white);
}


/* =========================================================
   5. ENTRADA AL HACER SCROLL
   Cuando una sección con la clase "reveal" asoma en pantalla, js/main.js le pone "is-visible"
   y sus bloques suben y aparecen uno detrás de otro.
   Solo funciona si js/main.js ha puesto "reveal-on" en <html> (nunca con movimiento reducido):
   sin JavaScript, todo se ve normal.
   Se usa "translate" (no "transform") para no pisar otros movimientos, como la taza de Somos.
   ========================================================= */
.reveal-on .reveal :is(.section-title, .section-lead, .about-text p, .about-cup, .services-intro, .faq-subtitle, .accordion-item, .section-cta, .work-cup, .work-subtitle, .project-card, .coffee-cup, .coffee-text > p, .steps-title, .steps-list li, .footer-grid > div) {
  transition: opacity 1.3s ease-out, translate 1.3s ease-out;
}

.reveal-on .reveal:not(.is-visible) :is(.section-title, .section-lead, .about-text p, .about-cup, .services-intro, .faq-subtitle, .accordion-item, .section-cta, .work-cup, .work-subtitle, .project-card, .coffee-cup, .coffee-text > p, .steps-title, .steps-list li, .footer-grid > div) {
  opacity: 0;
  translate: 0 90px;
}

/* Las tazas entran desde la izquierda */
.reveal-on .reveal:not(.is-visible) :is(.about-cup, .coffee-cup) {
  translate: -160px 0;
}

/* Orden de aparición: primero el título, luego el subtítulo, el texto y los elementos de las listas */
.reveal :is(.section-lead, .faq-subtitle, .work-cup) { transition-delay: 0.3s; }
.reveal :is(.about-text p, .coffee-text > p, .work-subtitle, .about-cup) { transition-delay: 0.55s; }
.reveal :is(.accordion-item, .project-card, .steps-list li, .footer-grid > div):nth-child(1) { transition-delay: 0.4s; }
.reveal :is(.accordion-item, .project-card, .steps-list li, .footer-grid > div):nth-child(2) { transition-delay: 0.6s; }
.reveal :is(.accordion-item, .project-card, .steps-list li, .footer-grid > div):nth-child(3) { transition-delay: 0.8s; }
.reveal :is(.accordion-item, .project-card, .steps-list li, .footer-grid > div):nth-child(4) { transition-delay: 1s; }
.reveal :is(.accordion-item, .project-card, .steps-list li, .footer-grid > div):nth-child(5) { transition-delay: 1.2s; }
.reveal :is(.accordion-item, .project-card, .steps-list li, .footer-grid > div):nth-child(6) { transition-delay: 1.4s; }
.reveal .section-cta { transition-delay: 1.2s; }


/* =========================================================
   6. MOVIMIENTO REDUCIDO
   Para quien ha pedido en su sistema "reducir movimiento":
   nada se mueve solo. El vapor se queda como una nube quieta.
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .typed-cursor,
  .smoke span,
  .logo-link:hover .logo-cup {
    animation: none;
  }

  .coffee-ripples {
    display: none;
  }

  .smoke span:first-child {
    opacity: 0.5;
    transform: translate(-50%, -40%) scale(1);
  }

  .hero-photo,
  .hero-scene,
  .hero-scene.is-active,
  .main-button,
  .main-button svg,
  .project-photo,
  .accordion-item summary::after,
  .whatsapp-button img {
    transition: none;
  }
}
