/* ==========================================================================
   ISABEL POVEDA — REDISEÑO EDITORIAL
   Una tinta propia (vino) sobre papel cálido. Las marcas solo aparecen
   en sus propias piezas. Sin tarjetas: el aire lo da el espacio vertical.
   ========================================================================== */

:root {
  --hand: 'Caveat', 'Segoe Print', cursive;
  --grain: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --paper: #FFFFFF;
  --paper-2: #F7F4F1;
  --ink: #1C1815;
  --ink-soft: #5B534C;
  --ink-mute: #8A8078;
  --line: #E7E1DA;
  --accent: #7A1E2C;
  --accent-soft: #F6ECEA;
  --dark: #1C1815;
  --on-dark: #F3EDE4;
  --on-dark-soft: #B7ADA2;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;

  --gutter: 20px;
  --max: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em { font-style: italic; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* ---------- Tipografía base ---------- */

.kicker {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}

.h2, .h3, .hero-title, .poster, .contact-title, .case-client {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; color: var(--ink);
  font-optical-sizing: auto;
}
.h2 em, .h3 em, .hero-title em, .poster em, .contact-title em { color: var(--accent); font-weight: 300; }

.h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.1; }
.h3 { font-size: clamp(24px, 3vw, 36px); line-height: 1.15; }

.body { color: var(--ink-soft); }
.body + .body { margin-top: 0.9em; }
.body strong { color: var(--ink); font-weight: 500; }
.body-lg { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-soft); }
.body-lg em { color: var(--ink); }
.narrow { max-width: 640px; }

.label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.label .ico { color: var(--accent); width: 20px; height: 20px; }

/* Encabezado de sección: rótulo + línea fina */
.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.sec-head .rule { flex: 1; height: 1px; background: var(--line); }
.sec-head .count { font-size: 13px; color: var(--ink-mute); }
.sec-head.on-dark .kicker { color: #E7A9A6; }
.sec-head.on-dark .rule { background: rgba(243, 237, 228, 0.18); }

.block-head { margin: 96px 0 32px; }
.block-head .kicker { margin-bottom: 12px; }

/* ---------- Botones y enlaces ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 500; font-size: 16px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--accent); transform: translateY(-2px); }

.link-line {
  font-weight: 500; background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: 2px; transition: background-size 0.3s var(--ease), color 0.3s;
}
.link-line:hover { color: var(--accent); background-size: 30% 1px; }

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

.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--serif); font-size: 21px; letter-spacing: -0.01em; display: inline-flex; align-items: flex-start; }
.logo-ast { width: 11px; height: 11px; color: var(--accent); margin-left: 2px; margin-top: 2px; }
.top-nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top-nav a:not(.top-cta) { color: var(--ink-soft); transition: color 0.2s; }
.top-nav a:not(.top-cta):hover { color: var(--accent); }
.top-cta { padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; transition: all 0.25s; }
.top-cta:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 520px) {
  .top-nav a[href="#sobre-mi"] { display: none; }
}

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

.hero { padding: 56px 0 0; }
.hero-grid { display: grid; gap: 40px; }
.hero-text .kicker { margin-bottom: 24px; }
.hero-title { font-size: clamp(38px, 6.2vw, 80px); line-height: 1.04; text-wrap: balance; }
.hero-title em { display: block; margin-top: 0.12em; }
.hero-lead { margin-top: 28px; font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-soft); max-width: 520px; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 36px; flex-wrap: wrap; }

.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; }
.hero-photo img {
  padding: 10px 10px 34px; background: #FFFDF9; transform: rotate(1.6deg);
  box-shadow: 0 1px 2px rgba(28, 24, 21, 0.08), 0 18px 40px -18px rgba(28, 24, 21, 0.35);
}

.brands {
  display: flex; flex-wrap: wrap; gap: 10px 0; margin-top: 72px; padding: 22px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(17px, 1.8vw, 22px); color: var(--ink-soft);
}
.brands li { display: inline-flex; align-items: center; }
.brands li:not(:last-child)::after {
  content: "✳"; font-size: 0.6em; color: var(--accent); margin: 0 0.9em;
}

@media (min-width: 900px) {
  .hero { padding-top: 96px; }
  .hero-grid { grid-template-columns: 1.55fr 1fr; gap: 72px; align-items: end; }
}
@media (max-width: 899px) {
  .hero-photo { max-width: 70%; margin: 20px 30px 0 auto; }
  .hero-photo img { box-shadow: 0 1px 2px rgba(28, 24, 21, 0.08), 0 18px 40px -18px rgba(28, 24, 21, 0.35), 22px -22px 0 0 var(--accent); }
}

/* ---------- Índice de trabajo ---------- */

.work { padding: 120px 0 40px; }
.index { display: grid; gap: 64px; }
.tile { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 6px; }
.tile-img { grid-column: 1 / -1; overflow: hidden; margin: 0 calc(var(--gutter) * -1) 18px; }
.tile-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.9s var(--ease); }
.tile:hover .tile-img img { transform: scale(1.04); }
.tile-num {
  grid-row: span 3; font-family: var(--serif); font-weight: 300; font-size: 56px; line-height: 0.9;
  color: var(--accent);
}
.tile-client { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.tile-line { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -0.01em; }
.tile-tags { font-size: 14px; color: var(--ink-mute); }
.tile:hover .tile-line { color: var(--accent); }

@media (min-width: 760px) {
  .index { grid-template-columns: 1fr 1fr; column-gap: 48px; row-gap: 88px; }
  .index li:nth-child(even) { margin-top: 120px; }
  .tile-img { margin-inline: 0; }
}

/* ---------- Caso ---------- */

.case { padding-top: 140px; }

.case-head { display: flex; align-items: flex-end; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.case-num {
  font-variation-settings: 'opsz' 72;
  font-family: var(--serif); font-weight: 300; font-size: clamp(110px, 18vw, 240px); line-height: 0.72;
  color: var(--accent); letter-spacing: -0.04em;
}
.case-client { font-size: clamp(32px, 4.4vw, 56px); line-height: 1; }
.case-sub { margin-top: 8px; color: var(--ink-mute); font-size: 15px; }

.ficha { display: grid; gap: 0; margin-top: 8px; }
.ficha div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ficha dt { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); padding-top: 3px; }
.ficha dd { font-size: 16px; }
@media (min-width: 760px) {
  .ficha { grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .ficha div { grid-template-columns: 1fr; gap: 6px; }
}

.poster { font-variation-settings: 'opsz' 72; font-size: clamp(42px, 7.4vw, 104px); line-height: 1; margin: 72px 0 56px; text-wrap: balance; }
.poster-sm { font-size: clamp(38px, 6.4vw, 88px); margin: 0 0 32px; }

.bleed { margin: 0; }
.bleed img { width: 100%; aspect-ratio: 16 / 9; max-height: 82vh; object-fit: cover; }
@media (min-width: 760px) {
  .bleed { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
}

.two-col { display: grid; gap: 56px; margin-top: 72px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 80px; } }

/* Titulares en banda oscura */
.band-dark { background: var(--dark); color: var(--on-dark); margin-top: 120px; padding: 88px 0 72px; }
.headlines { display: grid; }
.headlines li { padding: 36px 0 40px; border-top: 1px solid rgba(243, 237, 228, 0.16); }
.headlines li:first-child { border-top: 0; padding-top: 0; }
.hl-tag {
  display: inline-flex; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--on-dark-soft); margin-bottom: 16px;
}
.headlines blockquote {
  font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4.2vw, 50px);
  line-height: 1.12; letter-spacing: -0.02em; color: var(--on-dark);
}
.headlines blockquote em { color: #E7A9A6; font-weight: 300; }
.headlines p { margin-top: 16px; color: var(--on-dark-soft); max-width: 560px; font-size: 16px; }
@media (min-width: 900px) {
  .headlines li { display: grid; grid-template-columns: 180px 1fr; column-gap: 40px; }
  .headlines li p { grid-column: 2; }
  .hl-tag { padding-top: 14px; }
}

/* Carril de piezas: desliza en móvil, cuadrícula en escritorio */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 12px;
  scroll-padding-inline: var(--gutter); scrollbar-width: none; outline: none;
}
.rail::-webkit-scrollbar { display: none; }
.piece { scroll-snap-align: start; }
.piece img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--paper-2); }
.rail-tall .piece img { aspect-ratio: 4 / 5; object-fit: contain; padding: 18px; }
.piece figcaption { display: grid; gap: 8px; padding-top: 18px; }
.piece .fmt { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.piece .fmt .ico { width: 20px; height: 20px; }
.piece strong { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.25; }
.piece span:not(.fmt) { color: var(--ink-soft); font-size: 15px; }

@media (min-width: 760px) {
  .rail {
    grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px 32px;
    overflow: visible; max-width: var(--max); margin-inline: auto;
  }
}

/* Comercial */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; margin-inline: calc(var(--gutter) * -1); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; }
.video-play img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; transition: opacity 0.3s; }
.video-play:hover img { opacity: 1; }
.play-dot {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--paper); color: var(--accent);
  display: grid; place-items: center; transition: transform 0.3s var(--ease);
}
.play-dot svg { width: 30px; height: 30px; margin-left: 4px; }
.video-play:hover .play-dot { transform: translate(-50%, -50%) scale(1.08); }
.video-alt { margin-top: 12px; font-size: 14px; color: var(--ink-mute); }
@media (min-width: 760px) { .video { margin-inline: 0; } }

.script-hook {
  font-family: var(--serif); font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -0.015em;
  margin: 64px 0 48px; max-width: 900px;
}
.script-hook em { color: var(--accent); font-weight: 300; }

.timeline { display: grid; position: relative; }
.timeline li { position: relative; padding: 0 0 36px 28px; border-left: 1px solid var(--line); }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline .tc { display: block; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-mute); margin-bottom: 4px; }
.timeline strong { font-family: var(--serif); font-weight: 400; font-size: 23px; }
.timeline p { margin-top: 6px; color: var(--ink-soft); font-size: 16px; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 40px; border-top: 1px solid var(--line); }
  .timeline li { border-left: 0; padding: 32px 0 0; }
  .timeline li::before { left: 0; top: -5px; }
}

/* Sub-caso */
.subcase { margin-top: 140px; padding: 96px 0; background: var(--paper-2); }
.subcase .rail { margin-top: 56px; }
.mini-lines { margin-top: 56px; display: grid; gap: 0; }
.mini-lines li {
  font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 24px); line-height: 1.35;
  padding: 18px 0; border-top: 1px solid var(--line);
}

.next-case {
  display: grid; gap: 10px; margin-top: 96px; padding-top: 28px; border-top: 1px solid var(--ink);
}
.next-name { display: flex; align-items: baseline; gap: 16px; font-family: var(--serif); font-size: clamp(34px, 5vw, 64px); line-height: 1; }
.next-num { font-weight: 300; color: var(--accent); }
.next-name .ico { width: 0.6em; height: 0.6em; color: var(--accent); transition: transform 0.3s var(--ease); }
.next-case:hover .ico { transform: translateX(8px); }

/* ---------- Piezas añadidas para Palatino, Casa Cuatro y Casavita ---------- */

.poster-md { font-size: clamp(34px, 5.4vw, 76px); line-height: 1.04; }

.band-soft { background: var(--paper-2); margin-top: 120px; padding: 88px 0 96px; }

/* Campaña: pieza + texto; en escritorio lado a lado, alternando */
.campaign { display: grid; gap: 32px; padding: 0 0 72px; }
.campaign + .campaign { padding-top: 72px; border-top: 1px solid var(--line); }
.campaign-text .kicker { margin-bottom: 14px; }
.campaign-text .h3 { margin-bottom: 24px; }
.mini-ficha div { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.mini-ficha dt { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
.mini-ficha dd { color: var(--ink-soft); }
.campaign-copy {
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--ink);
  font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; letter-spacing: -0.01em;
}
.campaign-copy em { color: var(--accent); font-weight: 300; }
.campaign-media img { width: 100%; }
.campaign-wide .campaign-media { margin-inline: calc(var(--gutter) * -1); }
@media (min-width: 600px) { .mini-ficha div { grid-template-columns: 96px 1fr; gap: 16px; } }
@media (min-width: 900px) {
  .campaign { grid-template-columns: 5fr 7fr; gap: 72px; align-items: center; }
  .campaign-flip .campaign-media { order: 2; }
  .campaign-wide { grid-template-columns: 1fr; gap: 40px; }
  .campaign-wide .campaign-media { order: 0 !important; margin-inline: 0; }
  .campaign-wide .campaign-text { display: grid; grid-template-columns: 5fr 7fr; column-gap: 72px; }
  .campaign-wide .campaign-text > .kicker, .campaign-wide .campaign-text > .h3 { grid-column: 1; }
  .campaign-wide .mini-ficha { grid-column: 1; }
  .campaign-wide .campaign-copy { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; align-self: start; }
}

/* Reel vertical incrustado */
.reel {
  position: relative; aspect-ratio: 9 / 16; width: 100%; max-width: 340px; margin-inline: auto;
  background: var(--dark); overflow: hidden;
}
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-link { display: inline-block; justify-self: start; width: fit-content; margin-top: 14px; font-size: 14px; color: var(--ink-mute); }
.campaign-media .media-link { display: block; width: fit-content; margin-inline: auto; }

.rail-reels { grid-auto-columns: 72%; }
.rail-reels .reel { max-width: none; }
@media (min-width: 760px) {
  .rail-reels { grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: 48px; }
}
.rail-reels + .wrap .timeline { margin-top: 72px; }

/* Feed de Instagram */
.feed { margin: 0 calc(var(--gutter) * -1); }
.feed img { width: 100%; }
@media (min-width: 760px) { .feed { margin: 0 auto; max-width: 820px; } }

/* Rótulos con ícono en la banda oscura */
.hl-tag { gap: 8px; align-items: center; }
.hl-tag .ico { width: 18px; height: 18px; color: #E7A9A6; }

/* Manifiesto: reel + frases */
.manifesto { display: grid; gap: 56px; }
.manifesto-reel figcaption { display: grid; gap: 8px; padding-top: 18px; max-width: 340px; margin-inline: auto; }
.manifesto-reel .fmt { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #E7A9A6; }
.manifesto-reel strong { font-family: var(--serif); font-weight: 400; font-size: 21px; }
.manifesto-reel .media-link { color: var(--on-dark-soft); }
@media (min-width: 900px) {
  .manifesto { grid-template-columns: 300px 1fr; gap: 72px; align-items: start; }
  .manifesto .headlines li { grid-template-columns: 1fr; }
  .manifesto .headlines li p { grid-column: 1; }
}

.case .next-case { margin-bottom: 0; }

/* ---------- Sobre mí ---------- */

.about { padding: 140px 0; }
.about-grid { display: grid; gap: 64px; }
.about-intro .kicker, .about-text > .kicker { margin-bottom: 20px; }
.about-intro .body-lg { margin-top: 24px; }
.learned li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line); color: var(--ink-soft); }
.learned span { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
@media (min-width: 600px) { .learned li { grid-template-columns: 140px 1fr; gap: 24px; } }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 88px; align-items: start; }
  .about-text { padding-top: 6px; }
}

/* ---------- Contacto ---------- */

.contact { background: var(--accent); color: var(--paper); padding: 112px 0 96px; }
.contact-ast { width: 40px; height: 40px; color: #F0B9B4; margin-bottom: 32px; }
.contact-title { color: var(--paper); font-size: clamp(40px, 6.4vw, 84px); line-height: 1.02; max-width: 980px; }
.contact-title em { color: #F0B9B4; }
.contact-list { margin-top: 64px; border-top: 1px solid rgba(246, 241, 233, 0.3); }
.contact-list a, .contact-list button {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "i k a" "i v a";
  align-items: center; column-gap: 16px; row-gap: 2px; width: 100%; text-align: left;
  padding: 22px 0; border-bottom: 1px solid rgba(246, 241, 233, 0.3); transition: padding 0.3s var(--ease);
}
.contact-list .ico { grid-area: i; width: 26px; height: 26px; }
.c-k { grid-area: k; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #F0B9B4; }
.c-v { grid-area: v; font-family: var(--serif); font-size: clamp(19px, 2.6vw, 30px); line-height: 1.2; overflow-wrap: anywhere; }
.contact-list .c-arrow { grid-area: a; width: 22px; height: 22px; }
.c-k span { font-weight: 500; letter-spacing: 0.04em; text-transform: none; opacity: 0.8; }
.contact-list a:hover, .contact-list button:hover { padding-left: 10px; }

.foot { background: var(--accent); color: rgba(246, 241, 233, 0.7); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 28px; border-top: 1px solid rgba(246, 241, 233, 0.18); }

/* ---------- Aparición suave al hacer scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (min-width: 900px) {
  :root { --gutter: 40px; }
  body { font-size: 18px; }
}

/* ==========================================================================
   LA MANO DE ISABEL: trazos, notas, íconos grandes y movimiento
   ========================================================================== */

/* sin textura: sobre blanco se ve sucia */

/* Barra de lectura */
.progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* Cifras del inicio */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 560px; }
.stat-n { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 5.4vw, 72px); line-height: 0.95; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-l { display: block; margin-top: 8px; font-size: 13px; line-height: 1.35; color: var(--ink-mute); }

/* Trazos a mano: JS los dibuja con la medida real de cada palabra */
.hand { position: relative; display: inline-block; white-space: nowrap; }
.hand-svg { position: absolute; pointer-events: none; overflow: visible; }
.hand-svg path { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.hand-strike .hand-svg path { stroke: var(--accent); stroke-width: 2.2; }
.in .hand-svg path, .hero.in .hand-svg path { transition: stroke-dashoffset 1.1s cubic-bezier(.6,.1,.3,1) .5s; stroke-dashoffset: 0; }
.hand-svg.now path { transition: none !important; }

/* Notas manuscritas al margen */
.note {
  font-family: var(--hand); font-weight: 500; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.1;
  color: var(--accent); display: flex; align-items: flex-end; gap: 2px; width: fit-content; max-width: 100%;
  rotate: -1.5deg; transform-origin: 0 50%;
}
/* Nota bajo una frase grande: pegada a ella, alineada a su borde izquierdo */
.note-right { margin: -30px 0 56px 4px; }
.poster-sm + .note-right { margin-top: -6px; }
.hand-circle { margin: 0 0.16em 0 0.1em; }
.note-left { margin: 48px 0 -30px 0; align-items: flex-start; gap: 6px; }
.note-left .note-arrow { width: 36px; height: 36px; margin-top: 12px; }
.note-arrow { width: 40px; height: 28px; flex: none; overflow: visible; }
@media (min-width: 760px) { .note-right { white-space: nowrap; } }
.note-arrow path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 0.9s ease 0.4s; }
.in .note-arrow path, .note.in .note-arrow path, .hero.in .note-arrow path { stroke-dashoffset: 0; }
.note-photo { z-index: 1; position: absolute; left: 18px; bottom: -44px; rotate: -4deg; align-items: flex-end; gap: 4px; }
.note-photo .note-arrow { width: 36px; height: 36px; margin-bottom: 10px; }
@media (max-width: 899px) {
  .note-photo { left: 12px; bottom: -42px; }
}
@media (min-width: 900px) { .note-right { margin-right: 6%; } }

/* Íconos grandes dentro de un círculo trazado a mano */
.ring { position: relative; display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; color: var(--accent); }
.ring .ico { width: 26px; height: 26px; }
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-svg { transform: rotate(-90deg); }
.ring-svg circle { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: butt; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.in .ring-svg circle { transition: stroke-dashoffset 1.1s ease 0.2s; stroke-dashoffset: 0; }
.ring-lg { width: 64px; height: 64px; }
.ring-lg .ico { width: 30px; height: 30px; }
.label { gap: 14px; font-size: 13px; }
.label .ring .ico { width: 26px; height: 26px; }

/* Íconos más presentes en piezas y rótulos */
.piece .fmt .ico, .manifesto-reel .fmt .ico { width: 26px; height: 26px; }
.block-head .kicker .ico { width: 24px; height: 24px; }
.hl-tag .ico { width: 22px; height: 22px; }

/* Los íconos se trazan solos al aparecer */
.js .reveal .ico { stroke-dasharray: 90; stroke-dashoffset: 90; transition: stroke-dashoffset 1.4s ease 0.3s; }
.js .reveal.in .ico { stroke-dashoffset: 0; }

/* Sobre mí: sectores con ícono grande */
.learned li { grid-template-columns: 64px 1fr; column-gap: 20px; align-items: start; padding: 22px 0; }
.learned .ring { grid-row: span 2; }
.learned-k { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); padding-top: 8px; }
@media (min-width: 600px) { .learned li { grid-template-columns: 64px 1fr; gap: 4px 20px; } }

/* Viñetas dibujadas en las frases sueltas */
.mini-lines li { position: relative; padding-left: 44px; }
.mini-lines li::before {
  content: ""; position: absolute; left: 0; top: 24px; width: 28px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 16' fill='none' stroke='%237A1E2C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9c7-3 14-2 22-1'/%3E%3Cpath d='M19 3l6 5-6 5'/%3E%3C/svg%3E") no-repeat;
}

/* Firma */
.sign { grid-column: 1 / -1; text-align: center; margin-top: 24px; }
.firma { display: block; width: min(520px, 92%); margin: 0 auto; overflow: visible; }
.firma text { font-family: var(--hand); font-weight: 600; font-size: 72px; fill: transparent; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2200; stroke-dashoffset: 2200; }
.firma.in text { transition: stroke-dashoffset 1.1s ease, fill 0.45s ease 0.55s; stroke-dashoffset: 0; fill: var(--accent); }

/* Números de caso que se dibujan */
.case-num { width: clamp(128px, 21vw, 280px); height: auto; flex: none; overflow: visible; }
.case-num text { font-family: var(--serif); font-weight: 400; font-size: 196px; font-variation-settings: 'opsz' 72; fill: var(--accent); opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s var(--ease); }
.case-head.in .case-num text { opacity: 1; transform: none; }

/* Franja de frases en movimiento */
.ticker { background: var(--accent); color: var(--paper); padding: 26px 0; margin-top: 88px; overflow: hidden; }
.ticker-track { display: flex; align-items: center; width: max-content; animation: tick 70s linear infinite; }
.ticker-track span { font-family: var(--serif); font-size: clamp(30px, 4.4vw, 58px); letter-spacing: -0.02em; white-space: nowrap; padding: 0 0.5em; }
.ticker-track em { color: #F0B9B4; font-weight: 300; }
.tick-ast { width: 26px; height: 26px; flex: none; color: #F0B9B4; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
.work { padding-top: 104px; }

/* Las imágenes aparecen de inmediato, sin cortina ni retraso */

/* Línea de tiempo que se traza */
@media (min-width: 900px) {
  .timeline { border-top: 0; }
  .timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.6s cubic-bezier(.6,.1,.3,1); }
  .timeline.in::before { transform: scaleX(1); }
}

/* Comillas grandes en las franjas oscuras */
.band-dark { position: relative; overflow: hidden; }
.band-dark::before {
  content: "“"; position: absolute; right: 0.04em; top: 0.02em; font-family: var(--serif); font-weight: 300;
  font-size: clamp(200px, 26vw, 380px); line-height: 0.8; color: var(--accent); opacity: 0.75; pointer-events: none;
}
.band-dark .wrap { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .hand-svg path, .note-arrow path, .ring-svg circle, .js .reveal .ico { stroke-dashoffset: 0 !important; transition: none !important; }
  .case-num text { opacity: 1; transform: none; transition: none; }
  .firma text { stroke-dashoffset: 0; fill: var(--accent); transition: none; }
  .js .wipe img { clip-path: none; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .timeline::before { transform: none; }
}

/* ==========================================================================
   PRIMERA SECCIÓN: cabe entera en una pantalla
   ========================================================================== */
.hero { padding-top: 40px; }
.hero-title { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.06; }
.hero-lead { margin-top: 22px; }
.hero-actions { margin-top: 28px; }
.stats { margin-top: 36px; padding-top: 18px; }
.stat-n { font-size: clamp(38px, 3.8vw, 54px); }
.hero-photo { isolation: isolate; }
/* Bloque de color del mismo tamaño que la foto, corrido hacia arriba y a la derecha */
.hero-photo img {
  box-shadow: 0 1px 2px rgba(28, 24, 21, 0.08), 0 18px 40px -18px rgba(28, 24, 21, 0.35), 34px -34px 0 0 var(--accent);
}
.brands { margin-top: 56px; }
@media (min-width: 900px) {
  .hero { min-height: calc(100svh - 64px); display: flex; flex-direction: column; justify-content: center; padding: 32px 0 40px; }
  .hero-grid { align-items: center; grid-template-columns: 1.35fr 1fr; gap: 64px; }
  .hero-photo { max-width: 420px; justify-self: end; }
  .hero-photo img { max-height: 64svh; width: auto; margin-left: auto; }
  .brands { margin-top: 48px; }
}

/* ==========================================================================
   QUÉ HAGO: una vez, en color, íconos grandes
   ========================================================================== */
.what { background: var(--dark); background-image: var(--grain); color: var(--on-dark); padding: 96px 0 104px; }
.kicker.on-color { color: #E7A9A6; }
.what-title { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; margin-top: 18px; max-width: 820px; text-wrap: balance; }
.what-title em { color: #E7A9A6; font-weight: 300; }
.what-list { display: grid; gap: 0; margin-top: 56px; }
.what-list li { position: relative; display: grid; grid-template-columns: 80px 1fr; column-gap: 20px; row-gap: 4px; align-items: center; padding: 26px 0; border-top: 1px solid rgba(243, 237, 228, 0.16); }
.what-list .ring { grid-row: span 2; color: #E7A9A6; }
.what-list strong { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.1; align-self: end; }
.what-list li > span:last-child { color: var(--on-dark-soft); font-size: 16px; align-self: start; }
.what-n { position: absolute; right: 0; top: 24px; font-size: 13px; letter-spacing: 0.14em; color: var(--on-dark-soft); }
.ring-xl { width: 80px; height: 80px; }
.ring-xl .ico { width: 36px; height: 36px; }
@media (min-width: 900px) {
  .what-list { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .what-list li { grid-template-columns: 1fr; row-gap: 14px; padding: 32px 0 0; align-items: start; align-content: start; }
  .what-list .ring { grid-row: auto; margin-bottom: 10px; }
  .what-list strong { align-self: start; }
}

/* ==========================================================================
   RETO → IDEA: panel de color con viñetas grandes
   ========================================================================== */
.brief {
  display: grid; gap: 22px; margin-top: 72px; padding: 36px 24px 32px;
  background: var(--accent-soft); color: var(--ink);
  margin-inline: calc(var(--gutter) * -1);
}
.brief-k { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.brief-t { font-family: var(--serif); font-size: clamp(22px, 2vw, 26px); line-height: 1.25; color: var(--ink-soft); }
.brief-big { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; color: var(--ink); letter-spacing: -0.015em; }
.brief-big em { color: var(--accent); }
.brief-arrow { width: 44px; height: 18px; color: var(--accent); transform: rotate(90deg); }
.brief-arrow path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brief-list { display: grid; gap: 14px; padding-top: 22px; border-top: 1px solid rgba(122, 30, 44, 0.2); }
.brief-list li { display: flex; align-items: center; gap: 16px; font-size: 17px; font-weight: 500; }
.brief-list .ring { background: var(--paper); border-radius: 50%; }
@media (min-width: 900px) {
  .brief { grid-template-columns: 1fr 60px 1.3fr; align-items: center; column-gap: 32px; padding: 56px 56px 48px; margin-inline: 0; }
  .brief-arrow { transform: none; width: 60px; height: 24px; }
  .brief-list { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; padding-top: 32px; }
}

/* Las imágenes, reels y videos se ven de inmediato; solo el texto aparece con movimiento */
.js .reveal:has(img), .js .reveal:has(iframe), .js .reveal:has(.video-play) { opacity: 1; transform: none; transition: none; }

.sign-sub { margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); }
.sign::before { content: ""; display: block; width: 48px; height: 1px; background: var(--line); margin: 0 auto 36px; }

/* Cierre */
.contact-sub { margin-top: 24px; max-width: 560px; font-size: clamp(18px, 1.6vw, 21px); color: rgba(255, 255, 255, 0.78); }

/* Primera sección en celular: foto arriba, luego el texto */
@media (max-width: 899px) {
  .hero { padding-top: 28px; }
  .hero-grid { gap: 36px; }
  .hero-photo { order: -1; max-width: 64%; margin: 28px auto 34px 12px; }
  .hero-text .kicker { margin-bottom: 16px; }
  .stats { margin-top: 32px; }
}

/* Encabezado de caso en celular: número y nombre en proporción, nombre en una línea */
@media (max-width: 599px) {
  .case-head { gap: 16px; align-items: center; }
  .case-num { width: 104px; }
  .case-client { font-size: 30px; }
  .case-sub { font-size: 14px; }
}

/* ==========================================================================
   MARCAS: logos centrados, en un tono uniforme; su color al pasar el mouse
   ========================================================================== */
.clients { margin-top: 64px; padding: 40px 0 8px; border-top: 1px solid var(--line); text-align: center; }
.clients-k { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); }
.clients-k::before, .clients-k::after { content: ""; width: 32px; height: 1px; background: var(--line); }
.clients-list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 36px 56px; margin-top: 36px; }
.clients-list li { display: flex; align-items: center; justify-content: center; }
.clients-list img {
  width: auto; filter: grayscale(1) brightness(0); opacity: 0.55;
  transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s var(--ease);
}
.clients-list li:hover img { filter: none; opacity: 1; transform: translateY(-2px); }
/* Alturas ajustadas a ojo para que todos pesen lo mismo */
.logo-banco-popular img { height: 44px; }
.logo-grupo-aval img { height: 40px; }
.logo-palatino img { height: 34px; }
.logo-casa-cuatro img { height: 50px; }
.logo-casavita img { height: 52px; }
.logo-magnetica img { height: 42px; }
@media (max-width: 599px) {
  .clients { margin-top: 48px; padding-top: 32px; }
  .clients-k { letter-spacing: 0.12em; gap: 10px; }
  .clients-k::before, .clients-k::after { width: 16px; }
  .clients-list { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .logo-banco-popular img { height: 36px; }
  .logo-grupo-aval img { height: 32px; }
  .logo-palatino img { height: 26px; }
  .logo-casa-cuatro img { height: 42px; }
  .logo-casavita img { height: 44px; }
  .logo-magnetica img { height: 32px; }
}
/* Seis logos: una sola fila en escritorio, repartidos a lo ancho */
@media (min-width: 900px) {
  .clients-list { flex-wrap: nowrap; justify-content: space-between; gap: 32px; max-width: 1060px; margin-inline: auto; }
  .logo-banco-popular img { height: 40px; }
  .logo-grupo-aval img { height: 36px; }
  .logo-magnetica img { height: 36px; }
  .logo-palatino img { height: 30px; }
  .logo-casa-cuatro img { height: 46px; }
  .logo-casavita img { height: 48px; }
}

/* Contacto sin titular: solo los datos */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contact { padding: 72px 0 64px; }
.contact-list { margin-top: 0; }

/* Celular: foto, bloque de color y nota centrados.
   El bloque de color sobresale 22px a la derecha, así que la foto se corre 11px
   a la izquierda para que el conjunto quede centrado a la vista. */
@media (max-width: 899px) {
  .hero-photo { margin: 36px auto 44px; translate: -11px 0; }
  .note-photo { left: 50%; right: auto; bottom: -46px; translate: calc(-50% + 11px) 0; white-space: nowrap; }
}

/* Celulares angostos: la cabecera solo con nombre y Contacto, sin apretarse */
@media (max-width: 380px) {
  .top-nav a[href="#trabajo"] { display: none; }
}
