/* Margem Arquitectura Paisagista — keeps the original's quiet look:
   white ground, Helvetica/Arial, small letter-spaced capitals, grey labels. */

:root {
  --ink: #141414;
  --ink-2: #505050;
  --muted: #7f7f7f;
  --line: #e4e4e4;
  --bg: #fff;
  --wrap: 1040px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --caps: 0.18em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--muted); }
h1, h2, h3 { font-weight: 400; margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter); border-bottom: 1px solid transparent;
}
.logo { display: flex; flex-direction: column; text-decoration: none; }
.logo img { width: 118px; }
.logo-sub { font-size: 9px; letter-spacing: var(--caps); text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.menu-toggle {
  font: inherit; font-size: 11px; letter-spacing: var(--caps); text-transform: uppercase;
  background: none; border: 1px solid var(--ink); padding: 8px 14px; cursor: pointer; color: var(--ink);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  text-decoration: none; font-size: 11px; letter-spacing: var(--caps); text-transform: uppercase; color: var(--ink-2);
}
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { font-weight: 600; }

/* mobile menu */
@media (max-width: 899px) {
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px;
  }
  .site-nav li a { display: block; padding: 12px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
  .site-nav li:last-child a { border-bottom: 0; }
  .no-js .menu-toggle { display: none; }
  .no-js .site-nav { position: static; padding: 0; border: 0; }
  .site-header.scrolled { border-bottom-color: var(--line); }
}

/* desktop: centred row like the original, vertical logo pinned right */
@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .site-header { justify-content: center; padding: 18px var(--gutter) 14px; }
  .site-nav ul { display: flex; gap: clamp(28px, 6vw, 88px); }
  /* vertical MARGEM pinned to the right edge, as on the original */
  .logo { position: fixed; z-index: 30; right: 14px; top: 20px; width: 26px; height: 130px; }
  .logo img {
    position: absolute; left: 50%; top: 50%; width: 130px; max-width: none;
    transform: translate(-50%, -50%) rotate(90deg); opacity: .5; transition: opacity .2s;
  }
  .logo:hover img { opacity: 1; }
  .logo-sub { display: none; }
}

/* ---------- home ---------- */
.home .site-header { position: absolute; left: 0; right: 0; background: transparent; }
.home .site-header .logo img { filter: invert(1); }
.home .site-header a, .home .menu-toggle { color: #fff; border-color: #fff; }
.home .logo-sub { color: rgba(255,255,255,.8); }
@media (max-width: 899px) {
  .home .site-nav a { color: var(--ink-2); }
}
@media (min-width: 900px) {
  .home .site-header .logo { display: none; }
  .home .site-nav a { color: rgba(255,255,255,.9); }
  .home .site-nav a:hover { color: #fff; }
}
.hero { position: relative; height: 100vh; height: 100svh; min-height: 420px; background: #222; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img { position: absolute; inset: 0; }
.hero-logo { position: absolute; right: var(--gutter); bottom: 34px; width: min(231px, 46vw); }
.hero-scroll {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  color: #fff; text-decoration: none; font-size: 20px; opacity: .8;
}
.intro { max-width: 760px; margin: 0 auto; padding: 72px var(--gutter) 40px; text-align: center; }
.intro h1 { font-size: 13px; letter-spacing: var(--caps); text-transform: uppercase; margin-bottom: 18px; }
.lead { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.5; color: var(--ink); margin: 0; }
.section-title { font-size: 11px; letter-spacing: var(--caps); text-transform: uppercase; color: var(--muted); text-align: center; margin: 24px 0 22px; }

/* ---------- headings / misc ---------- */
.page-title {
  font-size: 13px; letter-spacing: var(--caps); text-transform: uppercase;
  margin: 40px 0 26px; text-align: center;
}
.small-title { font-size: 11px; letter-spacing: var(--caps); text-transform: uppercase; color: var(--ink-2); margin: 32px 0 10px; }
.more { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin: 28px 0; }
.more a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.intro .more, .wrap > .more { text-align: center; }
.crumbs {
  font-size: 10px; letter-spacing: var(--caps); text-transform: uppercase; color: var(--ink);
  padding-top: 26px; padding-bottom: 18px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs span { color: var(--muted); margin: 0 4px; }
.crumbs [aria-current] { color: var(--ink); margin: 0; }

/* ---------- grid ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 6px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.grid-wide { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-wide { grid-template-columns: repeat(2, 1fr); } }
.card a { display: block; text-decoration: none; }
.card-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #f3f3f3; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s, transform .6s; }
.card a:hover .card-img img { opacity: .85; transform: scale(1.02); }
.card-text { display: block; padding-top: 9px; }
.card-title { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.4; color: var(--ink); }
.card-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.card[hidden] { display: none; }
.filters { display: flex; justify-content: center; gap: 4px; margin: -8px 0 26px; }
.no-js .filters { display: none; }
.filters button {
  font: inherit; font-size: 10px; letter-spacing: var(--caps); text-transform: uppercase;
  background: none; border: 0; padding: 8px 10px; cursor: pointer; color: var(--muted);
}
.filters button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }

/* ---------- gallery ---------- */
.gallery { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; }
.gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; margin: 0; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 var(--gutter); height: min(68vh, 560px);
}
.slide picture { display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; }
.slide img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.slide figcaption { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-top: 10px; text-align: center; }
.slide:has(figcaption) picture { height: calc(100% - 34px); }
@media (max-width: 699px) {
  .slide { height: auto; max-height: 75vh; padding: 0; }
  .slide img { max-height: 70vh; }
}
.gallery-controls {
  display: flex; align-items: center; gap: 10px; padding: 14px var(--gutter) 0;
  max-width: var(--wrap); margin: 0 auto;
}
.gallery-controls button {
  font: inherit; font-size: 16px; background: none; border: 0; cursor: pointer; padding: 6px 8px; color: var(--ink-2);
}
.gallery-controls button:hover { color: var(--ink); }
.g-dots { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
.g-dots a { display: inline-block; min-width: 22px; padding: 4px 2px; text-align: center; font-size: 12px; text-decoration: none; color: var(--muted); }
.g-dots a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.g-count { font-size: 12px; color: var(--muted); margin-left: auto; }
@media (max-width: 699px) { .g-dots { display: none; } .g-count { margin: 0 auto; } }
@media (min-width: 700px) { .g-count { display: none; } }
.no-js .gallery-controls button { display: none; }

/* ---------- project ---------- */
.project-body { padding-top: 28px; }
.project-head { margin-bottom: 30px; }
.project-head h1 { font-size: clamp(18px, 2.4vw, 22px); text-transform: uppercase; letter-spacing: .04em; line-height: 1.3; }
.h1-sub { color: var(--ink-2); }
.project-place { margin: 4px 0 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.project-collab { margin: 6px 0 0; font-size: 13px; }
.project-sub { margin: 14px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); max-width: 760px; }
.project-prize { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.cols { display: grid; gap: 36px; }
@media (min-width: 900px) {
  .cols { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; }
  .project .col-ficha { order: 0; }
  .atelier .cols, .contact .cols { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
}
.prose p { margin: 0 0 1.05em; text-align: left; hyphens: auto; }
.prose h3 { font-size: 12px; letter-spacing: var(--caps); text-transform: uppercase; margin: 1.8em 0 .8em; }
.prose ul { padding-left: 1.1em; margin: 0 0 1.05em; }
.prose li { margin-bottom: .5em; }
@media (min-width: 900px) { .prose { font-size: 14px; } }

.ficha { display: grid; grid-template-columns: 9.5em 1fr; gap: 6px 16px; margin: 0; font-size: 12.5px; line-height: 1.45; }
.ficha dt { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.ficha dd { margin: 0; }
.ficha .ficha-grupo { grid-column: 1 / -1; color: var(--ink-2); margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.ficha .ficha-grupo-dd { display: none; }
@media (max-width: 420px) { .ficha { grid-template-columns: 1fr; gap: 0; } .ficha dd { margin-bottom: 8px; } }
.pubs { list-style: none; padding: 0; margin: 0; font-size: 12.5px; line-height: 1.45; }
.pubs li { margin-bottom: 8px; overflow-wrap: anywhere; }
.pubs a { color: var(--ink-2); }

.pager { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); margin-top: 56px; padding-top: 18px; }
.pager a { text-decoration: none; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; max-width: 48%; }
.pager a span { display: block; color: var(--muted); font-size: 10px; letter-spacing: var(--caps); margin-bottom: 2px; }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- atelier ---------- */
.banner { margin: 28px 0 0; }
.banner figcaption { font-size: 10px; color: var(--muted); text-align: right; margin-top: 6px; }
.person { font-size: 14px; margin-bottom: 14px; }
.cv { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px 14px; margin: 0; font-size: 12.5px; line-height: 1.45; }
.cv dt { color: var(--muted); }
.cv dd { margin: 0; }
.people { list-style: none; margin: 0; padding: 0; font-size: 12.5px; columns: 2; column-gap: 18px; }
.people li { break-inside: avoid; margin-bottom: 4px; }
.people span { color: var(--muted); white-space: nowrap; }

/* ---------- publications / index ---------- */
.pub-section { margin-bottom: 30px; }
.pub-note { font-size: 12px; color: var(--muted); margin: -4px 0 14px; }
.publist { list-style: none; margin: 0; padding: 0; font-size: 13.5px; line-height: 1.5; }
.publist li { margin-bottom: 14px; overflow-wrap: anywhere; }
.pub-author { color: var(--muted); }
.timeline { display: grid; grid-template-columns: 5.5em 1fr; gap: 10px 18px; margin: 0 0 40px; font-size: 13.5px; line-height: 1.5; }
.timeline dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline dd { margin: 0; }

/* ---------- contact ---------- */
.contact-name { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 12px; }
.contact-address { font-style: normal; font-size: 17px; line-height: 1.55; margin-bottom: 14px; }
.contact-lines { font-size: 17px; line-height: 1.7; }
.contact-lines a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 26px var(--gutter) 34px; font-size: 11.5px; color: var(--ink-2); text-align: center; }
.footer-inner p { margin: 0; }
.footer-inner strong { font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.site-footer address { font-style: normal; margin: 8px 0; line-height: 1.7; }
.site-footer a { text-decoration: none; }
.copy { color: var(--muted); }

.notfound { min-height: 40vh; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html, .gallery-track { scroll-behavior: auto; }
  .card-img img { transition: none; }
}

/* tweaks after review */
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 140px; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0));
}
.home .site-header { z-index: 20; }
@media (max-width: 899px) {
  .project .col-text { order: -1; }
  .atelier .col-text { order: -1; }
}
@media (max-width: 699px) { .hero-scroll { display: none; } }
