/* ============================================
   ROCKY MTN REMODEL — HERO STYLES
   Shared by template-parts/hero-main.php and template-parts/hero-basement.php.
   Enqueued via functions.php on every public page (nav is site-wide).
   ============================================ */

:root {
  --ink: #0e0e0e;
  --ink-soft: #1a1a1a;
  --cream: #f4ede3;
  --cream-soft: #ebe2d4;
  --gold: #b8924a;
  --gold-soft: #c9a961;
  --white: #ffffff;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
}

/* Full-bleed: hero and trust-strip break out of any parent max-width
   so they span the full viewport regardless of the theme's wrapper. */
.hero,
.trust-strip {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.hero {
  height: 100vh;
  overflow: hidden;
  font-family: var(--sans);
  color: var(--white);
}

/* CAROUSEL */
.hero .carousel { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1.2s ease;
}
.hero .slide.active { opacity: 1; }
/* First slide visible by default — prevents black flash before JS executes. */
.hero .slide:first-child { opacity: 1; }

.hero .scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.1) 55%, rgba(0,0,0,0) 80%),
    linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.25) 25%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero h1,
.hero .headline,
.hero .subhead,
.hero .eyebrow,
.hero .rating-line {
  text-shadow: 0 1px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
}

/* ============================================
   NAVIGATION (site-wide — no .hero ancestor)
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding: 20px 36px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

/* Zero WP's html margin-top (admin bar bump) on every page — the nav's
   own top: 32px rule handles the admin bar clearance instead.
   Zero body padding-top only on hero pages so .no-hero rules work normally. */
html { margin-top: 0 !important; }
body.has-hero { padding-top: 0 !important; }
body.admin-bar .nav { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .nav { top: 46px; }
}

/* Non-hero pages: clear fixed nav */
body.no-hero { padding-top: 130px; }
@media (max-width: 768px) {
  body.no-hero { padding-top: 100px; }
}
body.admin-bar.no-hero { padding-top: 162px; }
@media (max-width: 782px) {
  body.admin-bar.no-hero { padding-top: 146px; }
}

.nav.scrolled { padding-top: 10px; padding-bottom: 10px; }
.nav.nav-light { background: rgba(255, 255, 255, 0.97); border-color: rgba(14, 14, 14, 0.08); }
.nav.nav-light .nav-left,
.nav.nav-light .nav-right { color: rgba(14, 14, 14, 0.85); text-shadow: none; }
.nav.nav-light .nav-logo img { filter: invert(1) drop-shadow(0 1px 6px rgba(0, 0, 0, 0.12)); }
.nav.nav-light .nav-cta { background: var(--ink); color: var(--white) !important; }
.nav.nav-light .nav-cta:hover { background: #2a2a2a; }
.nav.nav-light .hamburger span { background: var(--ink); box-shadow: none; }
.nav.nav-light a:hover { color: var(--gold); }

.nav-left,
.nav-right { transition: color 0.4s ease; }
.nav-logo img { transition: height 0.3s ease, filter 0.4s ease; }
.nav-cta { transition: background 0.3s ease, color 0.3s ease, padding 0.3s ease, font-size 0.3s ease; }
.hamburger span { transition: background 0.3s ease; }

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
}
.nav-left  { grid-column: 1; }
.nav-logo  { grid-column: 2; }
.nav-right { grid-column: 3; justify-content: flex-end; }
.nav a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav a:hover { color: var(--gold-soft); }

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}
.nav-logo a { display: block; line-height: 0; }
.nav-logo img {
  display: block;
  height: 94px;
  width: auto;
  filter: drop-shadow(0 1px 12px rgba(0,0,0,0.35));
  transition: height 0.3s ease;
}
.nav.scrolled .nav-logo img { height: 56px; }

.nav-cta {
  background: var(--cream);
  color: var(--ink) !important;
  padding: 11px 22px;
  border-radius: 2px;
  letter-spacing: 0.08em !important;
  font-weight: 600;
  margin-left: 8px;
  transition: all 0.2s;
}
.nav-cta:hover {
  color: var(--ink) !important;
  background: var(--white);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 28px;
  height: 22px;
  padding: 0;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
  transition: all 0.3s;
}
.hamburger:hover span { background: var(--gold-soft); }

/* CENTERED HERO CONTENT */
.hero .center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
  max-width: 880px;
  z-index: 10;
}
.hero .eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(244,237,227,0.85);
  margin-bottom: 14px;
  font-weight: 500;
}
.hero .headline {
  font-family: var(--serif);
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: var(--white);
  margin: 0 0 28px;
}
.hero .subhead {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  max-width: 640px;
  margin: 0 auto 28px;
}
.hero .rating-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
}
.hero .rating-line .stars { color: var(--gold-soft); letter-spacing: 2px; }
.hero .ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn {
  display: inline-block;
  padding: 16px 32px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  border-radius: 2px;
}
.hero .btn-primary { background: var(--cream); color: var(--ink); }
.hero .btn-primary:hover { background: var(--white); transform: translateY(-2px); }
.hero .btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.hero .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.05); }

/* TRUST STRIP */
.trust-strip {
  background: var(--stone-warm);
  padding: 26px 48px;
  border-bottom: 1px solid rgba(14,14,14,0.06);
  font-family: var(--sans);
}
.trust-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.trust-item .stars { color: var(--gold); letter-spacing: 2px; font-size: 14px; }
.trust-item .check { color: var(--gold); font-weight: 700; font-size: 14px; }
.trust-divider { width: 1px; height: 18px; background: rgba(14,14,14,0.18); }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .nav-left,
  .nav-right { gap: 18px; font-size: 10px; letter-spacing: 0.1em; }
}
@media (max-width: 968px) {
  .nav-left { display: none; }
  .nav-right > a { display: none; }
  .nav-right { justify-content: flex-end; gap: 0; }
  .hamburger { display: flex; }
  .nav.scrolled .hamburger { display: none; }
  .nav.scrolled .nav-right > a.nav-cta {
    display: inline-block;
    padding: 7px 12px;
    font-size: 10px;
    letter-spacing: 0.06em;
    margin-left: 0;
  }
}
@media (max-width: 768px) {
  .nav { position: absolute; padding: 18px 20px; grid-template-columns: 1fr auto 1fr; gap: 12px; }
  .nav-logo img { height: 62px; }
  .nav.scrolled .nav-logo img { height: 40px; }
  .hero .headline { font-size: 38px; line-height: 1.1; margin-bottom: 20px; }
  .hero .subhead { font-size: 15px; margin-bottom: 20px; }
  .hero .rating-line { font-size: 12px; margin-bottom: 28px; }
  .hero .ctas { flex-direction: column; gap: 10px; width: 100%; padding: 0 24px; }
  .hero .ctas .btn { width: 100%; }
  .hero .eyebrow { font-size: 10px; margin-bottom: 10px; }
  .trust-strip { padding: 20px 16px; }
  .trust-container { flex-direction: column; gap: 12px; }
  .trust-divider { display: none; }
  .trust-item { font-size: 12px; }
}

/* ── NAV DRAWER ────────────────────────────────────────────────────────────── */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-drawer.open {
  pointer-events: auto;
  opacity: 1;
}
.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 14, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 380px);
  background: var(--cream);
  padding: 80px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}
.nav-drawer.open .nav-drawer-panel {
  transform: translateX(0);
}
.nav-drawer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-drawer-close span {
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}
.nav-drawer-close span:nth-child(1) { transform: rotate(45deg); }
.nav-drawer-close span:nth-child(2) { transform: rotate(-45deg); }
.nav-drawer-close:hover span { background: var(--gold); }
.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 28px;
}
.nav-drawer-links a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 0;
  border-bottom: 1px solid rgba(14, 14, 14, 0.08);
  transition: color 0.2s, padding 0.2s;
}
.nav-drawer-links a:hover {
  color: var(--gold);
  padding-left: 6px;
}
.nav-drawer-cta {
  display: inline-block;
  text-align: center;
  background: var(--ink);
  color: var(--white) !important;
  text-decoration: none;
  padding: 16px 24px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.2s;
}
.nav-drawer-cta:hover { background: #2a2a2a; }
.nav-drawer-phone {
  margin-top: 24px;
  text-align: center;
}
.nav-drawer-phone a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-drawer-phone a:hover { color: var(--gold); }
body.drawer-open { overflow: hidden; }
