/* ============================================================
   SMPL — Page modules
   The sections pages are built from. Loaded after smpl.css and
   round3.css. Each block is one module; its markup lives in
   /design-system/modules/<id>.html and the list is in
   /design-system/modules.json. See DESIGN.md.
   ============================================================ */

/* ── Project grid (project-grid) ─────────────────────────────
   Float grid v3 rows on black, straight after the hero. The hero ends
   in a gutter of black, so the grid needs no top gap. */
/* The hero ends in a gutter of black, so the grid needs no top gap. */
.fg-work {
  padding: 0 var(--hero-frame) clamp(20px, 2.5vw, 32px);
  display: grid; gap: var(--r3-gap);
  background: var(--charcoal);
}
.fg-feature { display: grid; grid-template-columns: 1.62fr 1fr; gap: var(--r3-gap); }
.fg-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--r3-gap); }
.fg-feature > *, .fg-row > * { min-width: 0; }
.fg-feature .proj-feature .proj-img { aspect-ratio: 16 / 10; }
.fg-feature .proj-tall .proj-img { position: absolute; inset: 0; height: auto; min-height: 0; }
.fg-row .proj-img { aspect-ratio: 4 / 3; }
.fg-viewall { display: flex; justify-content: flex-end; padding: clamp(14px, 2vw, 24px) 0 0; }
.fg-work .btn-ghost { color: var(--dark-muted); border-bottom-color: rgba(255,255,255,.28); }
.fg-work .btn-ghost:hover { color: rgba(255,255,255,.92); border-bottom-color: rgba(255,255,255,.7); }

/* The intro strip stays light: the page turns light after the project rows. */

@media (max-width: 900px) {
  .fg-feature { grid-template-columns: 1fr; }
  .fg-feature .proj-tall { aspect-ratio: 4 / 5; }
  .fg-row { grid-template-columns: 1fr 1fr; }
  .fg-row .proj:last-child { display: none; }
}
/* Same phone labels as .work-row in round3.css: two-up cards are narrow. */
@media (max-width: 720px) {
  .fg-row .proj-info { padding: 14px; }
  .fg-row .proj-name { font-size: .95rem; }
  .fg-row .proj-meta { font-size: 9px; letter-spacing: .08em; line-height: 1.5; }
  .fg-row .proj-arrow { display: none; }
}

/* ── Rest of the homepage, ported from / in the round 3 look ──
   Square corners come from round3.css. Cards are flat: no glass, no
   lift on hover, only the image scales. Every gap is --r3-gap. */

/* Studio: the team photo and copy sit on the page, not in a card. */
.studio-photo-top { aspect-ratio: 21/9; overflow: hidden; margin-bottom: clamp(32px, 4vw, 56px); }
.studio-photo-top img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.studio-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 60px); align-items: start;
}
.studio-body { font-size: clamp(.9rem, 1.1vw, 1rem); line-height: 1.85; color: var(--muted); margin-bottom: 1.4em; }
.studio-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--r3-gap) clamp(20px, 3vw, 40px); }
.studio-pillars > div { padding-top: 16px; border-top: 1px solid var(--line); }
.pillar-word { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); display: block; margin-bottom: 6px; }
.pillar-desc { font-size: .85rem; line-height: 1.7; color: var(--muted); }
.studio-footnote {
  margin-top: clamp(32px, 4vw, 48px); padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}

/* Process (dark) */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--r3-gap); }
.step { position: relative; overflow: hidden; }
.step-img { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.step-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.25,.46,.45,.94); }
.step:hover .step-img img { transform: scale(1.05); }
.step-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,12,9,.15) 0%, rgba(14,12,9,.8) 100%); }
.step-content { position: absolute; bottom: 0; left: 0; right: 0; padding: clamp(18px, 2vw, 28px); }
.step-num { font-family: var(--serif); font-size: 2rem; color: rgba(255,255,255,.18); line-height: 1; margin-bottom: 12px; }
.step-title { font-family: var(--serif); font-size: 1.1rem; color: rgba(255,255,255,.9); margin-bottom: 8px; }
.step-body { font-size: .82rem; line-height: 1.7; color: var(--dark-muted); }

/* Journal: three equal columns, same image size, the date in the
   category line and excerpts held to two lines so the row stays level. */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--r3-gap); }
.post-card, .post-card:hover {
  background: none; border: none; box-shadow: none; transform: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.posts-grid .post-card-img { aspect-ratio: 3/2; }
.post-card-body { padding: 18px 0 0; }
.post-card-cat { color: var(--muted); margin-bottom: 8px; }
.post-card-title { margin-bottom: 8px; }
.post-card-excerpt {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; font-size: .88rem;
}

/* Inspire (dark) */
.inspire-grid { columns: 5 180px; gap: var(--r3-gap); }
.inspire-card {
  break-inside: avoid; margin-bottom: var(--r3-gap);
  position: relative; overflow: hidden; cursor: pointer; background: #26231f;
}
.inspire-card-img img { width: 100%; display: block; object-fit: cover; transition: transform 1.2s cubic-bezier(.25,.46,.45,.94); }
.inspire-card:hover .inspire-card-img img { transform: scale(1.04); }
.inspire-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(14,12,9,.42) 100%);
  opacity: 0; transition: opacity .3s ease;
}
.inspire-card:hover .inspire-card-overlay,
.inspire-card.saved .inspire-card-overlay { opacity: 1; }
.inspire-heart {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px;
  background: rgba(255,255,255,.88); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.85);
  transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.56,.64,1), background .2s;
}
.inspire-card:hover .inspire-heart { opacity: 1; transform: scale(1); }
.inspire-card.saved .inspire-heart { opacity: 1; transform: scale(1); background: var(--terra); }
.inspire-heart svg { width: 16px; height: 16px; }
.inspire-heart svg path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; transition: fill .2s, stroke .2s; }
.inspire-card.saved .inspire-heart svg path { fill: #fff; stroke: #fff; }
.inspire-heart.pop { animation: heartPop .38s cubic-bezier(.34,1.56,.64,1); }
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* Lightbox */
.hp-lightbox {
  position: fixed; inset: 0; z-index: 210;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,13,11,.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 0; pointer-events: none; transition: opacity .24s ease;
}
.hp-lightbox.open { opacity: 1; pointer-events: auto; }
.hp-lightbox-dialog { width: min(1180px, calc(100% - 48px)); transform: translateY(10px) scale(.985); transition: transform .28s cubic-bezier(.22,1,.36,1); }
.hp-lightbox.open .hp-lightbox-dialog { transform: none; }
.hp-lightbox-media { position: relative; overflow: hidden; background: rgba(255,255,255,.03); }
.hp-lightbox-media img { width: 100%; max-height: 80vh; object-fit: contain; display: block; background: rgba(15,13,11,.35); }
.hp-lightbox-top { position: absolute; top: 18px; right: 18px; z-index: 2; display: flex; gap: 10px; }
.hp-lightbox-controls { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; pointer-events: none; padding: 18px; }
.hp-lb-btn {
  pointer-events: auto; width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.92); cursor: pointer; transition: background .2s;
}
.hp-lb-btn:hover { background: rgba(255,255,255,.2); }
.hp-lb-btn svg { width: 18px; height: 18px; }
.hp-lb-heart.saved { background: rgba(184,105,74,.92); border-color: rgba(184,105,74,.96); }
.hp-lb-heart path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.hp-lb-heart.saved path { fill: currentColor; }
.hp-lightbox-index { margin-top: 14px; text-align: right; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.45); }

/* Contact CTA: no lift or shadow, square from round3.css */
.cta-band { box-shadow: none; }

@media (max-width: 1040px) {
  .studio-inner { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .posts-grid .post-card:last-child { display: none; }
  .inspire-grid { columns: 4 150px; }
}
@media (max-width: 720px) {
  .studio-photo-top { aspect-ratio: 4/3; }
  .studio-pillars { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid .post-card:last-child { display: block; }
  .inspire-grid { columns: 2 120px; }
  .inspire-card .inspire-heart { opacity: 1; transform: scale(1); }
}

/* ============================================================
   New modules (Nov 2026), in the round 3 look: square corners,
   flat cards, every gap --r3-gap. For Joel's review; not on a page yet.
   ============================================================ */

/* ── Text + media (text-media) ───────────────────────────────
   A paragraph beside an image or muted looping video. Add
   .tm-flip to put the media on the right; stack them to alternate. */
.tm { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.tm + .tm { margin-top: clamp(56px, 7vw, 104px); }
.tm-flip .tm-media { order: 2; }
.tm-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #26231f; }
.tm-media img, .tm-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-copy { max-width: 46ch; }
.tm-copy .label { display: block; margin-bottom: var(--eyebrow-gap); }
.tm-copy h3 {
  font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: 400; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 18px;
}
.tm-copy p { font-size: clamp(.9rem, 1.1vw, 1rem); line-height: 1.85; color: var(--muted); }
.tm-copy p + p { margin-top: 1em; }
.tm-copy .btn-ghost { margin-top: 26px; display: inline-flex; }
.tm-points { margin-top: 22px; border-top: 1px solid var(--line); }
.tm-points li {
  list-style: none; padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: .88rem; color: var(--ink); display: flex; justify-content: space-between; gap: 16px;
}
.tm-points li span { color: var(--muted); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }

/* ── Image bento (image-bento) ───────────────────────────────
   One project told in five to six images of mixed sizes. Optional
   caption in the first wide cell. */
.bento {
  display: grid; gap: var(--r3-gap);
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 17vw, 250px);
}
.bento-cell { position: relative; overflow: hidden; background: #26231f; }
.bento-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.4s cubic-bezier(.25,.46,.45,.94); }
.bento-cell:hover img { transform: scale(1.04); }
.bento-a { grid-column: span 2; grid-row: span 2; }
.bento-b { grid-column: span 2; }
.bento-c { grid-row: span 2; }
.bento-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(16px, 2vw, 24px);
  background: linear-gradient(180deg, transparent, rgba(14,12,9,.7));
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dark-muted);
}

/* ── Quote + results (quote-results) ─────────────────────────
   From Beverly Court: a client or editor quote on an image, beside
   three short results. */
.qr { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--r3-gap); align-items: stretch; }
.qr-panel { position: relative; overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; margin: 0; background: var(--charcoal); }
.qr-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.5); }
.qr-quote {
  position: relative; padding: clamp(24px, 3.5vw, 48px);
  font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.45; letter-spacing: -.01em; color: #fff; max-width: 30ch;
}
.qr-quote cite {
  display: block; margin-top: 18px; font-family: var(--sans); font-style: normal;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dark-muted);
}
.qr-results { display: grid; align-content: center; padding: clamp(8px, 2vw, 24px) clamp(0px, 2vw, 32px); }
.qr-item { padding: clamp(18px, 2.4vw, 28px) 0; border-top: 1px solid var(--line); }
.qr-item:last-child { border-bottom: 1px solid var(--line); }
.qr-item .label { display: block; margin-bottom: 10px; }
.qr-value { font-family: var(--serif); font-size: clamp(1.15rem, 1.6vw, 1.4rem); letter-spacing: -.01em; margin-bottom: 6px; }
.qr-item p { font-size: .88rem; line-height: 1.75; color: var(--muted); max-width: 48ch; }

/* ── Detail rail (detail-rail) ───────────────────────────────
   Design details in a horizontal rail: image first, a number, a
   short title and one line. Scroll-snap, with prev/next buttons. */
.rail-head-ctrls { display: flex; gap: 8px; }
.rail-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--ink); background: transparent; transition: background .2s, border-color .2s;
}
.rail-btn:hover { border-color: var(--ink); }
.rail-btn svg { width: 16px; height: 16px; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 28vw, 380px);
  gap: var(--r3-gap); overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px;
}
.rail::-webkit-scrollbar { display: none; }
.rail-item { scroll-snap-align: start; }
.rail-img { aspect-ratio: 4/5; overflow: hidden; background: #26231f; margin-bottom: 16px; }
.rail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rail-num { font-size: 10px; letter-spacing: .18em; color: var(--muted); margin-bottom: 8px; }
.rail-title { font-family: var(--serif); font-size: 1.1rem; letter-spacing: -.01em; margin-bottom: 6px; }
.rail-item p { font-size: .85rem; line-height: 1.7; color: var(--muted); }

/* ── Project header (project-header) ─────────────────────────
   Project pages: the framed hero and the stats + credits strip sit on
   one black band, like the homepage hero, and the page turns light
   after it. The hero markup is smpl.css's .hero-outer/.hero-spread;
   body.is-project scopes the band. */
.is-project .hero-outer { background: var(--band); }
.proj-details {
  background: var(--band); color: var(--dark-text);
  padding: clamp(32px, 4vw, 52px) 0;  /* even top and bottom; the hero has opened full width by the time this is in view */
}
.proj-details-inner {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 28px clamp(28px, 4vw, 56px); flex-wrap: wrap;
}
.proj-stats { display: flex; gap: clamp(24px, 4vw, 56px); flex-wrap: wrap; }
.proj-stat-n {
  font-family: var(--serif); font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400; letter-spacing: -.02em; line-height: 1; color: var(--dark-text);
}
.proj-stat-l {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dark-subtle); margin-top: 8px;
}
.proj-credits { display: flex; gap: clamp(20px, 3vw, 40px); flex-wrap: wrap; justify-content: flex-end; }
.proj-credit-label {
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--dark-faint); margin-bottom: 6px;
}
.proj-credit-value { font-size: 11px; letter-spacing: .08em; color: var(--dark-muted); font-weight: 300; }

/* ── Closing line (closing-cta) ──────────────────────────────
   The quiet close for inner pages: smpl.css's .inspire-bottom-cta,
   which already reads square. Listed here for the registry only. */

@media (max-width: 900px) {
  .proj-details-inner { flex-direction: column; align-items: flex-start; }
  .proj-credits { justify-content: flex-start; }
  .tm, .qr { grid-template-columns: 1fr; }
  .tm-flip .tm-media { order: 0; }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(140px, 36vw, 240px); }
  .bento-c { grid-row: span 1; }
  .qr-panel { min-height: 380px; }
}
@media (max-width: 720px) {
  .bento-a { grid-column: span 2; grid-row: span 1; }
}
