/* Shared responsive foundation. Phone layouts first; larger layouts opt in below.
   Load after the art-direction styles on the home and every generated page. */

/* ---------- Footer: one mobile-first layout on every page, home included ---------- */
.site-footer{margin:0 10px 10px;padding:44px 22px 24px;border:0;border-radius:var(--lx-r);background:var(--lx-card);color:#f2f1ed}
.footer-main{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 20px;align-items:start}
.footer-main>*{min-width:0}
.footer-main>.site-logo{grid-column:1/-1;display:flex;align-items:center;width:112px;min-height:44px}
.footer-main>.site-logo img{display:block;width:100%;height:auto}
.footer-main>div,.footer-main>nav{display:grid;align-content:start;grid-column:1/-1}
.footer-main .eyebrow{display:block;margin:0 0 6px;font-family:inherit;font-weight:400;font-size:11px;line-height:1.5;letter-spacing:.06em;text-transform:none;color:#8e9aa0}
.footer-main .eyebrow:before{content:none}
.footer-main>div>a,.footer-main>nav>a{display:flex;align-items:center;width:fit-content;max-width:100%;min-height:44px;padding:10px 0;font-size:14px;line-height:1.5;color:inherit;text-decoration:none!important;transition:color .3s;overflow-wrap:anywhere}
.footer-main>div>a:hover,.footer-main>nav>a:hover{color:#9cbaf7}
.site-footer .lx-roll{max-width:100%}
.footer-main>.footer-nav{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px}
.footer-nav .eyebrow{grid-column:1/-1}
.footer-main>.footer-social{display:flex;flex-wrap:wrap;column-gap:22px}
.footer-social .eyebrow{flex-basis:100%}
.footer-base{display:flex;flex-wrap:wrap;align-items:center;gap:0 20px;margin-top:30px;padding-top:14px;border-top:1px solid #ffffff1a;font-size:12px;line-height:1.5;color:#a6afb6}
.footer-base>span{padding-block:6px}
.footer-base>span:first-child{flex-basis:100%}
.footer-base>a{display:inline-flex;align-items:center;min-height:44px;padding-block:10px;color:inherit;transition:color .3s}
.footer-legal{display:flex;flex-wrap:wrap;gap:0 18px}
.footer-legal a,.footer-legal button{display:inline-flex;align-items:center;min-height:44px;font:inherit;color:inherit;background:none;border:0;padding:10px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px;opacity:.85}
.footer-legal a:hover,.footer-legal button:hover,.footer-base>a:hover{opacity:1;color:#fff}
.footer-note{margin:10px 0 0;max-width:880px;font-size:12px;line-height:1.65;color:#9ba6ad;overflow-wrap:anywhere}
.footer-note a{color:inherit;text-decoration:underline;text-underline-offset:3px}
@media(min-width:600px){
 .footer-main{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr);gap:36px 28px}
 .footer-main>.site-logo{width:124px}
 .footer-main>div,.footer-main>nav{grid-column:auto}
 .footer-main>.footer-nav{grid-template-columns:minmax(0,1fr)}
 .footer-main>.footer-social{display:grid}
 .footer-base{gap:0 24px;margin-top:40px}
 .footer-base>span:first-child{flex-basis:auto}
}
@media(min-width:761px){.site-footer{margin:0 var(--gutter) var(--gutter);padding:clamp(48px,5vw,75px) clamp(26px,3.5vw,56px) 28px}}
/* With a mouse the footer labels roll on one line: «Explora» is wide enough for its longest link (210 px). */
@media(min-width:761px){.footer-main{grid-template-columns:minmax(0,1.2fr) minmax(0,1.3fr) minmax(0,.8fr)}}
@media(min-width:1024px){
 .footer-main{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) minmax(0,1.35fr) minmax(0,.8fr);gap:40px}
 .footer-main>.site-logo{grid-column:auto;width:150px}
 .footer-base{justify-content:space-between;margin-top:56px}
}

/* Content may shrink within flex/grid tracks; long names and emails may wrap. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
:where(main,section,article,nav,form,fieldset,.page-wrap,.chapter-copy,.case-title,.next-copy>div){min-width:0}
:where(h1,h2,h3,p,li,.text-link,.small-link,.button-link){overflow-wrap:anywhere}
.lx-lines .lx-w,.lx-lines .lx-wi{max-width:none;white-space:nowrap;overflow-wrap:normal}
.lx-lw{max-width:none;white-space:nowrap}
/* Phones and touch screens: labels wrap instead of rolling. With a mouse, from 761 px, the rolling hover labels stay. */
@media(hover:none),(max-width:760px){
 :is(.button-link,.text-link,.small-link,.footer-main a,.contact-bottom a,.logo-density) .lx-roll{max-width:100%;height:auto;overflow:visible}
 :is(.button-link,.text-link,.small-link,.footer-main a,.contact-bottom a,.logo-density) .lx-roll>span{white-space:normal;overflow-wrap:anywhere;text-shadow:none;transform:none!important}
}
.button-link,.text-link,.small-link{max-width:100%;min-height:44px}
.button-link>span[aria-hidden],.text-link>span[aria-hidden],.small-link>span[aria-hidden]{flex:none}
.blog-conversation .button-link,.article-cta .button-link{gap:12px;padding-inline:18px}
.site-footer{padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}

/* A scrollable mobile menu stays usable in landscape and with enlarged text.
   The collapsed «Menú +» bar is the default from the first paint; navigation.js only opens and closes it.
   Without JavaScript the links stay laid out in the header (noscript block in each page head). */
.site-header{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;height:80px;min-height:80px;flex-wrap:nowrap;gap:12px;padding:0 var(--gutter);font:400 16px/1.55 var(--sf-pro);color:#f2f1ed}
.home-body .site-header{position:fixed;left:0;right:0}
.site-header .site-logo{display:block;flex-shrink:0}
.site-header .site-logo img{display:block;width:100%;height:auto}
.site-header a{text-decoration:none}
.site-header .menu-toggle{font:inherit;cursor:pointer;border-radius:40px!important;padding:11px 18px!important}
.site-header .site-nav>a{color:#cbd0d2;position:relative;border-radius:14px;text-decoration:none}
.site-header .site-logo{width:107px}
.site-header .button-link{display:none}
.site-header .menu-toggle{display:block;min-height:44px;flex-shrink:0}
.site-header .site-nav{display:none;position:absolute;top:84px!important;left:var(--gutter)!important;right:var(--gutter)!important;width:auto;gap:2px!important;padding:10px!important;background:#121b20!important;border-radius:15px;max-height:calc(100svh - 96px);max-height:calc(100dvh - 96px - env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain;box-shadow:0 30px 60px #0008}
.site-header .site-nav.is-open{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch}
.site-header .site-nav>a{width:100%;min-height:44px;display:flex!important;align-items:center;font-size:25px!important;font-weight:300;padding:14px 16px!important}
.site-header .site-nav .mobile-contact{display:flex!important;margin-top:8px;background:#f2f1ed;color:#080d0f}
.site-header .site-nav a[aria-current=page]:after{display:none}
.site-header .lx-nav-pill{display:none}
.site-header .site-nav>a:hover,.site-header .site-nav>a[aria-current=page]{background:#ffffff0f}
@media(max-width:900px){.site-header.lx-header-hide{transform:none}.site-header .site-nav>a[aria-current=page]:after{display:none}.site-header .button-link{display:none}}

/* Keep every portfolio filter visible, without an undiscoverable sideways strip. */
.work-toolbar{flex-direction:column;align-items:stretch}
.work-filters{flex-wrap:wrap;overflow:visible;max-width:100%;gap:4px;border-radius:20px}
.work-filters button,.blog-filters button{min-height:44px}
.work-search{width:100%;min-width:0}
.work-search input{width:100%;min-width:0;min-height:44px;font-size:16px}
.work-grid{grid-template-columns:minmax(0,1fr)}
.work-card-copy :is(h2,h3){overflow-wrap:anywhere}
.logo-density{flex-shrink:0;min-height:44px}

/* The chapter dock has three generous touch targets and never covers the footer. */
.case-nav{width:min(420px,calc(100% - 24px));padding:5px!important;gap:0!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))}
.case-nav>span:first-child{display:none}
.case-nav>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;min-width:0;gap:2px!important}
.case-nav a{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;font-size:11px;padding:8px 4px;text-align:center}
@media(hover:none),(max-width:760px){
 .case-nav .lx-roll{max-width:100%;height:auto;overflow:visible}
 .case-nav .lx-roll>span{white-space:normal;text-shadow:none;transform:none!important}
}
.case-nav .case-progress{display:block}
/* Hidden until the hero has passed; before lusion.js runs too, so it never shows up in the page flow first.
   Without JavaScript it stays in the flow (noscript block in the page head). */
html:not(.lx-dock-on) .case-nav{visibility:hidden;pointer-events:none}
@media(prefers-reduced-motion:no-preference){
 html.lx .case-nav{transition:transform .8s var(--lx-ease),opacity .5s,visibility 0s linear .8s}
 html.lx.lx-dock-on .case-nav{transition-delay:0s}
}
.case-title h1,.hero-split .case-title h1,.hero-float .case-title h1,.hero-editorial .case-title h1,.hero-cinema .case-title h1{font-size:clamp(48px,14vw,100px);hyphens:manual;overflow-wrap:anywhere}
.hero-cinema[data-project=bioalimentar] .case-title h1{font-size:clamp(44px,12vw,96px)}
.case-back,.case-hero-bottom>a,.next-topbar a{min-height:44px;display:inline-flex;align-items:center}
.next-topbar{flex-wrap:wrap;gap:8px 20px}
@media(max-width:560px){.next-copy h2{font-size:clamp(36px,10vw,56px)}}

/* Forms start with full-width fields; split only where labels have room. */
.contact-conversation{grid-template-columns:minmax(0,1fr)}
.contact-form-row{grid-template-columns:minmax(0,1fr);gap:0}
.contact-field :is(input,select,textarea),.quiz-lead :is(input,textarea){font-size:16px}
.contact-primary,.contact-secondary,.quiz-back,.quiz-track-label button,.quiz-answer-review button{min-height:44px}
.quiz-page button,.quiz-answer-review summary{min-height:44px}
.quiz-step-actions,.quiz-track-label{flex-wrap:wrap;gap:12px}
.article-toc summary,.article-toc nav a,.legal-toc a{min-height:44px}
.article-toc nav a,.legal-toc a{display:flex;align-items:center}
.tb-cookies{max-height:calc(100svh - 20px);max-height:calc(100dvh - 20px - env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain}
.tb-cookies-actions button{min-height:44px}
.media-dialog,.index-ov,.service-dialog{max-height:calc(100dvh - 24px);overflow:auto}
.media-dialog .dialog-close,.lightbox-controls button{min-height:44px;min-width:44px}
.media-dialog{padding-top:74px}
.media-dialog img{max-height:calc(100dvh - 160px)}

@media(hover:none){
 .lx-roll>span{transform:none!important;text-shadow:none}
}

@media(min-width:560px){
 .work-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .contact-form-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
 .blog-conversation .button-link,.article-cta .button-link{gap:32px;padding-inline:25px}
}
@media(min-width:761px){
 .case-title h1{font-size:clamp(75px,8.8vw,156px)}
 .hero-split .case-title h1{font-size:clamp(64px,6.5vw,112px)}
 .hero-float .case-title h1{font-size:clamp(72px,8vw,145px)}
 .hero-editorial .case-title h1{font-size:clamp(65px,7vw,124px)}
 .hero-cinema .case-title h1{font-size:clamp(76px,min(11vw,17svh),190px)}
 .hero-cinema[data-project=bioalimentar] .case-title h1{font-size:clamp(70px,10.4vw,175px)}
 .case-nav{width:auto;padding:6px 6px 6px 20px!important;gap:26px!important}
 .case-nav>span:first-child{display:block}
 .case-nav>div{display:flex;width:auto}
 .case-nav a{font-size:12px;padding:9px 14px}
}
@media(min-width:901px){
 .site-header{height:94px;flex-wrap:nowrap;padding-block:0;gap:20px}
 .site-header .site-logo{width:132px}
 .site-header .menu-toggle{display:none}
 .site-header .site-nav,.site-header .site-nav.is-open{position:relative;top:auto!important;left:auto!important;right:auto!important;display:flex;flex-direction:row;flex-wrap:nowrap;width:auto;max-height:none;overflow:visible;gap:2px!important;padding:5px!important;border-radius:44px;background:#ffffff0c!important;box-shadow:inset 0 0 0 1px #ffffff14}
 .site-header .site-nav>a{width:auto;font-size:13px!important;font-weight:400;padding:10px 17px!important;border-radius:30px;white-space:nowrap}
 .site-header .site-nav .mobile-contact{display:none!important}
 .site-header .site-nav a[aria-current=page]:after{content:"";display:block;position:absolute;left:50%;bottom:4px;width:4px;height:4px;border-radius:50%;transform:translateX(-50%);background:currentColor}
 .site-header .site-nav>a:hover,.site-header .site-nav>a[aria-current=page]{background:transparent}
 .site-header .lx-nav-pill{display:block}
 .work-toolbar{flex-direction:row;align-items:center;flex-wrap:wrap}
 .work-search{width:240px}
}
@media(min-width:1101px){
 .site-header .button-link{display:inline-flex;font-size:12px;padding:12px 18px;white-space:nowrap}
 .contact-conversation{grid-template-columns:minmax(0,.85fr) minmax(0,1fr)}
}
/* The dropdown menu keeps its opening animation across its whole range (phones and tablets). */
@media(max-width:900px) and (prefers-reduced-motion:no-preference){
 .site-header .site-nav.is-open{animation:lx-drop .55s var(--lx-ease) both}
}
/* …and leaves the same way it came in. navigation.js keeps .is-closing until the animation ends, so the
   panel is still laid out while it folds back; it takes no taps meanwhile. */
@media(max-width:900px){
 .site-header .site-nav.is-closing{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;pointer-events:none}
}
@media(max-width:900px) and (prefers-reduced-motion:no-preference){
 .site-header .site-nav.is-closing{animation:lx-drop-out .42s var(--lx-io) both}
}
@keyframes lx-drop-out{from{opacity:1;transform:none;transform-origin:top right;clip-path:inset(0 round var(--lx-r))}to{opacity:0;transform:translateY(-12px) scale(.97);transform-origin:top right;clip-path:inset(0 0 100% 30% round var(--lx-r))}}
/* The cookie notice and the chapter dock never cover the open menu; they come back when it closes. */
.lx-nav-open .tb-cookies,html.lx-nav-open .case-nav{opacity:0;visibility:hidden;pointer-events:none}
/* Language selector (scripts/i18n_site.py writes it once a language is live): a small menu beside
   «Hablemos de tu marca» on wide screens, a row of codes inside the phone menu. */
.lang-switch{display:none;position:relative;flex-shrink:0;font:400 12px/1 var(--sf-pro)}
.lang-switch summary{display:inline-flex;align-items:center;gap:7px;height:41px;padding:0 15px;border-radius:40px;background:#ffffff0c;box-shadow:inset 0 0 0 1px #ffffff14;color:#f2f1ed;letter-spacing:.05em;cursor:pointer;list-style:none;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition:background-color .3s}
.lang-switch summary::-webkit-details-marker{display:none}
.lang-switch summary:after{content:"";width:6px;height:6px;margin-top:-3px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);opacity:.7;transition:transform .3s,margin .3s}
.lang-switch[open] summary:after{transform:rotate(225deg);margin-top:3px}
.lang-switch summary:hover,.lang-switch[open] summary{background:#ffffff1a}
.lang-switch summary:focus-visible{outline:2px solid #a9bbdf;outline-offset:2px}
.lang-menu{position:absolute;top:calc(100% + 10px);right:0;z-index:5;display:grid;gap:2px;min-width:176px;padding:6px;border-radius:15px;background:#121b20;box-shadow:0 30px 60px #0008,inset 0 0 0 1px #ffffff14}
.lang-menu a{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:10px;color:#cbd0d2;font-size:13px;white-space:nowrap;text-decoration:none}
.lang-menu a b{width:22px;font-weight:400;font-size:11px;letter-spacing:.06em;color:#8f9aa0}
.lang-menu a:hover,.lang-menu a[aria-current]{background:#ffffff0f;color:#f2f1ed}
.site-header .site-nav .lang-row{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;margin-top:10px;padding:12px 6px 4px;border-top:1px solid #ffffff14}
.site-header .site-nav .lang-row a{display:inline-flex!important;align-items:center;justify-content:center!important;width:auto!important;min-width:52px;min-height:44px;padding:0 14px!important;border-radius:30px!important;color:#cbd0d2;font-size:14px!important;font-weight:400;letter-spacing:.05em;text-decoration:none}
.site-header .site-nav .lang-row a[aria-current]{background:#ffffff14;color:#f2f1ed}
.header-actions{display:none}
@media(min-width:901px){
 .lang-switch{display:block}
 .site-header .site-nav .lang-row{display:none}
 /* Desktop bar in three parts: logo, menu, and languages + contact button. Both sides take the same width, so the
    menu sits at the centre of the page whatever they measure; phones and tablets show the menu button alone. */
 .site-header{display:grid;grid-template-columns:minmax(max-content,1fr) auto minmax(max-content,1fr)}
 .site-header .site-logo{grid-column:1;justify-self:start}
 .site-header .site-nav{grid-column:2;justify-self:center}
 .site-header>.button-link,.site-header .header-actions{grid-column:3;justify-self:end}
 .site-header .header-actions{display:flex;align-items:center;gap:clamp(8px,1vw,12px)}
 .site-header .button-link{display:inline-flex;flex-shrink:0;font-size:12px;padding:12px 18px;white-space:nowrap}
}
/* Narrow desktop bars: logo, menu, languages and contact button close up little by little, so the button never
   drops out and the menu stays at the centre. With the language menu the bar needs more room (from 1010 px). */
@media(min-width:901px) and (max-width:1180px){
 .site-header{padding-inline:clamp(20px,calc(20px + (100vw - 901px)*.106),var(--gutter));column-gap:clamp(10px,calc(10px + (100vw - 901px)*0.0358),20px)}
 .site-header .site-logo{width:clamp(100px,calc(100px + (100vw - 901px)*0.1147),132px)}
 .site-header .site-nav>a{padding-inline:clamp(8px,calc(8px + (100vw - 901px)*0.0323),17px)!important;font-size:clamp(12px,calc(12px + (100vw - 901px)*0.0036),13px)!important}
 .site-header .button-link{padding-inline:clamp(13px,calc(13px + (100vw - 901px)*0.0179),18px);gap:clamp(8px,calc(8px + (100vw - 901px)*0.0215),14px)}
 .site-header .button-link:before{width:clamp(22px,calc(22px + (100vw - 901px)*0.0645),40px)}
 .site-header .lang-switch summary{padding-inline:clamp(11px,calc(11px + (100vw - 901px)*0.0143),15px)}
}
@media(min-width:901px) and (max-width:1360px){
 .site-header:has(.header-actions){padding-inline:clamp(20px,calc(20px + (100vw - 1010px)*.106),var(--gutter));column-gap:clamp(10px,calc(10px + (100vw - 1010px)*0.0286),20px)}
 .site-header:has(.header-actions) .site-logo{width:clamp(100px,calc(100px + (100vw - 1010px)*0.0914),132px)}
 .site-header:has(.header-actions) .site-nav>a{padding-inline:clamp(8px,calc(8px + (100vw - 1010px)*0.0257),17px)!important;font-size:clamp(12px,calc(12px + (100vw - 1010px)*0.0029),13px)!important}
 .site-header:has(.header-actions) .button-link{padding-inline:clamp(13px,calc(13px + (100vw - 1010px)*0.0143),18px);gap:clamp(8px,calc(8px + (100vw - 1010px)*0.0171),14px)}
 .site-header:has(.header-actions) .button-link:before{width:clamp(22px,calc(22px + (100vw - 1010px)*0.0514),40px)}
 .site-header:has(.header-actions) .lang-switch summary{padding-inline:clamp(11px,calc(11px + (100vw - 1010px)*0.0114),15px)}
}
/* Footer: the same choice of language, written out. */
.footer-lang{order:-1;flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:0 18px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid #ffffff12}
.footer-lang span{padding-block:6px;color:#8e9aa0}
.footer-lang a{display:inline-flex;align-items:center;min-height:44px;padding:10px 0;color:inherit;text-decoration:none;opacity:.85;transition:color .3s,opacity .3s}
.footer-lang a:hover,.footer-lang a[aria-current]{opacity:1;color:#fff}
.footer-lang a[aria-current]{text-decoration:underline;text-underline-offset:5px}
/* Hover label of a case picture, in the language of the page. */
:lang(en) .case-media a.media-frame:after{content:"Enlarge ↗"}
/* A page in another language links to the Spanish blog: the link says so. */
a[hreflang="es"]:not([lang]):after{content:" (ES)";font-size:.72em;letter-spacing:.04em;opacity:.7}
/* Offer of the visitor's own language (navigation.js): it suggests, it never redirects. */
.lang-offer{position:fixed;top:104px;right:var(--gutter);z-index:290;display:flex;align-items:center;gap:14px;max-width:min(430px,calc(100% - 20px));padding:12px 12px 12px 18px;border-radius:40px;background:#111a1ff2;color:#f2f1ed;font:400 13px/1.35 var(--sf-pro);box-shadow:0 20px 50px #0009,inset 0 0 0 1px #ffffff14;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);animation:lang-offer-in .5s cubic-bezier(.2,.7,.2,1) both}
.lang-offer a{flex-shrink:0;padding:9px 15px;border-radius:30px;background:#f2f1ed;color:#080d0f;text-decoration:none;white-space:nowrap}
.lang-offer button{flex-shrink:0;width:34px;height:34px;border:0;border-radius:50%;background:#ffffff14;color:inherit;font:inherit;font-size:16px;line-height:1;cursor:pointer}
@keyframes lang-offer-in{from{opacity:0;transform:translateY(-8px)}}
@media(max-width:900px){.lang-offer{top:88px;left:10px;right:10px;max-width:none;border-radius:22px;justify-content:space-between}.lang-offer span{flex:1}}
@media(prefers-reduced-motion:reduce){.lang-offer{animation:none}}
/* Languages the studio does not answer in: the form says to write in English or Spanish. */
.lang-notice{margin:0 0 24px;padding:14px 16px;border-radius:12px;background:#274b9b2e;box-shadow:inset 0 0 0 1px #4d7be066;color:#f2f1ed;font:400 14px/1.45 var(--sf-pro)}
