/* ============================================================
   DMD ARCHITECTS — Pixel-accurate replica stylesheet
   Based on screenshot analysis of dmdarchitects.com

   Key visual facts from screenshots:
   - Logo: "DONALD MACDONALD" red bold / "BRIDGE ARCHITECTS LLC" black below
   - Nav: spaced caps, gray, right-aligned
   - Home: full-width hero image → centered narrow intro text → 3-col project grid
   - Projects page: 3-col grid, images full width, title below in tiny spaced caps
   - Footer: 4 nav columns (About/Process/Projects/Contact) + address block right
   ============================================================ */

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

/* ── RESET ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  background: #fff;
  color: #1a1a1a;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }

/* ── HEADER ─────────────────────────────────────────────
   From screenshot: logo left, nav right, thin bottom border
   Logo is TWO lines: red bold name + black subtitle
────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  /* 80% opacity white — hero image shows faintly through it */
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-bottom: 1px solid rgba(224, 224, 224, 0.6);
  height: 64px;
}

/*
  header-inner is always exactly 64px tall and vertically centered.
  This means logo + nav are ALWAYS in the same position,
  whether or not there is a sub-nav row below.
*/
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;         /* fixed 64px — never stretches */
  flex-shrink: 0;
}

/* Logo — two-line text, NOT an image */
.logo { display: flex; flex-direction: column; line-height: 1.15; }
.logo-line1 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #cc2222;   /* the red from the screenshot */
}
.logo-line2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1a1a;
}

/* Main nav — right side, spaced caps, NO underline, bold on hover/active */
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #555;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: none;
  transition: color 0.2s, font-weight 0s;
}
.main-nav a:hover,
.main-nav a.active {
  color: #111;
  font-weight: 700;
}

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: #111;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/*
  Body has NO top padding — the transparent header overlaps page content.
  Inner pages add top padding directly to their content wrapper.
  Home page hero image slides up flush behind the transparent header.
*/
body { padding-top: 0; }

/* Standard inner pages (no sub-nav) — offset for 64px header */
.projects-grid-wrapper { padding-top: 84px; }

/* Pages with sub-nav — offset for 96px header */
body.has-subnav .about-page,
body.has-subnav .process-page,
body.has-subnav .contact-page { padding-top: 116px; }

/* ── HOME HERO IMAGE ─────────────────────────────────────
   Starts at very top of viewport — slides behind the
   80% opacity transparent fixed header.
   Height includes the header height so image fills well.
────────────────────────────────────────────────────────── */
.home-hero {
  width: 100%;
  height: calc(58vh + 64px);   /* extra 64px to account for overlap */
  min-height: 380px;
  overflow: hidden;
  background: #c8d4e0;
  margin-top: 0;               /* flush to top of page */
}
.home-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ── HOME INTRO TEXT ─────────────────────────────────────
   From screenshot: centered, medium width (~580px), serif-weight
   heading in normal weight, smaller body text below
────────────────────────────────────────────────────────── */
.home-intro {
  max-width: 680px;
  margin: 0 auto;
  padding: 54px 40px 40px;
  text-align: left;
}
.home-intro h1 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: #1a1a1a;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}
.home-intro p {
  font-size: 12px;
  line-height: 1.75;
  color: #555;
  margin-bottom: 8px;
}
.home-intro a {
  color: #555;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.home-intro a:hover { color: #111; }

/* ── PROJECT CARD ────────────────────────────────────────
   From screenshots: image fills cell (no borders), title below
   in tiny all-caps spaced lettering, no category badge
────────────────────────────────────────────────────────── */
.project-card { background: #fff; }
.project-card a { display: block; }

/* Media wrapper — aspect ratio matches original ~3:2 landscape */
.project-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #1a1a1a;
}
.project-card__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card__poster { transform: scale(1.04); }

/* Video layer — created by JS on scroll, fades in over poster */
.project-card__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.project-card__video.is-playing { opacity: 1; }

/* Title below image */
.project-card__info { padding: 10px 0 16px; }
.project-card__title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1a1a1a;
  line-height: 1.5;
  transition: color 0.2s;
}
.project-card:hover .project-card__title { color: #888; }

/* ── PROJECTS GRID ───────────────────────────────────────
   3-column, gap matches gutter (~30px between columns),
   no outer border/background, contained with side padding
────────────────────────────────────────────────────────── */
.projects-grid-wrapper { padding: 84px 40px 60px; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 30px;
}

/* ── PAGE HERO (inner pages) ─────────────────────────────
   Simple: page title in small caps, no big image
────────────────────────────────────────────────────────── */
.page-hero {
  padding: 40px 40px 24px;
  border-bottom: 1px solid #e0e0e0;
}
.page-hero h1 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1a1a1a;
}

/* ── SUB-NAV ─────────────────────────────────────────────
   Lives INSIDE the fixed header as a second row.
   Right-aligned horizontal links under the main nav.
   No underline. Bold on hover/active. Sticky because
   it's part of the header which is already fixed.
────────────────────────────────────────────────────────── */

/* When a page has a sub-nav, the header grows taller */
.site-header.has-subnav { height: 96px; }
/* No body padding-top needed — handled per content element */

/* Second row inside .header-inner — only visible when present */
.sub-nav {
  display: flex;
  justify-content: flex-end;   /* right-align */
  align-items: center;
  gap: 0;
  /* Sits at the bottom of the header */
  position: absolute;
  bottom: 0;
  right: 40px;
}

.sub-nav a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #888;
  padding: 8px 14px;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  transition: color 0.15s;
}
.sub-nav a:hover,
.sub-nav a.active {
  color: #111;
  font-weight: 700;
}

/* ── ABOUT PAGE ─────────────────────────────────────────── */
.about-page { padding: 0 40px; min-width: 0; }
.about-section { padding: 56px 0; border-bottom: 1px solid #e0e0e0; }
.about-section:last-child { border-bottom: none; }
.section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: #1a1a1a; margin-bottom: 32px; display: block;
}

/* Bio */
.bio-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px; align-items: start;
  margin-bottom: 48px; padding-bottom: 48px;
  border-bottom: 1px solid #e0e0e0;
}
.bio-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.bio-card__img { aspect-ratio: 3/4; overflow: hidden; background: #eee; }
.bio-card__img img { width: 100%; height: 100%; object-fit: cover; }
.bio-card__text h3 {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 16px;
}
.bio-card__text p { font-size: 12px; line-height: 1.8; color: #444; margin-bottom: 12px; }
.bio-card__text p:last-child { margin-bottom: 0; }
.bio-card__text a { text-decoration: underline; }

/* Practice */
.practice-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.practice-text p { font-size: 12px; line-height: 1.8; color: #444; margin-bottom: 12px; }
.practice-text strong { font-weight: 700; color: #111; }
.practice-text ul { list-style: disc; padding-left: 18px; margin-top: 10px; }
.practice-text li { font-size: 12px; line-height: 1.7; color: #444; margin-bottom: 6px; }
.practice-images { display: flex; flex-direction: column; gap: 3px; }
.practice-images img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }

/* Books */
.books-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 36px; }
.book-card { display: flex; flex-direction: column; gap: 14px; }
.book-card__cover { aspect-ratio: 2/3; overflow: hidden; background: #f0f0f0; }
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__info h3 {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  line-height: 1.4; margin-bottom: 8px;
}
.book-card__info p { font-size: 12px; line-height: 1.75; color: #555; margin-bottom: 10px; }
.underline-link {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #111; text-decoration: underline; text-underline-offset: 3px;
}
.underline-link:hover { color: #888; }

/* Updates */
.updates-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 36px; }
.update-card { display: flex; flex-direction: column; gap: 14px; }
.update-card__img { aspect-ratio: 16/9; overflow: hidden; background: #eee; }
.update-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.update-card:hover .update-card__img img { transform: scale(1.04); }
.update-card__text h3 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.4; margin-bottom: 8px;
}
.update-card__text p { font-size: 12px; line-height: 1.75; color: #555; margin-bottom: 10px; }
.update-card__text em { font-style: italic; font-size: 11px; color: #888; }

/* Awards */
.awards-list { display: flex; flex-direction: column; }
.award-year {
  display: grid; grid-template-columns: 60px 1fr;
  gap: 36px; padding: 26px 0; border-bottom: 1px solid #e0e0e0;
}
.award-year:last-child { border-bottom: none; }
.award-year__num { font-size: 12px; font-weight: 700; color: #111; padding-top: 2px; }
.award-year ul { display: flex; flex-direction: column; gap: 12px; }
.award-year li { font-size: 12px; line-height: 1.6; color: #444; }
.award-year li strong { font-weight: 600; color: #111; display: block; }
.award-year li em { font-style: italic; color: #888; }

/* ── PROCESS PAGE ─────────────────────────────────────── */
.process-page { padding: 0 40px; min-width: 0; }
.process-section { padding: 56px 0; border-bottom: 1px solid #e0e0e0; }
.process-section:last-child { border-bottom: none; }
.process-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.process-layout--reverse { direction: rtl; }
.process-layout--reverse > * { direction: ltr; }
.process-img { aspect-ratio: 16/9; overflow: hidden; background: #eee; }
.process-img img { width: 100%; height: 100%; object-fit: cover; }
.process-text h2 {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 18px;
}
.process-text p { font-size: 12px; line-height: 1.8; color: #444; margin-bottom: 12px; }
.process-text p:last-child { margin-bottom: 0; }
.process-list { list-style: none; padding: 0; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.process-list li {
  font-size: 12px; line-height: 1.65; color: #444;
  padding-left: 12px; border-left: 2px solid #ddd;
}
.process-list a { text-decoration: underline; color: inherit; }
.process-list a:hover { color: #111; }

/* ── CONTACT PAGE ─────────────────────────────────────── */
.contact-page { padding: 0 40px; min-width: 0; }
.contact-section { padding: 56px 0; border-bottom: 1px solid #e0e0e0; }
.contact-section:last-child { border-bottom: none; }
.contact-section h2 {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 24px;
}
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-layout--single { grid-template-columns: 1fr; max-width: 640px; }
.contact-text p { font-size: 12px; line-height: 1.8; color: #444; margin-bottom: 12px; }
.contact-img { aspect-ratio: 16/9; overflow: hidden; background: #eee; }
.contact-img img { width: 100%; height: 100%; object-fit: cover; }
.contact-details { margin-top: 28px; display: flex; flex-direction: column; gap: 20px; }
.detail-label {
  display: block; font-size: 9px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: #888; margin-bottom: 4px;
}
.detail-value { font-size: 12px; line-height: 1.7; color: #444; }
.detail-value a { color: #444; }
.detail-value a:hover { color: #111; }

.team-grid { display: grid; grid-template-columns: repeat(2,220px); gap: 36px; }
.team-card { display: flex; flex-direction: column; gap: 10px; }
.team-card__img { aspect-ratio: 3/4; overflow: hidden; background: #eee; max-width: 170px; }
.team-card__img img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.team-card__role { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #888; }
.team-card p { font-size: 12px; line-height: 1.7; color: #555; }
.employment-block p { font-size: 12px; line-height: 1.8; color: #444; margin-bottom: 12px; }

/* ── FOOTER ──────────────────────────────────────────────
   From screenshot: 4 label+link columns (ABOUT, PROCESS, PROJECTS, CONTACT)
   each with sub-links below, then on far right: "DONALD MACDONALD" + address
   Fine horizontal rule above, plain white background
────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid #e0e0e0;
  padding: 40px 40px 28px;
  margin-top: 20px;
}
.footer-inner {
  display: grid;
  /* 4 nav columns + 1 address column */
  grid-template-columns: repeat(4, auto) 1fr;
  gap: 0 48px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 32px;
  border-bottom: 1px solid #e0e0e0;
}
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #1a1a1a; margin-bottom: 4px; display: block;
}
.footer-col a {
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: #666; transition: color 0.2s;
  line-height: 1.8;
}
.footer-col a:hover { color: #111; }

/* Address block — right column */
.footer-address { margin-left: auto; text-align: right; }
.footer-address-name {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #1a1a1a; line-height: 1.3; margin-bottom: 6px;
  display: block;
}
.footer-address address,
.footer-address p {
  font-size: 11px; line-height: 1.7; color: #888;
}
.footer-address a { color: #888; }
.footer-address a:hover { color: #111; }

.footer-bottom {
  max-width: 1200px; margin: 20px auto 0;
}
.footer-bottom p { font-size: 10px; letter-spacing: 0.06em; color: #bbb; }

/* ── MOBILE NAV ───────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(255,255,255,0.96);
    flex-direction: column; align-items: flex-start;
    border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0;
    transform: translateY(-100%); opacity: 0; pointer-events: none;
    transition: transform 0.3s ease, opacity 0.25s ease; z-index: 199;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a {
    width: 100%; height: auto; padding: 14px 40px;
    border-bottom: 1px solid #e0e0e0; font-size: 11px; border-left: none;
  }
  .main-nav a:last-child { border-bottom: none; }
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2,1fr); }
  .books-grid, .updates-grid { grid-template-columns: repeat(2,1fr); }
  .footer-inner {
    grid-template-columns: repeat(2, auto) 1fr;
    row-gap: 28px;
  }
  .footer-address { grid-column: 1 / -1; text-align: left; margin-left: 0; }
  .practice-layout { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 860px) {
  /* On mobile the sub-nav hides since the hamburger menu replaces main nav */
  .sub-nav { display: none; }
  .site-header.has-subnav { height: 64px; }
  /* Reset has-subnav pages back to standard 64px header offset */
  body.has-subnav .about-page,
  body.has-subnav .process-page,
  body.has-subnav .contact-page { padding-top: 84px; }
}

@media (max-width: 700px) {
  .header-inner { padding: 0 20px; }
  .home-hero { height: 50vw; min-height: 200px; }
  .home-intro { padding: 36px 20px 28px; }
  .home-intro h1 { font-size: 16px; }
  .projects-grid-wrapper { padding: 84px 20px 40px; }
  .projects-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-page, .process-page, .contact-page { padding-left: 20px; padding-right: 20px; }
  .bio-card { grid-template-columns: 1fr; gap: 20px; }
  .books-grid, .updates-grid { grid-template-columns: 1fr; gap: 24px; }
  .award-year { grid-template-columns: 50px 1fr; gap: 16px; }
  .process-layout { grid-template-columns: 1fr; gap: 24px; }
  .process-layout--reverse { direction: ltr; }
  .contact-layout { grid-template-columns: 1fr; gap: 24px; }
  .team-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 32px 20px 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-address { grid-column: 1 / -1; }
}
