/* Upholstery Man – site-wide design layer (Bootstrap 5 + custom). Loaded from header.php. */
:root {
  --um-red: #d7261e;
  --um-red-dark: #b01c16;
  --um-ink: #16181d;
  --um-blue: #0066cc;
  --um-soft: #f4f6f9;
}

/* ---------- Iteration 1: full-bleed hero ---------- */
.um-hero {
  position: relative;
  width: 100vw; margin-left: calc(50% - 50vw);   /* break out of index.php's container */
  min-height: 82vh;
  margin-top: var(--nav-h, 104px);  /* clears the fixed nav (measured in header.php) */
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--um-ink);
  isolation: isolate;
  overflow: hidden;
}
.um-hero::before {                 /* legibility gradient over the photo */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(10,12,16,.88) 0%, rgba(10,12,16,.62) 45%, rgba(10,12,16,.15) 100%);
}
.um-hero .kicker {
  display: inline-block;
  font: 600 .8rem/1 'Montserrat', sans-serif;
  letter-spacing: .18em; text-transform: uppercase;
  padding: .55rem .9rem; border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  background: rgba(255,255,255,.08); backdrop-filter: blur(4px);
}
.um-hero h1 {
  font: 800 clamp(2.2rem, 5.6vw, 4.4rem)/1.05 'Montserrat', sans-serif;
  letter-spacing: -.02em; margin: 1.1rem 0 1rem; max-width: 14ch;
}
.um-hero h1 em { font-style: normal; color: #ff5a50; }
.um-hero .lead { max-width: 46ch; color: rgba(255,255,255,.86); font-size: clamp(1rem, 1.5vw, 1.25rem); }
.btn-um {
  --bs-btn-bg: var(--um-red); --bs-btn-border-color: var(--um-red); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--um-red-dark); --bs-btn-hover-border-color: var(--um-red-dark); --bs-btn-hover-color: #fff;
  --bs-btn-padding-x: 1.6rem; --bs-btn-padding-y: .85rem;
  font-weight: 600; border-radius: 999px; box-shadow: 0 8px 24px rgba(215,38,30,.35);
}
.btn-um-ghost {
  --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.7);
  --bs-btn-hover-bg: #fff; --bs-btn-hover-color: var(--um-ink); --bs-btn-hover-border-color: #fff;
  --bs-btn-padding-x: 1.6rem; --bs-btn-padding-y: .85rem; font-weight: 600; border-radius: 999px;
}
.um-trust { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-top: 2rem; font-size: .9rem; color: rgba(255,255,255,.8); }
.um-trust span::before { content: "✓"; color: #6ee07a; margin-right: .45rem; font-weight: 700; }

/* intro / story block */
.um-section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.um-section h2 { font: 800 clamp(1.7rem, 3.2vw, 2.5rem)/1.15 'Montserrat', sans-serif; letter-spacing: -.01em; }
.um-section .eyebrow { font: 600 .78rem/1 'Montserrat', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--um-red); }

/* ---------- Iteration 2: category image tiles ---------- */
.um-tiles { background: var(--um-soft); }
.um-tile {
  position: relative; display: block; overflow: hidden; border-radius: 18px; color: #fff; text-decoration: none;
  aspect-ratio: 4 / 3; background: var(--um-ink); box-shadow: 0 10px 30px rgba(16,24,40,.12);
}
.um-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.um-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.78) 100%); }
.um-tile .cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1.25rem 1.4rem; }
.um-tile .cap h3 { font: 700 1.3rem/1.2 'Montserrat', sans-serif; margin: 0 0 .25rem; }
.um-tile .cap p { margin: 0; font-size: .9rem; color: rgba(255,255,255,.85); }
.um-tile .go { display: inline-block; margin-top: .6rem; font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; opacity: 0; transform: translateY(6px); transition: all .3s; }
.um-tile:hover img { transform: scale(1.08); }
.um-tile:hover .go, .um-tile:focus-visible .go { opacity: 1; transform: none; }
@media (hover: none) { .um-tile .go { opacity: 1; transform: none; } }

/* ---------- Iteration 3: reactive nav + mobile action bar ---------- */
.site-nav { transition: box-shadow .25s ease, padding .25s ease; }
.site-nav.is-scrolled { box-shadow: 0 6px 24px rgba(16,24,40,.14); }
.um-actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
  display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 1px;
  background: #d9dde3; border-top: 1px solid #d9dde3;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(16,24,40,.12);
}
.um-actionbar a {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .95rem .5rem; background: #fff; color: var(--um-ink);
  font: 600 .95rem/1 'Montserrat', sans-serif; text-decoration: none;
}
.um-actionbar a.est { background: var(--um-red); color: #fff; }
.um-actionbar a.call { color: #0a7a2b; }
@media (max-width: 991.98px) { body { padding-bottom: 3.4rem; } }

/* ---------- Iteration 4: masonry gallery, pill switcher, CTA band ---------- */
.um-gal-title { font: 800 clamp(1.6rem, 3.4vw, 2.4rem)/1.15 'Montserrat', sans-serif; letter-spacing: -.01em; }
.um-pills { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.um-pill { padding: .5rem 1rem; border-radius: 999px; border: 1px solid #cfd5dd; color: var(--um-ink); text-decoration: none; font-size: .9rem; font-weight: 500; background: #fff; transition: all .2s; }
.um-pill:hover { border-color: var(--um-ink); }
.um-pill.active { background: var(--um-ink); border-color: var(--um-ink); color: #fff; }
.um-masonry { column-count: 2; column-gap: .75rem; }
@media (min-width: 768px) { .um-masonry { column-count: 3; } }
@media (min-width: 1200px) { .um-masonry { column-count: 4; } }
.um-shot { position: relative; display: block; margin: 0 0 .75rem; break-inside: avoid; border-radius: 12px; overflow: hidden; background: #e9ecf1; }
.um-shot img { display: block; width: 100%; height: auto; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .3s; }
.um-shot:hover img { transform: scale(1.05); filter: brightness(.85); }
.um-shot-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .8rem .6rem; color: #fff; font-size: .82rem; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transition: opacity .3s; }
.um-shot:hover .um-shot-cap { opacity: 1; }
.um-cta { margin-top: 3rem; padding: clamp(2.5rem, 6vw, 4.5rem) 0; background: var(--um-ink); color: #fff; }
.um-cta h2 { font: 800 clamp(1.6rem, 3.4vw, 2.4rem)/1.15 'Montserrat', sans-serif; }
.um-cta p { color: rgba(255,255,255,.75); max-width: 52ch; margin: .5rem auto 1.5rem; }

/* ---------- Iteration 5: dark footer ---------- */
.um-footer {
  width: 100vw; margin: 0 0 0 calc(50% - 50vw);   /* full-bleed even inside index.php's container */
  background: #101216; color: rgba(255,255,255,.72); padding: 4rem 0 1.5rem; font-size: .95rem;
}
.um-footer h3 { font: 700 .8rem/1 'Montserrat', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.um-footer a { color: rgba(255,255,255,.72); text-decoration: none; transition: color .2s; }
.um-footer a:hover { color: #fff; }
.um-footer li { margin-bottom: .5rem; }
.um-footer address { font-style: normal; }
.um-footer-logo { height: 44px; width: auto; filter: brightness(0) invert(1); }
.um-footer-bar { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; color: rgba(255,255,255,.5); }

.um-social img { width: 26px; height: 26px; filter: brightness(0) invert(1); opacity: .75; transition: opacity .2s; }
.um-social a:hover img { opacity: 1; }

.um-credit { margin-top: 1.5rem; }
.um-credit a { display: inline-flex; flex-direction: column; align-items: center; gap: .4rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.um-credit img { width: 110px; height: auto; opacity: .75; transition: opacity .2s; }
.um-credit a:hover img { opacity: 1; }

/* ---------- Contact page ---------- */
.um-contact-hero { margin-top: var(--nav-h, 104px); padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; background: var(--um-soft); }
.um-contact-hero .eyebrow { font: 600 .78rem/1 'Montserrat', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--um-red); margin-bottom: .6rem; }
.um-contact-hero h1 { font: 800 clamp(2rem, 4.6vw, 3.4rem)/1.1 'Montserrat', sans-serif; letter-spacing: -.02em; }
.um-contact-hero .lead { max-width: 56ch; color: #5b6472; }
.um-contact-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 30px rgba(16,24,40,.14); }
.um-contact-card { background: var(--um-soft); border-radius: 18px; padding: 1.5rem; }
.um-contact-card a:not(.btn) { color: var(--um-ink); text-decoration: none; font-weight: 600; }
.um-contact-card a:not(.btn):hover { color: var(--um-red); }
.um-contact-card address { font-style: normal; color: #5b6472; }
.form-control:focus, .form-select:focus { border-color: var(--um-red); box-shadow: 0 0 0 .2rem rgba(215,38,30,.15); }

/* ---------- Loop 2 / iteration 1: crossfading hero slideshow ---------- */
.um-hero-slides { position: absolute; inset: 0; z-index: -2; }
.um-hero-slides .carousel-item { transition: opacity 1.6s ease-in-out; }
.um-hero-slides img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: um-kenburns 9s ease-out forwards; }
@keyframes um-kenburns { from { transform: scale(1.04); } to { transform: scale(1.12); } }
.um-now { display: inline-block; margin-top: 1.6rem; color: rgba(255,255,255,.85); text-decoration: none; font-size: .85rem; letter-spacing: .04em; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 2px; }
.um-now:hover { color: #fff; border-color: #fff; }
.um-now + .um-trust { margin-top: 1.2rem; }
@media (prefers-reduced-motion: reduce) { .um-hero-slides img { animation: none; } }

/* ---------- Loop 2 / iteration 2: quick-estimate card overlapping the hero ---------- */
.um-quick { position: relative; z-index: 3; margin-top: -3.2rem; }
.um-quick-card {
  display: grid; grid-template-columns: 1.2fr 1.2fr 1.2fr auto; gap: .75rem; align-items: center;
  background: #fff; border-radius: 20px; padding: 1.1rem 1.25rem;
  box-shadow: 0 24px 60px rgba(16,24,40,.22);
}
.um-quick-title { display: flex; flex-direction: column; line-height: 1.25; padding-right: .5rem; }
.um-quick-title strong { font: 700 1.05rem/1.2 'Montserrat', sans-serif; }
.um-quick-title span { font-size: .85rem; color: #6b7482; }
@media (max-width: 991.98px) {
  .um-quick { margin-top: -2rem; }
  .um-quick-card { grid-template-columns: 1fr; padding: 1.1rem; }
  .um-quick-title { padding: 0 0 .25rem; }
}

/* ---------- Loop 2 / iteration 4: photo viewer ---------- */
.um-viewer .modal-content { background: rgba(8,10,14,.97); color: #fff; border: 0; }
.um-viewer-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; }
.um-viewer-count { font-size: .85rem; letter-spacing: .08em; color: rgba(255,255,255,.7); }
.um-viewer-stage { position: absolute; inset: 3.5rem 0 6rem; display: flex; align-items: center; justify-content: center; padding: 0 3.5rem; }
.um-viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.um-viewer-nav { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 48px; height: 64px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 2.4rem; line-height: 1; border-radius: 10px; transition: background .2s; }
.um-viewer-nav:hover { background: rgba(255,255,255,.25); }
.um-viewer-nav.prev { left: .75rem; } .um-viewer-nav.next { right: .75rem; }
.um-viewer-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.um-viewer-cap { flex: 1 1 240px; color: rgba(255,255,255,.85); font-size: .95rem; }
@media (max-width: 575.98px) { .um-viewer-stage { padding: 0 .5rem; } .um-viewer-nav { width: 38px; height: 52px; font-size: 2rem; } }

/* ---------- Loop 2 / iteration 5: navigation revamp + hero gap fix ---------- */
/* Gap fix: css/carousel.css (old Bootstrap demo) gives .carousel-item margin-top/600px height */
.um-hero .um-hero-slides { margin-top: 0; }
.um-hero-slides .carousel-item { height: 100%; margin-top: 0; border-radius: 0; position: relative; }
.um-hero-slides .carousel-item > img { position: static; left: auto; top: auto; margin-left: 0; min-width: 0; width: 100%; height: 100%; object-fit: cover; }

.site-nav.navbar { background: #fff; border-bottom: 1px solid #eceff3; padding: .75rem 0; }
.site-nav .um-logo { width: 180px; height: auto; display: block; }
.site-nav .navbar-brand { max-width: none; width: auto; margin-right: 1.5rem; }
.site-nav.navbar .nav-link {
  font: 600 1.02rem/1 'Montserrat', 'Open Sans', sans-serif; color: var(--um-ink);
  padding: .6rem .85rem; position: relative; letter-spacing: .01em;
}
.site-nav.navbar .nav-link::after {            /* animated underline */
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 2px;
  background: var(--um-red); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.site-nav.navbar .nav-link:hover, .site-nav.navbar .nav-link.show { color: var(--um-red); }
.site-nav.navbar .nav-link:hover::after, .site-nav.navbar .nav-link.show::after { transform: scaleX(1); }
.site-nav.navbar .nav-item a { color: var(--um-ink); text-align: left; }
.site-nav .dropdown-toggle::after { border-top-color: currentColor; }
.site-nav.navbar .nav-link.dropdown-toggle::after { position: static; background: none; height: 0; transform: none; margin-left: .45em; }
.site-nav .dropdown-menu {
  background: #fff; border: 0; border-radius: 14px; padding: .5rem; margin-top: .6rem;
  box-shadow: 0 18px 48px rgba(16,24,40,.18);
}
.site-nav .dropdown-item { font: 500 .98rem/1.2 'Montserrat', 'Open Sans', sans-serif; color: var(--um-ink); padding: .6rem .9rem; border-radius: 8px; }
.site-nav .dropdown-item:hover { background: #fff1f0; color: var(--um-red); }
.site-nav .phone-pill {
  display: inline-flex; align-items: center; gap: .45rem; background: var(--um-red); color: #fff;
  border: 0; border-radius: 999px; padding: .7rem 1.25rem; font: 700 1.02rem/1 'Montserrat', sans-serif;
  box-shadow: 0 8px 22px rgba(215,38,30,.32); white-space: nowrap; text-decoration: none; transition: background .2s, transform .2s;
}
.site-nav .phone-pill:hover { background: var(--um-red-dark); color: #fff; transform: translateY(-1px); }
@media (min-width: 992px) {
  .site-nav .um-logo { width: 260px; }
  /* open on hover (click still works); stays open briefly so a sloppy mouse path doesn't close it */
  .site-nav .dropdown > .dropdown-menu { display: block; visibility: hidden; opacity: 0; transition: opacity .15s ease, visibility 0s linear .35s; }
  .site-nav .dropdown:hover > .dropdown-menu, .site-nav .dropdown > .dropdown-menu.show { visibility: visible; opacity: 1; transition-delay: 0s; }
  .site-nav .dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -1rem; height: 1rem; } /* invisible bridge over the gap */
  .site-nav .phone-pill-item { margin-left: .9rem; }
}
@media (max-width: 991.98px) {
  .site-nav.navbar .nav-link { font-size: 1.05rem; padding: .8rem .3rem; }
  .site-nav.navbar .nav-link::after { display: none; }
  .site-nav .dropdown-menu { box-shadow: none; padding: 0 0 0 .75rem; margin: 0; }
  .site-nav .phone-pill { width: 100%; justify-content: center; margin-top: .4rem; }
}

/* phone pill text must stay white (beats the generic .nav-item a ink colour) */
.site-nav.navbar .nav-item a.phone-pill,
.site-nav.navbar .nav-item a.phone-pill:hover,
.site-nav.navbar .nav-item a.phone-pill:focus { color: #fff; }

/* nav polish: no border line, tighter, regular weight (size kept large) */
.site-nav.navbar { border-bottom: 0; padding: .4rem 0; }
.site-nav.navbar .nav-link { font-weight: 400; font-size: 1.1rem; }
.site-nav .dropdown-item { font-weight: 400; font-size: 1.05rem; }
.site-nav .phone-pill { font-weight: 500; font-size: 1.05rem; padding: .6rem 1.2rem; }

/* CTA band: full width like the footer, with breathing room above the footer */
.um-cta { width: 100vw; margin-left: calc(50% - 50vw); margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* viewer v2: full-bleed, centered, as large as possible; caption + quote button overlay the photo on hover */
.um-viewer .modal-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; margin: 0; padding: 0; }
.um-viewer .modal-content { height: 100%; border-radius: 0; }
.um-viewer-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0; }
.um-viewer-fig { position: relative; margin: 0; display: inline-block; line-height: 0; border-radius: 8px; overflow: hidden; }
.um-viewer-fig img { display: block; max-width: calc(100vw - 2rem); max-height: calc(100vh - 2rem); width: auto; height: auto; border-radius: 0; }
.um-viewer-cap, .um-viewer-cta { position: absolute; z-index: 2; opacity: 0; transition: opacity .25s ease, transform .25s ease; }
.um-viewer-cap {
  top: 0; left: 0; right: 0; padding: 1.1rem 1.25rem 1.6rem; line-height: 1.4; font-size: 1rem; color: #fff;
  background: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,0)); transform: translateY(-6px);
}
.um-viewer-cap:empty { display: none; }
.um-viewer-cta { left: 50%; bottom: 1.25rem; transform: translate(-50%, 6px); line-height: 1.2; white-space: nowrap; }
.um-viewer-fig:hover .um-viewer-cap, .um-viewer-fig:focus-within .um-viewer-cap { opacity: 1; transform: none; }
.um-viewer-fig:hover .um-viewer-cta, .um-viewer-fig:focus-within .um-viewer-cta { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .um-viewer-cap { opacity: 1; transform: none; } .um-viewer-cta { opacity: 1; transform: translate(-50%, 0); } }
.um-viewer-top { z-index: 4; } .um-viewer-nav { z-index: 4; }
.um-viewer-top .um-viewer-count { text-shadow: 0 1px 4px rgba(0,0,0,.6); }
 
/* viewer v3: see-through surround, clearer caption */
.um-viewer .modal-content { background: rgba(8,10,14,.55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.um-viewer-cap {
  padding: 1.25rem 1.5rem 2.4rem; font-size: 1.2rem; font-weight: 500; color: #fff;
  background: linear-gradient(rgba(0,0,0,.88) 0%, rgba(0,0,0,.7) 55%, rgba(0,0,0,0) 100%);
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
}

/* masonry: reserve each photo's space (width/height attrs) so columns never reflow while loading */
.um-shot img { height: auto; background: #e9ecf1; }
.um-masonry { contain: layout; }

/* logo: keep aspect ratio (legacy carousel.css forces height:40px) */
.site-nav .container .navbar-brand img.um-logo, .site-nav .navbar-brand img.um-logo { height: auto !important; max-height: none !important; width: 180px; object-fit: contain; }
@media (min-width: 992px) { .site-nav .container .navbar-brand img.um-logo, .site-nav .navbar-brand img.um-logo { width: 260px; } }

/* ---------- Frosted nav + top-of-page clearance ---------- */
.site-nav.navbar, .site-nav.navbar.is-scrolled {
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.35);
}
/* Pages without a hero (gallery, about, etc.): push content below the fixed nav */
body:not(:has(.um-hero, .um-contact-hero)) { padding-top: calc(var(--nav-h, 104px) + 1rem); }
/* Hero slides up behind the frosted nav so the photo shows through */
.um-hero { margin-top: 0; padding-top: var(--nav-h, 104px); }
.um-contact-hero { margin-top: 0; padding-top: calc(var(--nav-h, 104px) + clamp(2.5rem, 6vw, 4.5rem)); }
