/* Sounds Good Studio Design — shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f8f7f4;
  --bg-alt: #f0eeea;
  --dark: #161616;
  --ink: #1a1a1a;
  --ink-muted: #6b6b6b;
  --on-dark: #f3f1ec;
  --on-dark-muted: #a19d95;
  --rule: #e2e0db;
  --max-w: 1160px;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 400; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; }

/* ─── Nav ─────────────────────────────────────── */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(248,247,244,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
#nav.scrolled { border-color: var(--rule); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo { font-family: var(--serif); font-size: 1.15rem; text-decoration: none; }
.nav-logo span { display: block; font-family: var(--sans); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-top: 2px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.82rem; text-decoration: none; color: var(--ink-muted); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-cta { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--ink); padding: 10px 18px; transition: background .2s, color .2s; }
.nav-cta:hover { background: var(--ink); color: var(--bg); }
@media (max-width: 760px) { .nav-links { display: none; } .nav-cta { padding: 8px 12px; } }


@media (max-width: 480px) { .nav-logo { font-size: 1rem; } .nav-logo span { display: none; } .nav-cta { font-size: .64rem; padding: 7px 10px; } }
/* ─── Project hero ────────────────────────────── */
.p-hero { position: relative; height: min(92vh, 860px); min-height: 520px; background: var(--dark); overflow: hidden; }
.p-hero img { width: 100%; height: 100%; object-fit: cover; }
.p-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.82) 0%, rgba(10,10,10,.25) 45%, rgba(10,10,10,0) 70%); }
.p-hero-text { position: absolute; left: 0; right: 0; bottom: clamp(32px, 7vh, 72px); z-index: 2; color: var(--on-dark); }
.p-hero-text .eyebrow { color: var(--on-dark-muted); }
.p-hero h1 { font-size: clamp(3rem, 8vw, 6.2rem); margin: 14px 0 10px; }
.p-hero .sub { font-size: clamp(1rem, 1.6vw, 1.2rem); color: #d8d4cc; max-width: 560px; }
.back-link { display: inline-block; margin-bottom: 18px; font-size: 0.78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); text-decoration: none; }
.back-link:hover { color: var(--on-dark); }

/* ─── Facts bar ───────────────────────────────── */
.facts { border-bottom: 1px solid var(--rule); }
.facts dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; padding: 40px 0; }
@media (max-width: 760px) { .facts dl { grid-template-columns: 1fr 1fr; } }
.facts dt { font-size: 0.68rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.facts dd { font-size: 0.95rem; line-height: 1.45; }
.facts .award dd { font-family: var(--serif); font-size: 1.15rem; }

/* ─── Story ───────────────────────────────────── */
.story { padding: clamp(64px, 10vw, 120px) 0; }
.story-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.story h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-top: 14px; }
.story-body p { color: #3d3d3d; font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.3em; }
.story-body p:last-child { margin-bottom: 0; }
.story-figure { margin-top: 40px; }
.story-figure figcaption { font-size: 0.8rem; color: var(--ink-muted); margin-top: 10px; }
@media (max-width: 860px) { .story-grid { grid-template-columns: 1fr; } }

/* Scope list */
.scope { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); margin-top: clamp(56px, 8vw, 96px); }
.scope > div { padding: 32px 28px 8px 0; }
.scope > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.scope .num { font-family: var(--serif); color: var(--ink-muted); font-size: .9rem; }
.scope h3 { font-size: 1.45rem; margin: 10px 0 10px; }
.scope p { font-size: .92rem; color: #4a4a4a; line-height: 1.7; }
@media (max-width: 860px) { .scope { grid-template-columns: 1fr; } .scope > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }

/* ─── Galleries ───────────────────────────────── */
.gallery-section { padding: clamp(64px, 9vw, 112px) 0; }
.gallery-section.dark { background: var(--dark); color: var(--on-dark); }
.gallery-section.dark .eyebrow { color: var(--on-dark-muted); }
.gallery-section.dark .section-intro { color: var(--on-dark-muted); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-top: 12px; }
.section-intro { max-width: 460px; color: var(--ink-muted); font-size: .98rem; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.grid a { position: relative; display: block; overflow: hidden; background: #222; cursor: zoom-in; }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.grid a:hover img { transform: scale(1.035); }
.grid a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.g-wide { grid-column: span 8; aspect-ratio: 3 / 2; }
.g-side { grid-column: span 4; aspect-ratio: 3 / 4; }
.g-third { grid-column: span 4; aspect-ratio: 3 / 2; }
.g-half { grid-column: span 6; aspect-ratio: 3 / 2; }
@media (max-width: 760px) { .g-wide, .g-side, .g-third, .g-half { grid-column: span 12; aspect-ratio: 3 / 2; } }

/* Build stages */
.stage { display: grid; grid-template-columns: 3fr 9fr; gap: clamp(24px, 4vw, 56px); padding: 40px 0; border-top: 1px solid #2c2c2c; }
.stage:first-of-type { border-top: 0; padding-top: 0; }
.stage-label .num { font-family: var(--serif); font-size: 2.4rem; color: #5d5a55; line-height: 1; }
.stage-label h3 { font-size: 1.5rem; margin: 10px 0 8px; }
.stage-label p { font-size: .9rem; color: var(--on-dark-muted); line-height: 1.65; }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.strip a { aspect-ratio: 4 / 3; }
.strip figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: .72rem; color: #eee; background: linear-gradient(to top, rgba(0,0,0,.75), transparent); opacity: 0; transition: opacity .25s; }
.strip a:hover figcaption, .strip a:focus-visible figcaption { opacity: 1; }
@media (hover: none) { .strip figcaption { opacity: 1; } }
@media (max-width: 760px) { .stage { grid-template-columns: 1fr; } .strip { grid-template-columns: repeat(2, 1fr); } }

/* ─── Next / CTA ──────────────────────────────── */
.next { padding: clamp(64px, 9vw, 104px) 0; }
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.next-card { display: block; padding: 36px; text-decoration: none; border: 1px solid var(--rule); transition: border-color .2s, background .2s; }
.next-card:hover { border-color: var(--ink); background: #fff; }
.next-card h3 { font-size: 1.9rem; margin: 10px 0 8px; }
.next-card p { color: var(--ink-muted); font-size: .92rem; }
.next-card .arrow { display: inline-block; margin-top: 18px; font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.next-card.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.next-card.solid p { color: #b9b5ad; }
.next-card.solid:hover { background: #000; }
@media (max-width: 760px) { .next-grid { grid-template-columns: 1fr; } }

/* ─── Footer ──────────────────────────────────── */
#footer { background: #111; color: #777; padding: 36px 0; font-size: .8rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-logo { font-family: var(--serif); color: #ccc; font-size: 1rem; }

/* ─── Lightbox ────────────────────────────────── */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,8,.96); display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; }
.lb img { max-width: min(92vw, 1800px); max-height: 84vh; object-fit: contain; box-shadow: 0 10px 60px rgba(0,0,0,.5); }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; color: #bbb; font-size: .85rem; padding: 0 70px; }
.lb-count { position: absolute; top: 22px; left: 24px; color: #888; font-size: .78rem; letter-spacing: .1em; }
.lb button { position: absolute; background: none; border: 0; color: #ddd; cursor: pointer; font: 300 2.4rem/1 var(--sans); padding: 18px; transition: color .2s; }
.lb button:hover { color: #fff; }
.lb-close { top: 6px; right: 10px; font-size: 2rem !important; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }

/* Placeholder text Brandon still has to supply — remove the class once filled in */
.todo { background: #fff3b0; color: #5a4a00; padding: 1px 5px; border-radius: 2px; font-style: normal; }
.dark .todo, .on-dark .todo { background: #4a4214; color: #ffe98a; }

/* ─── Front door + section home ───────────────── */
.front { padding: calc(68px + clamp(56px, 10vw, 120px)) 0 clamp(40px, 6vw, 72px); }
.front h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); margin: 16px 0 20px; }
.front h1 em { font-style: italic; }
.front-sub { max-width: 620px; font-size: 1.1rem; color: #4a4a4a; }
.doors { padding-bottom: clamp(56px, 8vw, 96px); }
.doors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.door { display: block; text-decoration: none; background: #fff; border: 1px solid var(--rule); transition: border-color .2s; }
a.door:hover { border-color: var(--ink); }
.door img, .door-blank { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.door-blank { display: flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--ink-muted); font-family: var(--serif); font-size: 1.6rem; }
.door-text { padding: 28px; }
.door-text h2 { font-size: 1.9rem; margin: 10px 0 8px; }
.door-text p { color: var(--ink-muted); font-size: .95rem; }
.door .arrow { display: inline-block; margin-top: 16px; font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 760px) { .doors-grid { grid-template-columns: 1fr; } }

/* ─── Engineering ─────────────────────────────── */
.p-hero-short { height: min(70vh, 640px); min-height: 440px; }
.svc-section { padding-bottom: clamp(56px, 8vw, 96px); }
.svc { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.svc > div { padding: 32px 24px 0 0; }
.svc > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.svc .num { font-family: var(--serif); color: var(--ink-muted); font-size: .9rem; }
.svc h3 { font-size: 1.4rem; margin: 10px 0; }
.svc p { font-size: .92rem; color: #4a4a4a; line-height: 1.7; }
@media (max-width: 900px) { .svc { grid-template-columns: 1fr 1fr; } .svc > div:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 560px) { .svc { grid-template-columns: 1fr; } .svc > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }
.covers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.cover img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #1a1a1a; }
.cover figcaption { margin-top: 12px; font-size: .86rem; line-height: 1.45; }
.cover figcaption strong { display: block; font-weight: 600; }
.cover figcaption span { display: block; color: var(--ink-muted); }
.cover figcaption em { display: block; font-style: normal; margin-top: 4px; font-size: .78rem; letter-spacing: .04em; }
@media (max-width: 900px) { .covers { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .covers { grid-template-columns: repeat(2, 1fr); } }
.vids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
.vid { display: block; text-decoration: none; color: var(--on-dark); font-size: .88rem; line-height: 1.45; }
.vid-img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #222; margin-bottom: 12px; }
.vid-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.vid:hover .vid-img img { transform: scale(1.04); }
.play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(0,0,0,.6); }
.play::after { content: ""; position: absolute; left: 23px; top: 18px; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.vid strong { display: block; font-weight: 600; }
.vid > span:last-child { color: var(--on-dark-muted); }
@media (max-width: 900px) { .vids { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .vids { grid-template-columns: 1fr; } }
.credits { list-style: none; border-top: 1px solid var(--rule); }
.credits li { display: grid; grid-template-columns: 1.1fr 1.4fr .8fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: .92rem; }
.credits li span { color: #4a4a4a; }
.credits li em { font-style: normal; color: var(--ink-muted); text-align: right; font-size: .84rem; }
@media (max-width: 560px) { .credits li { grid-template-columns: 1fr; gap: 2px; } .credits li em { text-align: left; } }
#credits h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-top: 12px; }
