/* ============================================================
   nine4 — shared site stylesheet
   Linked from every page. Edit colors, fonts, and the nav here
   and the change applies across the whole site.
   ============================================================ */

:root{
  --ink:#1B1A18;
  --paper:#FFFFFF;
  --light:#F7F4EE;
  --brass:#B08D57;
  --font-heading:'Helvetica Neue', 'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html, body{ height:100%; }
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
}

/* Body modifier for pages with a fullscreen background video (index, contact) */
body.page-video{
  position:relative;
  overflow:hidden;
}
body.page-video.page-center{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

/* Body modifier for plain content pages (projects, project detail) */
body.page-content{
  height:auto;
  padding:100px 24px 80px;
}

h1{ font-family:var(--font-heading); }

/* ---------- NAV MENU ---------- */
.nav{
  position:absolute;
  z-index:3;
  top:0;
  left:0;
  right:0;
  display:flex;
  justify-content:center;
  gap:14px;
  padding:28px 24px 14px;
  background:var(--paper);
}
.nav.on-video{ background:none; }
.nav a{
  color:var(--ink);
  text-decoration:none;
  font-size:13.5px;
  letter-spacing:0.02em;
  padding-bottom:2px;
  border-bottom:1px solid transparent;
  transition:border-color .2s ease;
}
.nav a:hover{ border-bottom-color:var(--ink); }
.nav a.active{ border-bottom-color:rgba(27,26,24,0.6); }

/* Light-text variant for nav sitting over a background video */
.nav.on-video a{ color:var(--light); }
.nav.on-video a:hover{ border-bottom-color:var(--light); }
.nav.on-video a.active{ border-bottom-color:rgba(247,244,238,0.6); }

/* ---------- BACKGROUND VIDEO (index, contact) ---------- */
.bg-video{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0;
}
.bg-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.25);
  z-index:1;
}
.page-contact .bg-overlay{ background:rgba(0,0,0,0.70); }

/* ---------- HOME: CENTER IMAGE ---------- */
.center-wrap{
  position:relative;
  z-index:2;
  height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.image-placeholder{
  width:min(60vw, 640px);
  aspect-ratio:4/3;
  border:2px dashed rgba(255,255,255,0.55);
  border-radius:4px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.06);
  backdrop-filter:blur(2px);
  text-decoration:none;
  transition:border-color .2s ease, background .2s ease;
}
.image-placeholder:hover{
  border-color:var(--light);
  background:rgba(255,255,255,0.1);
}
.image-placeholder span{
  color:rgba(255,255,255,0.75);
  font-size:15px;
  letter-spacing:0.02em;
}

/* ---------- CONTACT: ICON LINKS ---------- */
.wrap-contact{
  position:relative;
  z-index:2;
  text-align:center;
  color:var(--light);
}
.wrap-contact h1{
  font-size:15px;
  font-weight:500;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:rgba(247,244,238,0.55);
  margin-bottom:64px;
}
.links{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:28px;
}
.icon-link{
  width:56px;
  height:56px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--light);
  text-decoration:none;
  transition:transform .2s ease, background .2s ease;
}
.icon-link:hover{
  background:rgba(247,244,238,0.06);
  transform:translateY(-2px);
}
.icon-link svg{ width:20px; height:20px; }
.email-link{
  width:auto;
  padding:0 22px;
  border-radius:28px;
  font-size:13.5px;
  letter-spacing:0.02em;
  gap:9px;
}
.email-link svg{ width:16px; height:16px; }
@media (max-width:420px){ .links{ gap:18px; } }

/* ---------- PROJECTS LISTING PAGE ---------- */
.page-heading{
  text-align:center;
  font-size:15px;
  font-weight:500;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:rgba(27,26,24,0.55);
  margin-bottom:56px;
}
.project-grid{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  column-gap:40px;
  row-gap:56px;
}
@media (max-width:820px){
  .project-grid{ grid-template-columns:1fr; row-gap:44px; }
}
.project-card{
  display:block;
  text-decoration:none;
  color:inherit;
}
.thumb{
  position:relative;
  width:100%;
  aspect-ratio:16/10;
  border-radius:3px;
  overflow:hidden;
  background:rgba(27,26,24,0.05);
  border:1px dashed rgba(27,26,24,0.2);
}
.thumb:has(img){
  background:none;
  border:none;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.thumb-placeholder{
  position:absolute; inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12.5px;
  letter-spacing:0.03em;
  color:rgba(27,26,24,0.4);
}
.project-meta{ margin-top:18px; }
.project-eyebrow{
  font-size:12px;
  letter-spacing:0.04em;
  color:var(--brass);
  margin-bottom:8px;
}
.project-title{
  font-family:var(--font-heading);
  font-size:19px;
  font-weight:500;
  line-height:1.3;
  margin-bottom:8px;
}
.project-desc{
  font-size:14px;
  line-height:1.5;
  color:rgba(27,26,24,0.6);
  max-width:48ch;
}

/* ---------- PROJECT DETAIL PAGE ---------- */
.wrap{
  max-width:900px;
  margin:0 auto;
}
.back-link{
  display:inline-block;
  font-size:13px;
  color:rgba(27,26,24,0.5);
  text-decoration:none;
  margin-bottom:28px;
}
.back-link:hover{ color:var(--ink); }

header{ margin-bottom:48px; }
.eyebrow{
  font-size:12px;
  letter-spacing:0.04em;
  color:var(--brass);
  margin-bottom:10px;
}
header h1{
  font-size:clamp(28px, 4vw, 42px);
  font-weight:500;
  line-height:1.15;
  margin-bottom:10px;
}
.subtitle{
  font-size:15px;
  color:rgba(27,26,24,0.55);
}

.image-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:12px;
  margin-bottom:56px;
}
.image-grid .cell{
  position:relative;
  overflow:hidden;
  border-radius:3px;
  background:rgba(27,26,24,0.05);
  border:1px dashed rgba(27,26,24,0.2);
  aspect-ratio:3/4;
}
.image-grid .cell:has(img){
  background:none;
  border:none;
}
.image-grid .cell.wide{
  grid-column:1 / -1;
  aspect-ratio:16/9;
}
.image-grid .cell img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.image-grid .cell .label{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size:12.5px; letter-spacing:0.03em;
  color:rgba(27,26,24,0.4);
}

.video-box{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  border-radius:3px;
  overflow:hidden;
  background:#000;
  margin-bottom:12px;
}
.video-box iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

.write-up{
  font-size:16px;
  line-height:1.7;
  color:rgba(27,26,24,0.85);
  max-width:70ch;
  margin-bottom:56px;
}
.write-up p{ margin-bottom:22px; }
.write-up p:last-child{ margin-bottom:0; }

@media (max-width:640px){
  .image-grid{ grid-template-columns:1fr; }
  .image-grid .cell.wide{ grid-column:1; }
}

/* ---------- FOOTER ---------- */
.site-footer{
  max-width:1180px;
  margin:96px auto 0;
  padding-bottom:60px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:32px;
  font-size:13px;
  letter-spacing:0.02em;
  color:rgba(27,26,24,0.5);
}
.footer-links{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:22px;
}
.footer-links a{
  color:rgba(27,26,24,0.7);
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:border-color .2s ease, color .2s ease;
}
.footer-links a:hover{
  color:var(--ink);
  border-bottom-color:var(--ink);
}
