:root{ --bg:#fff; --fg:#0a0a0a; --muted:#6b6b6b; --gutter:clamp(16px,3vw,28px); --maxw:1440px; --transition:180ms ease; }
*{box-sizing:border-box} html{scroll-behavior:smooth}
body{margin:0;color:var(--fg);background:var(--bg);font:400 16px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,"Noto Sans",sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:inherit;text-decoration:none} a:hover{text-decoration:underline;text-decoration-thickness:1px}
.container{max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter)}

/* Header */
.site-header{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.85);backdrop-filter:saturate(150%) blur(6px);border-bottom:1px solid #efefef}
.nav{display:flex;align-items:center;justify-content:space-between;height:64px}
.brand{font-size:clamp(16px,2vw,18px);letter-spacing:.04em;text-transform:uppercase}
.brand strong{font-weight:600}
.menu{display:flex;gap:clamp(16px,2.2vw,36px);align-items:center}
.menu a{font-size:15px;opacity:.85}
.menu a[aria-current="page"]{opacity:1;text-decoration:underline;text-underline-offset:4px}

/* Mobile */
.menu-toggle{display:none;background:none;border:0;font-size:14px}
@media (max-width:760px){
  .menu-toggle{display:block}
  .menu{display:none;position:absolute;inset:64px var(--gutter) auto var(--gutter);background:#fff;border:1px solid #eee;border-radius:16px;padding:16px;flex-direction:column}
  .menu.is-open{display:flex}
}

/* Footer */
.site-footer{color:var(--muted);border-top:1px solid #efefef;margin-top:48px}
.site-footer .inner{padding:28px 0;display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap}
small,.muted{color:var(--muted)}

/* Hero */
.hero{min-height:calc(60vh - 64px);display:grid;place-items:center;padding:clamp(40px,10vw,120px) 0}
.hero h1{font-weight:500;font-size:clamp(28px,6vw,64px);line-height:1.06;text-align:center;letter-spacing:-.01em}
.hero p{text-align:center;max-width:60ch;margin:12px auto 0;color:var(--muted);font-size:clamp(14px,1.6vw,17px)}

/* Single-column image flow */
.flow{padding: 24px 0 40px;}
.flow figure{margin:0 0 clamp(18px,2.5vw,28px) 0}
.flow img{width:100%;height:auto;display:block;border-radius:12px;border:1px solid #eee;background:#f7f7f7}
.flow figcaption{margin-top:8px;color:var(--muted);font-size:14px}

/* Fade (fixed) */
body.fade-enter{opacity:0}
body.fade-enter.fade-enter-active{opacity:1;transition:opacity var(--transition)}

/* ===== Viewer pages (Residential / Commercial) ===== */
:root {
  /* Fallbacks; JS sets --avail-h precisely at runtime */
  --vh: 1vh;
  --avail-h: 100vh;
  --bg: #f2f0ec; /* tweak if you want a different neutral */
}

body.viewer {
  height: 100%;
  overflow: hidden;           /* no page scroll on viewer pages */
  background: var(--bg);
}

.viewer main {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Layout containers */
.viewer .folio {
  position: relative;
  height: 100%;
  width: 100%;
}

.viewer .stage {
  height: var(--avail-h);
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);   /* NEW: horizontal padding same as global container */
  box-sizing: border-box;
}

.viewer .stage img {
  display: block;
  background: transparent;
  border: none;
  border-radius: 0;
  max-width: 100%;
  max-height: var(--avail-h);
  object-fit: contain;
}

/* JS toggles these based on aspect ratio */
.viewer .stage img.fit-height { height: var(--avail-h); width: auto; }
.viewer .stage img.fit-width  { width: 100%; height: auto; }

/* Fixed bottom controls */
/* ----- Viewer controls: text-only arrows (no circle) ----- */
.viewer .controls {
  position: fixed;
  left: 0; right: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;                  /* a little more space between arrows and counter */
  padding: 0;
}

/* Remove the foggy gradient behind controls */
.viewer .controls::before { content: none; }

/* Arrow buttons: no border, no background, no radius */
.viewer .btn {
  position: relative;
  appearance: none;
  border: none;
  background: none;
  border-radius: 0;
  padding: 8px 12px;          /* keeps a comfortable hit target */
  min-width: 0;
  height: auto;
  line-height: 1;
  font-size: clamp(28px, 3.6vw, 36px);  /* scale with viewport */
  color: rgba(20,20,20,.65);  /* subtle default */
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}

/* Hover / focus states */
.viewer .btn:hover,
.viewer .btn:focus {
  color: rgba(20,20,20,.95);
  transform: translateY(-1px);
  outline: none;
}

/* Visible keyboard focus (accessible but tasteful) */
.viewer .btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Active tap/click feedback */
.viewer .btn:active {
  transform: translateY(0);
}

/* Counter style next to arrows */
.viewer .index {
  font-size: 14px;
  color: #6b6b6b;
  display: grid;
  place-items: center;
  padding: 0 10px;
}


/* Optional: container gutters (already in your CSS, keep if useful) */
/* .container { padding-left: clamp(16px,3vw,28px); padding-right: clamp(16px,3vw,28px); } */


/* ===== Homepage (full-screen hero) ===== */
body.home {
  overflow: hidden;                   /* no page scroll on the hero */
  background: #000;                   /* fallback while image loads */
}

/* Make the top bar transparent on the homepage */
body.home .site-header {
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
}

/* Light-on-dark nav for readability over photos */
body.home .brand,
body.home .menu a {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* Fullscreen hero image */
.hero-viewport {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.hero-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;                  /* fill the viewport, keep aspect */
  display: block;
}

/* Optional: a very subtle top-to-bottom gradient for contrast */
.hero-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.22) 0%, rgba(0,0,0,.12) 40%, rgba(0,0,0,0) 65%);
  pointer-events: none;
}

/* Keep header on top of the hero */
.site-header { position: sticky; top: 0; z-index: 10; }

/* If you use the viewer styles elsewhere, they won’t affect the home page */


/* ================= HEADER + MOBILE MENU FIXES (scoped overrides) ================= */

/* Add a smaller second line under the brand title */
.brand-sub {
  display: block;
  font-size: clamp(12px, 1.2vw, 13px);
  opacity: .8;
  margin-top: 2px;
}

/* Hamburger icon color should match nav links */
.menu-toggle { color: inherit; }      /* inherits link color */
body.home .menu-toggle { color: #fff; }

/* Hamburger lines use currentColor */
.menu-toggle .hamburger span,
.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  background: currentColor;
}

/* Mobile menu on the homepage: ensure white links are visible */
@media (max-width: 760px) {
  body.home .menu {
    background: rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.25);
  }
  body.home .menu a {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
  }
}

/* Hamburger icon (3 lines, already in your CSS but ensure correct color) */
.menu-toggle .hamburger {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 18px;
}
.menu-toggle .hamburger span,
.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 1px;
}
.menu-toggle .hamburger::before { top: 0; }
.menu-toggle .hamburger span { top: 8px; }
.menu-toggle .hamburger::after { bottom: 0; }

/* Hidden accessible label */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}


/* ===== Information page ===== */
body.info main.info-content {
  padding-top: 140px;   /* more breathing room below header */
  padding-bottom: 60px;
  max-width: 720px;     /* keep text column narrower */
}

.info-content blockquote {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 2em;
  font-style: normal;      /* same as other text */
}

.info-content blockquote footer {
  font-style: italic;   /* only author italic */
  margin-top: 0.15em;    /* much closer to the quote */
  display: block;
}



.info-content h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2.5em;
  margin-bottom: 1em;
  font-weight: 500;
}

.info-content p,
.info-content li {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 1em;
}

.info-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-content li::before {
  content: "– ";        /* simple dash prefix, like reference site */
  color: #666;
}

.info-content p:last-of-type {
  margin-top: 3em;   /* adds more vertical space before the links */
}




/* Viewer pages: full-bleed main - Fix Photos being aligned to the left */
body.viewer main {
  width: 100vw;
  margin: 0;
  padding: 0;
}

/* Gentle vertical breathing room for the viewer stage */
:root {
  /* tweak to taste; clamp keeps it nice across sizes */
  --stage-top-gap: clamp(12px, 2vh, 32px);
  --stage-bottom-gap: clamp(16px, 2.5vh, 40px);
}

/* Add vertical padding, keep existing horizontal gutter */
body.viewer .stage {
  padding: var(--stage-top-gap) var(--gutter) var(--stage-bottom-gap);
  /* Create an internal var so the image knows how much height it can use */
  --img-max-h: calc(var(--avail-h) - var(--stage-top-gap) - var(--stage-bottom-gap));
}

/* ===== Viewer image sizing with absolute caps ===== */
body.viewer .stage img {
  /* hard upper limits */
  max-width: 1100px;   /* never wider than 1600px */
  max-height: 1100px;  /* never taller than 1000px */

  /* still shrink as needed to fit stage/viewport */
  width: auto;
  height: auto;
  object-fit: contain;
}


/* Keep the aspect-ratio fit variants consistent with the new max height */
body.viewer .stage img.fit-height { height: var(--img-max-h); width: auto; }
body.viewer .stage img.fit-width  { width: 100%; height: auto; }


/* subtle blur-up while higher-res loads */
#stage img.is-blurry {
  filter: blur(8px);
  transition: filter 200ms ease;
}
#stage:not(.is-loading) img.is-blurry {
  filter: blur(0);
}

/* optional tiny spinner; style to taste */
#stage.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(0,0,0,0.15), transparent 40%) no-repeat center/80px 80px;
  /* if you prefer a real spinner, we can add one */
}
#stage { position: relative; } /* required for the ::after overlay */
