@font-face{font-family:Grenadine;src:url('assets/fonts/Grenadine_MVB_Regular.otf')}@font-face{font-family:Grenadine;src:url('assets/fonts/Grenadine_MVB_Medium.otf');font-weight:500}@font-face{font-family:Grenadine;src:url('assets/fonts/Grenadine_MVB_Bold.otf');font-weight:700}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Grenadine,Arial,sans-serif;color:#151b1b}body{background:#fff url('assets/bg-papel-seamless.webp') center top/100% auto repeat-y}.topbar{height:130px;border-bottom:1px solid #ddd;display:grid;grid-template-columns:1fr 1fr 120px 1fr 1fr;align-items:center;padding:0 10.5vw;font-size:18px}.topbar a{color:#151b1b;text-decoration:none;white-space:nowrap}.topbar a:hover{font-weight:700}.home-mark{font-size:54px;text-align:center;color:#62f4f4;font-weight:700;line-height:1}.page{height:calc(100vh - 130px);overflow:hidden;padding:48px 8.5vw 32px}.intro-row{display:flex;align-items:center;gap:38px;max-width:1200px;margin:0 auto 46px}.shape{width:160px;height:150px;flex:none;display:grid;place-items:center;font-size:120px;font-weight:700;line-height:1}.shape.purple{color:#aa8bd0;-webkit-text-stroke:14px #151b1b}.shape.green{color:#61efba;-webkit-text-stroke:14px #151b1b}.shape.orange{color:#ffab46;-webkit-text-stroke:14px #151b1b}.intro-copy{flex:1}.title{font-size:72px;line-height:.9;font-weight:500;margin:0 0 18px;display:inline-block;padding:0 16px 7px}.title.green{background:#66ffcc}.title.purple{background:#ae95d1}.title.orange{background:#ff9933}.intro-copy p{font-size:23px;line-height:1.18;margin:0;max-width:900px}.cards-wrap{position:relative;max-width:1420px;margin:0 auto}.cards{display:flex;gap:36px;align-items:stretch;justify-content:center}.card{background:#fff;width:245px;padding:16px 16px 20px;box-shadow:7px 8px 7px #0005;flex:none;text-align:center}.card img{width:100%;aspect-ratio:1/1;object-fit:cover}.card p{margin:12px 0 0;font-size:14px;line-height:1.2}.arrow{position:absolute;top:42%;font-size:72px;color:#555;cursor:pointer;user-select:none}.arrow.left{left:-60px}.arrow.right{right:-60px}.services{display:grid;grid-template-columns:1fr 1fr;gap:25px 110px;max-width:1350px;margin:0 auto}.service{font-size:42px;line-height:1.15}.service:before{content:'';display:inline-block;width:55px;height:27px;background:#aa8bd0;margin-right:14px}.service small{display:block;font-size:24px;line-height:1.25;margin:4px 0 20px 70px;max-width:570px}.contact-head{display:flex;align-items:flex-start;gap:45px;max-width:1160px;margin:0 auto 40px}.contact-symbol{font-size:145px;color:#63eff2;font-weight:700}.contact-title{font-size:70px;line-height:1.05;font-weight:700;margin:0}.highlight{background:#63eff2;padding:0 10px}.form{max-width:1160px;margin:auto;display:grid;grid-template-columns:110px 1fr 90px 1fr;gap:26px 20px;align-items:center;font-size:24px}.form input,.form textarea{border:0;background:#fff;box-shadow:7px 8px 8px #0005;padding:20px;font:inherit}.form textarea{grid-column:2/5;height:205px;resize:none}.send{grid-column:4;background:#63eff2;border:7px solid #151b1b;border-radius:28px;font:700 28px Grenadine;padding:12px 55px;justify-self:end;margin-top:-65px;z-index:2}.creative .intro-row{margin-bottom:70px}.creative .cards{gap:36px}
@media(max-width:900px){.topbar{height:auto;min-height:90px;padding:18px 25px;grid-template-columns:1fr 1fr;gap:14px}.home-mark{display:none}.page{height:auto;overflow:visible;padding:35px 24px}.intro-row{align-items:flex-start}.shape{width:90px;font-size:75px}.title{font-size:48px}.intro-copy p{font-size:18px}.cards{overflow-x:auto;justify-content:flex-start;padding:10px}.arrow{display:none}.services{grid-template-columns:1fr}.service{font-size:30px}.contact-title{font-size:45px}.form{grid-template-columns:1fr}.form>*{grid-column:1!important}.send{margin:0}}

/* v13 — universal inner-page header */
.topbar{
  height:130px;
  border-bottom:0;
  display:block;
  padding:0;
  font-size:18px;
  background:rgba(255,255,255,.28);
  -webkit-backdrop-filter:blur(7px) saturate(.85);
  backdrop-filter:blur(7px) saturate(.85);
}
.topbar-inner{
  width:min(1480px, calc(100% - 12vw));
  height:100%;
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr 1fr 112px 1fr 1fr;
  align-items:center;
  column-gap:clamp(36px,5vw,96px);
}
.topbar-link{
  display:inline-flex;
  width:max-content;
  justify-self:center;
  align-items:center;
  padding:7px 9px;
  line-height:1;
  font-weight:400;
  transition:font-weight .15s ease, transform .15s ease;
}
.topbar-link:hover{font-weight:700;transform:translateY(-1px)}
.home-mark{
  width:78px;
  height:88px;
  justify-self:center;
  display:grid;
  place-items:center;
  padding:5px;
  line-height:0;
}
.home-mark img{display:block;width:100%;height:100%;object-fit:contain}
.shape.shape--asset{display:grid;place-items:center;-webkit-text-stroke:0;color:inherit}
.shape.shape--asset img{display:block;width:100%;height:100%;object-fit:contain}
.contact-symbol.contact-symbol--asset{width:175px;height:220px;flex:none;display:grid;place-items:center;font-size:0;color:inherit}
.contact-symbol.contact-symbol--asset img{width:100%;height:100%;object-fit:contain}
@media(max-width:900px){
  .topbar{min-height:90px;height:auto;padding:0;background:rgba(255,255,255,.38)}
  .topbar-inner{width:calc(100% - 32px);min-height:90px;padding:14px 0;grid-template-columns:1fr 1fr;gap:8px 14px}
  .topbar-link{justify-self:start;padding:6px 5px}
  .home-mark{display:none}
}


/* v14 — softer tracing-paper header + logo hover */
.topbar{
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.055));
  -webkit-backdrop-filter:blur(3px) saturate(.72) brightness(1.035);
  backdrop-filter:blur(3px) saturate(.72) brightness(1.035);
}
.home-mark img{
  transform:rotate(0deg) scale(1);
  transform-origin:center;
  transition:transform .28s cubic-bezier(.2,.75,.25,1),filter .28s ease;
}
.home-mark:hover img{
  transform:rotate(5deg) scale(1.055);
  filter:drop-shadow(0 3px 2px rgba(0,0,0,.12));
}

/* v14 — Servicios accordion */
.services-accordion{
  width:min(1350px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  column-gap:clamp(60px,8vw,130px);
  align-items:start;
}
.services-column{display:flex;flex-direction:column;gap:13px;min-width:0}
.service-item{border:0;margin:0;min-width:0}
.service-trigger{
  appearance:none;
  border:0;
  background:transparent;
  padding:7px 0;
  width:100%;
  display:flex;
  align-items:flex-start;
  gap:13px;
  color:#151b1b;
  font:500 clamp(28px,2.35vw,42px)/1.08 Grenadine,Arial,sans-serif;
  text-align:left;
  cursor:pointer;
}
.service-chevron{
  flex:none;
  display:inline-block;
  margin-top:.08em;
  font-size:.88em;
  line-height:1;
  font-weight:500;
  transform:rotate(0deg);
  transform-origin:50% 52%;
  transition:transform .22s ease;
}
.service-trigger[aria-expanded="true"] .service-chevron{transform:rotate(90deg)}
.service-trigger:hover .service-label{font-weight:700}
.service-trigger:hover .service-label,
.service-trigger:hover .service-chevron{color:#ae95d1}
.service-label{transition:font-weight .14s ease,color .16s ease}
.service-chevron{transition:transform .22s ease,color .16s ease}
.service-panel{
  display:grid;
  grid-template-rows:0fr;
  opacity:0;
  transition:grid-template-rows .28s ease,opacity .2s ease;
}
.service-item.is-open .service-panel{grid-template-rows:1fr;opacity:1}
.service-panel-inner{overflow:hidden}
.service-panel p{
  margin:2px 0 11px 40px;
  max-width:590px;
  font-size:clamp(17px,1.28vw,23px);
  line-height:1.22;
}
@media(max-width:900px){
  .services-accordion{grid-template-columns:1fr;gap:13px}
  .services-column{gap:13px}
  .service-trigger{font-size:29px}
  .service-panel p{margin-left:36px;font-size:18px}
}

/* v15 — clickable project/creation carousels */
.cards-wrap{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:22px;max-width:1510px}
.cards-viewport{min-width:0;overflow:hidden;padding:10px 10px 16px}
.cards{justify-content:flex-start;width:max-content;will-change:transform}
a.card{display:block;color:#151b1b;text-decoration:none;transition:transform .18s ease,box-shadow .18s ease}
a.card:hover{transform:translateY(-4px);box-shadow:9px 11px 9px #0005}
a.card:focus-visible{outline:3px solid #151b1b;outline-offset:5px}
.arrow{position:static;appearance:none;border:0;background:transparent;padding:8px 10px;font-family:inherit;line-height:1;transition:transform .15s ease,color .15s ease}
.arrow:hover{transform:scale(1.1);color:#151b1b}.arrow:focus-visible{outline:3px solid #151b1b;outline-offset:2px}
.project-detail-placeholder{display:grid;place-content:center;justify-items:start}.project-detail-placeholder h1{font-size:clamp(52px,6vw,96px);margin:18px 0 8px}.project-detail-placeholder p{font-size:22px}.back-projects{color:#151b1b;text-decoration:none;font-size:20px}
@media(max-width:900px){.cards-wrap{display:block}.cards-viewport{overflow-x:auto}.cards{width:max-content}.arrow{display:none}}

/* Servicios: estado abierto en lila; la descripción permanece negra. */
.service-item.is-open .service-label,
.service-item.is-open .service-chevron { color:#ae95d1; }
.service-item.is-open .service-panel,
.service-item.is-open .service-panel p { color:#151b1b; }


/* v18 — doodles de Creaciones, posicionados según la referencia 2048×1152. */
.creative{position:relative}
.creative .intro-row,.creative .cards-wrap{position:relative;z-index:2}
.creation-doodles{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.creation-doodle{position:absolute;display:block;opacity:1;filter:none;}
/* pequeño grupo arriba, a la izquierda del título */
.creation-doodle--01{width:255px;height:255px;object-fit:contain;left:-4.0%;bottom:-9.0%;}
/* grupo vertical del lateral superior derecho */
.creation-doodle--02{width:112px;height:112px;object-fit:contain;left:25.5%;top:1.4%;}
/* trazo grande que entra desde la esquina inferior izquierda */
.creation-doodle--03{width:170px;height:236px;object-fit:contain;right:1.0%;top:1.0%;}
/* trazo fino que entra desde la esquina inferior derecha */
.creation-doodle--04{width:235px;height:235px;object-fit:contain;right:-3.2%;bottom:-5.0%;}
@media(max-width:900px){.creation-doodles{display:none}}

/* v20 — Creaciones: doodles como capa decorativa, por encima del papel y por debajo del contenido. */
.creative{position:relative;isolation:isolate}
.creative::before{z-index:-2}
.creative .creation-doodles{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.creative .intro-row,.creative .cards-wrap{position:relative;z-index:1}
.creative .creation-doodle{position:absolute;display:block;opacity:1;filter:none;pointer-events:none;user-select:none}
/* 01 — esquina inferior izquierda */
.creative .creation-doodle--01{width:330px;height:330px;left:-72px;bottom:-76px;object-fit:contain}
/* 02 — alrededor / al lado del título */
.creative .creation-doodle--02{width:690px;height:220px;left:485px;top:12px;object-fit:contain}
/* 03 — esquina superior derecha */
.creative .creation-doodle--03{width:215px;height:300px;right:10px;top:8px;object-fit:contain}
/* 04 — esquina inferior derecha */
.creative .creation-doodle--04{width:360px;height:300px;right:-82px;bottom:-92px;object-fit:contain}

/* v21 — ajuste de escala de doodles inferiores según referencia, completos dentro del viewport. */
.creative .creation-doodle--01{
  width:245px;
  height:245px;
  left:0;
  bottom:0;
  object-fit:contain;
}
.creative .creation-doodle--04{
  width:205px;
  height:205px;
  right:14px;
  bottom:10px;
  object-fit:contain;
}

/* v26 — Hablemos: formulario compacto + redes, todo dentro del viewport desktop. */
@media (min-width:901px){
  .page.contact-page{
    height:calc(100vh - 130px);
    padding:34px 8.5vw 24px;
    overflow:hidden;
  }
  .contact-page .contact-head{
    gap:34px;
    max-width:1040px;
    margin:0 auto 26px;
    align-items:center;
  }
  .contact-page .contact-symbol.contact-symbol--asset{
    width:150px;
    height:170px;
  }
  .contact-page .contact-title{
    font-size:clamp(54px,4.35vw,70px);
    line-height:1.02;
  }
  .contact-page .form{
    max-width:1040px;
    margin:0 auto;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px 28px;
    font-size:22px;
    align-items:stretch;
  }
  .contact-page .form input,
  .contact-page .form textarea{
    width:100%;
    border:0;
    outline:0;
    background:rgba(255,255,255,.76);
    -webkit-backdrop-filter:blur(2px);
    backdrop-filter:blur(2px);
    box-shadow:6px 7px 7px rgba(0,0,0,.28);
    padding:18px 20px;
    font:inherit;
    color:#151b1b;
  }
  .contact-page .form input{height:66px}
  .contact-page .form textarea{
    grid-column:1/-1;
    height:165px;
    resize:none;
  }
  .contact-page .form input::placeholder,
  .contact-page .form textarea::placeholder{color:#777;opacity:1}
  .contact-page .contact-actions{
    grid-column:1/-1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:68px;
    margin-top:-4px;
  }
  .contact-page .contact-socials{
    display:flex;
    align-items:center;
    gap:15px;
  }
  .contact-page .contact-socials-label{
    margin-right:8px;
    font-size:18px;
    white-space:nowrap;
  }
  .contact-page .contact-socials a{
    display:block;
    width:52px;
    height:52px;
    border-radius:50%;
    transition:transform .18s ease;
  }
  .contact-page .contact-socials a:hover{transform:rotate(-5deg) scale(1.08)}
  .contact-page .contact-socials img{display:block;width:100%;height:100%}
  .contact-page .send{
    grid-column:auto;
    justify-self:auto;
    margin:0;
    min-width:205px;
    background:#63eff2;
    border:6px solid #151b1b;
    border-radius:25px;
    font:700 25px Grenadine,Arial,sans-serif;
    padding:10px 42px;
    cursor:pointer;
  }
}
@media(max-width:900px){
  .contact-page .contact-actions{display:flex;flex-direction:column;align-items:flex-start;gap:18px}
  .contact-page .contact-socials{display:flex;align-items:center;gap:12px}
  .contact-page .contact-socials-label{font-size:17px;margin-right:4px}
  .contact-page .contact-socials a{width:48px;height:48px}
  html[lang="en"] .contact-page .contact-head{gap:20px}
  html[lang="en"] .contact-page .contact-symbol--asset{width:clamp(80px,22vw,150px);height:auto;aspect-ratio:175/220}
  html[lang="en"] .contact-page .contact-title{min-width:0;font-size:clamp(30px,6vw,45px)}
  html[lang="en"] .contact-page .form{grid-template-columns:minmax(0,1fr)}
  html[lang="en"] .contact-page .form input,
  html[lang="en"] .contact-page .form textarea{min-width:0;width:100%}
  html[lang="en"] .contact-page .contact-socials{flex-wrap:wrap}
  html[lang="en"] .contact-page .contact-socials-label{flex-basis:100%}
}

/* v27 — detalle Motion Graphics */
.motion-detail-body{overflow-y:auto}.motion-detail-body .topbar{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.64)}
.motion-project{position:relative;overflow:hidden}.motion-hero{min-height:calc(100vh - 130px);padding:44px 8.5vw 52px;display:flex;flex-direction:column;justify-content:center}
.motion-back{position:absolute;top:28px;left:8.5vw;color:#151b1b;text-decoration:none;font-size:17px}.motion-back:hover{font-weight:700}
.motion-hero-grid{width:min(1380px,100%);margin:0 auto;display:grid;grid-template-columns:1.15fr .85fr;gap:clamp(55px,8vw,130px);align-items:end}.motion-kicker{display:inline-block;font-size:17px;margin-bottom:22px}.motion-heading h1{font-size:clamp(76px,8vw,142px);line-height:.78;letter-spacing:-.045em;margin:0;font-weight:700}.motion-heading h1 span{display:inline-block;background:#66ffcc;padding:0 .07em .1em}.motion-intro{padding-bottom:8px}.motion-intro>p{font-size:clamp(20px,1.6vw,27px);line-height:1.25;margin:0 0 38px;max-width:590px}.motion-meta{display:grid;grid-template-columns:1fr 1fr;gap:28px;font-size:15px;line-height:1.45}.motion-meta b{font-size:13px;text-transform:uppercase;letter-spacing:.06em}.motion-scroll-cue{width:min(1380px,100%);margin:65px auto 0;font-size:15px}
.motion-gallery{padding:30px 8.5vw 110px;width:100%}.motion-piece{margin:0}.motion-piece video{display:block;width:100%;height:auto;background:#111;box-shadow:10px 12px 18px rgba(0,0,0,.2)}.motion-wide{width:min(1180px,88%);margin:0 auto 150px}.motion-label{display:flex;align-items:baseline;gap:18px;margin:0 0 13px;font-size:18px}.motion-label span{font-size:13px;font-weight:700}.motion-label p{margin:0}.motion-vertical-row{width:min(1120px,94%);margin:0 auto 170px;display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(28px,4vw,70px);align-items:start}.motion-vertical-row .motion-piece--lower{margin-top:120px}.motion-wide--end{margin-bottom:60px}.motion-footer{min-height:190px;border-top:2px solid #151b1b;margin:0 8.5vw;padding:40px 0 70px;display:flex;justify-content:space-between;gap:30px;font-size:18px}.motion-footer a{color:#151b1b;text-decoration:none;font-weight:700}
@media(max-width:900px){.motion-detail-body .topbar{position:relative}.motion-hero{min-height:auto;padding:70px 24px 70px}.motion-back{left:24px;top:25px}.motion-hero-grid{grid-template-columns:1fr;gap:45px}.motion-heading h1{font-size:clamp(60px,18vw,92px)}.motion-scroll-cue{margin-top:50px}.motion-gallery{padding:20px 24px 70px}.motion-wide{width:100%;margin-bottom:80px}.motion-vertical-row{width:100%;grid-template-columns:1fr 1fr;gap:28px;margin-bottom:80px}.motion-vertical-row .motion-piece--lower{margin-top:55px}.motion-vertical-row .motion-piece:last-child{grid-column:1/-1;width:50%;margin:0 auto}.motion-footer{margin:0 24px;padding-bottom:50px;flex-direction:column}.motion-meta{grid-template-columns:1fr}}
@media(max-width:560px){.motion-vertical-row{grid-template-columns:1fr}.motion-vertical-row .motion-piece--lower{margin-top:0}.motion-vertical-row .motion-piece:last-child{grid-column:auto;width:100%}}

/* v27 — Hablemos: centrar un poco más el bloque en vertical */
@media(min-width:901px){.contact-page{transform:translateY(24px)}}

/* v28 — Project case studies */
.card-year{display:inline-block;margin-top:4px;font-size:12px;opacity:.68}

.case-detail-body{overflow-y:auto}
.case-detail-body .topbar{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.68)}
.case-project{position:relative;overflow:hidden}
.case-project figure{margin:0}
.case-project img{max-width:100%}
.case-hero{min-height:calc(100vh - 130px);padding:54px 8.5vw 68px;position:relative;display:flex;flex-direction:column;justify-content:center}
.case-back{position:absolute;top:28px;left:8.5vw;color:#151b1b;text-decoration:none;font-size:17px}
.case-back:hover{font-weight:700}
.case-hero-grid{width:min(1420px,100%);margin:26px auto 0;display:grid;grid-template-columns:minmax(0,.88fr) minmax(420px,1.12fr);gap:clamp(44px,6vw,100px);align-items:center}
.case-hero-grid--bit{grid-template-columns:minmax(0,1fr) minmax(380px,.78fr)}
.case-kicker{display:inline-block;font-size:16px;margin-bottom:18px;text-transform:uppercase;letter-spacing:.045em}
.case-hero-copy h1{font-size:clamp(64px,7.1vw,124px);line-height:.82;letter-spacing:-.045em;margin:0 0 30px;font-weight:700}
.case-hero-copy h1 span{display:inline-block;background:var(--accent);padding:0 .07em .09em;color:#fff}
.case-lead{font-size:clamp(19px,1.45vw,25px);line-height:1.27;margin:0;max-width:660px}
.case-hero-media{overflow:hidden;background:#fff;box-shadow:12px 14px 23px rgba(0,0,0,.2)}
.case-hero-media img{display:block;width:100%;height:100%;object-fit:cover}
.case-hero-media--landscape{aspect-ratio:16/11}
.case-hero-media--square{aspect-ratio:1/1}
.case-meta{width:min(1420px,100%);margin:48px auto 0;padding-top:24px;border-top:2px solid #151b1b;display:grid;gap:24px 42px}
.case-meta--4{grid-template-columns:.72fr 1.45fr 1fr 1.75fr}
.case-meta--3{grid-template-columns:.55fr 1.3fr 2fr}
.case-meta div{display:flex;flex-direction:column;gap:5px;min-width:0}
.case-meta b{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--accent)}
.case-meta span{font-size:15px;line-height:1.35}

.case-section{padding:110px 8.5vw 30px}
.case-section--tight{padding-top:46px}
.case-section--format,.case-section--result{padding-bottom:100px}
.case-section-heading{width:min(1260px,100%);margin:0 auto 42px;display:flex;align-items:baseline;gap:20px}
.case-index{font-size:13px;font-weight:700;color:var(--accent);letter-spacing:.08em}
.case-section-heading h2{font-size:clamp(42px,5vw,78px);line-height:.92;letter-spacing:-.035em;margin:0;font-weight:700}
.case-copy{font-size:clamp(19px,1.5vw,25px);line-height:1.34}
.case-copy p{margin:0 0 22px}
.case-copy p:last-child{margin-bottom:0}
.case-copy--wide{width:min(1040px,100%);margin:0 auto 50px}
.case-intro-grid{width:min(1260px,100%);margin:0 auto;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:clamp(45px,7vw,110px);align-items:center}
.brand-panel{background:#fff;padding:45px;box-shadow:9px 11px 16px rgba(0,0,0,.14)}
.brand-panel img{display:block;width:min(350px,90%);height:auto;margin:0 auto 34px}
.brand-panel p{font-size:17px;line-height:1.4;margin:0;padding-top:24px;border-top:4px solid var(--accent)}
.case-section-note{width:min(1040px,100%);margin:-14px auto 42px;font-size:clamp(18px,1.4vw,23px);line-height:1.35}
.media-grid img{display:block;width:100%;height:100%;object-fit:cover}
.prinde-vertical-grid{width:min(1150px,100%);margin:0 auto;display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(22px,3.5vw,52px);align-items:start}
.prinde-vertical-grid figure:nth-child(2){transform:translateY(72px)}
.prinde-vertical-grid figure{box-shadow:8px 10px 15px rgba(0,0,0,.16)}
.square-gallery{width:min(1210px,100%);margin:92px auto 0;display:grid;grid-template-columns:repeat(2,1fr);gap:28px}
.square-gallery figure{box-shadow:7px 8px 13px rgba(0,0,0,.14)}
.format-pair{width:min(940px,100%);margin:0 auto;display:grid;grid-template-columns:1fr .8fr;gap:clamp(26px,5vw,70px);align-items:start}
.format-pair figure{box-shadow:8px 10px 15px rgba(0,0,0,.15)}
.format-pair figure:last-child{width:80%;justify-self:center}

.bit-reference-grid{width:min(1140px,100%);margin:0 auto;display:grid;grid-template-columns:1.25fr .72fr .72fr;gap:24px;align-items:stretch}
.bit-reference-grid figure{background:#fff;padding:12px;box-shadow:8px 10px 15px rgba(0,0,0,.14);min-height:380px}
.bit-reference-grid img{object-fit:cover}
.bit-reference-grid__wide img{object-position:center}
.case-section--process{padding-top:130px}
.process-step{width:min(960px,100%);margin:0 auto 28px;padding:22px 0;display:grid;grid-template-columns:92px 1fr;gap:25px;border-top:1px solid rgba(21,27,27,.28)}
.process-step:first-of-type{border-top:0}
.process-number{font-size:42px;line-height:1;font-weight:700;color:var(--accent)}
.process-copy h3{font-size:clamp(26px,2.2vw,36px);line-height:1.05;margin:0 0 10px}
.process-copy p{font-size:18px;line-height:1.42;margin:0;max-width:760px}
.process-sheet{width:min(1150px,100%);margin:45px auto 85px!important;box-shadow:9px 11px 18px rgba(0,0,0,.15)}
.process-sheet img{display:block;width:100%;height:auto}
.logo-result-grid{width:min(930px,100%);margin:0 auto;display:grid;grid-template-columns:1fr 1fr;gap:clamp(34px,6vw,90px)}
.logo-card{background:#fff;min-height:420px;padding:55px;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:8px 10px 15px rgba(0,0,0,.15)}
.logo-card img{width:100%;height:260px;object-fit:contain}
.logo-card figcaption{margin-top:24px;font-size:16px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--accent)}

.wide-sheet{width:min(1180px,100%);margin:0 auto!important;box-shadow:8px 10px 16px rgba(0,0,0,.13)}
.wide-sheet img{display:block;width:100%;height:auto}
.wide-sheet--white{background:#fff;padding:18px}
.case-pullquote{width:min(1050px,100%);margin:-10px auto 70px;padding-left:28px;border-left:8px solid var(--accent);font-size:clamp(26px,2.8vw,42px);line-height:1.1;font-weight:500}
.racing-process-block{margin-bottom:100px}
.process-step--standalone{margin-bottom:34px}
.logo-card--racing img{height:290px}
.racing-variants{width:min(1120px,100%);margin:75px auto 0;display:grid;grid-template-columns:1fr 1fr;gap:30px}
.racing-variants figure{box-shadow:8px 10px 15px rgba(0,0,0,.14)}
.racing-court{width:min(800px,92%);margin:95px auto 0!important}
.racing-court img{display:block;width:100%;height:auto;box-shadow:8px 10px 15px rgba(0,0,0,.15)}
.racing-court figcaption{font-size:15px;line-height:1.4;margin-top:12px;text-align:center}

.case-footer{min-height:190px;border-top:2px solid #151b1b;margin:80px 8.5vw 0;padding:40px 0 70px;display:flex;justify-content:space-between;gap:30px;font-size:18px}
.case-footer a{color:#151b1b;text-decoration:none;font-weight:700}
.case-footer a:hover{color:var(--accent)}

/* Path / Motion Graphics — project-specific accent + tool icons */
.motion-heading h1 span{background:var(--motion-accent,#065168);color:#fff}
.motion-tool-icons{display:flex;align-items:center;gap:10px;margin-top:9px}
.motion-tool-icons img{display:block;width:44px;height:44px;object-fit:contain;border-radius:8px;box-shadow:0 3px 7px rgba(0,0,0,.12)}
.motion-label span{color:var(--motion-accent,#065168)}
.motion-footer a:hover{color:var(--motion-accent,#065168)}

@media(max-width:1100px){
  .case-hero-grid,.case-hero-grid--bit{grid-template-columns:1fr;gap:42px}
  .case-hero-media{width:min(850px,100%);justify-self:center}
  .case-meta--4,.case-meta--3{grid-template-columns:repeat(2,1fr)}
  .case-intro-grid{grid-template-columns:1fr}
  .brand-panel{width:min(700px,100%);justify-self:center}
  .bit-reference-grid{grid-template-columns:1.2fr 1fr}.bit-reference-grid figure:last-child{grid-column:1/-1;min-height:420px}.bit-reference-grid figure:last-child img{object-fit:contain;background:#eee}
}

@media(max-width:900px){
  .case-detail-body .topbar{position:relative}
  .case-hero{min-height:auto;padding:78px 24px 55px}
  .case-back{left:24px;top:24px}
  .case-hero-copy h1{font-size:clamp(58px,16vw,90px)}
  .case-meta{margin-top:38px}.case-meta--4,.case-meta--3{grid-template-columns:1fr 1fr}
  .case-section{padding:78px 24px 20px}
  .case-section--tight{padding-top:25px}
  .case-section-heading{margin-bottom:32px}
  .case-intro-grid{gap:35px}
  .prinde-vertical-grid{gap:16px}.prinde-vertical-grid figure:nth-child(2){transform:translateY(36px)}
  .square-gallery{margin-top:58px;gap:16px}
  .format-pair{gap:20px}
  .bit-reference-grid{grid-template-columns:1fr 1fr;gap:16px}.bit-reference-grid__wide{grid-column:1/-1}.bit-reference-grid figure{min-height:300px}.bit-reference-grid figure:last-child{grid-column:auto;min-height:300px}
  .process-step{grid-template-columns:64px 1fr}
  .process-sheet{margin:30px auto 60px!important}
  .logo-result-grid{gap:20px}.logo-card{min-height:330px;padding:35px}.logo-card img,.logo-card--racing img{height:220px}
  .racing-variants{gap:18px}
  .case-footer{margin:55px 24px 0;padding-bottom:50px;flex-direction:column}
}

@media(max-width:620px){
  .case-meta--4,.case-meta--3{grid-template-columns:1fr}
  .case-hero-media--landscape{aspect-ratio:4/3}
  .brand-panel{padding:30px}
  .prinde-vertical-grid{grid-template-columns:1fr}.prinde-vertical-grid figure:nth-child(2){transform:none}
  .square-gallery{grid-template-columns:1fr}
  .format-pair{grid-template-columns:1fr}.format-pair figure:last-child{width:100%}
  .bit-reference-grid{grid-template-columns:1fr}.bit-reference-grid__wide,.bit-reference-grid figure:last-child{grid-column:auto}.bit-reference-grid figure{min-height:0}.bit-reference-grid figure img{height:auto;object-fit:contain}
  .process-step{grid-template-columns:1fr;gap:10px}.process-number{font-size:31px}
  .logo-result-grid{grid-template-columns:1fr}.logo-card{min-height:300px}
  .racing-variants{grid-template-columns:1fr}
  .motion-tool-icons img{width:39px;height:39px}
}
.case-manifesto{margin-top:34px!important;padding:18px 0 18px 24px;border-left:7px solid var(--accent);font-size:clamp(24px,2.4vw,36px);line-height:1.13;font-weight:500}
/* v28.1 — allow long project accents to wrap cleanly */
.case-hero-copy h1{font-size:clamp(56px,5.8vw,100px)}
.case-hero-copy h1 span{display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .07em .09em}


/* v28.2 — hero headline spacing fix */
.case-hero-grid{grid-template-columns:minmax(0,1.02fr) minmax(340px,.98fr);align-items:start}
.case-hero-copy h1{font-size:clamp(50px,5.4vw,92px);line-height:.96;max-width:11ch;margin:0 0 34px}
.case-hero-copy h1 span{display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:.03em .08em .1em;line-height:1.08}
.case-lead{max-width:720px}
@media(max-width:1100px){
  .case-hero-copy h1{max-width:none}
}
@media(max-width:900px){
  .case-hero-copy h1{font-size:clamp(48px,14vw,82px);line-height:.94;max-width:9.6ch;margin-bottom:26px}
}
@media(max-width:620px){
  .case-hero-copy h1{max-width:8.8ch}
}

/* v30 — project metadata refinements */
.motion-meta--3{grid-template-columns:.65fr 1.2fr 1.35fr}
@media(max-width:900px){.motion-meta--3{grid-template-columns:1fr 1fr}.motion-meta--3 .motion-tools{grid-column:1/-1}}
@media(max-width:560px){.motion-meta--3{grid-template-columns:1fr}.motion-meta--3 .motion-tools{grid-column:auto}}


/* v31 — hero titles: each line owns its vertical space (no overlaps) */
.case-hero-copy h1{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.09em;
  margin:0 0 34px;
  max-width:none;
  font-size:clamp(50px,5.15vw,90px);
  line-height:.9;
  letter-spacing:-.045em;
  font-weight:700;
}
.case-hero-copy h1 .case-title-line{
  display:block;
  max-width:100%;
  line-height:.92;
}
.case-hero-copy h1 .case-title-highlight{
  display:block;
  width:max-content;
  max-width:100%;
  box-sizing:border-box;
  background:var(--accent);
  color:#fff;
  padding:.08em .1em .12em;
  line-height:.92;
  -webkit-box-decoration-break:clone;
  box-decoration-break:clone;
}
.case-lead{
  margin-top:0;
  max-width:720px;
}

.motion-heading h1{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.09em;
  margin:0;
  font-size:clamp(70px,7.4vw,132px);
  line-height:.9;
  letter-spacing:-.045em;
  font-weight:700;
}
.motion-heading h1 .motion-title-line{
  display:block;
  max-width:100%;
  line-height:.92;
}
.motion-heading h1 .motion-title-highlight{
  display:block;
  width:max-content;
  max-width:100%;
  box-sizing:border-box;
  background:var(--motion-accent,#065168);
  color:#fff;
  padding:.08em .1em .12em;
  line-height:.92;
}

@media(max-width:1100px){
  .case-hero-grid,.case-hero-grid--bit{align-items:start}
  .case-hero-copy h1{font-size:clamp(54px,8vw,86px)}
}

@media(max-width:900px){
  .case-hero-copy h1{
    font-size:clamp(48px,13vw,78px);
    line-height:.9;
    gap:.08em;
    margin-bottom:28px;
  }
  .motion-heading h1{
    font-size:clamp(56px,15vw,86px);
    line-height:.9;
    gap:.08em;
  }
}

@media(max-width:560px){
  .case-hero-copy h1{font-size:clamp(44px,14vw,70px)}
  .motion-heading h1{font-size:clamp(50px,16vw,76px)}
}
/* v31.1 — neutral first title line; accent only on highlighted line */
.case-hero-copy h1 .case-title-line{
  background:transparent;
  color:#151b1b;
  padding:0;
  width:auto;
}
.motion-heading h1 .motion-title-line{
  background:transparent;
  color:#151b1b;
  padding:0;
  width:auto;
}

/* v33 — Racing process images */
.racing-process-options{margin-top:46px;margin-bottom:0}
.racing-process-options figure{overflow:hidden}
.racing-process-options img{display:block;width:100%;height:auto;object-fit:contain}
@media(max-width:620px){
  .racing-process-options{grid-template-columns:1fr}
}

/* Path — image-first case study introduction */
.path-hero-grid{grid-template-columns:minmax(0,.98fr) minmax(0,1.02fr)}
.path-hero-grid>*{min-width:0}
.path-hero-media{margin:0}
.path-hero-media img{height:auto}
.path-meta{grid-template-columns:.65fr 1.2fr 1.35fr}
.path-hero .motion-scroll-cue{width:min(1420px,100%);margin-top:38px}
@media(min-width:901px) and (max-width:1100px){
  .path-hero .case-hero-copy h1{font-size:clamp(42px,4.7vw,54px)}
}
@media(max-width:900px){
  .path-hero-grid{grid-template-columns:minmax(0,1fr);gap:36px}
  .path-meta{grid-template-columns:1fr 1fr}
  .path-meta>div:last-child{grid-column:1/-1}
}
@media(max-width:620px){
  .path-meta{grid-template-columns:1fr}
  .path-meta>div:last-child{grid-column:auto}
  .path-hero .case-hero-copy h1{font-size:clamp(36px,10.8vw,66px)}
}
/* Path — piezas en contexto */
.path-context{padding:0 8.5vw 105px}
.path-context h2{width:min(1180px,100%);margin:0 auto 22px;font-size:clamp(18px,1.6vw,25px);line-height:1.2;font-weight:500}
.path-context-grid{width:min(1180px,100%);margin:0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,1.7vw,26px)}
.path-context-grid figure{margin:0;overflow:hidden;box-shadow:7px 9px 14px rgba(0,0,0,.16)}
.path-context-grid img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
@media(max-width:700px){
  .path-context{padding:0 24px 72px}
  .path-context-grid{grid-template-columns:1fr;gap:18px}
}
/* BIT Voley — referencias y proceso simplificados */
.bit-rescue .bit-reference-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.bit-rescue .bit-reference-grid figure{min-height:0;padding:6px;aspect-ratio:1/1;overflow:hidden}
.bit-rescue .bit-reference-grid img{width:100%;height:100%;object-fit:cover}
.bit-process .process-step{grid-template-columns:1fr;padding:20px 0;margin-bottom:18px}
.bit-process .process-copy h3{color:var(--accent)}
.bit-process-sheet{width:min(1260px,100%);margin-top:54px!important}
@media(max-width:900px){
  .bit-rescue .bit-reference-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:620px){
  .bit-rescue .bit-reference-grid{grid-template-columns:1fr}
}
/* Prindemar — introducción y sistema visual */
.prindemar-intro .case-section-heading h2{color:var(--accent)}
.prindemar-brand-panel ul{margin:0;padding:24px 0 0;border-top:4px solid var(--accent);list-style:none;display:grid;gap:10px;font-size:17px;line-height:1.35}
.prindemar-brand-panel li::before{content:'·';color:var(--accent);font-weight:700;margin-right:10px}

/* Proyectos — centrar las polaroids cuando entran en el carrusel */
.projects-page .cards{margin-inline:auto}

/* Navegación responsive compartida: estados, foco y área táctil. */
.mobile-menu-toggle{display:none}
.topbar-link[href$="proyectos.html"]{--nav-accent:#61efba}
.topbar-link[href$="servicios.html"]{--nav-accent:#ae95d1}
.topbar-link[href$="creaciones.html"]{--nav-accent:#ff9933}
.topbar-link[href$="hablemos.html"]{--nav-accent:#63eff2}
.topbar-link[aria-current="page"]{font-weight:700}
/* Highlight only the label, preserving the full mobile tap target. */
.topbar .topbar-link{color:#151b1b;-webkit-tap-highlight-color:transparent}
.topbar-link-label{position:relative;isolation:isolate;display:inline-block}
.topbar-link-label::before{
  content:'';position:absolute;z-index:-1;inset:-5px -7px;
  background:var(--nav-accent);transform:scaleX(0);transform-origin:left center;
  transition:transform .22s ease;pointer-events:none;
}
@media(hover:hover) and (pointer:fine){
  .topbar-link:hover .topbar-link-label::before{transform:scaleX(1)}
}
.topbar-link.is-tap-highlight .topbar-link-label::before{animation:nav-marker-tap .45s ease both}
@keyframes nav-marker-tap{0%{transform:scaleX(0)}45%,75%{transform:scaleX(1)}100%{transform:scaleX(0)}}
@media(prefers-reduced-motion:reduce){
  .topbar-link-label::before{transition:none}
  .topbar-link.is-tap-highlight .topbar-link-label::before{animation:none;transform:scaleX(1)}
}
.topbar-link:focus-visible,.home-mark:focus-visible,.mobile-menu-toggle:focus-visible{
  outline:3px solid #151b1b;
  outline-offset:4px;
}

@media(max-width:900px){
  .topbar{
    min-height:104px;
    height:auto;
    padding:0;
    border-bottom:1px solid rgba(21,27,27,.18);
  }
  .topbar-inner{
    width:100%;
    min-height:104px;
    padding:14px 20px;
    display:grid;
    grid-template-columns:auto 1fr auto;
    grid-template-rows:76px;
    gap:0;
    align-items:center;
  }
  .home-mark{
    display:grid;
    grid-column:1;
    grid-row:1;
    width:66px;
    height:76px;
    padding:2px;
    justify-self:start;
  }
  .mobile-menu-toggle{
    grid-column:3;
    grid-row:1;
    display:grid;
    place-content:center;
    gap:7px;
    width:56px;
    height:56px;
    padding:10px;
    border:0;
    border-radius:50%;
    background:transparent;
    color:#151b1b;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .mobile-menu-toggle span{
    display:block;
    width:34px;
    height:4px;
    border-radius:999px;
    background:currentColor;
  }
  .mobile-menu-toggle:hover{background:rgba(21,27,27,.08)}
  .mobile-menu-toggle:active{background:rgba(21,27,27,.14)}
  .topbar-link{
    display:none;
    grid-column:1/-1;
    justify-self:stretch;
    width:calc(100% + 40px);
    min-height:60px;
    margin-inline:-20px;
    padding:0 20px;
    align-items:center;
    border-top:1px solid rgba(21,27,27,.18);
    background:rgba(255,255,255,.2);
    font-size:clamp(18px,5vw,22px);
    font-weight:500;
    line-height:1.2;
  }
  .topbar-inner.is-menu-open .topbar-link{display:flex}
  .topbar-link:nth-child(1){grid-row:2}
  .topbar-link:nth-child(2){grid-row:3}
  .topbar-link:nth-child(4){grid-row:4}
  .topbar-link:nth-child(5){grid-row:5;border-bottom:1px solid rgba(21,27,27,.18)}
  .topbar-link[aria-current="page"]{font-weight:700}
  .topbar-link:hover,.topbar-link:focus-visible,.topbar-link:active{transform:none}
  .topbar-link:focus-visible{outline-offset:-4px}
}

@media(prefers-reduced-motion:reduce){
  .topbar-link,.mobile-menu-toggle{transition:none!important}
}
/* Proyectos y Servicios — sistema responsive mobile. */
@media(max-width:900px){
  .projects-page,
  body:has(.services-accordion) .page{
    min-height:calc(100svh - 104px);
    height:auto;
    padding:30px 20px 88px;
    overflow:visible;
  }

  .projects-page .intro-row,
  body:has(.services-accordion) .intro-row{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    gap:14px 16px;
    margin:0 auto 42px;
  }
  .projects-page .shape,
  body:has(.services-accordion) .shape{
    grid-column:1;
    grid-row:1;
    width:72px;
    height:72px;
    margin:0;
  }
  .projects-page .intro-copy,
  body:has(.services-accordion) .intro-copy{
    display:contents;
  }
  .projects-page .title,
  body:has(.services-accordion) .title{
    grid-column:2;
    grid-row:1;
    justify-self:start;
    max-width:100%;
    margin:0;
    padding:2px 10px 6px;
    font-size:clamp(38px,11vw,52px);
    line-height:.9;
  }
  .projects-page .intro-copy p,
  body:has(.services-accordion) .intro-copy p{
    grid-column:1/-1;
    grid-row:2;
    max-width:42rem;
    margin:0;
    font-size:17px;
    line-height:1.3;
  }

  .projects-page .cards-wrap{display:block;width:100%;margin:0}
  .projects-page .cards-viewport{overflow:visible;padding:0}
  .projects-page .cards{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:stretch;
    width:100%;
    gap:24px 16px;
    padding:0;
    transform:none!important;
  }
  .projects-page .card{
    display:flex;
    flex-direction:column;
    width:auto;
    min-width:0;
    padding:10px 10px 14px;
    box-shadow:5px 6px 7px rgba(0,0,0,.27);
  }
  .projects-page .card:hover{transform:none;box-shadow:6px 8px 9px rgba(0,0,0,.3)}
  .projects-page .card img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
  .projects-page .card p{
    display:flex;
    flex:1;
    flex-direction:column;
    justify-content:center;
    margin:10px 0 0;
    font-size:13px;
    line-height:1.22;
  }
  .projects-page .card-year{font-size:11.5px}
  .projects-page .arrow{display:none}

  body:has(.services-accordion) .intro-row{margin-bottom:26px}
  .services-accordion{
    grid-template-columns:1fr;
    gap:0;
    width:100%;
  }
  .services-column{gap:0}
  .service-item{border-bottom:1px solid rgba(21,27,27,.2)}
  .services-column:first-child .service-item:first-child{border-top:1px solid rgba(21,27,27,.2)}
  .service-trigger{
    min-height:58px;
    padding:12px 4px;
    gap:12px;
    font-size:clamp(21px,6vw,26px);
    line-height:1.08;
    text-align:left;
  }
  .service-chevron{width:18px;flex:0 0 18px}
  .service-trigger:focus-visible{
    outline:3px solid #151b1b;
    outline-offset:-3px;
    border-radius:4px;
  }
  .service-trigger[aria-expanded="true"]{
    background:rgba(174,149,209,.16);
  }
  .service-panel p{
    margin:0 14px 18px 34px;
    font-size:16.5px;
    line-height:1.4;
  }
}

@media(max-width:360px){
  .projects-page,
  body:has(.services-accordion) .page{padding-inline:16px}
  .projects-page .intro-row,
  body:has(.services-accordion) .intro-row{gap-inline:12px}
  .projects-page .shape,
  body:has(.services-accordion) .shape{width:62px;height:62px}
  .projects-page .title,
  body:has(.services-accordion) .title{font-size:clamp(34px,11vw,42px)}
  .projects-page .intro-copy p,
  body:has(.services-accordion) .intro-copy p{font-size:16px}
  .projects-page .cards{gap:18px 12px}
  .projects-page .card{padding:8px 8px 12px}
  .projects-page .card p{font-size:12px}
  .service-trigger{font-size:21px}
}

@media(prefers-reduced-motion:reduce){
  .service-chevron,.service-label,.service-panel,.service-panel-inner{transition:none!important}
}
.service-panel[hidden]{display:none}

/* Carousel copies stay outside layout while sliding into view. */
[data-carousel] .cards{position:relative}


/* Consistent previous/next navigation, including on narrow screens. */
.project-footer{margin:80px 8.5vw 0;padding:40px 0 80px;border-top:2px solid currentColor}
.project-pagination{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:24px;max-width:1200px;margin:30px auto 0;text-align:left}
.project-pagination a[rel]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;margin:0;padding:12px 0;color:inherit;text-decoration:none;font-size:clamp(15px,1.4vw,21px);font-weight:700;overflow-wrap:anywhere}
.project-pagination a[rel="next"]{align-items:flex-end;text-align:right}
.project-pagination .pagination-label{font-size:13px;font-weight:400}
.project-pagination a:hover{text-decoration:underline;text-underline-offset:5px}
.project-pagination a:focus-visible{outline:2px solid currentColor;outline-offset:5px}
@media(max-width:600px){.project-footer{margin:50px 24px 0;padding:25px 0 90px}.project-pagination{gap:20px}.project-pagination .pagination-label{font-size:11px}}
.contact-page{height:auto;min-height:calc(100svh - 130px);overflow:visible;padding-bottom:100px}
.form .form-status{grid-column:1/-1;font-size:16px;line-height:1.5;margin:0;min-height:1.5em}
.form-status[data-state="error"]{color:#8a2337}
.form .form-trap{display:none}
.send:disabled{opacity:.65;cursor:wait}

/* Archive link stays centered between the two project directions. */
.project-pagination .pagination-overview{grid-column:2;grid-row:1;align-self:center;display:block;margin:0;padding:12px 4px;color:inherit;text-decoration:none;text-align:center;font-size:14px;line-height:1.4;font-weight:400}
.project-pagination a[rel="prev"]{grid-column:1;grid-row:1}
.project-pagination a[rel="next"]{grid-column:3;grid-row:1}
body .back-to-top{position:fixed;right:max(22px,env(safe-area-inset-right));bottom:max(22px,env(safe-area-inset-bottom));z-index:1001;display:grid;place-items:center;width:44px;height:44px;padding:10px;border:2px solid #151b1b;border-radius:50%;background:#fff;color:#151b1b;box-shadow:0 2px 5px #0002;cursor:pointer}
body .back-to-top[hidden]{display:none}
.back-to-top svg{display:block;width:20px;height:20px}
.back-to-top .back-to-top-label{position:absolute;right:calc(100% + 10px);top:50%;transform:translateY(-50%);padding:7px 10px;border-radius:6px;background:#151b1b;color:#fff;white-space:nowrap;font:400 13px Grenadine,Arial,sans-serif;opacity:0;visibility:hidden;pointer-events:none}
.back-to-top:hover .back-to-top-label,.back-to-top:focus-visible .back-to-top-label{opacity:1;visibility:visible}
.back-to-top:focus-visible{outline:3px solid #66ffff;outline-offset:4px}
@media(max-width:600px){.project-pagination{gap:12px}.project-pagination .pagination-overview{max-width:80px;font-size:12px}.project-pagination a[rel]{font-size:14px}.project-pagination .pagination-label{font-size:10px}}
@media(max-width:900px){body .back-to-top{right:max(14px,env(safe-area-inset-right));bottom:calc(82px + env(safe-area-inset-bottom))}}

/* Compact send action, matching the home menu. */
.contact-page .form .send{display:inline-flex;align-items:center;justify-content:center;gap:20px;grid-column:auto;align-self:flex-end;justify-self:end;min-width:0;min-height:48px;margin:0;padding:13px 22px;border:0;border-radius:7px;background:#151b1b;color:#fff;box-shadow:0 3px 6px #0002;font:500 19px/1.2 Grenadine,Arial,sans-serif;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,color .18s ease}
.contact-page .send svg{width:20px;height:20px;flex:none}
.contact-page .form .send:focus-visible{color:#63eff2;outline:3px solid #63eff2;outline-offset:4px}
@media(hover:hover){.contact-page .form .send:hover:not(:disabled){color:#63eff2;transform:translateY(-2px);box-shadow:0 5px 9px #0003}}
.contact-page .form .send:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #0002}
.contact-page .form .send:disabled{cursor:wait;opacity:.65}
@media(prefers-reduced-motion:reduce){.contact-page .form .send{transition:none}}

/* Hablemos: compact phone layout. Desktop and tablet styles stay independent. */
@media(max-width:900px){
  html[lang] .contact-page .contact-head{align-items:center}
  html[lang] .contact-page .contact-title{align-self:center}
}
@media(max-width:600px){
  body:has(.contact-page) .topbar{min-height:80px}
  body:has(.contact-page) .topbar-inner{min-height:80px;grid-template-rows:56px;padding-block:12px}
  body:has(.contact-page) .home-mark{width:48px;height:56px}
  .page.contact-page{min-height:calc(100svh - 80px);padding:18px 20px 76px;display:flex;flex-direction:column;justify-content:safe center}
  html[lang] .contact-page .contact-head{width:100%;min-width:0;gap:14px;align-items:center;margin:0 auto 20px}
  html[lang] .contact-page .contact-symbol.contact-symbol--asset{width:66px;height:84px;aspect-ratio:auto}
  html[lang] .contact-page .contact-title{flex:1;min-width:0;font-size:clamp(22px,6vw,30px);line-height:1.12;overflow-wrap:normal}
  .contact-page .contact-title .highlight{padding-inline:5px}
  html[lang] .contact-page .form{flex:none;width:100%;min-width:0;margin:0 auto;grid-template-columns:minmax(0,1fr);gap:12px;font-size:16px}
  html[lang] .contact-page .form>input,
  html[lang] .contact-page .form>textarea{width:100%;min-width:0;padding:12px 14px;font:inherit;line-height:1.4;box-shadow:3px 4px 6px #0003;border-radius:0}
  .contact-page .form>input{height:46px}
  .contact-page .form>textarea{height:clamp(84px,16svh,132px)}
  .contact-page .contact-actions{width:100%;gap:18px;align-items:stretch}
  .contact-page .form .send{order:-1;min-height:44px;padding:10px 18px;font-size:17px;gap:18px}
  html[lang] .contact-page .contact-socials{display:grid;grid-template-columns:repeat(3,64px) minmax(0,1fr);gap:10px 6px;align-items:center;width:100%}
  html[lang] .contact-page .contact-socials-label{grid-column:1/-1;min-width:0;margin:0;font-size:16px;line-height:1.35;white-space:normal}
  .contact-page .contact-socials a{display:block;position:relative;width:64px;height:64px}
  .contact-page .contact-socials img{display:block;position:absolute;left:50%;top:50%;width:83px;height:83px;max-width:none;transform:translate(-50%,-50%)}
  .contact-page .form .form-status:empty{min-height:0}
}
@media(max-width:600px) and (max-height:700px){
  .page.contact-page{padding-top:12px;padding-bottom:64px}
  html[lang] .contact-page .contact-head{gap:12px;margin-bottom:14px}
  html[lang] .contact-page .contact-symbol.contact-symbol--asset{width:56px;height:70px}
  html[lang] .contact-page .contact-title{font-size:clamp(21px,5.6vw,27px)}
  html[lang] .contact-page .form{gap:10px}
  .contact-page .form>input{height:44px}
  .contact-page .form>textarea{height:clamp(72px,14svh,98px)}
  .contact-page .contact-actions{gap:14px}
}

/* Mobile navigation: softer separation and lighter menu icon. */
@media(max-width:900px){
  .topbar{border-bottom:0;box-shadow:0 3px 10px rgba(21,27,27,.10)}
  .mobile-menu-toggle span{height:2px}
  .topbar .topbar-link,
  .topbar .topbar-link:nth-child(5){border:0}

  /* A single swipeable row; its height follows the available phone viewport. */
  .page.projects-page{
    height:calc(100svh - 104px);
    min-height:0;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    padding:22px 20px 70px;
    overflow:hidden;
  }
  .projects-page .intro-row{gap:12px 14px;margin:0 0 20px}
  .projects-page .shape{width:56px;height:56px}
  .projects-page .title{font-size:clamp(32px,9vw,46px)}
  .projects-page .intro-copy p{font-size:16px;line-height:1.27}
  .projects-page .cards-wrap{display:block;min-width:0;min-height:0;width:auto;height:100%;margin:0 -20px}
  .projects-page .cards-viewport{
    height:100%;overflow-x:auto;overflow-y:hidden;
    padding:8px max(20px,calc((100vw - 280px)/2)) 18px;
    scroll-snap-type:x mandatory;
    scroll-padding-inline:max(20px,calc((100vw - 280px)/2));
    overscroll-behavior-inline:contain;scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .projects-page .cards-viewport::-webkit-scrollbar{display:none}
  .projects-page .cards{display:flex;align-items:stretch;width:max-content;height:100%;gap:18px;margin:0;padding:0;overflow:visible;transform:none!important}
  .projects-page .card{display:flex;flex-direction:column;flex:none;width:min(280px,calc(100vw - 64px));min-width:0;min-height:0;height:min(100%,352px);padding:12px 12px 16px;scroll-snap-align:center;box-shadow:5px 6px 7px #0004}
  .projects-page .card img{display:block;flex:1 1 0;min-height:0;width:100%;height:0;aspect-ratio:auto;object-fit:cover}
  .projects-page .card p{display:block;flex:none;margin:10px 0 0;font-size:14px;line-height:1.22}
  .projects-page .arrow{display:none}
}
@media(max-width:600px) and (max-height:700px){
  .page.projects-page{padding-top:14px;padding-bottom:64px}
  .projects-page .intro-row{gap:10px 12px;margin-bottom:12px}
  .projects-page .shape{width:46px;height:46px}
  .projects-page .title{font-size:32px}
  .projects-page .intro-copy p{font-size:14px;line-height:1.25}
  .projects-page .card p{font-size:12px}
}

/* Mobile menu floats over every page without changing the header's height. */
@media(max-width:900px){
  body .topbar:has(.topbar-inner){position:relative;z-index:1100;--menu-header-size:104px;--menu-row:min(60px,calc((100svh - var(--menu-header-size))/4))}
  body .topbar:has(.topbar-inner.is-menu-open){background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
  .topbar:has(.topbar-inner.is-menu-open) .topbar-inner{position:relative;z-index:2}
  .topbar:has(.topbar-inner.is-menu-open)::after{content:'';position:absolute;top:0;left:0;right:0;height:calc(100% + var(--menu-row)*4);background:rgba(255,255,255,.35);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:0 6px 10px #0002;pointer-events:none;z-index:1}
  .topbar .topbar-inner .topbar-link{position:absolute;left:0;right:0;grid-column:auto;grid-row:auto;width:100%;height:var(--menu-row);min-height:0;margin:0;padding:0 20px;border:0;background:transparent;z-index:2}
  .topbar .topbar-inner .topbar-link:nth-child(1){top:100%}
  .topbar .topbar-inner .topbar-link:nth-child(2){top:calc(100% + var(--menu-row))}
  .topbar .topbar-inner .topbar-link:nth-child(4){top:calc(100% + var(--menu-row)*2)}
  .topbar .topbar-inner .topbar-link:nth-child(5){top:calc(100% + var(--menu-row)*3);box-shadow:none}
  html:has(.topbar-inner.is-menu-open),body:has(.topbar-inner.is-menu-open){overflow:hidden}
}
@media(max-width:600px){body:has(.contact-page) .topbar{--menu-header-size:80px}}

/* Project introductions stack on mobile, after the desktop grid refinements. */
@media(max-width:900px){
  .case-project>.case-hero{min-height:0;padding:28px 20px 48px;justify-content:flex-start}
  .case-project>.case-hero .case-back{position:static;align-self:flex-start;max-width:100%;margin:0 0 28px;font-size:16px;line-height:1.3}
  .case-project>.case-hero .case-hero-grid{display:grid;grid-template-columns:minmax(0,1fr);width:100%;min-width:0;margin:0;gap:28px;align-items:start}
  .case-project>.case-hero .case-hero-grid>*{min-width:0;max-width:100%}
  .case-project>.case-hero .case-kicker{max-width:100%;font-size:12px;line-height:1.4;margin-bottom:14px}
  .case-project>.case-hero .case-hero-copy h1{width:100%;max-width:none;margin:0 0 20px;font-size:clamp(36px,10.5vw,52px);line-height:1.05;gap:.08em}
  .case-project>.case-hero .case-hero-copy h1 .case-title-line,
  .case-project>.case-hero .case-hero-copy h1 .case-title-highlight{max-width:100%;line-height:1.05;overflow-wrap:break-word}
  .case-project>.case-hero .case-lead{width:100%;max-width:none;font-size:17px;line-height:1.4}
  .case-project>.case-hero .case-hero-media{width:100%;max-width:100%;justify-self:stretch}
}

@media(max-width:900px){html,body{scrollbar-width:none}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none;width:0;height:0}}

/* Mobile case studies: a consistent rhythm without desktop-sized blank areas. */
@media (max-width: 900px) {
  .case-project > .case-hero { padding-bottom: 24px; }
  .case-project > .case-section { padding-top: 24px; padding-bottom: 24px; }
  .case-project > .case-section--tight { padding-top: 0; }
  .case-project .case-section-heading { margin-bottom: 28px; }
  .case-project .case-copy--wide { margin-bottom: 28px; }
  .case-project .case-copy--wide:last-child { margin-bottom: 0; }
  .case-project .square-gallery { margin-top: 0; }
  .case-project .process-sheet { margin-top: 28px!important; margin-bottom: 0!important; }
  .case-project .case-pullquote { margin-bottom: 28px; }
  .case-project .racing-variants { margin-top: 28px; }
  .motion-project .motion-wide { margin-bottom: 36px; }
  .motion-project .motion-vertical-row { margin-bottom: 36px; }
  .motion-project .motion-wide--end { margin-bottom: 0; }
  .motion-project .motion-gallery { padding-bottom: 36px; }
  .motion-project .path-context { padding-bottom: 0; }
  .case-project > .project-footer,
  .motion-project > .project-footer { margin-top: 24px; }
}

/* Prindemar mobile: tighter transitions around the introduction and closing. */
@media (max-width: 900px) {
  .case-project:has(> .prindemar-intro) > .case-hero { padding-bottom: 16px; }
  .case-project > .prindemar-intro { padding-top: 16px; }
  .case-project:has(> .prindemar-intro) > .case-section--tight { padding-top: 0; padding-bottom: 16px; }
  .case-project:has(> .prindemar-intro) .square-gallery { margin-top: 0; }
  .case-project:has(> .prindemar-intro) > .project-footer { margin-top: 16px; }
}

/* Selected mobile pages: soften only the paper, preserving content contrast. */
@media (max-width: 900px) {
  body.mobile-soft-paper {
    background-image: linear-gradient(rgba(255,255,255,.40), rgba(255,255,255,.40)), url('assets/bg-papel-seamless.webp');
  }
}

/* Mobile utility controls share one row, with room for the up arrow. */
@media (max-width: 900px) {
  body:has(> .topbar):has(.back-to-top) .language-switcher {
    right: calc(max(14px, env(safe-area-inset-right)) + 56px);
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  body .back-to-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

/* Mobile footer: keep links close to the divider. */
@media (max-width: 900px) {
  .project-footer { padding-top: 12px; }
  .project-footer .project-pagination { margin-top: 0; }
}

/* Language selection stays on the home at every size; the saved language applies everywhere. */
body:has(> .topbar) .language-switcher { display: none; }
