/* ══════════════════════════════════════════════════════════════
   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 {
  /* the fluid engine scales with the viewport but caps content at ~1512px
     (measured off the live Squarespace site: at 2600px wide, content stays
     1512px centered with large side gutters and section heights freeze) */
  --fluid: min(100vw, 1512px);
  --maxw: calc(1512px + 8vw);
  --pad: 4vw;
  --cell: calc(var(--fluid) * 0.019775);   /* row unit: 25.31px @ 1280 */
  --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, 3.2rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.3rem); }
h3 { font-size: clamp(1.6rem, 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; }
.sec.dark figcaption { color: #a8a8a8; }

/* large pull-quotes (press page) */
.quote-lg p { font-size: clamp(1.5rem, 2.1vw, 1.8rem); line-height: 1.35; font-weight: 400;
              margin-bottom: 1em; }

.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, .has-sub.active > a { text-decoration: underline; text-underline-offset: 5px; }
.has-sub { position: relative; }
/* invisible bridge so the pointer can travel from the trigger down into the
   dropdown without leaving the hover area */
.has-sub::after {
  content: ''; position: absolute; left: -16px; right: -16px; top: 100%; height: 16px;
}
.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;
  /* grace period: keep the menu up for a moment after the pointer strays */
  transition: opacity .18s ease .25s, visibility 0s linear .43s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub {
  opacity: 1; visibility: visible; transition-delay: 0s, 0s;
}
.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 ───────────────────────────────────────────── */
/* per-section vertical padding measured from the original site
   (inline --pt/--pb in vw for desktop, --ptm/--pbm px for mobile) */
.sec { padding: calc(var(--pt, 3.4) / 100 * var(--fluid)) 0 calc(var(--pb, 3.4) / 100 * var(--fluid)); }
.sec.dark { background: #000; color: #fff; }
.sec-bleed { padding: 0; line-height: 0; }
.sec-bleed img, .sec-bleed video { width: 100%; height: auto; object-fit: cover; }

/* fluid-engine emulation: every block placed on a 24-col grid at its
   original Squarespace coordinates; rows are squarish vw-based cells so
   section heights and image crops match the original */
.fe {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-auto-rows: minmax(var(--cell), auto);
  column-gap: 11px;
  row-gap: 11px;
}
@media (min-width: 761px) {
  /* text sections hug their content (no fixed stage height); only image
     stages keep their measured height, since they have no intrinsic size */
  .sec-bleed video, .sec-bleed img { height: var(--ghu, calc(var(--gh, 56.25) / 100 * var(--fluid))); min-height: 0; aspect-ratio: auto; }
  .sec-gallery { min-height: var(--ghu, 0px); }
}
.feb a { word-break: break-word; }
.feb { grid-column: var(--c1, 1) / var(--c2, 25); grid-row: var(--r1, auto) / var(--r2, auto);
       min-width: 0; display: flex; flex-direction: column; }
.feb-image, .feb-video { justify-content: stretch; }
.feb-image .img { height: 100%; display: flex; flex-direction: column; }
.feb-image .img a { flex: 1; min-height: 0; display: block; }
.feb-image .img img { width: 100%; height: 100%; object-fit: cover; }
.feb.circle .img img { aspect-ratio: 1 / 1; height: auto; border-radius: 50%; }
.feb-contain .img img { object-fit: contain; }
.feb-text { justify-content: flex-start; }
.feb-rule { justify-content: center; }
.feb-button { justify-content: flex-start; }
.feb .vid { height: 100%; }
.feb .vid video, .feb .vid iframe { height: 100%; object-fit: cover; }

/* 50/50 split hero: padded text panel one side, edge-bleed cover image
   the other, stacking head → image → body on mobile */
.sec-split2 {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr;
  grid-template-areas: "head media" "body media";
  padding: 0 !important;
}
.sec-split2.media-left { grid-template-areas: "media head" "media body"; }
.sec-split2 .s2-head { grid-area: head; padding: 7.5vw 13vw 2rem 6.5vw; }
.sec-split2 .s2-body { grid-area: body; padding: 0 13vw 7.5vw 6.5vw; }
.sec-split2 .s2-media { grid-area: media; position: relative; min-height: 100%; }
.sec-split2 .s2-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* legacy fallback: bands of column-clusters */
.band { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: 2rem; align-items: start; }
.band.center { align-items: center; }
.band + .band { margin-top: 2.6rem; }
.cluster { grid-column: var(--g1, 1) / var(--g2, 25); min-width: 0; }
.cluster .img img { width: 100%; }
.txt.card { background: var(--gray-card); padding: 2.5rem; }
.sec.dark .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 — edge-to-edge at any browser width; the poster
   cover-crops to fill the 16:9 stage */
.sec-video-hero { padding: 0; }
.sec-video-hero .wrap { max-width: none; padding: 0; }
.sec-video-hero video { width: 100%; aspect-ratio: 16 / 9; height: auto; background: #000; object-fit: cover; }
.sec-video-hero video.fit-contain { object-fit: contain; }

/* full-bleed background-video section keeps its stage height even before
   video metadata loads */
.sec-bleed video { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; min-height: 320px; }

/* 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: 1rem; letter-spacing: .02em;
  padding: 1.15em 2.6em; transition: opacity .15s ease;
}
.btn:hover { opacity: .8; }
.sec.dark .btn { background: #fff; color: #000; }

/* ── portfolio grid ─────────────────────────────────────── */
.sec-portfolio { padding-top: 1rem; }
.sec-portfolio .wrap { max-width: none; }
.sec-portfolio .portfolio-grid { padding-bottom: 3.2rem; }
.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; }
}
/* the original shows plain images with no titles on touch/mobile */
@media (hover: none), (max-width: 760px) {
  .pg-title { display: none; }
}

/* ── galleries ──────────────────────────────────────────── */
.sec-gallery { padding: calc(var(--pt, 0) / 100 * var(--fluid)) 0 calc(var(--pb, 0) / 100 * var(--fluid)); }
/* gallery/portfolio sections are NOT engine-capped — they span the full
   viewport on the original at any width */
.gallery-grid {
  display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 14px;
  max-width: none; margin: 0 auto; padding: 0 var(--pad);
}
.gallery-grid figure { overflow: hidden; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--ar, 1); transition: transform .45s ease; }
.gallery-grid figure:hover img { transform: scale(1.03); }
.gallery-strips {
  display: flex; flex-wrap: wrap; gap: 14px;
  max-width: none; 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: 2.3vw 0 2.5vw; margin-top: 0; }
.site-footer h2 { font-size: 1.7rem; margin-bottom: 2rem; }
.footer-lines { max-width: 300px; }
.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) {
  /* header: single row — logo left, hamburger right (like the original).
     Social icons leave the bar; the menu drops down as a full-width panel. */
  .logo img { height: 76px; }
  .site-header { position: relative; }
  .header-wrap { flex-wrap: nowrap; align-items: center; gap: 1rem;
                 padding-top: 14px; padding-bottom: 14px; }
  .social { display: none; }
  .site-nav { flex: 0 0 auto; margin-left: auto; position: static; }
  .nav-toggle { display: block; background: none; border: 0; cursor: pointer; padding: 6px; }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: #000; margin: 6px 0; transition: .2s; }
  .site-nav > ul {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; margin: 0; padding: 1.2rem var(--pad) 1.6rem;
    flex-direction: column; align-items: flex-start; gap: 1.15rem;
    border-bottom: 1px solid #ececec; box-shadow: 0 18px 34px rgba(0,0,0,.07);
    z-index: 60;
  }
  .site-nav.open > ul { display: flex; }
  .site-nav > ul a, .site-nav > ul .has-sub > a { font-size: 1rem; }
  .has-sub .sub {
    position: static; transform: none; opacity: 1; visibility: hidden; display: none;
    border: 0; box-shadow: none; padding: .5rem 0 0 1.1rem; min-width: 0;
  }
  .has-sub.open .sub { display: block; visibility: visible; }
  .has-sub:not(.open):hover .sub { visibility: hidden; }

  .sec { padding: var(--ptm, 2.6rem) 0 var(--pbm, 2.6rem); }
  .sec-bleed { padding: 0; }
  .site-footer { padding: 1.4rem 0 1.8rem; }

  /* split hero stacks: heading → image → body text */
  .sec-split2 { display: block; padding: 0 !important; }
  .sec-split2 .s2-head { padding: 2.4rem var(--pad) 1.4rem; }
  .sec-split2 .s2-media { min-height: 0; }
  .sec-split2 .s2-media img { position: static; height: var(--ghmu, auto); object-fit: cover; }
  .sec-split2 .s2-body { padding: 1.8rem var(--pad) 2.6rem; }

  /* stack fluid-engine blocks into a single column (Squarespace behavior) */
  .fe { display: block; }
  .feb + .feb { margin-top: 2.8rem; }
  .feb-image .img a { flex: none; }
  .feb-image .img img { height: auto; object-fit: unset; }
  /* solo hero images and full-bleed sections keep the original mobile crop height */
  .fe-solo .feb-image .img img { height: var(--ghmu, calc(var(--ghm, 60) * 1vw)); object-fit: cover; }
  .sec-bleed video, .sec-bleed img { height: var(--ghmu, calc(var(--ghm, 56.25) * 1vw)); min-height: 0; object-fit: cover; }
  .feb.circle .img { max-width: 180px; margin: 0 auto; }
  .feb.circle .img img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; }
  .feb .vid video, .feb .vid iframe { height: auto; object-fit: unset; }
  .btn { display: block; width: 100%; text-align: center; }

  /* stack side-by-side clusters into a single column (Squarespace behavior) */
  .band { display: block; }
  .band > .cluster { width: 100%; }
  .band > .cluster + .cluster { margin-top: 1.8rem; }

  /* galleries keep compact grids on mobile instead of stacking full-width */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* strips galleries (large presentation slides) stack full-width on mobile */
  .gallery-strips { gap: 10px; }
  .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); }

/* ── contact form (mirrors the Squarespace form) ─────────── */
.cform { max-width: 640px; }
.cform .frow { display: flex; gap: 1rem; }
.cform .frow > label { flex: 1; }
.cform .group-label { display: block; font-size: .95rem; margin-bottom: .5rem; }
.cform label { display: block; font-size: .95rem; margin-bottom: 1.2rem; }
.cform .req { color: #7d7d7d; font-size: .8rem; margin-left: .3em; }
.cform input, .cform textarea {
  width: 100%; margin-top: .45em; padding: .8em .9em;
  border: 1px solid #8a8a8a; background: #fff; font: inherit; color: inherit;
}
.cform input:focus, .cform textarea:focus { outline: 2px solid #000; outline-offset: -1px; }
.cform textarea { min-height: 130px; resize: vertical; }
.cform .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.cform button.btn { border: 0; cursor: pointer; }
.cform button.btn { width: auto; display: inline-block; }
.contact-social { display: flex; gap: 1.1rem; align-items: center; padding-top: .4rem; }
.contact-social a { color: inherit; display: inline-flex; }
.contact-social a:hover { opacity: .6; }
.form-note { display: none; padding: 1em 1.2em; margin-bottom: 1.4rem; font-size: .9rem; }
.form-note.ok { display: block; background: #eef7ee; border: 1px solid #bfe3bf; }
.form-note.err { display: block; background: #fdecec; border: 1px solid #f2bcbc; }
/* the original keeps First/Last name side-by-side even on mobile */
