:root{
  --ink:#111827;
  --ink-2:#374151;
  --brand:#b91c1c;
  --surface:#ffffff;
  --bg:#f9fafb;
  /* set these to your real footer heights */
  --footer-h-desktop: 220px;
  --footer-h-mobile: 180px;
  --header-h: 84px; /* your header min-height */
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Inter,system-ui,Arial,Helvetica,sans-serif;line-height:1.6;color:var(--ink);background:var(--bg)}
a{color:var(--brand);text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:0 20px}

/* ========== HEADER overlays HERO ========== */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.4);  /* subtle dark overlay */
  backdrop-filter: blur(4px);   /* optional glass effect */
  z-index: 1000;
}

.site-nav a {
  color: #fff !important;       /* always visible */
  font-weight: 600;
  padding: 6px 3px;
}
.site-nav a:hover,
.site-nav a.active {
  color: #ffcccc !important;    /* highlight on hover/active */
}


.nav-toggle{display:none;background:transparent;border:0;font-size:24px}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height: var(--header-h);
  padding: 0 20px;
}
.brand img{height:85px}


/* HERO compensates for overlaid header (adds visual space under it) */
.hero {
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  min-height: calc(100svh - var(--footer-h-desktop) - var(--header-h));         /* full viewport height */
  display: flex;              /* center content */
  align-items: center;
  justify-content: center;
  color: #e5ebe6;
  position: relative;
  margin-top: 0;
  padding: 0;                 /* remove fixed padding */
}
/* Home: overlay header on hero */
.has-hero .site-header{
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

/* About (no hero): regular header that doesn’t cover content */
.no-hero .site-header{
  position: relative;           /* not overlaying */
  background: rgba(26,26,26,0.70); /* same color but with 85% opacity */
  backdrop-filter: blur(4px);      /* adds a nice glassy effect */
}
.no-hero main{ padding-top:var(--header-h); } /* no artificial offset */

.has-hero .hero{ padding-top: var(--header-h); } /* ensures hero text clears the header */

.hero::before{content:'';position:absolute;inset:0;background:rgba(17,24,39,.55)}
.hero .hero-inner{position:relative}

.hero h1{font-size:clamp(32px,5vw,56px);line-height:1.1;margin:0 0 12px;color:#fff;text-shadow:0 2px 6px rgba(0,0,0,.25)}
.hero p{max-width:760px;color:#f3f4f6}
.cta-row{display:flex;gap:12px;margin-top:16px}
/* Textured primary button */
.btn {
  display: inline-block;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 14px;
  color: white;
  background:
    /*url("/assets/red_texture_calm.webp") center/cover no-repeat;
  /*border: 2px solid #6b0203;  /* optional darker red border */
  text-shadow: 0 1px 2px rgba(0,0,0,.4); /* keep text readable */
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}

.btn2 {
  display: inline-block;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 14px;
  color: white;
  background:
    url("/assets/red_texture_calm.webp") center/cover no-repeat;
  /*border: 2px solid #6b0203;  /* optional darker red border */
  text-shadow: 0 1px 2px rgba(0,0,0,.4); /* keep text readable */
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn2:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}

/* PROSE / GRIDS (unchanged) */
.prose h1,h2,h3,h4{color:var(--ink)}
.prose p{color:var(--ink-2)}
.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.projects-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.project-card{background:var(--surface);border:1px solid #e5e7eb;border-radius:16px;padding:16px;overflow:hidden}
.project-card img{width:100%;height:200px;object-fit:cover;border-radius:12px;margin-bottom:12px}
.team-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.member{background:var(--surface);border:1px solid #e5e7eb;border-radius:16px;padding:20px}
.contact-form input, .contact-form textarea{width:100%;padding:12px;border:1px solid #e5e7eb;border-radius:12px}
.contact-form label{display:block;margin:12px 0 0}

/* ========== FOOTER (in flow, centered content, high contrast) ========== */
.site-footer{
  margin-top: 0;
  width: 100%;
  background:
    url("/assets/red_texture_calm.webp") repeat-x center,
    linear-gradient(180deg,#5b0b0c 0%, #9f151a 35%, #6b0203 100%);
  background-size: auto 100%, cover;
  color:#fff;
  padding: 12px 0;          /* content height; remove fixed height */
  position: static;         /* <— important: not fixed */
}
.site-footer a{ color:#ffe7e7; }
.site-footer a:hover{ color:#fff; }


.site-footer .container{
  /* constrain the text so the footer doesn’t feel “too wide” */
  max-width:2400px;
  margin:0 auto;
  padding:16px 0px;
  text-align:center;
}
.site-footer .muted{color:#f4dada}             /* optional helper */

/* If you keep the multi-row info, stack it nicely */
.footer-columns{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:12px;
  align-items:start;
  max-width:2400px;
  margin:0 auto;
}
.footer-columns h4{margin:0 0 8px;color:#fff}
.footer-bottom{
  max-width:2400px;margin:12px auto 0;
  border-top:1px solid rgba(255,255,255,.18);
  padding:12px 0px;
  font-size:14px;color:#f4dada;text-align:center;
}



/* ========== RESPONSIVE ========== */
@media (max-width: 900px){
  .projects-grid{grid-template-columns:1fr 1fr}
  .grid.two,.team-grid{grid-template-columns:1fr}
  .footer-columns{grid-template-columns:1fr}
}
/* Desktop/Large screens: always restore nav layout */
@media (min-width: 681px){
  .site-nav{
    display: flex !important;     /* override any leftover inline or mobile rules */
    position: static;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    flex-direction: row;
    min-width: 0;
  }
  .nav-toggle{ display: none !important; }
}

@media (max-width: 680px){
  .site-nav{
    display:none;
    position:absolute;
    right:20px;
    top:64px;
    background: rgba(26,26,26,0.70);  /* matches your desktop no-hero bar */
    backdrop-filter: blur(4px);       /* optional glass effect */
    border:1px solid rgba(255,255,255,0.15);
    border-radius:12px;
    padding:12px;
    flex-direction:column;
    min-width:200px
  }
  .nav-toggle{display:inline-block}
  .hero{padding:calc(72px + 56px) 0 72px;}
}

[id] {
  scroll-margin-top: var(--header-h);
}

.no-hero main [id] {
  scroll-margin-top: var(--header-h);
}

/* === Bulletproof top-offset for pages without a hero === */
:root { --header-h: 50px; } /* a touch larger than the 85px logo + padding */

/* If the page does NOT have a hero, ensure the header is in-flow and content is offset */
body:not(.has-hero) .site-header {
  position: sticky;
  top: 0;
  z-index: 1000; /* keep it above content but IN the flow */
}

body:not(.has-hero) main {
  padding-top: var(--header-h);   /* prevent the first element from hiding under the header */
  padding-bottom: 50px;
}

/* Prevent margin-collapsing from pulling the H1 under the header */
body:not(.has-hero) main > :first-child {
  margin-top: 0;
}

/* Mobile tweak if your header is shorter on small screens */
@media (max-width: 680px){
  :root { --header-h: 72px; }
  body:not(.has-hero) main { padding-top: var(--header-h); }
}

.popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.popup-content p {
  margin-bottom: 1rem;
}


