/* ============================================================
   JUANJO. — páginas web para negocios locales de la Vega Baja
   Dirección: editorial, cálida, mediterránea.
   Papel hueso · tinta cálida · un acento terracota. Fraunces + Inter.
   ============================================================ */

:root {
  --paper: #faf6f0;
  --paper-2: #f1e8da;
  --ink: #201b17;
  --muted: #6f665c;
  --accent: #c65a34;
  --accent-soft: #f7e6dc;
  --line: #e7ddd0;
  --radius: 22px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
a, button, label, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }

/* al tocar o hacer clic no sale ningún recuadro; con el teclado (Tab) sí, redondeado como cada botón */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grano de papel sutil sobre toda la página (toque editorial) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
}

::selection { background: var(--accent); color: var(--paper); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
}

h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }

.accent { color: var(--accent); }

/* ---------- botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--paper);
  background: var(--ink);
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
@media (hover: hover) { .btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); } }

.btn--small { padding: 0.55rem 1.25rem; font-size: 0.92rem; }

.btn--ghost { background: transparent; color: var(--ink); }
@media (hover: hover) { .btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); } }

.btn--invert { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (hover: hover) { .btn--invert:hover { background: var(--accent); color: #fff; border-color: var(--accent); } }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.2rem, 5vw, 4rem);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.nav__links { display: flex; gap: 1.7rem; }
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
@media (hover: hover) { .nav__links a:hover { color: var(--accent); } }

.nav__right { display: flex; align-items: center; gap: 0.6rem; }
.nav__burger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffdf9;
  cursor: pointer;
}
.nav__burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav__burger span:first-child { top: 15px; }
.nav__burger span:last-child { top: 23px; }
.nav.is-open .nav__burger span:first-child { top: 19px; transform: rotate(45deg); }
.nav.is-open .nav__burger span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.28fr 0.72fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.4rem;
}

.hero__title {
  font-size: clamp(1.1rem, 1.5vw, 1.32rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  max-width: 32ch;
  color: var(--muted);
  margin-top: 0.2rem;
}
.hero__title .swash { color: var(--ink); font-weight: 600; }

/* subrayado "a mano" que se dibuja solo bajo Vega Baja */
.swash { position: relative; white-space: nowrap; }
.swash svg {
  position: absolute;
  left: 0;
  bottom: -0.14em;
  width: 100%;
  height: 0.28em;
  overflow: visible;
}
.swash path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.hero__title.is-visible .swash path { animation: swash-draw 0.9s ease-out 0.55s forwards; }
@keyframes swash-draw { to { stroke-dashoffset: 0; } }

.hero__statement {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.5vw, 3.3rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-top: 1.6rem;
}
.hero__statement span { display: block; }
.hero__statement .accent { font-style: italic; }
.hero__statement .w { display: inline-block; font-style: inherit; }
.hero__statement.is-visible .w {
  animation: word-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--w) * 70ms + 0.1s);
}
@keyframes word-in {
  from { opacity: 0; transform: translateY(0.5em) rotate(1.5deg); }
  to { opacity: 1; transform: none; }
}

.hero__lead { max-width: 40rem; margin-top: 1.8rem; }
.hero__lead p { color: var(--muted); font-size: 1.12rem; }
.hero__punch {
  border-left: 2px solid var(--accent);
  padding-left: 1.1rem;
  margin-top: 1.2rem;
  color: var(--ink) !important;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.5;
}

.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

/* ---------- demo: web montándose sola ---------- */
.hero__visual { position: relative; }

/* brillo cálido difuso detrás del navegador */
.hero__visual::before {
  content: "";
  position: absolute;
  inset: -14% -10%;
  background: radial-gradient(closest-side, rgba(198, 90, 52, 0.16), transparent 72%);
  z-index: 0;
  pointer-events: none;
}

.browser {
  position: relative;
  z-index: 1;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 35px 70px -30px rgba(32, 27, 23, 0.4);
  transform: rotate(1.5deg);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.browser__dots { display: flex; gap: 5px; }
.browser__dots i { width: 9px; height: 9px; border-radius: 50%; }
.browser__dots i:nth-child(1) { background: #e77465; }
.browser__dots i:nth-child(2) { background: #e9b949; }
.browser__dots i:nth-child(3) { background: #6fbf7e; }

.browser__url {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.75rem;
  font-size: 0.74rem;
  color: var(--muted);
  min-height: 1.5rem;
}
.browser__caret {
  display: inline-block;
  width: 1.5px;
  height: 0.85em;
  margin-left: 2px;
  background: var(--accent);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.browser__screen {
  --demo-accent: var(--accent);
  position: relative;
  min-height: 342px;
}

.demo-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  min-height: 342px;
  transition: opacity 0.35s ease;
}

/* las piezas empiezan invisibles; el JS las arrastra a su sitio */
.demo-el { opacity: 0; }
.browser__screen.static .demo-el { opacity: 1 !important; transform: none !important; }

.demo-topbar { display: flex; justify-content: space-between; align-items: center; }
.demo-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--demo-accent); }
.demo-navs { display: flex; gap: 7px; }
.demo-navs i { width: 24px; height: 5px; border-radius: 3px; background: var(--line); }

/* tarjeta principal de la mini-web: texto + objeto animado */
.demo-card {
  background: color-mix(in srgb, var(--demo-accent) 13%, #fffdf9);
  border-radius: 12px;
  padding: 16px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.demo-card__text { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.demo-card__text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.demo-card__text em { font-size: 0.68rem; color: var(--muted); font-style: italic; }

.demo-cta {
  margin-top: 6px;
  background: var(--demo-accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
}
.demo-cta.clicked { animation: cta-pop 0.4s ease; }
@keyframes cta-pop {
  40% { transform: scale(0.88); }
  100% { transform: scale(1); }
}

/* objeto "3D" de cada negocio: emoji grande con vida propia */
.demo-obj {
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 8px 10px rgba(32, 27, 23, 0.25));
  user-select: none;
}
.demo-obj--steam { animation: obj-steam 2.6s ease-in-out infinite; }
@keyframes obj-steam {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.demo-obj--swing { animation: obj-swing 2.2s ease-in-out infinite; transform-origin: 50% 20%; }
@keyframes obj-swing {
  0%, 100% { transform: rotate(-12deg); }
  50% { transform: rotate(12deg); }
}
.demo-obj--spin { animation: obj-spin 6s linear infinite; }
@keyframes obj-spin { to { transform: rotate(360deg); } }
.demo-obj--bloom { animation: obj-bloom 2.4s ease-in-out infinite; transform-origin: 50% 85%; }
@keyframes obj-bloom {
  0%, 100% { transform: scale(1) rotate(-3deg); }
  50% { transform: scale(1.12) rotate(3deg); }
}

/* café: filas de carta */
.demo-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdf9;
}
.demo-menu b { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--demo-accent) 45%, #e5ddd2); width: 34%; }
.demo-menu i { flex: 1; border-bottom: 2px dotted var(--line); }
.demo-menu u { height: 8px; width: 26px; border-radius: 4px; background: var(--line); text-decoration: none; }

/* peluquería: huecos de cita */
.demo-slots { display: flex; align-items: center; gap: 7px; }
.demo-slots span {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--muted);
  width: 52px;
  flex-shrink: 0;
}
.demo-slots i {
  flex: 1;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 600;
  font-style: normal;
  color: var(--demo-accent);
  border: 1.5px solid color-mix(in srgb, var(--demo-accent) 45%, transparent);
  border-radius: 999px;
  padding: 0.28rem 0;
}
.demo-slots i.busy { color: var(--muted); border-style: dashed; border-color: var(--line); text-decoration: line-through; }

/* taller: lista de servicios con check */
.demo-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdf9;
}
.demo-check span {
  width: 17px; height: 17px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--demo-accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-check b { height: 8px; border-radius: 4px; background: #ded6ca; }
.demo-check b:nth-of-type(1) { width: 52%; }

/* flores: cuadrícula de ramos */
.demo-tiles { display: flex; gap: 9px; }
.demo-tiles i { flex: 1; height: 62px; border-radius: 10px; }

.demo-foot { display: flex; gap: 7px; justify-content: center; padding-top: 4px; }
.demo-foot i { width: 44px; height: 5px; border-radius: 3px; background: var(--line); }

.demo-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate(40px, 60px);
  transition: transform 0.55s cubic-bezier(0.3, 0.9, 0.3, 1), opacity 0.3s ease;
}
.demo-cursor.live { opacity: 1; }
.demo-cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 1 L3 15 L6.8 11.6 L9.2 17 L11.6 15.9 L9.2 10.7 L14 10.4 Z' fill='%23201b17' stroke='%23fffdf9' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.15s ease;
}
.demo-cursor.click::before { transform: scale(0.8); }

.hero__caption {
  text-align: center;
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- secciones ---------- */
.section { padding: clamp(3.4rem, 7vw, 5.4rem) clamp(1.2rem, 5vw, 4rem); max-width: var(--maxw); margin: 0 auto; }
.section--tight { padding-top: clamp(3rem, 6vw, 5rem); }

.section--band {
  max-width: none;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--band > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

/* Tiñe el fondo de una sección a todo el ancho SIN tocar la maquetación
   interior (a diferencia de .section--band, que además centra sus hijos).
   Sirve para alternar tonos y que se note dónde acaba una sección. */
.section--tinted {
  position: relative;
  background: var(--paper-2);
  box-shadow: -50vw 0 0 var(--paper-2), 50vw 0 0 var(--paper-2);
}
.section--tinted::before,
.section--tinted::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  box-shadow: -50vw 0 0 var(--line), 50vw 0 0 var(--line);
  pointer-events: none;
}
.section--tinted::before { top: 0; }
.section--tinted::after { bottom: 0; }

.section__head { max-width: 42rem; margin-bottom: clamp(2rem, 3.4vw, 2.9rem); position: relative; z-index: 0; }
.section__head p { color: var(--muted); margin-top: 1.1rem; font-size: 1.15rem; }

/* numeral gigante fantasma detrás de cada título (aire de revista) */
@supports (-webkit-text-stroke: 1px black) {
  .section__head[data-ghost]::before {
    content: attr(data-ghost);
    position: absolute;
    top: -0.55em;
    right: -0.15em;
    font-family: var(--font-display);
    font-size: clamp(6.5rem, 13vw, 10.5rem);
    font-weight: 600;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--line);
    z-index: -1;
    pointer-events: none;
    user-select: none;
    transform: translateY(var(--ghost-shift, 0px));
    transition: transform 0.15s linear;
  }
}

.section__num {
  display: block;
  font-family: var(--font-body);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ---------- prosa (sobre mí) ---------- */
.prose { max-width: 40rem; }
.prose p { margin-bottom: 1.15rem; color: var(--muted); }

.prose__stack {
  font-family: var(--font-display);
  color: var(--ink) !important;
  font-weight: 500;
  line-height: 1.55;
  font-size: 1.2rem;
}

.prose__big {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 600;
  color: var(--ink) !important;
  line-height: 1.25;
  margin: 2rem 0 !important;
}

.prose__muted { color: var(--muted); font-style: italic; }


/* ---------- intereses ---------- */
.interests {
  list-style: none;
  max-width: 46rem;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.interests li {
  position: relative;
  padding: 1.15rem 1rem 1.15rem 2.6rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.3vw, 1.4rem);
  font-weight: 500;
  opacity: 0;
  transition: background 0.2s ease, padding-left 0.2s ease;
}
.interests li::before {
  content: "→";
  position: absolute;
  left: 0.6rem;
  color: var(--accent);
  font-size: 0.85em;
  transition: transform 0.2s ease;
}
@media (hover: hover) { .interests li:hover { background: var(--accent-soft); padding-left: 3rem; } }
@media (hover: hover) { .interests li:hover::before { transform: translateX(5px); } }

/* entrada escalonada al hacer scroll */
.interests.is-visible li { animation: li-in 0.55s ease both; }
.interests.is-visible li:nth-child(2) { animation-delay: 0.09s; }
.interests.is-visible li:nth-child(3) { animation-delay: 0.18s; }
.interests.is-visible li:nth-child(4) { animation-delay: 0.27s; }
.interests.is-visible li:nth-child(5) { animation-delay: 0.36s; }
@keyframes li-in {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- trabajos (portfolio) ---------- */
.works { display: flex; flex-direction: column; gap: clamp(3rem, 6vw, 5rem); }

.work {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
/* la segunda, la cuarta... invierten el orden: ritmo de revista */
.work:nth-child(even) .work__frame { order: 2; }

/* miniatura dentro de una ventana de navegador, como la del hero */
.work__frame {
  display: block;
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 28px 55px -28px rgba(32, 27, 23, 0.45);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
@media (hover: hover) {
  .work__frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 36px 65px -28px rgba(32, 27, 23, 0.55);
  }
}

.work__bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.work__bar i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.work__bar i:nth-child(1) { background: #e77465; }
.work__bar i:nth-child(2) { background: #e9b949; }
.work__bar i:nth-child(3) { background: #6fbf7e; }
.work__bar em {
  flex: 1;
  margin-left: 0.3rem;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.16rem 0.7rem;
  font-size: 0.72rem;
  font-style: normal;
  color: var(--muted);
}

.work__shot { display: block; aspect-ratio: 1000 / 625; overflow: hidden; }
.work__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: object-position 1.2s ease; /* vuelta rapida al soltar */
}
.work__hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--paper);
  background: rgba(32, 27, 23, 0.72);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
@media (hover: hover) {
  .work__hint { opacity: 1; }
  .work__frame:hover .work__hint { opacity: 0; }
  .work__frame:hover .work__shot img { object-position: bottom; transition: object-position 7s ease-in-out; }
}

.work__info h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.9rem; }
/* aclaración de qué es el proyecto, junto al nombre (no es una etiqueta de adorno) */
.work__tipo {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: 0.42em;
  margin-left: 0.5rem;
}
.work__info p { color: var(--muted); margin-bottom: 1.2rem; max-width: 34rem; }

.work__link {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s ease;
}
@media (hover: hover) { .work__link:hover { border-bottom-color: var(--accent); } }

/* ---------- zona ---------- */
.zona {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: clamp(2.2rem, 5vw, 4rem);
}
.zona__text h2 { margin-bottom: 1.2rem; }
.zona__text p { color: #cbc3b8; margin-bottom: 0.9rem; }
.zona__text .section__num { color: #f0a184; }
.zona__text .prose__muted { color: #a49b8f; }

/* mapa: tierra en trama de puntos, costa y río que se dibujan, onda que sale
   del centro de la zona y enciende cada pueblo al alcanzarlo (--d, en ms,
   calculado por distancia) y después un latido suave que los recorre (--p) */
.vbmap { display: block; width: 100%; height: auto; overflow: visible; }
.vbmap pattern circle { fill: rgba(250, 246, 240, 0.2); }
.vbmap__sea { fill: rgba(250, 246, 240, 0.05); }
.vbmap__land { fill: url(#vbDots); opacity: 0; }
.vbmap__coast, .vbmap__river {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.vbmap__coast { stroke: rgba(250, 246, 240, 0.55); stroke-width: 1.4; }
.vbmap__river { stroke: #f0a184; stroke-width: 2; }
.vbmap__river-label { font-size: 10px; fill: #f0a184; letter-spacing: 0.06em; opacity: 0; }

.vbmap__zone { fill: url(#vbGlow); opacity: 0; }
.vbmap__wave {
  fill: none;
  stroke: #f0a184;
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.vbmap__town { opacity: 0; cursor: default; }
.vbmap__town circle { fill: var(--accent); stroke: var(--ink); stroke-width: 2; transition: fill 0.2s ease; }
.vbmap__town--minor circle { fill: #f0a184; }
.vbmap__town text { font-family: var(--font-body); font-size: 10.5px; fill: #cbc3b8; transition: fill 0.2s ease; }
.vbmap__town--main text { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; fill: var(--paper); }
.vbmap__town:hover circle, .vbmap__town:hover text { fill: var(--paper); }

.vbmap__pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.vbmap__note { font-family: var(--font-display); font-style: italic; font-size: 11px; fill: #a49b8f; }
.vbmap__note--sea { letter-spacing: 0.08em; font-size: 10px; }
.vbmap__legend { opacity: 0; }
.vbmap__legend-text { font-style: normal; font-size: 9.5px; letter-spacing: 0.08em; }
.vbmap__scale { fill: none; stroke: #a49b8f; stroke-width: 1.2; }
.vbmap__north { fill: #a49b8f; }

/* coreografía al llegar a la sección */
.zona.is-visible .vbmap__land { animation: map-fade 1.2s ease-out forwards; }
.zona.is-visible .vbmap__coast { animation: swash-draw 1.6s ease-out 0.1s forwards; }
.zona.is-visible .vbmap__river { animation: swash-draw 1.6s ease-out 0.5s forwards; }
.zona.is-visible .vbmap__river-label { animation: map-fade 0.8s ease-out 1.9s forwards; }
.zona.is-visible .vbmap__wave { animation: map-wave 1.9s cubic-bezier(0.25, 0.6, 0.35, 1) 0.7s forwards; }
.zona.is-visible .vbmap__wave--2 { animation-delay: 1.05s; }
.zona.is-visible .vbmap__zone { animation: map-fade 1.4s ease-out 1.6s forwards; }
.zona.is-visible .vbmap__town { animation: town-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(var(--d) * 1ms); }
.zona.is-visible .vbmap__pulse { animation: map-pulse 6.4s ease-out infinite; animation-delay: calc(var(--p) * 1ms); }
.zona.is-visible .vbmap__legend { animation: map-fade 0.8s ease-out 2.4s forwards; }

@keyframes map-fade { to { opacity: 1; } }
@keyframes town-in {
  0% { opacity: 0; }
  45% { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes map-wave {
  0% { opacity: 0.9; transform: scale(0.02); }
  75% { opacity: 0.3; }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes map-pulse {
  0% { opacity: 0.75; transform: scale(1); }
  22%, 100% { opacity: 0; transform: scale(3.4); }
}

@media (prefers-reduced-motion: reduce) {
  .vbmap__land, .vbmap__zone, .vbmap__river-label, .vbmap__legend, .vbmap__town { opacity: 1; animation: none !important; }
  .vbmap__coast, .vbmap__river { stroke-dashoffset: 0; animation: none !important; }
  .vbmap__wave, .vbmap__pulse { display: none; }
}

/* ---------- contacto ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.2rem, 5vw, 4rem) clamp(3rem, 6vw, 4.5rem);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: 3rem;
}
.contact__num { display: block; color: #f0a184; font-family: var(--font-body); font-weight: 600; font-size: 0.88rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.2rem; }
.contact__title { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 600; max-width: 18ch; margin: 0 auto; }
.contact__body { max-width: 36rem; margin: 1.8rem auto 0; }
.contact__body p { color: #cbc3b8; margin-bottom: 1rem; font-size: 1.1rem; }
.contact__lines {
  font-family: var(--font-display);
  color: var(--paper) !important;
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.5;
}
.contact__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-top: 2.4rem; }
.contact__email {
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-style: italic;
  color: #a49b8f;
  font-size: 1.05rem;
}
.copy-btn {
  margin-left: 0.6rem;
  vertical-align: middle;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(250, 246, 240, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
@media (hover: hover) { .copy-btn:hover { border-color: var(--paper); background: rgba(250, 246, 240, 0.08); } }
.copy-btn.is-done { background: var(--accent); border-color: var(--accent); }

/* ---------- menú "¿con qué me escribes?" (solo escritorio) ---------- */
.mailpick {
  position: fixed;
  z-index: 200;
  width: 272px;
  padding: 0.55rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 50px -18px rgba(32, 27, 23, 0.45);
  font-family: var(--font-body);
  text-align: left;
  animation: mailpick-in 0.18s ease-out;
}
@keyframes mailpick-in { from { opacity: 0; transform: translateY(-6px); } }
.mailpick__title {
  margin: 0.35rem 0.7rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.mailpick__opt {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.mailpick__opt small { font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.mailpick__opt:hover, .mailpick__opt:focus-visible { background: var(--accent-soft); }
.mailpick__opt:focus-visible { outline: none; }
.mailpick__opt.is-done small { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .mailpick { animation: none; } }

/* ---------- footer ---------- */
.footer {
  background: var(--paper);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.2rem, 4vw, 3rem) clamp(1.2rem, 5vw, 4rem) clamp(1.6rem, 3vw, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__logo {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.5rem;
}
.footer__brand p { max-width: 30rem; line-height: 1.6; }

.footer__side { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; }

.footer__mail {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s ease;
}
@media (hover: hover) { .footer__mail:hover { border-bottom-color: var(--accent); } }

.footer__nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer__nav a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
@media (hover: hover) { .footer__nav a:hover { color: var(--ink); } }

.footer__bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem clamp(1.2rem, 5vw, 4rem) 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem 1.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.footer__legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .footer__legal a:hover { color: var(--accent); } }

.footer__top {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
@media (hover: hover) { .footer__top:hover { color: var(--accent); } }

/* footer en páginas interiores (sin bloque de contacto encima) */
.footer--page { border-top: 1px solid var(--line); margin-top: clamp(2.5rem, 6vw, 4rem); }

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
@media (hover: hover) { .link-button:hover { color: var(--accent); } }

/* ---------- banner de cookies ---------- */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  max-width: 620px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  border-radius: 16px;
  padding: 1.3rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 20px 50px -15px rgba(32, 27, 23, 0.5);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner { animation: banner-in 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes banner-in {
  from { opacity: 0; transform: translateY(18px); }
}
.cookie-banner p { flex: 1 1 260px; font-size: 0.88rem; color: #cbc3b8; margin: 0; }
.cookie-banner a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner__actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.cookie-banner .btn--ghost { color: var(--paper); border-color: rgba(250, 246, 240, 0.4); }
@media (hover: hover) { .cookie-banner .btn--ghost:hover { background: var(--paper); color: var(--ink); } }

/* ---------- páginas legales ---------- */
.legal { max-width: 42rem; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: 0.6rem; }
.legal__updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2.5rem; font-style: italic; }
.legal h2 { font-size: 1.25rem; margin-top: 2.2rem; margin-bottom: 0.7rem; }
.legal p { color: var(--muted); margin-bottom: 0.4rem; }
.legal a { color: var(--accent); }
.legal code {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.9em;
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .browser__caret, .demo-obj, .cookie-banner { animation: none !important; }
  .swash path { stroke-dashoffset: 0; animation: none !important; }
  .interests li { opacity: 1; animation: none !important; }
  .hero__statement .w { opacity: 1; transform: none; animation: none !important; }
  .work__shot img { transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 440px; margin: 0 auto; width: 100%; }
  /* en pantallas estrechas el brillo se ciñe para no generar scroll lateral */
  .hero__visual::before { inset: -40px -14px; }
}

@media (max-width: 820px) {
  .zona { grid-template-columns: 1fr; }
  .work { grid-template-columns: 1fr; gap: 1.6rem; }
  .work:nth-child(even) .work__frame { order: 0; }
}

@media (max-width: 640px) {
  /* en pantallas estrechas reparte las palabras para que no quede un "no." suelto */
  .hero__statement { text-wrap: balance; }
  .nav__burger { display: block; }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -22px rgba(32, 27, 23, 0.35);
  }
  .nav.is-open .nav__links { display: flex; }
  /* scrim tras el panel: sin él, el box-shadow del panel cae directo sobre
     el titular del hero y se ve como una mancha en vez de profundidad */
  .nav.is-open::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 100vh;
    background: rgba(32, 27, 23, 0.25);
    pointer-events: none;
  }
  .nav__links a {
    padding: 0.95rem clamp(1.2rem, 5vw, 4rem);
    border-top: 1px solid var(--line);
    font-size: 1.05rem;
    color: var(--ink);
  }
  .hero__ctas .btn, .contact__ctas .btn { width: 100%; text-align: center; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner__actions .btn { flex: 1; text-align: center; }
  /* el mapa ocupa todo el ancho de la pantalla para que se lean los nombres:
     la tarjeta se sale del margen de la seccion y el mapa del de la tarjeta */
  .zona {
    padding: 2rem 1.3rem;
    margin: 0 calc(-1 * clamp(1.2rem, 5vw, 4rem));
    border-radius: 0;
  }
  .zona__map { margin: 0 -1.3rem; }
  /* a este tamaño solo caben los nombres principales (los demas quedan como punto) */
  .vbmap__town--minor text { display: none; }
  .vbmap__town--main text { font-size: 14.5px; }
  .vbmap__note { font-size: 12.5px; }
  .vbmap__river-label { font-size: 12px; }

  /* footer: una sola columna centrada, el menú entre dos líneas finas */
  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.4rem;
    padding-top: 2.8rem;
    padding-bottom: 1.3rem;
  }
  .footer__logo { font-size: 1.7rem; margin-bottom: 0.4rem; }
  .footer__brand p { text-wrap: balance; }
  .footer__side { align-items: center; gap: 1.3rem; width: 100%; }
  .footer__mail { font-size: 1.2rem; }
  .footer__nav {
    width: 100%;
    justify-content: center;
    gap: 0.4rem clamp(0.9rem, 4.5vw, 1.5rem);
    padding-top: 1.3rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    /* la línea de arriba con el mismo margen que la del menú */
    margin: 0 clamp(1.2rem, 5vw, 4rem);
    padding: 1.3rem 0 2rem;
    text-align: center;
  }
  .footer__legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.35rem 0.55rem; }
  .footer__legal a, .footer__legal .link-button { text-decoration: none; }
  .footer__sep { color: var(--muted); opacity: 0.45; }
  /* "Configurar cookies" en su propia línea, sin punto delante */
  .footer__legal .footer__sep:has(+ .link-button) { display: none; }
  .footer__legal .link-button { flex-basis: 100%; }
  .footer__top {
    padding: 0.55rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
  }
}
