/* ==========================================================================
   Michael A. Roberts Construction — "Steel & Asphalt" theme
   Self-contained stylesheet. No external assets required.
   ========================================================================== */

:root {
  /* Brand / palette */
  --crimson:      #F83F3F;   /* canonical logo red — CTAs, active states, accents only */
  --crimson-dark: #D92F2F;
  --navy:         #0F172A;   /* foundation anchor — headers, dark sections */
  --navy-2:       #1E293B;   /* raised navy surfaces */
  --slate:        #64748B;   /* secondary text, borders, metadata */
  --slate-light:  #94A3B8;
  --alabaster:    #F8FAFC;   /* page canvas */
  --white:        #FFFFFF;
  --line:         #E2E8F0;   /* hairline borders on light surfaces */

  /* Status colors */
  --status-bid:    #F83F3F;  /* Active Bidding */
  --status-build:  #0EA5E9;  /* Under Construction */
  --status-arch:   #64748B;  /* Archived */

  --radius:   14px;
  --radius-sm: 8px;
  --shadow:   0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg:0 12px 40px rgba(15,23,42,.18);
  --maxw: 1180px;

  --font-display: "Anton", "Oswald", system-ui, sans-serif;     /* heavy condensed — big statements */
  --font-head: "Oswald", "Barlow Condensed", system-ui, sans-serif; /* industrial headings/nav/buttons */
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: none;        /* Firefox: hide scrollbar without disabling scroll */
  -ms-overflow-style: none;     /* Legacy Edge/IE */
}
html.no-smooth-scroll { scroll-behavior: auto; }
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.overlay-scrollbar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  width: 22px;
  background: transparent;
  pointer-events: auto;
  touch-action: none;
}
.overlay-scrollbar__thumb {
  position: absolute;
  top: 0;
  right: 5px;
  width: 7px;
  min-height: 48px;
  border-radius: 999px;
  background: var(--crimson);
  box-shadow: 0 0 0 1px rgba(0,0,0,.24), 0 8px 18px rgba(0,0,0,.28);
  opacity: 0;
  transform: translateY(0);
  will-change: transform, opacity;
  transition: opacity .42s ease, width .22s ease, right .22s ease;
}
.overlay-scrollbar.is-visible .overlay-scrollbar__thumb,
.overlay-scrollbar.is-dragging .overlay-scrollbar__thumb {
  opacity: .95;
}
.overlay-scrollbar:hover .overlay-scrollbar__thumb,
.overlay-scrollbar.is-dragging .overlay-scrollbar__thumb {
  right: 4px;
  width: 9px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--alabaster);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Blueprint background pattern (pure CSS, no image files) ------------------- */
.blueprint {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(148,163,184,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.10) 1px, transparent 1px),
    linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}

/* "Asphalt" black theme — index <body class="blk"> overrides the navy foundation.
   Plan Room deliberately KEEPS navy: blueprint-room vibe + showcases theme switching. */
body.blk { --navy: #0B0D11; --navy-2: #15181E; }
body.blk .nav { background: rgba(10,12,16,.92); }
body.blk .hero { background: linear-gradient(rgba(11,13,17,.55), rgba(11,13,17,.80)); }

/* ============================ Top nav ===================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(148,163,184,.18);
}
.nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav__links {
  display: flex; align-items: center; gap: 26px;
}
.nav__links a {
  color: var(--slate-light); font-family: var(--font-head); font-weight: 600;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--white); }
.nav__links a.is-active { color: var(--white); }
.nav__cta {
  background: var(--crimson); color: var(--white) !important;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.nav__cta:hover { background: var(--crimson-dark); }
/* Plan Room header button — outline style so it doesn't compete with the red Contact */
.nav__links a.nav__cta--plan {
  background: transparent; border-color: rgba(148,163,184,.55);
}
.nav__links a.nav__cta--plan:hover { background: rgba(255,255,255,.08); border-color: var(--white); }

/* Centered logo lockup (text-based placeholder mark) ----------------------- */
.logo { display: flex; align-items: center; gap: 12px; }
.logo__mark { height: 48px; width: auto; display: block; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__text .l1 {
  font-family: var(--font-head); font-weight: 800; color: var(--white);
  letter-spacing: .14em; font-size: 15px;
}
.logo__text .l2 {
  color: var(--slate-light); font-size: 10.5px; letter-spacing: .26em;
  text-transform: uppercase;
}

/* ============================ Hero ======================================== */
/* Crane image is a FIXED rear layer (z-index -1); the whole site scrolls on top of it */
.site-bg {
  position: fixed; top: 0; left: 0; right: 0; z-index: -1;
  height: 100vh;   /* fallback */
  height: 100lvh;  /* large viewport height — sized to toolbar-hidden state so it never snap-zooms */
  background: var(--navy); overflow: hidden;
}
/* Solid cover that fades out once the first slide image has loaded —
   prevents the bg "popping in" whenever the network finishes the download */
.site-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: var(--navy); opacity: 1;
  /* hold the solid black a beat (.7s) before the slow reveal — logo-on-black first,
     then the world fades in: simple → complex, like the build itself */
  transition: opacity 5s ease 1.3s;
  pointer-events: none;
}
.site-bg.ready::after { opacity: 0; }

/* Cinematic crossfade slideshow with slow Ken Burns */
.bg-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center 32%;
  opacity: 0; will-change: opacity, transform;
  animation: heroSlides 32s linear infinite;
}
.bg-slide:nth-child(1) { animation-delay: -2s; }
.bg-slide:nth-child(2) { animation-delay:  6s; }
.bg-slide:nth-child(3) { animation-delay: 14s; }
.bg-slide:nth-child(4) { animation-delay: 22s; }
@keyframes heroSlides {
  0%   { opacity: 0; transform: scale(1.03); }
  5%   { opacity: 1; }
  28%  { opacity: 1; }
  34%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.13); }
}
/* Hero is transparent so the fixed crane shows through; gradient just darkens it for text */
.hero { color: var(--white); position: relative; overflow: hidden;
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(rgba(15,23,42,.55), rgba(15,23,42,.80)); }
.hero::after {
  content:""; position:absolute; inset:0;
  /* kept faint (≤.10) — stronger crimson over the navy/photo blend reads magenta */
  background: radial-gradient(120% 80% at 50% -10%, rgba(248,63,63,.09), transparent 60%);
  pointer-events:none;
}
.hero .container { position: relative; z-index: 1; text-align: center; }
.hero .eyebrow { color: var(--white); }
.hero__badge { width: min(400px, 84%); height: auto; display: block; margin: 0 auto 30px;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.4)); }
.tagline {
  font-family: var(--font-head); font-style: italic; font-weight: 700;
  color: var(--white); font-size: clamp(17px, 2.6vw, 24px);
  margin: 0 0 22px; letter-spacing: .01em;
}
.tagline::first-letter { color: var(--crimson); }
.eyebrow {
  display: inline-block; color: var(--crimson);
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  letter-spacing: .22em; text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(40px, 7.5vw, 80px); line-height: .96; margin: 0 0 18px;
  letter-spacing: .005em;
}
.hero h1 .accent { color: var(--crimson); }
.hero-h1 .line { display: block; opacity: 0; transform: translateY(30px);
  animation: lineUp .85s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-h1 .line:nth-child(1) { animation-delay: .15s; }
.hero-h1 .line:nth-child(2) { animation-delay: .32s; }
@keyframes lineUp { to { opacity: 1; transform: none; } }
.hero p.lead {
  color: var(--slate-light); font-size: clamp(15px, 2.2vw, 19px);
  max-width: 620px; margin: 0 auto 34px;
}
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  letter-spacing: .03em; padding: 14px 24px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
}
.btn { text-transform: uppercase; letter-spacing: .06em; }
.btn--primary { background: var(--crimson); color: var(--white);
  box-shadow: 0 10px 24px rgba(248,63,63,.32); }
.btn--primary:hover { background: var(--crimson-dark); transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(248,63,63,.42); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(148,163,184,.45); }
.btn--ghost:hover { border-color: var(--white); }

/* Trust strip -------------------------------------------------------------- */
.trust { background: var(--navy-2); border-top: 1px solid rgba(148,163,184,.14); }
.trust .container {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 24px; padding: 40px 24px; text-align: center;
}
.trust .stat .num {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 5vw, 60px);
  color: var(--white); line-height: 1;
}
.trust .stat .num .u { color: var(--crimson); }  /* suffix accent */
.trust .stat .lbl {
  color: var(--slate-light); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; margin-top: 4px;
}

/* ============================ Plan Room =================================== */
.pr-hero { color: var(--white); padding: 64px 0 28px; text-align: center; }
.pr-hero h1 {
  font-family: var(--font-head); font-weight: 800; letter-spacing: .02em;
  font-size: clamp(28px, 5vw, 48px); margin: 18px 0 12px;
}
.pr-hero p {
  color: var(--slate-light); max-width: 560px; margin: 0 auto;
  font-size: clamp(14px, 2vw, 16px);
}
/* Plan Room title pill — brand palette (white on navy, crimson dot) */
.pr-hero .pr-pill {
  display: inline-flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.06); color: var(--white);
  border: 1px solid rgba(148,163,184,.45);
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(18px, 4.2vw, 26px); letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 30px; border-radius: 999px; margin: 4px 0 14px; line-height: 1;
}

/* Toolbar: search + filter chips ------------------------------------------ */
.pr-toolbar {
  position: sticky; top: 76px; z-index: 40;
  background: var(--alabaster);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.pr-toolbar .container {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.search {
  flex: 1 1 320px; position: relative;
}
.search input {
  width: 100%; height: 50px; border: 1px solid var(--line); background: var(--white);
  border-radius: var(--radius-sm); padding: 0 16px 0 46px;
  font-size: 15px; font-family: var(--font-body); color: var(--navy);
  box-shadow: var(--shadow); outline: none; transition: border-color .15s ease;
}
.search input:focus { border-color: var(--crimson); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--slate); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  background: var(--white); color: var(--slate);
  border: 1px solid var(--line); transition: all .15s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--slate); color: var(--navy); }
.chip.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Job grid ---------------------------------------------------------------- */
.pr-grid {
  padding: 32px 0 80px;
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:hover .card__photo { transform: scale(1.07); }

.card__media {
  height: 152px; position: relative; overflow: hidden;
  background-color: var(--navy);
  background-image:
    linear-gradient(135deg, rgba(248,63,63,.20), rgba(15,23,42,.0) 55%),
    linear-gradient(rgba(148,163,184,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.16) 1px, transparent 1px);
  background-size: cover, 22px 22px, 22px 22px;
}
.card__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; transition: transform .5s ease;
}
.card__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(15,23,42,.66), rgba(15,23,42,.05) 62%);
}
.card__media .status, .card__media .jobno { z-index: 2; }
.card__media .jobno {
  position: absolute; left: 16px; bottom: 12px;
  font-family: var(--font-head); font-weight: 800; color: var(--white);
  font-size: 13px; letter-spacing: .14em; opacity: .9;
}
.status {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--font-head); font-weight: 700; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 999px; color: var(--white);
  display: inline-flex; align-items: center; gap: 6px;
}
.status::before { content:""; width:7px; height:7px; border-radius:50%; background: currentColor; }
.status--bid   { background: var(--status-bid); }
.status--build { background: var(--status-build); }
.status--arch  { background: var(--status-arch); }

.card__body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card__title { font-family: var(--font-head); font-weight: 800; font-size: 18px; margin: 0; letter-spacing: -.01em; }
.card__meta { color: var(--slate); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: -6px; }
.card__meta b { color: var(--navy); font-weight: 600; }

.folders { display: flex; flex-direction: column; gap: 2px; }
.folder {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: none; font: inherit; text-align: left;  /* <button> resets */
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--navy); cursor: pointer;
  border: 1px solid transparent; transition: all .12s ease;
}
.folder:hover { background: var(--alabaster); border-color: var(--line); }
.folder .ic { color: var(--crimson); flex: none; }
.folder .ro { margin-left: auto; font-size: 11px; color: var(--slate); letter-spacing: .04em; }

/* "Recently Uploaded" 4-file feed (Tier-1 cards, backed by SharePoint) */
.feed { display: flex; flex-direction: column; gap: 2px; }
.feed-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--navy); text-decoration: none;
  border: 1px solid transparent; transition: all .12s ease;
}
.feed-row:hover { background: var(--alabaster); border-color: var(--line); }
.feed-row > svg { color: var(--crimson); flex: none; }
/* flex:1 + min-width:0 forces the name to truncate with an ellipsis instead of pushing the
   timestamp around, so every row is the same shape: icon · name … · time, right-aligned. */
.feed-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-time { margin-left: auto; padding-left: 8px; font-size: 12px; color: var(--slate); flex: none; white-space: nowrap; }
.feed-empty { padding: 9px 10px; font-size: 13px; color: var(--slate); font-style: italic; }

.card__foot { margin-top: auto; }
.card { cursor: pointer; }

/* Loading card: reserves the full card footprint and shows only a centered spinner, so the
   grid lays out once and nothing shifts. When the detail lands the card content replaces the
   spinner and the whole card fades in (refreshCard adds .card--reveal). No piece-by-piece pop. */
.card.is-loading {
  cursor: default; min-height: 440px;
  display: flex; align-items: center; justify-content: center;
}
.card.is-loading:hover { transform: none; box-shadow: var(--shadow); }
.card-spin {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--crimson);
  animation: card-spin .8s linear infinite;
}
@keyframes card-spin { to { transform: rotate(360deg); } }
.card--reveal { animation: card-reveal .4s ease both; }
@keyframes card-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .card-spin { animation-duration: 1.6s; }
  .card--reveal { animation: none; }
}

/* ---- Tier-2 job detail (drill-down) ---- */
.pr-detail { padding-top: 24px; padding-bottom: 60px; }
.pr-back {
  background: none; border: 1px solid var(--line); color: var(--navy); font: inherit; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 18px;
}
.pr-back:hover { background: var(--alabaster); }
.pr-dhead { margin-bottom: 18px; }
.pr-dhead .jobno-d { font-family: var(--font-head); font-size: 13px; letter-spacing: .06em; color: var(--crimson); }
.pr-dhead h2 { font-family: var(--font-head); font-size: 28px; color: var(--navy); margin: 6px 0 2px; }
.pr-dhead .addr-d { color: var(--slate); font-size: 14px; margin: 0; }
.pr-subnav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.pr-subnav input { flex: 1; min-width: 220px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.pr-subnav select { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.pr-subnav label { font-size: 13px; color: var(--slate); display: flex; gap: 6px; align-items: center; }
.pr-subnav .btn-dl { width: auto; }
.btn-dl:disabled { opacity: .5; cursor: default; }
.fl-group { margin-bottom: 14px; }
.fl-folder { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy); padding: 8px 4px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.fl-folder .ic { color: var(--crimson); }
.fl-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-sm); color: var(--navy); text-decoration: none; border: 1px solid transparent; }
.fl-row:hover { background: var(--alabaster); border-color: var(--line); }
.fl-row > svg { color: var(--crimson); flex: none; }
.fl-name { font-size: 14px; }
.fl-path { color: var(--slate); font-size: 12px; }
.fl-tech { margin-left: auto; color: var(--slate); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-size { color: var(--navy); font-size: 12px; min-width: 56px; text-align: right; }
@media (max-width: 640px) { .fl-path { display: none; } .fl-tech { font-size: 11px; } }
.btn-dl {
  width: 100%; justify-content: center;
  background: var(--crimson); color: var(--white);
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  border: none; border-radius: var(--radius-sm); padding: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px; transition: background .15s ease;
}
.btn-dl:hover { background: var(--crimson-dark); }

.empty { grid-column: 1 / -1; text-align: center; color: var(--slate); padding: 60px 0; display:none; }

/* ========================== Capabilities ================================= */
.cap-head h2 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(26px, 4.4vw, 46px); line-height: 1.03; margin: 8px 0 16px;
  letter-spacing: .005em;
}
.cap-head p { color: var(--slate); max-width: 660px; margin: 0; font-size: clamp(15px, 2vw, 18px); }
.cap-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  column-gap: 40px; margin-top: 40px;
}
.cap-item {
  display: flex; align-items: center; gap: 13px;
  padding: 17px 4px;
  font-family: var(--font-head); font-weight: 600; font-size: 16.5px;
  color: var(--navy); letter-spacing: .01em; opacity: 0;
  transition: color .15s ease, padding-left .15s ease,
              opacity 1.8s ease, transform 1.2s cubic-bezier(.16,.8,.26,1);
}
.cap-item::before {
  content: ""; flex: none; width: 9px; height: 9px;
  background: var(--crimson); transform: rotate(45deg);
}
.cap-item:hover { color: var(--crimson); padding-left: 10px; }
/* Alternating slide-in (left, right, left, right…) revealed on scroll */
.cap-item:nth-child(odd)  { transform: translateX(-72px); }
.cap-item:nth-child(even) { transform: translateX(72px); }
.cap-item.in { opacity: 1; transform: none; }

/* "What We Do" sits on the dark blueprint background — flip text to light */
#services { padding: 84px 0; background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
#services .container { position: relative; z-index: 1; }
/* Fixed grid layer, pinned to viewport, clipped to the section by JS (static like the hero) */
.svc-grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background-image:
    linear-gradient(rgba(148,163,184,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.10) 1px, transparent 1px),
    linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
}
#services .cap-head h2 { color: var(--white); }
#services .cap-head p { color: var(--slate-light); }
#services .cap-item { color: var(--white); }
#services .cap-item:hover { color: var(--crimson); }

/* ========================= Before / After =============================== */
#work { padding: 84px 0; background: var(--alabaster); }
.work-h2 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(26px, 4.4vw, 46px); margin: 8px 0 10px; letter-spacing: .005em;
}
.work-sub { color: var(--slate); margin: 0; font-size: clamp(14px, 2vw, 16px); }
.work-sub em { color: var(--slate-light); font-style: italic; }
.ba {
  position: relative; aspect-ratio: 16 / 9; margin-top: 32px;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  user-select: none; touch-action: pan-y;
}
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba-tag {
  position: absolute; top: 16px; z-index: 3;
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--white);
  background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.25);
  padding: 7px 14px; border-radius: 999px;
}
.ba-tag--before { left: 16px; }
.ba-tag--after  { right: 16px; }
.ba-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); z-index: 4;
  width: 3px; background: var(--white); transform: translateX(-50%); pointer-events: none;
  box-shadow: 0 0 0 1px rgba(15,23,42,.25);
}
.ba-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--crimson); color: var(--white);
  display: grid; place-items: center; font-size: 20px; font-weight: 700;
  box-shadow: var(--shadow-lg); border: 2px solid rgba(255,255,255,.85);
}
.ba-range {
  position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize;
}

/* ============================ Contact ==================================== */
#contact { padding: 80px 0; background: var(--alabaster); }
#contact .container { text-align: center; max-width: 600px; }
#contact h2 { font-family: var(--font-head); font-size: clamp(26px, 4vw, 40px); margin: 8px 0 16px; }
#contact p { color: var(--slate); margin: 0 0 24px; }
.contact__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn--navy { background: var(--navy); color: var(--white); }

/* ============================ Footer ===================================== */
.footer { background: var(--navy); color: var(--slate-light); padding: 40px 0; }
.footer .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer .fl { font-size: 13px; }
.footer a { color: var(--slate-light); }
.footer a:hover { color: var(--white); }
/* Hidden admin entrance: a sub-footer that stays collapsed (0 height) so the footer looks
   normal at rest, and only reveals when you deliberately over-scroll past the bottom (JS). */
.subfooter { background: var(--white); overflow: hidden; max-height: 0; transition: max-height .4s ease; }
.subfooter.show { max-height: 28px; }
.subfooter a { display: block; text-align: center; padding: 5px 0; color: #111111; font-size: 13px; text-decoration: none; }
.subfooter a:hover { color: var(--navy); }

/* ============================ Motion ===================================== */
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* Gentle float on the hero badge */
.hero__badge { animation: floatY 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, .hero__badge, .bg-slide { animation: none !important; transition: none !important; }
  .bg-slide:first-child { opacity: 1; }  /* keep a static hero image */
  .hero-h1 .line { opacity: 1; transform: none; }
  .cap-item { opacity: 1 !important; transform: none !important; }
}

/* ==================== One-shot intro (index only) ========================= */
/* html.intro = armed pre-paint; native scroll DRIVES the zoom (no lock).
   html.introdone = choreographed entrance landed, then plain static site. */
/* Scroll-driven intro: the page scrolls natively the whole time. The hero pins
   (position:sticky) inside .intro-stage, which JS sizes to one runway taller than
   the viewport; scrolling that runway scrubs the logo zoom, and native sticky
   releases exactly as the JS engine latches. NB: no ancestor may carry
   overflow:hidden or sticky breaks — that's why the old scroll lock is gone. */
html.intro .hero { position: sticky; top: 0; }  /* exact px height set by JS (= innerHeight) */
html.intro.introgo .bg-slide { animation-play-state: running; }
/* scrub tracks input 1:1 — kill smooth-scroll interpolation during the intro */
html.intro { scroll-behavior: auto; }
/* Index canvas is dark PERMANENTLY (not just during the intro) — Chrome paints its
   gesture-bar/overscroll strips with the canvas color, and a state-dependent canvas
   made a white strip pop in when the intro ended. html ONLY carries the background;
   body must stay transparent or it paints OVER the z-index:-1 slideshow. Safe because
   every non-hero section is opaque (see §7 rule in CONTEXT). */
html.page-index { background: #0B0D11; }
html.page-index body { background: transparent; }
/* first slide holds static until the scroll begins */
html.intro .bg-slide { animation-play-state: paused; }
/* nav is FIXED (not sticky) through intro+after — sticky leaves its 76px flow slot
   visible as an un-darkened band above the hero while the nav is translated away */
html.intro .nav, html.introdone .nav { position: fixed; top: 0; left: 0; right: 0; }
html.intro .nav { transform: translateY(-110%); }
html.intro .nav .logo { opacity: 0; transform: translateX(-44px); }
html.intro .nav__links a { opacity: 0; transform: translateX(44px); }
html.intro .hero .eyebrow, html.intro .hero-h1, html.intro .tagline,
html.intro .hero p.lead, html.intro .hero__actions { opacity: 0; transform: translateY(46px); }
html.intro .hero__badge { animation: none; position: relative; z-index: 5; will-change: transform; }

/* Scroll hint — only during the intro */
.intro-hint { display: none; }
html.intro .intro-hint {
  display: block; position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.85); font-family: var(--font-head); font-weight: 600;
  font-size: 13px; letter-spacing: .3em; text-transform: uppercase; z-index: 6;
  animation: hintPulse 1.6s ease-in-out infinite;
}
@keyframes hintPulse { 0%,100% { opacity: .45; transform: translate(-50%,0); }
                       50%     { opacity: 1;  transform: translate(-50%,8px); } }

/* Quiet Plan Room shortcut during the intro — for subs in a rush, not here for the
   drama. Static (no pulse), faint; fades away once scrolling begins. */
.intro-skip { display: none; }
html.intro .intro-skip {
  display: block; position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.18); font-family: var(--font-head); font-weight: 600;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase; z-index: 6;
  opacity: 1; transition: color .2s ease, opacity .8s ease .55s;
}
html.intro .intro-skip:hover { color: rgba(255,255,255,.85); }
html.intro.introgo .intro-skip { opacity: 0; pointer-events: none; }
/* Email Login — same quiet style, sits directly under the Plan Room shortcut */
html.intro .intro-skip--email { top: 28px; }


/* Entrance is scroll-scrubbed by the intro engine (inline styles); on completion
   inline styles are cleared and defaults (= final state) take over seamlessly. */
/* badge float resumes gently after the landing settles (starts at translateY(0), no jump) */
html.introdone .hero__badge { animation: floatY 6s ease-in-out 1.2s infinite; }

/* ================= Plan Room auto-intro (no scroll, ~1.7s) ================ */
.pr-intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--navy); pointer-events: none;
  opacity: 0; visibility: hidden;
}
.pr-intro img { width: min(380px, 72vw); height: auto; }
html.printro body { overflow: hidden; }
html.printro .pr-intro { opacity: 1; visibility: visible; }
html.printro .pr-intro img { animation: prPop .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes prPop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
/* page hidden behind the overlay */
html.printro .nav { transform: translateY(-110%); }
html.printro .pr-hero .pr-pill, html.printro .pr-hero p,
html.printro .pr-toolbar, html.printro main { opacity: 0; transform: translateY(38px); }
/* the reveal: overlay lifts, nav drops, room assembles bottom-up */
html.printrodone .pr-intro {
  opacity: 0; visibility: hidden;
  transition: opacity .55s ease, visibility 0s .55s;
}
html.printrodone .nav { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
html.printrodone .pr-hero .pr-pill, html.printrodone .pr-hero p,
html.printrodone .pr-toolbar, html.printrodone main {
  transition: opacity .45s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
html.printrodone .pr-hero .pr-pill { transition-delay: .25s; }
html.printrodone .pr-hero p       { transition-delay: .34s; }
html.printrodone .pr-toolbar      { transition-delay: .44s; }
html.printrodone main             { transition-delay: .54s; }

/* ============================ Responsive ================================== */
@media (max-width: 760px) {
  .nav .container { justify-content: flex-start; }
  .nav__links { position: static; height: auto; margin-left: auto; gap: 8px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__links a.nav__cta { padding: 8px 12px; font-size: 12px; letter-spacing: .03em; white-space: nowrap; }
  /* real mark is wide (rooflines lockup) — drop the wordmark text on mobile */
  .logo__mark { height: 32px; }
  .logo { gap: 9px; }
  .logo__text { display: none; }
  .pr-toolbar { top: 64px; }
  .nav .container { height: 64px; }
  .trust .container { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .pr-grid { grid-template-columns: 1fr; }
  /* What We Do: two columns on mobile, smaller text */
  .cap-grid { grid-template-columns: repeat(2, 1fr); column-gap: 16px; }
  .cap-item { font-size: 13px; padding: 13px 2px; gap: 9px; }
  .cap-item::before { width: 7px; height: 7px; }
  .cap-item:nth-child(odd)  { transform: translateX(-28px); }
  .cap-item:nth-child(even) { transform: translateX(28px); }
  .cap-item.in { transform: none; }
}
