/* ============================================================
   LAYOUTS — header, nav, footer, hero, sections, grids
   ============================================================ */

/* One shared alignment grid for header, main and footer.
   Padding-based (box-sizing:border-box) so it can never cause overflow. */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--page-gutter); }
.container--narrow { --container-max: var(--container-narrow); }
.container--wide { --container-max: var(--container-wide); }

.section { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(1.75rem, 4vw, 3rem); }
.section--cinematic { background: var(--bg-cinematic); color: var(--text-on-dark); }
.section--cinematic h1, .section--cinematic h2, .section--cinematic h3 { color: var(--psm-white); }
.section--inset { background: var(--bg-inset); }
.section__head { max-width: 60ch; margin-bottom: var(--space-lg); }
.section__head p { color: var(--text-muted); font-size: var(--step-1); margin-top: var(--space-2xs); }
.section--cinematic .section__head p { color: var(--text-on-dark-muted); }

/* Grids */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Utility bar ---------- */
.utility-bar {
  background: var(--psm-black); color: var(--psm-off-white);
  font-size: var(--step--1); padding-top: var(--safe-top);
}
.utility-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: var(--utility-h); }
.utility-bar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4em; }
.utility-bar a:hover { color: var(--psm-yellow); }
.utility-bar .sep { opacity: 0.4; }
@media (max-width: 720px) { .utility-bar { display: none; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: rgba(246,246,242,0.94); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--border); transition: box-shadow var(--dur-base); }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 2rem); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.55em; text-decoration: none; flex: 0 0 auto; }
.brand img { height: 44px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
/* AUTO DETAILING is the dominant wordmark; PEEYESYEM is a small kicker above it */
.brand__name { font-family: var(--font-heading); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.32em; color: var(--text-muted); text-transform: uppercase; }
.brand__sub { font-family: var(--font-heading); font-weight: 800; font-size: var(--step-2); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-strong); margin-top: 0.12em; }

.primary-nav { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.primary-nav > ul { display: flex; flex-wrap: nowrap; list-style: none; margin: 0; padding: 0; gap: 2px; }
.primary-nav a, .nav-trigger {
  display: inline-flex; align-items: center; gap: 0.25em; white-space: nowrap;
  padding: 0.5em 0.6em; border-radius: var(--radius-sm); text-decoration: none;
  font-weight: 600; font-size: 0.95rem; color: var(--text-body); background: none; border: none;
}
.primary-nav a:hover, .nav-trigger:hover { background: var(--bg-inset); color: var(--text-strong); }
.primary-nav a[aria-current="page"] { color: var(--text-strong); }
.nav-item--current > a, .nav-item--current > .nav-trigger { box-shadow: inset 0 -3px 0 var(--psm-yellow); }
.header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 0.5rem; }
.header-cta { white-space: nowrap; }
/* .site-header prefix raises specificity above .btn/.icon-btn in components.css
   (which loads later) so these show/hide rules actually win.
   Desktop: CTA only. Mobile: hamburger only. */
.site-header .nav-toggle { display: none; }

@media (max-width: 1160px) {
  .site-header .primary-nav,
  .site-header .mega,
  .site-header .header-cta { display: none; }
  .site-header .nav-toggle { display: grid; }
  .header-inner { min-height: var(--header-h-mobile); justify-content: space-between; }
}

/* Mega menu */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--psm-white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); padding: var(--space-lg) 0; }
.mega[hidden] { display: none; }
.mega__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-lg); }
.mega__col h3 { font-size: var(--step-0); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: var(--space-2xs); }
.mega__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.mega__col a { display: block; padding: 0.35em 0.5em; margin-left: -0.5em; border-radius: var(--radius-xs); text-decoration: none; font-size: var(--step--1); font-weight: 500; }
.mega__col a:hover { background: var(--bg-inset); }

/* ---------- Mobile nav sheet ---------- */
/* Off-canvas container + dim backdrop + sliding right-side panel */
.mobile-nav { position: fixed; inset: 0; z-index: var(--z-drawer); visibility: hidden; }
.mobile-nav.is-open { visibility: visible; }
.mobile-nav__backdrop { position: absolute; inset: 0; background: rgba(7,7,7,0.55); opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.mobile-nav.is-open .mobile-nav__backdrop { opacity: 1; }
.mobile-nav__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(400px, 100%);
  background: var(--psm-carbon); color: var(--text-on-dark);
  display: flex; flex-direction: column;
  padding-top: var(--safe-top);
  transform: translateX(100%); transition: transform var(--dur-base) var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.mobile-nav.is-open .mobile-nav__panel { transform: translateX(0); }
.mobile-nav__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border-dark); }
.mobile-nav__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-sm) var(--space-md); }
.mobile-nav details { border-bottom: 1px solid var(--border-dark); }
.mobile-nav summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); padding: 0.85rem 0; font-family: var(--font-heading); font-size: var(--step-1); font-weight: 700; color: var(--psm-white); cursor: pointer; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary .icon-plus { flex: none; color: var(--psm-yellow); transition: transform var(--dur-base); }
.mobile-nav details[open] summary .icon-plus { transform: rotate(45deg); }
.mobile-nav__sub { list-style: none; padding: 0 0 var(--space-sm); margin: 0; display: grid; gap: 1px; }
.mobile-nav__sub a { display: block; padding: 0.55em 0.6em; color: var(--text-on-dark-muted); text-decoration: none; border-radius: var(--radius-xs); font-size: 0.95rem; }
.mobile-nav__sub a:hover { background: var(--psm-graphite); color: #fff; }
.mobile-nav__foot { padding: var(--space-md); padding-bottom: calc(var(--space-md) + var(--safe-bottom)); border-top: 1px solid var(--border-dark); display: grid; gap: var(--space-2xs); background: var(--psm-graphite); }

/* ---------- Bottom app nav (mobile) ---------- */
.bottom-nav { display: none; }
@media (max-width: 900px) {
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bottomnav);
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--psm-white); border-top: 1px solid var(--border);
    padding-bottom: var(--safe-bottom); box-shadow: 0 -2px 16px rgba(7,7,7,0.06);
  }
  body { padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom)); }
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--bottomnav-h); background: none; border: none; text-decoration: none;
  color: var(--text-muted); font-size: 0.66rem; font-weight: 600;
}
.bottom-nav svg { width: 22px; height: 22px; }
.bottom-nav a[aria-current="page"] { color: var(--text-strong); }
.bottom-nav .center { position: relative; }
.bottom-nav .center span.pill { position: absolute; top: -18px; width: 52px; height: 52px; border-radius: 50%; background: var(--psm-yellow); color: var(--psm-black); display: grid; place-items: center; box-shadow: var(--shadow-md); border: 3px solid var(--psm-white); }
.bottom-nav .center small { margin-top: 30px; color: var(--text-strong); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--text-on-dark);
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(249,224,6,0.10), transparent 55%),
    linear-gradient(160deg, var(--psm-black) 0%, var(--psm-carbon) 55%, var(--psm-graphite) 100%);
}
.hero__grid {
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(1.75rem, 4vw, 4rem); align-items: center;
  padding-block: clamp(2.75rem, 6vw, 5.5rem);
}
.hero__content { display: grid; gap: var(--space-md); max-width: 40rem; }
.hero h1 { color: var(--psm-white); font-size: var(--step-5); }
.hero__hl { color: var(--psm-yellow); }
.hero__lead { color: var(--text-on-dark-muted); font-size: var(--step-1); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__trust { list-style: none; padding: 0; margin: 0.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.hero__trust li { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; font-size: var(--step--1); color: var(--psm-white); }
.hero__trust svg { color: var(--psm-yellow); flex: none; }
.hero__star { line-height: 0; }
/* Framed image card */
.hero__media { position: relative; }
.hero__frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4 / 3; border: 1px solid var(--border-dark); box-shadow: var(--shadow-lg);
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero__badge {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(7,7,7,0.72); backdrop-filter: blur(6px);
  color: #fff; font-size: var(--step--1); font-weight: 600;
  padding: 0.5rem 0.8rem; border-radius: var(--radius-pill); border: 1px solid rgba(255,255,255,0.14);
}
.hero__badge svg { color: var(--psm-yellow); }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .hero__frame { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}
.hero__lead { font-size: var(--step-1); color: var(--text-on-dark-muted); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.hero__trust { margin-top: var(--space-sm); }
.yellow-band { height: 4px; width: 64px; background: var(--psm-yellow); border-radius: var(--radius-pill); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding-block: var(--space-sm); font-size: var(--step--1); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4em; padding: 0; margin: 0; color: var(--text-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.4em; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text-strong); }
.breadcrumbs [aria-current="page"] { color: var(--text-strong); font-weight: 600; }
.breadcrumbs .sep { opacity: 0.5; }

/* ---------- Footer ---------- */
.site-footer { background: var(--psm-carbon); color: var(--text-on-dark-muted); padding-top: var(--space-2xl); }
.site-footer a { color: var(--text-on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--psm-yellow); }
.footer-top { display: grid; grid-template-columns: minmax(240px, 0.9fr) 2.6fr; gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }
.footer-brand { max-width: 38ch; }
.footer-about { margin-top: 0.9rem; color: var(--text-on-dark-muted); }
.footer-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1.25rem, 2vw, 2.5rem); }
@media (max-width: 1100px) { .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px) { .footer-links { grid-template-columns: 1fr; } }
.footer-hours { width: 100%; font-size: var(--step--1); border-collapse: collapse; }
.footer-hours th { text-align: left; font-weight: 500; padding-right: 0.75rem; color: var(--text-on-dark-muted); white-space: nowrap; }
.footer-col--hours h3 { margin-bottom: 0.4rem; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; gap: 2.5rem; } }
.footer-col h3 { font-family: var(--font-body); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em; color: var(--psm-white); margin-bottom: var(--space-2xs); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: var(--step--1); }
.footer-social { display: flex; gap: var(--space-2xs); margin-top: var(--space-sm); }
.footer-social a { width: 40px; height: 40px; border: 1px solid var(--border-dark); border-radius: 50%; display: grid; place-items: center; }
.footer-social a:hover { border-color: var(--psm-yellow); }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid var(--border-dark); margin-top: var(--space-xl); padding-block: var(--space-md); font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: space-between; }

/* NAP block */
.nap { font-style: normal; line-height: 1.7; }
.nap strong { color: var(--psm-white); display: block; }

/* Open status pill */
.open-status { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 600; font-size: var(--step--1); }
.open-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.open-status[data-open="true"] .dot { background: var(--psm-success); box-shadow: 0 0 0 3px rgba(45,138,87,0.2); }
.open-status[data-open="false"] .dot { background: var(--text-muted); }

/* Prose (guides, legal, long copy) */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-sm); }
.prose h2 { margin-top: var(--space-lg); font-size: var(--step-2); }
.prose h3 { margin-top: var(--space-md); font-size: var(--step-1); }
.prose ul, .prose ol { display: grid; gap: 0.3em; }
.prose a { color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--psm-yellow-deep); }
.callout { border-left: 4px solid var(--psm-yellow); background: var(--bg-inset); padding: var(--space-sm) var(--space-md); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.callout--note { border-color: var(--psm-warning); }

/* ============================================================
   CORRECTION PASS — mobile nav additions, footer discipline
   ============================================================ */
.mobile-nav__link {
  display: block; padding: 0.85rem 0; color: var(--psm-white); text-decoration: none;
  font-family: var(--font-heading); font-size: var(--step-1); font-weight: 700;
  border-bottom: 1px solid var(--border-dark);
}
.mobile-nav__link:hover { color: var(--psm-yellow); }
/* Ghost buttons on any dark surface: white text + visible light border */
.on-dark .btn--ghost,
.hero .btn--ghost,
.section--cinematic .btn--ghost,
.mobile-nav .btn--ghost {
  --_fg: var(--psm-white);
  border-color: rgba(255,255,255,0.32);
}
.on-dark .btn--ghost:hover,
.hero .btn--ghost:hover,
.section--cinematic .btn--ghost:hover,
.mobile-nav .btn--ghost:hover { --_bg: var(--psm-white); --_fg: var(--psm-black); border-color: var(--psm-white); }
.mobile-nav__status { margin-top: 1rem; }

.footer-col a { display: inline-block; }
.footer-col li { line-height: 1.3; }

/* White wordmark on the dark footer (dark text was invisible) */
.site-footer .brand__sub { color: var(--psm-white); }
.site-footer .brand__name { color: var(--text-on-dark-muted); }

/* NAP: address + two separate phone lines, never merged/orphaned */
.nap { display: grid; gap: 3px; }
.nap strong { color: var(--psm-white); }
.site-footer .nap strong { color: var(--psm-white); }
.nap__line { display: block; }
.nap__tel { display: block; white-space: nowrap; }
.nap__email { display: block; overflow-wrap: anywhere; }

/* Footer bottom bar: intentional grouped wrapping */
.footer-bottom { align-items: center; }
.footer-bottom a:hover { color: var(--psm-yellow); }

/* Hero CTAs go full-width and stack on small screens (prevents overflow) */
@media (max-width: 560px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}
