/* cms/static/css/site.css
   Drop-in: keeps your structure, applies the reference look. */

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

:root{
  /* Design tokens */
  --gutter: clamp(16px, 3.5vw, 36px);          /* universal outer margin */
  --indent: clamp(10px, 2.2vw, 22px);          /* inside-body extra indent */
  --content-max: 1200px;                        /* max readable width */
  --header-height: 72px;                        /* used by sticky things */
  --brand: #111;
  --brand-accent: #6b8afd;
  --text: #222;
  --muted: #777;
  --bg: #fff;
  --overlay: rgba(0,0,0,.70);       /* darker overlay like the reference */
  --title-font: "Montserrat", sans-serif;
  --text-font: "Roboto", system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --title-size: clamp(24px, 5vw, 40px);
  --cat-size: clamp(12px, 3vw, 16px);
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --brand-size: clamp(28px, 5vw, 56px);   /* cap-height for the SVG wordmark */
  --mark-ratio: .88;                      /* image height relative to wordmark */
  --brand-gap: clamp(8px, 1.2vw, 14px);   /* space between logo & mark */
  --brand-kern: 112px;                     /* nudge image left to “tuck in” */
  --brand-tint: 0 0% 0% / .06;
}

/* ===== Containers align to the outer gutter ===== */
.container{
  max-width: calc(var(--content-max) + 2*var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}



/* Header & footer follow the outer gutter */
.site-header,
.site-footer{
  padding-block: 16px;
  /* in case something clipped brand/logo before */
  overflow: visible;
}

/* ===== Page body is indented a bit further than the header ===== */
.site-main{            /* outer container uses the universal gutter already */
  padding-block: clamp(10px, 2.4vw, 24px);
}
.page-indent{          /* THIS is the “extra” indent inside body */
  padding-inline: var(--indent);
}

/* Make long text comfy */
.page-indent p,
.page-indent ul,
.page-indent ol{
  max-width: 70ch;
}

/* ===== Helpers for content that should reach the outer gutter ===== */
/* Full-bleed to the container edges (keeps the universal gutter) */
.bleed{
  margin-inline: calc(-1 * var(--indent));
}

/* Truly edge-to-edge across viewport (rarely needed) */
.full-bleed{
  margin-inline: calc(-1 * (var(--gutter) + var(--indent)));
}

/* Example: make your project grids/hero use .bleed (not .full-bleed) */
.grid.bleed,
.hero-frame.bleed,
.phase-slider.bleed{
  width: auto; /* so they expand after negative margins */
}

/* ===== Keep sticky meta offsets correct (already used in project pages) ===== */
.project-meta{
  top: var(--header-height);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0; background:var(--bg); color:var(--text); font-family:var(--text-font);
}

/* A11y helper */
.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; }

/* =========================
   Header
   ========================= */

/* --- The lockup --- */
.brand-lockup{
  display:inline-flex;
  align-items:baseline;                   /* baseline alignment feels natural */
  gap: var(--brand-gap);
  text-decoration:none;
  color: inherit;
}

/* Wordmark (SVG) */
.brand-lockup .logo svg{
  display:block;
  height: var(--brand-size);
  width:auto;
  overflow:visible;                       /* avoids clipping glyph edges */
}

/* Brand mark (image) */
.brand-lockup .mark{
  display:block;
  height: calc(var(--brand-size) * var(--mark-ratio));
  width:auto;
  object-fit: contain;
  /* optical adjustments for perfect harmony */
  transform: translateY(2px);             /* baseline compensation */
  margin-left: var(--brand-kern);         /* “tuck” closer to wordmark */
  border-radius: 8px;                     /* give it a refined shape */
  box-shadow: 0 1px 8px hsl(var(--brand-tint));
  filter: saturate(110%) contrast(105%);
}

/* Subtle alive-ness on hover/focus (kept tasteful) */
.brand-lockup:hover .mark,
.brand-lockup:focus-visible .mark{
  transform: translateY(2px) scale(1.02);
  transition: transform .15s ease;
}

.site-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:24px; padding:12px 16px; width:100%; overflow:visible;
}

.site-header svg{
  display:block;
  width:auto; height:49px;
  overflow:visible; }

@media (max-width: 640px){
  :root{ --brand-size: 36px; }
  .brand-lockup .mark{ border-radius: 6px; }
}

/* Optional separator if you want a “deep vibe” divider between the two */
.brand-lockup::after{
  content:"";
  width:1px;
  height: calc(var(--brand-size) * .68);
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.14), transparent);
  margin: 0 calc(var(--brand-gap) - 2px);
  border-radius: 1px;
  /* comment this out if you don’t want the vertical hairline */
  display:none;
}

.hamburger{ width:40px; height:40px; display:grid; place-items:center; border:0; background:transparent; cursor:pointer; }
.hamburger span{ width:22px; height:2px; background:#222; margin:3px 0; display:block; }

/* Backdrop & panel (kept hidden until JS opens) */
.menu-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  opacity:0; transition:opacity .2s ease; z-index:30;
}
.menu-panel{
  position:fixed; top:0; right:0; bottom:0; width:min(88vw,380px);
  background:#fff; box-shadow:-12px 0 30px rgba(0,0,0,.15);
  transform:translateX(100%); transition:transform .25s ease; z-index:31;
}

.menu-panel a { text-decoration: none; color: inherit; }

.menu-inner{ display:flex; flex-direction:column; height:100%; padding:18px; }
.menu-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.menu-close{ border:0; background:transparent; font-size:22px; cursor:pointer; }
.menu-title{ margin:0; font-size:1.1rem; }

.menu-level1{ list-style:none; padding:0; margin:10px 0 0; }
.menu-level1 > .menu-item{ margin:8px 0; }

.menu-accordion{
  width:100%; text-align:left; border:0; background:transparent; font:inherit;
  padding:12px 6px; cursor:pointer; border-radius:8px;
}
.menu-accordion[aria-expanded="true"]{ background:#f3f3f3; }

.menu-level1 > .menu-item > a:hover,
.menu-accordion[aria-expanded="true"],
.menu-accordion:hover{
  background: #f3f3f3;
}

.menu-level1 > .menu-item > a:focus-visible,
.menu-accordion:focus-visible{
  outline: 2px solid #000;
  outline-offset: 2px;
}

.menu-level1{ list-style: none; margin: 10px 0 0; padding: 0; }
.menu-level1 > .menu-item{ margin: 6px 0; }


.menu-sub{ list-style:none; padding:6px 0 8px 14px; margin:0; }
.menu-sub a{ display:block; padding:10px 6px; text-decoration:none; color:inherit; border-radius:6px; }
.menu-sub a:hover{ background:#f7f7f7; }

/* Open state toggled by the <html> class */
.menu-open #menuBackdrop{ opacity:1; }
.menu-open #siteMenu{ transform:none; }

/* Prevent background scroll when menu open */
.menu-open, .menu-open body{ overflow:hidden; }


/* =========================
   “Projects” vertical dropdown (mobile-first)
   ========================= */
.panel-title{ margin:4px 0 10px; font:600 1.05rem/1.2 var(--text-font); }
.panel-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.panel-list a{
  display:block; padding:12px 14px; border:1px solid #e6e6e6; border-radius:10px;
  text-decoration:none; color:inherit; line-height:1.2; min-height:48px;
}
.panel-list a:hover,.panel-list a:focus{ background:#f7f7f7; }
.panel-all{ display:block; margin-top:14px; font-weight:600; text-decoration:none; }
.panel-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.28); z-index:90; }


/* =========================
   Footer
   ========================= */
/* ===== Footer ===== */
.site-footer{
  display:flex; align-items:center; 
  justify-content:space-between; 
  padding:16px 20px;
  color:var(--muted); 
  font-size:.95rem;
}

.footer-inner{
  padding-block: clamp(18px, 3vw, 36px);
}

/* 1-col mobile → 3-col desktop */
.footer-grid{
  display: grid;
  gap: 16px;
}
@media (min-width: 820px){
  .footer-grid{
    grid-template-columns: 2fr 1fr 1fr;
    gap: 22px;
  }
}

.f-block p{ margin: 6px 0 0; line-height: 1.6; }

/* small section titles */
.f-title{
  margin: 0 0 6px;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #666);
}

/* links look subtle but tactile */
.site-footer a{
  color: inherit; text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.2);
}
.site-footer a:hover{ border-color: rgba(0,0,0,.5); }

/* copyright strip */
.footer-meta{
	flex-wrap: warp;
	gap : 6px 10px;
}
.footer-meta > * { min-width: 0; }
.footer-meta small{ 
	white-space: normal;
        opacity: .7;
        overflow-wrap: anywhere;}

/* keep outer margin language consistent with the site */
/*.site-footer .container{ padding-inline: var(--gutter); } */


/* =========================
   Page Sections
   ========================= */
.hero{
  padding:28px 20px; font-family:var(--title-font); font-weight:300; line-height:1.20;
}
.hero--about{ padding:28px 20px 12px; }
.hero-title{
  font: 400 clamp(1.6rem,3.2vw,2.2rem)/1.25 var(--title-font);
  margin:0 0 6px;
}
.lead{ max-width:720px; color:var(--muted); font-size:1.05rem; line-height:1.6; }

/* =========================
   Filters
   ========================= */
.filters{
  display:flex; flex-wrap:wrap; gap:12px; padding:10px 20px 20px;
}
.filters a{
  text-decoration:none; color:inherit; padding:6px 12px; border-radius:8px;
  border:1px solid #e8e8e8; transition:.2s ease-in-out;
}
.filters a:hover{ background:#111; color:#fff; border-color:#111; }
.filters a.active{ background:#111; color:#fff; }

/* =========================
   Grid + Cards (portfolio)
   ========================= */
.grid{ display:grid; grid-template-columns:1fr; gap:12px; padding:0 20px; }
@media (min-width:600px){ .grid{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:900px){ .grid{ grid-template-columns:repeat(3,1fr); } }

.card{
  position:relative; aspect-ratio:1 / 1; overflow:hidden; border-radius:var(--radius);
  box-shadow:var(--shadow); transition:transform .25s ease;
  background:#f4f4f4;
}
.card:hover{ transform:translateY(-2px); }
.card img{ width:100%; height:100%; object-fit:cover; display:block; }
.card .card-link{ display:block; height:100%; position:relative; }

/* Hover overlay like the reference */
.card .overlay{
  position:absolute; inset:0; background:var(--overlay); opacity:0; transition:opacity .25s ease;
  display:flex; align-items:flex-end; pointer-events:none;
}
@media (hover:hover){ .card:hover .overlay{ opacity:1; } }
.overlay .inner{ padding:36px 24px; width:100%; }
.overlay .title{
  margin:0 0 6px; font-size:var(--title-size); font-weight:300; color:#fff;
  letter-spacing:0; font-family:var(--title-font);
}
.overlay .category{ display:inline-block; font:300 var(--cat-size)/1 var(--text-font); color:#fff; opacity:.9; }

/* Text-only fallback when no image */
.card.no-cover{ display:flex; align-items:flex-end; justify-content:flex-start; }
.card .fallback{ padding:24px; }

/* =========================
   Project detail (sticky info + scroll gallery)
   ========================= */
.project-layout{ display:grid; grid-template-columns:1fr; gap:24px; }
@media (min-width:1024px){
  .project-layout{ display:flex; gap:36px; align-items:flex-start; }
  .project-aside{ position:sticky; top:72px; flex:0 0 340px; height:fit-content; z-index:1; }
  .project-images{ flex:1 1 auto; min-height:120vh; }
}
.portfolio-section{ margin:18px 0 24px; }
.cat{ font-weight:600; letter-spacing:.02em; margin:0 0 6px; }
.tags{ margin:6px 0 12px; }
.tag{ display:inline-block; margin:0 6px 6px 0; padding:4px 8px; border-radius:999px; background:#eee; font-size:.9rem; }
.about{ margin:12px 0 16px; }

.info{ display:grid; grid-template-columns:140px 1fr; gap:6px 14px; margin:12px 0 0; }
.info dt{ color:var(--muted); font-size:.9rem; }
.info dd{ margin:0; }

.project-images{ display:grid; gap:16px; }
.shot .img{ width:100%; height:auto; display:block; }

/* =========================
   Generic page content
   ========================= */
.page-body{ padding:0 20px 24px; max-width:900px; }

/* =========================
   Tiny WordPress-block parity (for pasted content from ref)
   Only the essentials; won’t bloat your CSS.
   ========================= */
.aligncenter{ text-align:center; margin-left:auto; margin-right:auto; }
.wp-block-image{ margin:0 0 1em; }
.wp-block-image img{ max-width:100%; height:auto; }
.wp-block-gallery{ display:flex; flex-wrap:wrap; gap:16px; list-style:none; padding:0; margin:0 0 1em; }
.wp-block-gallery img{ display:block; max-width:100%; height:auto; }
.wp-block-cover{ position:relative; min-height:300px; background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; padding:1em; }
.wp-block-cover__inner-container{ color:#fff; z-index:1; }


/* --- Mobile project cards: caption always visible; preview expands overlay --- */
@media (hover: none) and (pointer: coarse) {
  /* 1) Default on touch: show a bottom caption bar */
  .card .overlay{
    opacity: 1;                       /* visible on touch */
    pointer-events: none;             /* taps still hit the link */
    position: absolute; inset: auto 0 0 0;
    height: var(--mobile-caption-height, 42%);
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.65) 60%, rgba(0,0,0,.80) 100%);
    display: flex; align-items: flex-end;
  }
  .overlay .inner{ padding: 12px 14px; }
  .overlay .title{
    font-size: 16px; font-weight: 600; margin: 0 0 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .overlay .category{ font-size: 12px; opacity: .9; }

  /* 2) Two-tap preview state: expand to full overlay */
  .card.preview .overlay{
    inset: 0; height: auto;
    background: rgba(0,0,0,.72);      /* solid-ish when previewed */
  }
}

/* (nice-to-have) reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .card, .card .overlay { transition: none !important; }
}
/* ===== Grid & sticky right meta (unchanged essentials) ===== */
.project-page, .project-page .project-layout { overflow: visible; }

@media (min-width: 1024px) {
  .project-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 360px; /* left images | right details */
    gap: 36px;
    align-items: start;
  }
  .project-meta {
    position: sticky;
    top: var(--header-height, 72px);
    align-self: start;
    max-height: calc(100vh - var(--header-height, 72px));
    overflow: auto;
    padding-right: 4px;
  }
}

/* ===== Constant golden-ratio frames (fixes oversized images) ===== */
:root { --phi: 1.618;
        --frame-max: 980px;}


.project-title{
  /* align visually with the hero frame */
  width: min(78%, var(--frame-max));
  max-width: var(--frame-max);

  margin: 4px 0 10px;               /* tight top, small gap before image */
  font: 600 clamp(22px, 3.6vw, 34px)/1.15 var(--title-font);
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Give it a calm baseline on wide screens */
@media (min-width: 1024px){
  .project-title{ margin-top: 2px; }
}



/* The frames */
.hero-frame,
.phase-slider {
  position: relative;
  width: min(78%, 980px);
  max-width: 980px;
  aspect-ratio: var(--phi) / 1;      /* 1.618 : 1 */
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;                  /* keep image inside the frame */
}

/* Make sure desktop rows alternate left/right */
.phase-row { margin: 22px 0 6px; }
.phase-row .phase-slider { justify-self: start; }
.phase-row:nth-of-type(even) .phase-slider { justify-self: end; }

@media (max-width: 899px) {
  .hero-frame, .phase-slider { width: 100%; }
}

/* The images: force them to fit the frame no matter what classes they have */
.hero-frame > img,
.hero-frame .fit,
.phase-slider img,
.phase-slider .fit {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;                 /* crop to the frame */
  display: block;
}

/* Slides stack inside the fixed-height frame (unchanged from before) */
.phase-slider .slide {
  position: absolute; inset: 0;
  opacity: 0; transform: translateX(var(--off,0));
  transition: transform .35s ease, opacity .35s ease; z-index: 1;
}
.phase-slider .slide.current { opacity: 1; transform: translateX(0); z-index: 2; }
.phase-slider .slide.out-left  { --off: -12%; }
.phase-slider .slide.out-right { --off:  12%; }

.phase-slider .cap { font-size:.95rem; color:var(--muted); margin-top:8px; }

/* Arrows stay centered because the frame height is fixed */
.phase-slider .ctrl{
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border-radius:999px; border:0;
  background:rgba(0,0,0,.55); color:#fff; font-size:22px;
  display:grid; place-items:center; cursor:pointer; z-index:3;
}
.phase-slider .prev{ left:8px; }
.phase-slider .next{ right:8px; }


/* Related full width at bottom */
.more-section.bottom{
  grid-column: 1 / -1 !important;
  margin-top: 48px; padding: 0 20px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce){
  .phase-slider .slide{ transition: none !important; transform: none !important; opacity: 1 !important; }
}
/* --- Force overlay captions to show above the image in hero + phase sliders --- */
.frame { position: relative; overflow: hidden; }

/* images stay below */
.frame img.fit,
.phase-slider img,
.hero-frame > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;                /* below caption */
}

/* caption sits above image, always visible (you can re-enable hover fade later) */
.frame .cap,
.phase-slider .slide .cap {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  padding: 8px 12px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.65) 70%, rgba(0,0,0,.78) 100%);
  border-radius: 10px;
  line-height: 1.35;
  z-index: 2;                /* above image */
  opacity: 1 !important;     /* override any previous fade rules */
  pointer-events: none;      /* taps still control the slider */
}

/* keep slider controls on top of both */
.phase-slider .ctrl { z-index: 3; }

/* ===== Contact page vertical-first layout ===== */

/* Mobile defaults: full-width stack, no gutter trespass */
.contact-wrap { padding-inline: var(--indent); }       /* inner indent */
.contact-grid { display:block;  grid-template-columns:1fr; gap:24px; }  /* vertical stack */

@media (min-width: 1024px){
  .contact-grid{
    grid-template-columns: minmax(0, 520px) 1fr;
    gap: 28px;
  }
}


/* Contact card spacing */
.contact-card { 
  background:#fff; border:1px solid rgba(0,0,0,.06); border-radius:16px; 
  box-shadow: var(--shadow); padding:16px; margin-bottom:16px;
}

/* Make specs single-column on small screens (no cramped 2-col) */
.contact-card .specs { 
  display:grid; 
  grid-template-columns: 1fr; 
  gap: 6px 0; 
  margin:0;
}

.contact-card .specs a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.2);
}
.contact-card .specs a:hover{
  border-color: rgba(0,0,0,.5);
}

.contact-card .specs dt { margin-top:10px; color: var(--muted); font-weight:600; }
.contact-card .specs dt:first-child { margin-top:0; }
.contact-card .specs dd { margin:0; }

/* Action chips */
.cta{ display:flex; flex-wrap: wrap; gap:10px; margin-top:14px; }
.chip{
  display:inline-block;
  padding:10px 14px;
  border:1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  background:#fafafa;
  text-decoration:none; color:inherit;
}
.chip:hover{ background:#f2f2f2; }

/* Chips wrap neatly */
.cta { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }

/* Map frame stays inside the gutter and never overflows */
.map-frame.frame {
  width: 100%;
  aspect-ratio: var(--phi) / 1;   /* same golden ratio as site */
  margin: 0;                      /* no negative margins on mobile */
}
.map-frame iframe,
.map-frame > #map {
  position:absolute; inset:0;
  width:100% !important; height:100% !important;
  border:0; border-radius:12px;
  max-width:100%;                  /* kill 600px inline widths from embeds */
}

/* ===== Desktop upgrade: two columns ===== */
@media (min-width: 1024px){
  .contact-grid{
    display:grid;
    grid-template-columns: minmax(0, 520px) 1fr;  /* left card | right map */
    gap: 28px;
  }
  .contact-card { padding: 18px 20px; margin-bottom:0; }
  .contact-card .specs { grid-template-columns: 120px 1fr; gap: 8px 14px; }
}



