/* GGS BUILD 01 — GLOBAL UI */
:root{--ggs-ui-pad:clamp(18px,2.3vw,42px)}
html,body{max-width:100%;overflow-x:clip}
body{min-width:0}
main,section,article,header,footer,nav,div{min-width:0}
img,video,svg{max-width:100%}


/* Evidence's compound title: only its Next Project preview. */
.ggs-next-evidence .next-copy{grid-column:1/-1}
.ggs-next-evidence strong{max-width:none!important;width:auto!important}
.ggs-next-evidence strong .next-artists{display:block;font-size:.65em;line-height:1.08;letter-spacing:-.035em;margin-top:.22em}
@media(max-width:560px){.ggs-next-evidence strong .next-artists{font-size:.56em}}
/* Header behaviour — applied to the existing header, not a replacement. */
.topbar,.nav,header.ggs-header-ui{
  transition:transform .28s cubic-bezier(.2,.75,.25,1),background-color .25s ease;
  will-change:transform;
}
.topbar.ggs-header-hidden,.nav.ggs-header-hidden,header.ggs-header-ui.ggs-header-hidden{transform:translateY(-115%)}
body.ggs-menu-open{overflow:hidden}

/* One graphic arrow language everywhere; never let ↗ render as an emoji. */
.ggs-arrow-icon{display:inline-flex;width:.92em;height:.92em;vertical-align:-.08em;margin-left:.18em;flex:0 0 auto}
.ggs-arrow-icon svg{display:block;width:100%;height:100%;overflow:visible}
.ggs-arrow-icon path{fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:square;stroke-linejoin:miter;vector-effect:non-scaling-stroke}

/* Mobile navigation panel. */
.ggs-menu-toggle{display:none;border:0;background:transparent;color:inherit;padding:8px 0;font:600 10px/1 Arial,Helvetica,sans-serif;letter-spacing:.12em;text-transform:uppercase;cursor:pointer}
.ggs-mobile-menu{display:none}

/* Existing language controls: keep a single baseline and equal spacing. */
.languages,.navright,.rightnav{align-items:center}
.languages{white-space:nowrap}
.languages .lang,.navright .lang{line-height:1;display:inline-flex;align-items:center;justify-content:center}

/* TOP: desktop unchanged in spirit, mobile sits safely above browser chrome. */
@media(min-width:801px){
  .ggs-backtop,.top{right:22px!important;bottom:20px!important}
}

@media(max-width:800px){
  html,body{width:100%;max-width:100%;overflow-x:clip}
  .topbar,.nav,header.ggs-header-ui{
    height:72px!important;
    padding-left:18px!important;padding-right:18px!important;
    grid-template-columns:1fr auto!important;
    align-items:center!important;
  }
  .mainnav,.navmid{display:none!important}
  .topbar .logo,.nav .logo{justify-self:start;position:relative;z-index:10003}
  .rightnav,.navright{justify-self:end!important;display:flex!important;gap:8px!important;padding-right:58px!important;position:relative;z-index:10003}
  .rightnav .contact-link,.navright>a[href^="mailto:"]{display:none!important}
  .languages{display:flex!important;gap:9px!important}
  .languages .lang,.navright .lang{font-size:11px!important;letter-spacing:.02em!important;padding:0!important;margin:0!important;min-width:20px;text-align:center}
  .ggs-menu-toggle{display:block;position:absolute;right:18px;top:50%;transform:translateY(-50%);z-index:10004}

  .ggs-mobile-menu{
    display:block;position:fixed;inset:0;z-index:9998;
    background:#0a0a0a;color:#f4f4f2;
    padding:118px 22px max(30px,env(safe-area-inset-bottom));
    opacity:0;visibility:hidden;pointer-events:none;
    transform:translateY(-8px);transition:opacity .22s ease,transform .22s ease,visibility .22s ease;
  }
  body.ggs-menu-open .ggs-mobile-menu{opacity:1;visibility:visible;pointer-events:auto;transform:none}
  .ggs-mobile-menu nav{display:grid;border-top:1px solid rgba(255,255,255,.34)}
  .ggs-mobile-menu nav a{display:flex;align-items:center;justify-content:space-between;min-height:74px;border-bottom:1px solid rgba(255,255,255,.18);font:400 clamp(32px,9vw,54px)/1 Arial,Helvetica,sans-serif;letter-spacing:-.045em}
  .ggs-mobile-menu nav a .ggs-arrow-icon{width:.72em;height:.72em}
  .ggs-mobile-menu-meta{position:absolute;left:22px;right:22px;bottom:max(28px,env(safe-area-inset-bottom));display:flex;justify-content:space-between;gap:20px;font:10px/1.4 Arial,Helvetica,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.62)}

  .ggs-backtop,.top{
    right:14px!important;
    bottom:max(76px,calc(62px + env(safe-area-inset-bottom)))!important;
    z-index:9996!important;
  }

  /* Prevent individual full-viewport blocks from creating lateral overflow after pinch zoom. */
  .hero,.project,.project-media,.gallery,.project-gallery,.archive,.contact,.footer,.next,.next-project{max-width:100vw}
  figure{max-width:100%}
}
/* /GGS BUILD 01 — GLOBAL UI */

/* GGS BUILD 01.3 — MOBILE LEGIBILITY + PROJECT CTA */
@media(max-width:800px){
  /* Header must stay legible on both light and dark photography. */
  .topbar,.nav,header.ggs-header-ui{
    mix-blend-mode:normal!important;
    color:#fff!important;
    background:linear-gradient(180deg,rgba(0,0,0,.58) 0%,rgba(0,0,0,.22) 62%,rgba(0,0,0,0) 100%)!important;
    text-shadow:0 1px 12px rgba(0,0,0,.38);
  }
  .topbar .logo,.nav .logo,
  .topbar a,.nav a,.topbar button,.nav button,
  .languages .lang,.navright .lang,.rightnav .lang{
    color:#fff!important;
  }
  .languages .lang:not(.active),.navright .lang:not(.active),.rightnav .lang:not(.active){opacity:.58!important}
  .ggs-menu-toggle{color:#fff!important;opacity:1!important}

  /* When MENU is open, no blend/hero interference at all. */
  body.ggs-menu-open .topbar,
  body.ggs-menu-open .nav,
  body.ggs-menu-open header.ggs-header-ui{
    background:#0a0a0a!important;
    text-shadow:none!important;
  }

  /* Long project titles: never run outside the viewport. */
  .cinema-label,.afi-copy,.project-overlay{
    max-width:100%!important;
  }
  .cinema-label{
    left:18px!important;
    right:18px!important;
    grid-template-columns:40px minmax(0,1fr)!important;
  }
  .cinema-label h2,
  .afi-copy h2,
  .project-overlay h2{
    font-size:clamp(48px,12.4vw,68px)!important;
    line-height:.84!important;
    letter-spacing:-.07em!important;
    max-width:calc(100vw - 72px)!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  .afi-copy{
    left:18px!important;
    right:18px!important;
  }
  .project-overlay{
    padding-left:18px!important;
    padding-right:18px!important;
  }
  .project-meta{gap:18px!important;flex-wrap:wrap!important}

  /* Visible entry point on project cards that were only invisibly clickable. */
  .ggs-mobile-project-cta{
    position:absolute;
    right:18px;
    bottom:18px;
    z-index:8;
    display:inline-flex;
    align-items:center;
    gap:9px;
    min-height:38px;
    padding:0 12px;
    border:1px solid rgba(255,255,255,.72);
    background:rgba(0,0,0,.32);
    color:#fff;
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);
    font:600 10px/1 Arial,Helvetica,sans-serif;
    letter-spacing:.11em;
    text-transform:uppercase;
    pointer-events:none;
  }
  .ggs-mobile-project-cta .ggs-project-arrow{
    position:relative;
    width:12px;height:12px;display:block;
  }
  .ggs-mobile-project-cta .ggs-project-arrow:before{
    content:"";
    position:absolute;right:0;top:0;width:8px;height:8px;
    border-top:1.4px solid currentColor;border-right:1.4px solid currentColor;
  }
  .ggs-mobile-project-cta .ggs-project-arrow:after{
    content:"";
    position:absolute;left:1px;bottom:1px;width:13px;height:1.4px;
    background:currentColor;transform:rotate(-45deg);transform-origin:left center;
  }

  /* Existing explicit links should also remain readable on image. */
  .view-link{
    position:relative!important;
    z-index:8!important;
    font-size:11px!important;
    padding:9px 10px!important;
    border:1px solid rgba(255,255,255,.72)!important;
    background:rgba(0,0,0,.30)!important;
    border-bottom:1px solid rgba(255,255,255,.72)!important;
  }

  /* Give Archive a clean handoff after the full-screen project. */
  .archive{position:relative;z-index:1}
}
/* /GGS BUILD 01.3 */

/* Desktop homepage TOP follows the existing footer grid and separator. */
@media(min-width:801px){
  body.master-home .contact-foot{anchor-name:--homepage-footer}
  html body.master-home .ggs-backtop{
    right:var(--pad)!important;
    /* Existing footer: 24px bottom inset; keep 12px clearance above its rule. */
    bottom:calc(anchor-size(--homepage-footer height,47px) + 24px + 12px)!important;
  }
}
/* Mobile footer clearance and the homepage Eco title; desktop remains unchanged. */
@media(max-width:700px){
  html body .ggs-backtop,html body .top,html body.master-home .ggs-backtop{
    bottom:max(116px,calc(102px + env(safe-area-inset-bottom)))!important;
  }
}
.home-architecture .featured:has(>a.cover[href$="/eco-visionaries.html"]) .featured-copy h2{
  white-space:nowrap;
  max-width:100%!important;
}
@media(max-width:800px){
  .home-architecture .featured:has(>a.cover[href$="/eco-visionaries.html"]) .featured-copy h2{
    white-space:nowrap;
    max-width:none!important;
    font-size:clamp(34px,11.5vw,80px)!important;
  }
  .home-architecture .featured:has(>a.cover[href$="/eco-visionaries.html"]) .featured-copy h2 br{
    display:none;
  }
}

/* Project Hero subtitle: the existing Evidence title/subtitle language. */
@media(max-width:800px){
  body.grada-kilomba.ggs-project-header-page .hero .hero-copy h1{white-space:nowrap}
  body.grada-kilomba .hero h1 .hero-artists{display:block}
}
body.haus-wittgenstein .haus-mobile-meta,
body.haus-wittgenstein .haus-hero-subtitle{display:none}
@media(max-width:800px){
  body.haus-wittgenstein .hero-copy{left:30px;right:30px;bottom:28px}
  body.haus-wittgenstein .hero-copy .haus-desktop-meta{display:none}
  body.haus-wittgenstein .hero-copy .haus-mobile-meta{display:inline}
  body.haus-wittgenstein .hero-copy .kicker{font-size:12px;letter-spacing:normal;text-transform:none;margin-bottom:10px}
  body.haus-wittgenstein.ggs-project-header-page .hero .hero-copy h1{font-size:40px!important;font-family:Arial,Helvetica,sans-serif;font-weight:400;font-style:normal;line-height:.9;letter-spacing:-.055em;margin:10px 0}
  body.haus-wittgenstein .hero-copy .haus-hero-subtitle{display:block;font-size:18px;font-weight:400;line-height:normal;letter-spacing:normal;margin:18px 0 0}
}
/* Haus project Hero only: keep the architectural projection in the mobile crop. */
@media(max-width:800px){
  body.haus-wittgenstein main > .hero > img{object-position:75% 50%}
}
body.ggs-project-page .hero h1 .hero-artists{
  display:block;font-size:.3em;line-height:1.08;letter-spacing:-.03em;margin-top:.5em;font-weight:500;
}
@media(max-width:800px){
  body.ggs-project-header-page:not(.master-home) :is(.hero,.project-hero) h1{
    font-size:var(--ggs-mobile-title-size,clamp(32px,15vw,66px))!important;
    max-width:100%!important;
    white-space:normal;word-break:normal;overflow-wrap:normal;
    line-height:1;
  }
  body.ggs-project-header-page :is(.hero,.project-hero) h1>br[data-ggs-title-break]{display:none}
  body.ggs-project-page .hero h1 .hero-artists{font-size:max(18px,.3em)}
}

/* Homepage closing section: the heading and the footer share one flex column, so the footer (now carrying the legal links)
   can grow without covering the heading. Same heading size, same bottom-left composition; the section only grows if the content needs it. */
html body.master-home .home-architecture #contact.closing-hero{display:flex;flex-direction:column;justify-content:flex-end;height:auto;min-height:max(100svh,650px);padding:clamp(88px,12vh,140px) var(--pad) 24px!important;box-sizing:border-box}
html body.master-home .home-architecture #contact.closing-hero .hero-copy{position:static;left:auto;right:auto;bottom:auto;margin:0 0 clamp(44px,6vh,64px)}
html body.master-home .home-architecture #contact.closing-hero .hero-title a{padding-bottom:.14em}
html body.master-home .home-architecture #contact.closing-hero .contact-foot{position:relative!important;left:auto;right:auto;bottom:auto;margin:0}

/* NEXT PROJECT card for Eco-Visionaries: keep the title on one line; the dash gets its own spacing (text stays "Eco-Visionaries") */
.next[href$="/eco-visionaries.html"] strong{white-space:nowrap}
.next[href$="/eco-visionaries.html"] strong .dash{letter-spacing:0;margin:0 .05em 0 .105em}
@media(min-width:801px){.next[href$="/eco-visionaries.html"]{grid-template-columns:1fr minmax(0,3fr) auto}.next[href$="/eco-visionaries.html"] strong{font-size:clamp(42px,5.4vw,84px)}}
@media(max-width:800px){.next[href$="/eco-visionaries.html"] strong{font-size:clamp(34px,11.5vw,64px)}}

.txt h2 .dash{font-size:inherit;letter-spacing:0;margin:0 .045em 0 .095em}

/* Photo credit under the project details table (same look as the Tension & Conflict reference): grey, regular weight, discreet. */
.details .credit{margin-top:28px;color:var(--muted,#74736f);font-size:12px;font-weight:400}

/* Project info heading with an explicit primary/secondary title (e.g. "Plástico: Reconstruir o Nosso Mundo"): one line on desktop (unchanged),
   two lines on mobile — the primary word first, without the colon, and the secondary part slightly smaller below it. */
@media(max-width:767px){
  .section h2 .title-colon{display:none}
  .section h2 .title-secondary{display:block;font-size:.8em;line-height:1.02;margin-top:.12em;overflow-wrap:anywhere}
}

/* Plastic: Remaking Our World — pinned Feature image. The three screens sit in the left part of the photograph; the tall mobile frame (cover, centred)
   cut them. Mobile only and this one image: anchor the crop to the left so all three screens stay visible. Desktop framing is untouched. */
@media(max-width:767px){
  body.ggs-project-page .ggs-feature-reveal>figure[data-feature-slot]>img[src*="Reconstruir%20o%20Nosso%20Mundo-24.jpg"]{object-position:8% 50%!important}
}

/* Mobile Hero framing (Media Curator → MOBILE HERO FRAMING): the part of the Hero image kept on phones. Desktop framing is never affected; no attribute = existing centred crop. */
@media(max-width:800px){
  .hero>img[data-hero-phone-focus],.hero>video[data-hero-phone-focus]{object-position:var(--hero-phone-focus)!important}
}

/* Project Hero with an explicit primary/secondary title (Plastic): one plain line on desktop; on phones the primary word first, without the colon,
   and the secondary part slightly smaller below it. The font size is fitted by the title script (ggs-global-ui.js) to the longest of the two lines. */
@media(max-width:800px){
  .hero h1 .title-colon{display:none}
  .hero h1 .title-secondary{display:block;font-size:.75em;line-height:1.04;letter-spacing:-.045em;margin-top:.14em}
}

/* Project info heading with an explicit primary/secondary title on every screen size (Jonathas de Andrade / Olho-Faísca): same hierarchy as its Hero. */
.section h2 .info-secondary{display:block;font-size:.65em;line-height:1.08;letter-spacing:-.035em;margin-top:.22em}

/* Editorial internal links inside body copy (e.g. "audiovisuais para museus" → AV for Museums): a discreet underline so they read as links; everything else unchanged. */
a.inline-link{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.2em;text-decoration-color:currentColor}
a.inline-link:hover,a.inline-link:focus-visible{text-decoration-thickness:2px}

/* Homepage "Selected Clients": the rows that have published projects link to the Work archive filtered by that client. Same type, lines and spacing; only a stretched link, a subtle hover and a keyboard focus ring. */
.client-list .client-link{position:relative;transition:opacity .25s ease}
.client-list .client-link>a{color:inherit;text-decoration:none}
.client-list .client-link>a::after{content:"";position:absolute;inset:0}
.client-list .client-link:hover{opacity:.62}
.client-list .client-link>a:focus-visible{outline:none}
.client-list .client-link>a:focus-visible::after{outline:2px solid currentColor;outline-offset:2px}
/* Work archive filtered by client (?client=maat): small status line above the grid. */
.client-filter{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px 24px;align-items:baseline;padding:22px var(--pad,2.2vw);background:#090909;color:#fff;font:11px/1.4 Arial,Helvetica,sans-serif;text-transform:uppercase;letter-spacing:.1em}
.client-filter a{color:inherit;text-decoration:underline;text-underline-offset:.3em}
.client-filter a:hover,.client-filter a:focus-visible{text-decoration-thickness:2px}

/* Homepage hero, last line: a small "within" whose TOP (ascender) sits on the top of the capital S of "the Space." (Georgia italic: cap height 0.708 em; "within" at 0.2 em → raised 2.787 of its own em).
   Same italic serif, same colour and letter-spacing, no extra box: the line height, animation and responsive size are untouched. */
.hero h1 em:has(.hero-within){white-space:nowrap}
.hero h1 em .hero-within{font-size:.2em;vertical-align:2.787em;letter-spacing:-.02em;margin-right:-.65em}
/* PT/ES hero: the big word is all lowercase, so the small words align to the top of its x-height (e/s/a), not to a capital. */
html[lang^="pt"] .hero h1 em .hero-within,html[lang^="es"] .hero h1 em .hero-within{vertical-align:1.707em}
