/* Marsh Calloway Reed. House CSS. Modern, minimal, quiet. */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Montserrat:wght@600;700&display=swap');

:root{
  --bg:#faf9f6;
  --text:#141412;
  --text-muted:#84817a;
  --body-color:#2c2f31;
  --line:#e4e2dc;
  --accent:#d1481c;
  --font-sans:'Roboto','Helvetica','Arial',sans-serif;
  --font-nav:'Montserrat','Helvetica','Arial',sans-serif;
  --base-font-size:16;
  --nav-font-size:calc((16 / var(--base-font-size)) * 1rem);
  --gutter:clamp(24px, 5vw, 72px);
  --gap:clamp(48px, 9vw, 140px);
  --ease:cubic-bezier(.4,0,.2,1);
  --dur:420ms;
  --hairline:0 0 0 1px rgba(0,0,0,.11);
}

*{box-sizing:border-box}
/* Reserve the scrollbar track always, so locking scroll for the mobile menu
   doesn't widen the viewport and shift the fixed nav to the right. */
html{scroll-behavior:smooth;scrollbar-gutter:stable}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-sans);
  font-weight:300;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
ul{list-style:none;margin:0;padding:0}
hr{border:0;border-top:1px solid var(--line);margin:0 0 clamp(20px,3vw,40px)}
h1,h2,h3,p{margin:0}

/* ===== page fade transition (nav is exempt, never fades) ===== */
body > *:not(.site-nav){
  transition:opacity 220ms var(--ease);
}
body.is-fading > *:not(.site-nav){
  opacity:0;
}

.container{
  max-width:1440px;
  margin:0 auto;
  padding-left:var(--gutter);
  padding-right:var(--gutter);
}

/* ===== nav ===== */
.site-nav{
  position:fixed;
  top:0;left:0;right:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:28px var(--gutter);
  color:var(--text);
  /* Fast, so the type is legible the instant the solid bar appears behind it.
     At the old 420ms the background snapped while the text was still white. */
  transition:color 120ms var(--ease), background-color 120ms var(--ease);
}
/* Explicit light/dark nav rather than mix-blend-mode: the fixed nav is its own
   stacking context, so a blended child has no page backdrop to blend against. */
.nav-mark,
.nav-links a,
.nav-toggle{color:inherit}
body.has-hero .site-nav{color:#fff}
/* Once content scrolls under it the bar goes solid, so type never sits on an image. */
.site-nav.is-scrolled{
  background:var(--bg);
  box-shadow:0 1px 0 var(--line);
}
body.has-hero .site-nav.is-scrolled{color:var(--text)}
.nav-mark{
  font-family:var(--font-nav);
  font-size:22px;
  letter-spacing:.12em;
  font-weight:700;
  text-transform:uppercase;
}
.nav-links{
  display:flex;
  gap:clamp(20px,3vw,44px);
}
/* The CTA belongs to the mobile panel only; the desktop bar stays as-is. */
.nav-cta-item{display:none}
.nav-links a{
  font-size:var(--nav-font-size);
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:700;
  /* No color transition here on purpose: the links inherit the nav's colour, and
     a second transition on top of an already-animating inherited value doubles
     the duration, leaving white type on the solid bar. */
  transition:opacity var(--dur) var(--ease);
}
/* Hover fades rather than underlines. Reads as a color shift in both the
   light-on-hero and dark-on-page nav states without hardcoding either. */
.nav-links a:hover{opacity:.5}
/* Current page reads as orange, never underlined. */
.nav-links a[aria-current="page"]{
  color:var(--accent);
  opacity:1;
}
/* Over the hero the orange muddies against the photograph, so the current
   page just stays white there and picks up the accent once the bar goes solid. */
body.has-hero .site-nav:not(.is-scrolled):not(.menu-open) .nav-links a[aria-current="page"]{
  color:#fff;
}
.nav-mark{position:relative;z-index:101}
.nav-toggle{
  display:none;
  position:relative;
  z-index:101;
  background:none;
  border:0;
  cursor:pointer;
  padding:4px;
}
.nav-toggle svg{display:block}
.nav-toggle .icon-close{display:none}
.nav-toggle.is-active .icon-menu{display:none}
.nav-toggle.is-active .icon-close{display:block}

@media (max-width:720px){
  .nav-links{
    position:fixed;
    inset:0;
    background:var(--text);
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:28px;
    padding:0 var(--gutter);
    /* Quick fade rather than a slide. visibility keeps the links
       unfocusable and unclickable while the panel is closed. */
    opacity:0;
    visibility:hidden;
    transition:opacity 160ms var(--ease), visibility 160ms var(--ease);
  }
  .nav-links{align-items:center;text-align:center;gap:6px}
  .nav-links.is-open{opacity:1;visibility:visible}
  .nav-links li{width:100%}
  /* Big tap targets. Capped by vw so the longest label ("PROJECTS") can't
     overflow a narrow phone. */
  .nav-links a{
    display:block;
    padding:14px 0;
    font-size:clamp(30px,9.5vw,46px);
    letter-spacing:.04em;
    color:#fff;
  }
  .nav-links a[aria-current="page"]{color:var(--accent)}

  /* CTA sits in a box that hugs its text rather than spanning the screen. */
  .nav-cta-item{display:block;margin-top:26px}
  .nav-links a.nav-cta{
    display:inline-block;
    width:auto;
    padding:16px 32px;
    border:1px solid rgba(255,255,255,.55);
    font-size:15px;
    letter-spacing:.14em;
    text-transform:uppercase;
    transition:background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  }
  .nav-links a.nav-cta:hover{
    opacity:1;
    background:#fff;
    border-color:#fff;
    color:var(--text);
  }
  .nav-toggle{display:block}
  /* Selectors here must outrank `body.has-hero .site-nav.is-scrolled`, or the
     mark and the X inherit the dark scrolled colour and vanish on the panel. */
  .site-nav.menu-open,
  body.has-hero .site-nav.menu-open,
  body.has-hero .site-nav.is-scrolled.menu-open{
    color:#fff;
    background:transparent;
    box-shadow:none;
  }
}

/* ===== hero ===== */
.hero{
  position:relative;
  height:100svh;
  min-height:560px;
  width:100%;
  overflow:hidden;
}
.hero img,
.hero video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
/* Slides stack and cross-fade; only the active one is visible. */
.hero-slide{
  opacity:0;
  transition:opacity 900ms var(--ease);
}
.hero-slide.is-active{opacity:1}

.hero-controls{
  position:absolute;
  left:var(--gutter);
  bottom:40px;
  z-index:2;
  display:flex;
  align-items:center;
  gap:20px;
  /* The footage runs from dark glass to pale concrete, so white controls need
     their own separation rather than relying on the frame behind them. */
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.55));
}
.hero-playpause{
  display:flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  padding:0;
  background:none;
  border:0;
  cursor:pointer;
  color:#fff;
  opacity:.75;
  transition:opacity var(--dur) var(--ease);
}
.hero-playpause:hover{opacity:1}
.hero-playpause .icon-play{display:none}
.hero-playpause.is-paused .icon-pause{display:none}
.hero-playpause.is-paused .icon-play{display:block}

.hero-dots{display:flex;gap:10px}
.hero-dot{
  width:8px;
  height:8px;
  padding:0;
  border-radius:50%;
  border:1px solid #fff;
  background:transparent;
  cursor:pointer;
  opacity:.7;
  transition:opacity var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.hero-dot:hover{opacity:1}
.hero-dot.is-active{background:#fff;opacity:1}

/* Wordless scroll cue: a chevron that drifts down and settles. */
.hero-cue{
  position:absolute;
  right:var(--gutter);
  bottom:40px;
  z-index:2;
  color:#fff;
  opacity:.75;
  animation:hero-cue-drift 2.4s var(--ease) infinite;
  transition:opacity 300ms var(--ease);
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.55));
}
.hero-cue:hover{opacity:1}
.hero.is-scrolled-past .hero-cue{opacity:0;pointer-events:none}
@keyframes hero-cue-drift{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(7px)}
}

/* Respect reduced-motion: hold the first poster instead of playing. */
@media (prefers-reduced-motion:reduce){
  .hero video,
  .hero-controls{display:none}
  .hero{background:url('../images/hero-poster.jpg') center/cover no-repeat}
  .hero-cue{animation:none}
}
/* ===== page intro / statement blocks ===== */
.section{padding:clamp(36px,4vw,60px) 0}
.section-tight{padding:clamp(32px,6vw,72px) 0}

.statement{
  max-width:1080px;
}
.eyebrow{
  font-size:12px;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:20px;
  display:block;
}
h1.display, .display{
  font-size:clamp(38px,6vw,82px);
  line-height:1.08;
  font-weight:200;
  letter-spacing:-.015em;
}
h2.title{
  font-size:clamp(26px,3.2vw,42px);
  font-weight:200;
  line-height:1.2;
}
p.lede{
  font-size:clamp(15px,1.1vw,16px);
  line-height:1.6;
  font-weight:500;
  color:var(--body-color);
}
p.body-text{
  font-size:15px;
  line-height:1.8;
  font-weight:500;
  color:var(--body-color);
  max-width:60ch;
}

/* ===== home intro (philosophy + four-column overview) ===== */
.intro-section .statement{margin-bottom:clamp(48px,7vw,88px)}
.intro-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:40px;
  border-top:1px solid var(--line);
  padding-top:clamp(32px,4vw,48px);
}
@media (min-width:720px){
  .intro-grid{grid-template-columns:repeat(3,1fr)}
}
.intro-col h3{
  font-size:clamp(20px,2.1vw,24px);
  font-weight:700;
  margin-bottom:14px;
}
.intro-col p{
  font-size:15px;
  line-height:1.7;
  color:var(--body-color);
  font-weight:500;
  max-width:38ch;
}
.intro-link{
  border-bottom:1px solid var(--line);
  transition:border-color var(--dur) var(--ease);
}
.intro-link:hover{border-color:var(--text)}

/* ===== home: expertise (two column) ===== */
.expertise-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--gap);
}
@media (min-width:720px){
  .expertise-grid{grid-template-columns:repeat(2,1fr)}
}
.expertise-photo{
  aspect-ratio:4/3;
  overflow:hidden;
  box-shadow:var(--hairline);
  margin-bottom:26px;
}
.expertise-photo img{width:100%;height:100%;object-fit:cover}
.expertise-col h3{
  font-size:clamp(20px,2.2vw,26px);
  font-weight:700;
  margin-bottom:12px;
}
.expertise-col p{
  font-size:16px;
  line-height:1.7;
  color:var(--body-color);
  font-weight:500;
  max-width:46ch;
}

/* ===== home: news (six column) ===== */
.news-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:32px;
  border-top:1px solid var(--line);
  padding-top:clamp(32px,4vw,48px);
}
@media (min-width:600px){
  .news-grid{grid-template-columns:repeat(3,1fr)}
}
@media (min-width:1100px){
  .news-grid{grid-template-columns:repeat(6,1fr)}
}
.news-item{display:block}
.news-date{
  display:block;
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:10px;
}
.news-headline{
  display:block;
  font-size:14px;
  line-height:1.5;
  color:var(--body-color);
  font-weight:500;
  border-bottom:1px solid transparent;
  transition:border-color var(--dur) var(--ease);
}
.news-item:hover .news-headline{border-color:var(--text)}

/* ===== featured project teasers (home) ===== */
.teaser{
  display:block;
  position:relative;
  margin-bottom:var(--gutter);
}
.teaser:last-child{margin-bottom:0}
.teaser-frame{
  position:relative;
  overflow:hidden;
  box-shadow:var(--hairline);
}
.teaser-frame img{
  width:100%;
  height:auto;
  display:block;
  transition:transform 900ms var(--ease);
}
.teaser:hover .teaser-frame img{transform:scale(1.025)}
.teaser-meta{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-top:18px;
  padding-bottom:18px;
  border-bottom:1px solid var(--line);
}
.teaser-name{
  font-size:clamp(21px,2.4vw,30px);
  font-weight:300;
  letter-spacing:-.005em;
}
.teaser-tag{
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-muted);
}

/* ===== work grid ===== */
.work-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--gutter);
}
.work-item{
  cursor:pointer;
  border:0;
  background:none;
  padding:0;
  text-align:left;
  width:100%;
  display:block;
}
.work-frame{
  position:relative;
  overflow:hidden;
  box-shadow:var(--hairline);
}
.work-frame img{
  width:100%;
  height:auto;
  display:block;
  transition:transform 900ms var(--ease);
}
.work-item:hover .work-frame img{transform:scale(1.025)}
.work-caption{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-top:18px;
  padding-bottom:22px;
  border-bottom:1px solid var(--line);
}
.work-name{font-size:clamp(20px,2.1vw,26px);font-weight:300}
.work-sub{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted)}

@media (min-width:960px){
  .work-grid{grid-template-columns:repeat(2,1fr)}
  .work-item:nth-child(3n+1){grid-column:1 / -1}
  .work-item:nth-child(3n+1) .work-frame{aspect-ratio:21/9}
  .work-item:nth-child(3n+1) .work-frame img{height:100%;object-fit:cover}
}

/* ===== founders ===== */
.founder-role{
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-muted);
  display:block;
  margin-bottom:14px;
}

.founder-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--gutter);
}
@media (min-width:720px){
  .founder-grid{grid-template-columns:repeat(3,1fr)}
}
.founder-photo{
  aspect-ratio:8/9;
  overflow:hidden;
  box-shadow:var(--hairline);
  margin-bottom:26px;
}
.founder-photo img{width:100%;height:100%;object-fit:cover}
.founder-card h3{
  font-size:clamp(18px,1.8vw,22px);
  font-weight:400;
  margin-bottom:10px;
}
.founder-creds{
  font-size:12px;
  font-weight:400;
  letter-spacing:.04em;
  color:var(--text-muted);
  margin-left:8px;
}
.founder-card .founder-role{
  font-size:14px;
  margin-bottom:20px;
}
.founder-card p{
  font-size:16px;
  line-height:1.8;
  color:var(--body-color);
  font-weight:500;
}

/* ===== team (wider roster: name + title only, no bio) ===== */
.team-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--gutter);
}
@media (min-width:560px){
  .team-grid{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:860px){
  .team-grid{grid-template-columns:repeat(4,1fr)}
}
.team-photo{
  aspect-ratio:8/9;
  overflow:hidden;
  box-shadow:var(--hairline);
  margin-bottom:18px;
}
.team-photo img{width:100%;height:100%;object-fit:cover}
.team-card h3{
  font-size:clamp(18px,1.8vw,22px);
  font-weight:400;
  margin-bottom:10px;
}
.team-role{
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-muted);
  display:block;
  margin-bottom:14px;
}


/* ===== contact: departments ===== */
.dept-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--gutter);
}
@media (min-width:720px){
  .dept-grid{grid-template-columns:repeat(3,1fr)}
}
.dept h3{
  font-size:clamp(15px,1.3vw,17px);
  font-weight:500;
  letter-spacing:.02em;
  margin-bottom:18px;
}
.dept-value{
  display:block;
  font-size:16px;
  font-weight:500;
  color:var(--body-color);
  width:max-content;
  max-width:100%;
  border-bottom:1px solid transparent;
  transition:border-color var(--dur) var(--ease);
}
.dept-value:hover{border-bottom-color:var(--text)}
.dept-value + .dept-value{margin-top:8px}

/* ===== contact: offices ===== */
.office-grid{
  display:grid;
  grid-template-columns:1fr;
  row-gap:clamp(32px,4vw,48px);
  column-gap:var(--gap);
}
@media (min-width:720px){
  .office-grid{grid-template-columns:repeat(2,1fr)}
}
.office-photo{
  aspect-ratio:16/9;
  overflow:hidden;
  box-shadow:var(--hairline);
  margin-bottom:32px;
}
.office-photo img{width:100%;height:100%;object-fit:cover}
.office-card h3{
  font-size:clamp(22px,2.4vw,30px);
  font-weight:400;
  margin-bottom:14px;
}
.office-address{
  font-size:15px;
  line-height:1.75;
  color:var(--body-color);
  font-weight:500;
  margin-bottom:12px;
}
.office-card .dept-value{font-size:15px}
.office-fax{
  display:block;
  font-size:13px;
  color:var(--text-muted);
  margin-top:8px;
}

/* ===== footer ===== */
.site-footer{
  border-top:1px solid var(--line);
  padding:40px 0 56px;
  display:flex;
  flex-wrap:wrap;
  gap:16px 40px;
  justify-content:space-between;
  align-items:baseline;
}
.site-footer, .site-footer a{
  font-size:11px;
  letter-spacing:.08em;
  color:var(--text-muted);
}
.site-footer a:hover{color:var(--text)}
.footer-links{display:flex;gap:28px}

/* ===== lightbox ===== */
.lightbox{
  position:fixed;
  inset:0;
  z-index:1000;
  background:#0b0b0a;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  visibility:hidden;
  transition:opacity var(--dur) var(--ease);
}
.lightbox.is-open{opacity:1;visibility:visible}
.lb-img-wrap{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(24px,6vw,80px);
}
.lightbox img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  opacity:0;
  transform:scale(.985);
  transition:opacity 320ms var(--ease), transform 320ms var(--ease);
}
.lightbox img.is-visible{opacity:1;transform:scale(1)}
.lb-close,.lb-prev,.lb-next{
  position:absolute;
  background:none;
  border:0;
  cursor:pointer;
  color:#f4f2ee;
  opacity:.7;
  transition:opacity 200ms var(--ease);
  padding:14px;
}
.lb-close:hover,.lb-prev:hover,.lb-next:hover{opacity:1}
.lb-close{top:14px;right:14px}
.lb-prev{left:6px;top:50%;transform:translateY(-50%)}
.lb-next{right:6px;top:50%;transform:translateY(-50%)}
.lb-caption{
  position:absolute;
  left:0;right:0;bottom:20px;
  text-align:center;
  color:#f4f2ee;
  font-size:12px;
  letter-spacing:.1em;
  text-transform:uppercase;
  opacity:.7;
  pointer-events:none;
}
.lb-count{
  position:absolute;
  top:22px;left:24px;
  color:#f4f2ee;
  font-size:11px;
  letter-spacing:.1em;
  opacity:.55;
}
@media (max-width:640px){
  .lb-prev{left:0}
  .lb-next{right:0}
  .lb-prev svg,.lb-next svg{width:20px;height:20px}
}

.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
