/* =========================================================
   PB + Co — Global Styles
   ========================================================= */

/* ---------- Webfonts ---------- */
@font-face {
  font-family: 'Austin Light';
  src: url('/css/fonts/austin-light-webfont.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Austin Medium';
  src: url('/css/fonts/austin-medium-webfont.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- CSS Variables ---------- */
:root {
  --header-h: 12vh;        /* compact header */
  --header-min: 60px;      /* compact min height */
  --pad-x: 20px;

  /* Global side alignment for wide screens (reduced ~20%) */
  --content-side-padding: 6.5rem; /* was 8rem */

  /* Colors */
  --brand: #0b1220;
  --text: #101418;
  --muted: #5b6571;
  --muted-bg: #f7f8fa;
  --card: #ffffff;
  --border: #e6e8eb;
  --link: var(--muted);;

  /* Rhythm */
  --space-xxl: 64px;
  --space-xl: 48px;
  --space-lg: 32px;
  --space-md: 20px;
  --space-sm: 12px;
}

* { box-sizing: border-box; }
html, body { height:100%; }
body {
  margin:0;
  font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:var(--text);
  background:#fff;
}

a {
  text-decoration: none;
  color: var(--muted);
}

/* =========================================================
   Header (shared) — tightened
   ========================================================= */
.site-header{
  position:sticky; top:0; z-index:1000;
  display:flex; align-items:center;
  background:rgba(255,255,255,1);
  backdrop-filter:blur(6px);
  height:var(--header-h);
  min-height:var(--header-min);
}
.header-inner{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  padding:0 var(--pad-x);
}
.logo{ margin-left:12px; }
.logo img{
  display:block;
  height:clamp(24px, calc(var(--header-h) - 36px), 50px);
  width:auto;
}

/* Wide-screen alignment: match content edges */
@media (min-width: 1200px){
  .site-header .logo { margin-left: var(--content-side-padding); }
  .site-header .burger { margin-right: var(--content-side-padding); }
}

/* Burger + Close (matching size, compact) */
.burger, .close-menu{
  background:transparent; border:none; border-radius:10px;
  width:36px; height:36px; padding:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  color:#111; position:relative;
}
.burger .lines{ display:grid; gap:3px; }
.burger .lines span{ display:block; width:22px; height:2px; background:#111; border-radius:2px; margin:0 auto; }

/* Larger touch targets on small screens */
@media (max-width:700px){
  .burger, .close-menu{ width:44px; height:44px; }
}

/* Screen-reader only utility */
.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;
}

/* =========================================================
   Overlay Menu
   ========================================================= */
.menu-overlay{
  position:fixed; inset:0; z-index:1200;
  background:rgba(255,255,255,.98);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .3s ease, visibility .3s ease;
}
.menu-overlay.open{ opacity:1; visibility:visible; pointer-events:auto; }

/* Close “X” */
.close-menu{ position:fixed; z-index:1300; font-size:0; line-height:0; }
.close-menu::before, .close-menu::after{
  content:''; display:block; width:22px; height:2px; background:#111; border-radius:2px;
  position:absolute; top:50%; left:50%; transform-origin:center;
}
.close-menu::before{ transform:translate(-50%,-50%) rotate(45deg); }
.close-menu::after{  transform:translate(-50%,-50%) rotate(-45deg); }

/* Menu links */
.menu{
  display:grid; gap:18px; text-align:center;
  font-size:clamp(22px,4.5vw,42px);
}
.menu a{
  font-family:'Austin Medium', serif; font-weight:500;
  color:var(--brand); text-decoration:none;
  opacity:0; transform:translateY(10px) scale(1);
  transition:opacity .25s ease, transform .25s ease;
  display:inline-block;
}
.menu-overlay.open .menu a{ opacity:1; transform:translateY(0) scale(1); }
.menu-overlay.open .menu a:hover{ transform:translateY(0) scale(1.25); }
.menu-overlay.open .menu a:nth-child(1){transition-delay:0s}
.menu-overlay.open .menu a:nth-child(2){transition-delay:.05s}
.menu-overlay.open .menu a:nth-child(3){transition-delay:.1s}
.menu-overlay.open .menu a:nth-child(4){transition-delay:.15s}
.menu-overlay.open .menu a:nth-child(5){transition-delay:.2s}

/* Socials in overlay */
.socials{ display:none; align-items:center; gap:18px; }
.menu-overlay .socials{ display:flex; margin-top:32px; }
.socials a{ display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; transition:transform .25s ease; }
.socials a:hover{ transform:scale(1.25); }
.socials svg{ width:22px; height:22px; color:#1f2937; }

/* Menu footer */
.menu-footer{
  position:absolute; bottom:20px; left:0; right:0;
  display:flex; align-items:center; justify-content:center; gap:8px;
  text-align:center; font-size:12px; color:#555; padding:0 var(--pad-x);
}
.menu-footer a{ color:inherit; text-decoration:none; }
.menu-footer .footer-links a + a::before{ content:'|'; margin:0 8px; color:#8a8f97; }

/* =========================================================
   Home — Fullscreen Video Hero
   ========================================================= */
.hero-video{ position:relative; height:calc(100vh - var(--header-h)); width:100%; overflow:hidden; background:#000; }
.hero-video video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }

/* =========================================================
   Content Pages — Global Type & Layout
   ========================================================= */

/* Headings use Austin Medium */
h1{
  font-family:'Austin Medium', serif; font-weight:500; letter-spacing:0.5px;
  font-size:clamp(2.8rem, 4vw, 3.8rem); line-height:1.2;
}
h2,h3,h4,h5,h6{
  font-family:'Austin Medium', serif; font-weight:500; letter-spacing:0.5px;
}

/* Body copy (refined) */
body, p, li{ font-size:clamp(0.85rem, 1vw, 0.95rem); line-height:1.6; }

/* Links in running copy */
.content a{
  color:var(--link); text-decoration:none;
  border-bottom:1px solid color-mix(in srgb, var(--link) 40%, transparent);
}
.content a:hover{ border-bottom-color:var(--link); }

/* Content wrappers */
.page{
  --breadcrumb-space: 0px;
  min-height: calc(100vh - var(--header-h));
}
.container{ max-width:1200px; margin-inline:auto; padding-inline:var(--pad-x); }
.section{ padding:var(--space-xl) 0; }
.section.muted{ background:var(--muted-bg); }

/* Content block spacing */
.content{ color:var(--text); }
.content > * + *{ margin-top:var(--space-md); }
.content h2{ font-size:clamp(1.8rem, 3vw, 2.4rem); line-height:1.25; margin:var(--space-lg) 0 var(--space-sm); }
.content h3{ font-size:clamp(1.5rem, 2.5vw, 2rem); line-height:1.3; margin:var(--space-md) 0 var(--space-sm); }

/* Pull-quote — tuned + ensure inner <p> inherits */
.pull-quote,
.content .pull-quote{
  font-family:'Austin Light', serif; font-weight:300;
  font-size:clamp(1.8rem, 2.75vw, 2.25rem) !important;
  line-height:1.2; letter-spacing:0.5px;
  background:none; border:none; font-style:italic;
  padding:0 0 0 1rem; margin:2rem 0;
  border-left:2px solid currentColor;
}
.pull-quote p,
.content .pull-quote p{ font-size:inherit !important; line-height:inherit; margin:0; }

/* Give text areas more horizontal breathing room (default) */
.split-hero .col-left,
.page .content{
  padding-left:clamp(32px, 6vw, 72px);
  padding-right:clamp(32px, 6vw, 72px);
}

/* On wide screens, align content paddings to the global grid */
@media (min-width:960px){
  .split-hero .col-left,
  .page .content, nav.breadcrumb {
    padding-left: var(--content-side-padding);
    padding-right: var(--content-side-padding);
    margin-left:-20px;
  }
}

/* Narrower line length for readability */
.col-left .content{ max-width:38rem; }
@media (min-width:1600px){ .col-left .content{ max-width:44rem; } }

/* Breadcrumb (global) */
.breadcrumb{ 
  padding:0 0 50px 0;
  top:160px;
  position:absolute;
  
 }

.breadcrumb a{
  display:inline-block; font-size:14px; color:var(--muted);
  text-decoration:none; border-bottom:1px solid transparent;
  text-decoration:none;
}
.breadcrumb a:hover{ 
  color:var(--brand); 
  border-bottom-color:currentColor;
  text-decoration: none;
 }

/* Pages with breadcrumb: allocate vertical space */
.page.has-breadcrumb{ --breadcrumb-space: 40px; }

@media (max-width:1200px){
  .page.has-breadcrumb .content h1 { 
   padding-top:50px;
 }
 .breadcrumb{ 
    top:150px !important;
    left:50px !important;
  }
 }

/* =========================================================
   About & Similar — Split Hero + Fade Carousel
   ========================================================= */
.split-hero{
  display:flex;
  height: calc(100vh - var(--header-h) - var(--breadcrumb-space));
  width:100%;
}
.split-hero .col-left{
  flex:0 0 40vw; max-width:40vw;
  display:flex; align-items:center; background:#fff; overflow:auto;
}
.split-hero .col-right{
  position:relative; flex:1 1 auto; min-width:0; background:#000;
}

/* Fade carousel */
.fade-carousel{ list-style:none; padding:0; margin:0; position:absolute; inset:0; }
.fade-carousel > li{ position:absolute; inset:0; opacity:0; transition:opacity .8s ease; }
.fade-carousel > li.is-active{ opacity:1; }
.fade-carousel img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Polite image load-in for right-column carousels */
.col-right .fade-carousel img{
  opacity:0; transform:scale(1.02);
  transition:opacity .5s ease, transform .5s ease;
  will-change:opacity, transform;
}
.col-right .fade-carousel img.is-loaded{
  opacity:1; transform:scale(1);
}

/* Responsive stacking for split hero */
@media (max-width:960px){
  .split-hero{ flex-direction:column; height:auto; }
  .split-hero .col-left{ flex:1 1 auto; max-width:100%; height:auto; overflow:visible; }
  .split-hero .col-right{ flex:1 1 auto; height:60vh; }
  .fade-carousel img{ height:100%; object-fit:cover; }

  /* Pull-quote: mobile tweaks */
  .pull-quote,
  .content .pull-quote{
    font-size:clamp(1.4rem, 4.5vw, 1.75rem) !important;
    line-height:1.3;
    margin-bottom:2rem;
    border-left-width:1px;
  }
}

/* Mid-range tweak (prevent content under masthead & give text more width) */
@media (min-width:960px) and (max-width:1420px){
  .split-hero .col-left{
    flex:0 0 48vw; max-width:48vw;
    align-items:flex-start;
    padding-top:clamp(16px, 3vh, 36px);
    overflow:visible;
  }
  .split-hero .col-right{ flex-basis:52vw; }
}

/* =========================================================
   Project detail meta list
   ========================================================= */
.project-meta{
  list-style:none;
  margin:2rem 0 0;
  padding:0;
  font-size:1.05rem;
  letter-spacing:0.5px;
}
.project-meta li{
  margin:0.5rem 0;
  padding-left:1.1rem; /* tighter gap to bullet */
  position:relative;
  line-height:1.5;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .35s ease, transform .35s ease;
}
.project-meta li.in{ opacity:1; transform:translateY(0); }
.project-meta li::before{
  content:'•';
  position:absolute; left:0; top:0; /* original bullet position */
  color:var(--brand, #333);
  font-size:1.2rem; line-height:1.2;
}
.project-meta strong{
  font-weight:normal; font-family:'Austin Medium', serif; font-size:1.1rem;
}
.project-meta span{
  font-family:'Austin Light', serif; font-size:1.1rem;
}
@media (max-width:960px){
  .project-meta{ margin-bottom:1.5rem; } /* space before stacked image */
}

/* =========================================================
   Reduced motion hygiene
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  .project-meta li,
  .menu a,
  .socials a,
  .fade-carousel > li{ transition:none !important; }
}

/* =========================================================
   Contact — Map monochrome (if used)
   ========================================================= */
.map-embed{ position:absolute; inset:0; }
.map-embed iframe{
  position:absolute; inset:0; width:100%; height:100%; border:0;
  filter: grayscale(100%) brightness(95%) contrast(90%);
}

/* ============================
   ALIGN HEADER TO CONTENT EDGE
   ============================ */

/* Remove extra left padding from content so it aligns with the header logo */
   .split-hero .col-left .content,
   .page .content {
     padding: 0 20px !important;
   }
   
   /* ========================================
      Logo alignment across all breakpoints
      ======================================== */
   
   /* Small to medium screens — match .page .content padding (20px) */
   @media (max-width: 1199px) {
     .site-header .logo {
       padding-left: clamp(32px, 6vw, 72px);
     }
   }
   
   /* Large screens — keep existing var-based alignment */
   @media (min-width: 1200px) {
     .site-header .logo {
       margin-left: var(--content-side-padding);
     }
     .site-header .burger { 
       margin-right: var(--content-side-padding); 
     }
   }
