/* ══════════════════════════════════════════════════════════════
   noguera.design — hand-built clone of the Squarespace original
   White · black · Helvetica Neue headings/body · Poppins accents
   ══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Poppins'; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins'; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins'; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/poppins-600.woff2') format('woff2');
}

:root {
  --maxw: 1500px;
  --pad: 4vw;
  --body-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --accent-font: 'Poppins', "Helvetica Neue", sans-serif;
  --gray-card: #ededee;
  --ink: #000;
  --paper: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 15px/1.8 var(--body-font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); }
h4 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
img, video { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid currentColor; opacity: .35; margin: 2.5rem 0; }
figure { margin: 0; }
figcaption { font-size: .8rem; color: #7d7d7d; padding-top: .6em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #000; color: #fff; padding: 8px 14px; z-index: 99; }

/* ── header ─────────────────────────────────────────────── */
.site-header { background: var(--paper); position: relative; z-index: 40; }
.header-wrap { display: flex; align-items: center; gap: 2.5rem; padding-top: 1.7vw; padding-bottom: 1.7vw; }
.logo img { height: 84px; width: auto; }
.site-nav { flex: 1; }
.site-nav > ul { list-style: none; display: flex; gap: 2.2rem; margin: 0; padding: 0; align-items: center; }
.site-nav a, .site-nav .has-sub > button {
  font-family: var(--accent-font); font-weight: 500; font-size: .875rem; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4em;
}
.site-nav a:hover, .site-nav .has-sub > button:hover { opacity: .6; }
.site-nav a.active, .has-sub.active > button { text-decoration: underline; text-underline-offset: 5px; }
.has-sub { position: relative; }
.has-sub .sub {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid #e6e6e6; box-shadow: 0 10px 30px rgba(0,0,0,.08);
  list-style: none; margin: 0; padding: .6rem 0; min-width: 170px;
  opacity: 0; visibility: hidden; transition: opacity .18s ease;
}
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; visibility: visible; }
.has-sub .sub a { display: block; padding: .5rem 1.3rem; }
.social { display: flex; gap: 1.1rem; align-items: center; }
.social a { color: var(--ink); display: inline-flex; }
.social a:hover { opacity: .6; }
.nav-toggle { display: none; }

/* ── sections ───────────────────────────────────────────── */
.sec { padding: 4.5rem 0; }
.sec.dark { background: #000; color: #fff; }
.sec.dark + .sec.dark { padding-top: 0; }
.sec-bleed { padding: 0; line-height: 0; }
.sec-bleed img, .sec-bleed video { width: 100%; height: auto; object-fit: cover; }

/* bands of column-clusters (mirrors the original fluid-engine layout) */
.band { display: flex; gap: 2.5rem; align-items: flex-start; }
.band.center { align-items: center; }
.band + .band { margin-top: 2.6rem; }
.cluster { flex: 0 1 var(--w); min-width: 0; }
.band > .cluster:only-child { flex-basis: 100%; }
.cluster .img img { width: 100%; }
.cluster .txt.card { background: var(--gray-card); padding: 2.5rem; }
.sec.dark .cluster .txt.card { background: #111; }
.cluster .txt + .txt, .cluster .txt + .img, .cluster .img + .txt, .cluster .img + .img { margin-top: 1.6rem; }
.cluster a { word-break: break-word; }

/* section background media */
.sec-bands { position: relative; }
.sec-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.sec-bands > .wrap { position: relative; z-index: 1; }

/* full-width video hero */
.sec-video-hero { padding: 3.5rem 0; }
.sec-video-hero video { width: 100%; aspect-ratio: 16 / 9; height: auto; background: #000; }

/* video */
.vid video, .vid iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; background: #000; }
.vid { margin: 0; }

/* buttons */
.btn {
  display: inline-block; background: #000; color: #fff; text-decoration: none;
  font-family: var(--accent-font); font-weight: 500; font-size: .9rem; letter-spacing: .02em;
  padding: 1em 2.2em; transition: opacity .15s ease;
}
.btn:hover { opacity: .8; }
.sec.dark .btn { background: #fff; color: #000; }

/* ── portfolio grid ─────────────────────────────────────── */
.sec-portfolio { padding-top: 1rem; }
.portfolio-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3.2rem; }
.portfolio-grid a { text-decoration: none; display: block; }
.portfolio-grid a { position: relative; }
.pg-img { display: block; overflow: hidden; aspect-ratio: 27 / 20; }
.pg-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.portfolio-grid a:hover .pg-img img, .portfolio-grid a:focus-visible .pg-img img { transform: scale(1.045); }
@media (hover: hover) {
  .pg-title {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.85); color: #000; opacity: 0;
    font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.8rem); letter-spacing: -0.01em;
    text-align: center; padding: 1rem; transition: opacity .3s ease;
  }
  .portfolio-grid a:hover .pg-title, .portfolio-grid a:focus-visible .pg-title { opacity: 1; }
}
@media (hover: none), (max-width: 760px) {
  .pg-title {
    display: block; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
    padding-top: .8rem;
  }
}

/* ── galleries ──────────────────────────────────────────── */
.sec-gallery { padding: 2.2rem 0; }
.sec-gallery + .sec-gallery { padding-top: 0; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
}
.gallery-grid figure { overflow: hidden; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; transition: transform .45s ease; }
.gallery-grid figure:hover img { transform: scale(1.03); }
.gallery-strips {
  display: flex; flex-wrap: wrap; gap: 14px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
}
.gallery-strips figure { flex: 1 1 auto; min-width: 180px; }
.gallery-strips img { width: 100%; height: 100%; object-fit: cover; }

/* next project link */
.sec-next { padding: 3rem 0 5rem; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.next-link {
  display: inline-flex; align-items: center; gap: .7rem;
  font-weight: 700; font-size: 1.35rem; text-decoration: none; letter-spacing: -0.01em;
}
.next-link svg { transition: transform .25s ease; }
.next-link:hover svg { transform: translateX(6px); }

/* ── footer ─────────────────────────────────────────────── */
.site-footer { background: #000; color: #fff; padding: 4.5rem 0 5rem; margin-top: 4rem; }
.site-footer h2 { font-size: 1.7rem; margin-bottom: 2.2rem; }
.footer-lines p { margin: 0; font-size: .95rem; line-height: 1.9; }
.footer-lines a { color: #fff; }

/* ── lightbox ───────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 92vh; width: auto; height: auto; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem;
  cursor: pointer; padding: .5rem 1rem; opacity: .8; line-height: 1;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .rows-wrap { grid-template-columns: 1fr; gap: 1.2rem; }
  .split-wrap, .sec-split.media-left .split-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .sec-split.media-left .split-text { order: 1; }
  .sec-split.media-left .split-media { order: 2; }
  .duo-wrap { display: block; }
  .duo-col + .duo-col { margin-top: 1.6rem; }
  .fgrid { display: block; }
  .fcell + .fcell { margin-top: 1.4rem; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .logo img { height: 60px; }
  .header-wrap { flex-wrap: wrap; gap: 1rem; }
  .nav-toggle {
    display: block; background: none; border: 0; cursor: pointer; padding: 6px;
    margin-left: auto; order: 2;
  }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: #000; margin: 5px 0; transition: .2s; }
  .site-nav { order: 3; flex-basis: 100%; }
  .site-nav > ul { display: none; flex-direction: column; align-items: flex-start; gap: 1.1rem; padding: 1rem 0; }
  .site-nav.open > ul { display: flex; }
  .has-sub .sub {
    position: static; transform: none; opacity: 1; visibility: hidden; display: none;
    border: 0; box-shadow: none; padding: .4rem 0 0 1rem;
  }
  .has-sub.open .sub { display: block; visibility: visible; }
  .social { order: 1; margin-left: auto; }
  .nav-toggle { margin-left: 0; }
  .sec { padding: 3rem 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-strips figure { min-width: 100%; }
  .sec-split:not(.dark) .split-text { padding: 1.6rem; }
  .fcell .txt.card { padding: 1.6rem; }
}

/* print: hide chrome (useful for the auto-generated CV page) */
@media print {
  .site-header, .site-footer, .sec-next, .lightbox { display: none !important; }
  .sec.dark { background: #fff; color: #000; }
  body { font-size: 12px; }
}
.next-link.prev:hover svg { transform: translateX(-6px); }
