/* [ASKC_NOTE]: ROOT | Global variables and spacing */
:root { --gap: 12px; --hero-minvh: 50vh; }

/* [ASKC_NOTE]: HERO | Hero image scaling and positioning */
.hero img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.hero .hero-wrapper{
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-elevated);
  aspect-ratio: 16 / 9;
}
#hero-rotator .hero-wrapper > img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-referral-row {
  min-height: 1.25rem;
  color: var(--text-low, currentColor);
  font: 700 .8rem/1.25 var(--font-ui, sans-serif);
}

.hero-project-referral[hidden] {
  display: none;
}
.hero { min-height: var(--hero-minvh); background: center/cover no-repeat var(--hero-bg, #ddd); background-image: var(--hero-image, none); transition: background-image .3s ease; }



/* --- Phase 5: container-safe text wrapping --- */
:where(main, .container, .section, .card-list li, .tile, .prose, .footer, nav, header) {
  overflow-wrap: anywhere;        /* modern, best default */
  word-break: normal;             /* avoid aggressive CJK break in Latin text */
  hyphens: auto;                  /* tasteful hyphenation when allowed */
}

:where(button, .btn, .chip, .badge, .wm-toggle, input, textarea) {
  overflow-wrap: anywhere;
  text-overflow: ellipsis;        /* truncated labels still look tidy */
}

/* Keep headings from blowing up layout while staying responsive */
h1, h2, h3 {
  line-height: 1.2;
  max-width: 60ch;                /* readable line length */
}
p { max-width: 70ch; }


/* [ASKC_NOTE]: GALLERY | Grid layout for project images */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap); padding: 12px; }
.gallery-card { display: grid; gap: 6px; text-decoration: none; }
.gallery-card img { width: 100%; height: auto; display: block; border-radius: 8px; }
.gallery-cap { color: var(--text); }

/* [ASKC_NOTE]: SYS_BANNER | Dev or preview mode banner */
#sys-banner{position:sticky;top:0;z-index:10000;padding:.5rem .75rem;font:500 14px/1 system-ui;background:#fff3cd;color:#664d03;border-bottom:1px solid #ffe69c}

/* [ASKC_NOTE]: WATERMARK | Optional background watermark system */
:root { --wm-text: 'ALLURE SURFACES • PREVIEW'; --wm-font: 700 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; --wm-opacity: 0.08; --wm-rotate: -22deg; --wm-gap: 120px; }
.watermark-on { position: relative; }
/* [ASKC_NOTE]: WATERMARK_LAYER | fixed repeating-linear background */
.watermark-on::before { ... }
.watermark-label { position: fixed; right: 0.75rem; top: 0.75rem; font: var(--wm-font); opacity: 0.35; pointer-events: none; }
@media (prefers-color-scheme: dark) { .watermark-on::before { opacity: 0.06; } .watermark-label { color: #fff; opacity: 0.25; } }

/* [ASKC_NOTE]: A11Y | Screen reader utility */
.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}

/* [ASKC_NOTE]: NAVIGATION | Layout and focus styling */
.nav{display:flex;gap:12px;align-items:center}
.nav a{ text-decoration:none; padding:.25rem .35rem; border-radius:.375rem }
.nav a:focus-visible{outline:2px solid #0f2a55; outline-offset:2px}
/* Header nav sits on its own row, centered */
.site-header .nav{
  grid-column: 1 / -1;    /* full width under the brand row */
  justify-content: center;
}


/* [ASKC_NOTE]: NAV_TOGGLE · Visual treatment for the burger */
.nav-toggle{
  width:40px;height:40px;display:inline-grid;place-items:center;
  border:2px solid var(--header-accent);border-radius:10px;
  background:var(--surface);color:var(--header-ink);box-shadow:0 1px 2px rgba(0,0,0,.08);
  font-weight:800; position:relative; z-index:1260;
}
:root[data-theme="dark"] .nav-toggle{ background:#1a264d; color:#fff; border-color:var(--header-accent) }
.nav-toggle:hover{ filter:brightness(1.06) }
.nav-toggle:focus-visible{ outline:2px solid var(--header-accent); outline-offset:2px }

/* Desktop: burger hidden, nav always shown */
@media (min-width:768px){
  .nav-toggle{ display:none }
  #site-nav[hidden]{ display:flex !important }
}

/* [ASKC_NOTE]: NAV_DROPDOWN
   Unified nav: desktop inline, mobile dropdown for #site-nav
-------------------------------------------------------------- */

/* Desktop: header nav always shown, burger hidden */
@media (min-width: 768px) {
	/* Desktop : header nav always shown,burger hidden */
  .nav-toggle { display: none; }
  #site-nav[hidden] { display: flex !important; }
    /* Desktop-only layout for links */
  #site-nav {
    display: flex !important;          /* make sure it's a row */
    align-items: center;
    gap: 1.75rem;           /* spacing between links */
  }
  #site-nav a {
    white-space: nowrap;    /* keep labels as whole words */
  }
}

/* Header nav readability tweak */
.site-header .nav a{font-weight:600;font-size:.95rem;letter-spacing:.03em}


/* Mobile dropdown panel */
@media (max-width: 767.98px) {
  /* anchor dropdown to header */
  .header-inner { position: relative; }

  /* hidden => not rendered */
  #site-nav[hidden] { display: none !important; }

  /* panel box (closed by default) */
  #site-nav {
  box-sizing: border-box;
  position: absolute;
  top: 100%;
  right: .75rem;
  left: .75rem;          /* let it grow from left to right */
  max-width: 26rem;      /* keep it from being too wide */
  margin-inline: auto;   /* center the panel */
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--header-accent);
  border-radius: .75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.20);
  padding: .5rem;
  min-width: 220px;
  z-index: 1250;

  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;

  display: block;        /* override desktop flex */
  text-align: left;
  pointer-events: none;
}

#site-nav a {
  display: block;
  padding: .5rem .75rem;
  border-radius: .375rem;
  white-space: nowrap;   /* keep words from breaking into letters */
}


  /* open state – JS adds .is-open */
  #site-nav.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  /* links stacked as rows */
#site-nav a {
  color: var(--text) !important;       /* ensures dark/light theme correct color */
}

#site-nav a:hover,
#site-nav a:focus-visible {
  background: var(--surface-alt, var(--surface-2));
  color: var(--text-high, var(--text));
}


  /* bigger click target for burger */
  [data-nav-toggle] {
    isolation: isolate;
    z-index: 1260;
    border: 2px solid transparent;
  }

  [data-nav-toggle]:focus-visible {
    border-color: var(--header-accent);
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
  }
}

/* Reduced-motion: keep dropdown static */
@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  #site-nav,
  #site-nav.is-open {
    transition: none;
    transform: none;
  }
}

/* [ASKC_NOTE]: CONTACT_PAGE | Scoped styles for contact.html */
.page-contact { --gap: 14px; }
/* [ASKC_NOTE]: CONTACT_CONTAINER | Form layout grid */
.page-contact .container { ... }
/* [ASKC_NOTE]: CONTACT_CARD | Individual card visual design */
.page-contact .card { ... }
/* [ASKC_NOTE]: CONTACT_BUTTONS | Payment and submission buttons */
.page-contact .btn-pay {
  background: var(--gold-100);
  color: var(--blue-100);
  border: 2px solid var(--gold-100);
  font-weight: 600;
}
.page-contact .btn-pay:hover {
  background: var(--blue-100);
  color: var(--gold-100);
}
/* Dark-mode refinement */
html[data-theme="dark"] .page-contact .btn-pay {
  background: var(--gold-100);
  color: #0b1221;                 /* dark ink for contrast on gold */
  border-color: var(--gold-100);
}
html[data-theme="dark"] .page-contact .btn-pay:hover {
  background: var(--blue-100);
  color: var(--gold-100);
}

/* [ASKC_NOTE]: CONTACT_NOTICE | Info + warning banner styles */
.page-contact .notice { ... }
/* [ASKC_NOTE]: HONEYPOT | Hidden field for anti-spam form trap */
.page-contact .hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* [ASKC_NOTE]: UTILITIES | Quick color + background helpers */
.bg-brand   { background: var(--brand-primary); color: #fff; }
.bg-accent  { background: var(--brand-accent); color: #111; }
.text-brand { color: var(--brand-primary); }
.text-accent{ color: var(--brand-accent); }

/* [ASKC_NOTE]: COLOR_RULES | Accessibility and contrast guidelines */
.bg-brand p,
.bg-brand span,
.bg-brand small { color: var(--surface); font-weight: 600; }
.bg-light, .bg-neutral { background: var(--a5-gray); color: var(--ink); }

/* [ASKC_NOTE]: FOCUS + ACCESSIBILITY | Keyboard navigation and motion reduction */
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
html.a11y-dys { letter-spacing: .0125em; word-spacing: .04em; line-height: 1.6; }
html.a11y-dys body { letter-spacing: .0125em; word-spacing: .04em; line-height: 1.65; }
html.a11y-dys :is(h1, h2, h3, h4) { letter-spacing: .01em; line-height: 1.2; }
html.a11y-nomotion { scroll-behavior: auto !important; }
html.a11y-nomotion *,
html.a11y-nomotion *::before,
html.a11y-nomotion *::after { animation:none!important; transition:none!important; }

/* [ASKC_NOTE]: SKIP_LINK | Jump-to-content link styling */
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: 0;
  z-index: 10001;
  padding: .65rem .9rem;
  transform: translateY(-125%);
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--focus-ring);
  border-radius: .375rem;
}
.skip-link:focus-visible { transform: translateY(.75rem); }

/* [ASKC_NOTE]: A11C_HELPERS | Visual accessibility feedback and live regions */
.aa-contrast  { filter: contrast(1.2); }
.aaa-contrast { filter: contrast(1.4); }
[role="alert"], [role="status"], [aria-live] { ... }


/* --- Layout primitives --- */
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-block: 1.25rem;           /* gutter on mobile */
  padding-inline: 1.25rem;			/* <--ensures left/right space */
}

.section { 
  margin-block: 2rem; 
}

.section h2, .section h3 {
  margin-bottom: 0.75rem;
}

/* --- Typography + spacing --- */
body {
  line-height: 1.55;
}
.lede {                       /* for the intro paragraph under H1 */
  font-size: 1.125rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

/* --- Responsive “columns” using CSS Grid --- */
.grid-list {
  display: grid;
  grid-template-columns: 1fr; /* 1 col on phones */
  gap: 0.75rem 1.25rem;
  padding-left: 1rem;         /* list indent */
}

.grid-list li { 
  margin-left: 0.25rem; 
}

/* --- Media queries --- */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .container { padding-block: 2rem; padding-inline: 2rem; }
}
@media (min-width: 1200px) {
  .container { max-width: 1280px; }
}

/* Hide the hero's fallback background once an image is loaded */
.hero.has-image { background: none; }

/* Optional: small space below hero on mobile */
@media (max-width: 640px){
  .hero { margin-bottom: .75rem; }
}
/* List cosmetics */
.grid-list { list-style: disc outside; }
.grid-list li::marker { color: var(--blue-100); }  /* from brand.css */
.grid-list li { padding-left: .125rem; }           /* tiny optical nudge */

/* Gentle scaling for the H1 */
h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 3rem); line-height: 1.15; }

/* Section rhythm */
.home .section { margin-block: clamp(1.25rem, 2.5vw, 2rem); }

/* === Main content card: white, softer shadow === */
@media (min-width:900px){
  main.container{
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    padding: 3rem 3.5rem;
  }
}

/* === Section rhythm on white === */
.home .section{ margin-block: clamp(1.25rem, 2.5vw, 2rem); }

/* === Card-lists: neutral tiles (no tinted mix) === */
.card-list{ list-style: none; padding-left: 0; }
.grid-list.card-list{ gap: 1rem 1.25rem; }
/* If you previously added faux dots for li items, turn them off for card-lists */
.grid-list.card-list li::before{ content: none; }

/* List-as-cards */
.card-list { 
  list-style: none; 
  padding-left: 0; 
}

.card-list li strong { 
  font-weight: 700;
}

/* hover/focus polish (keyboard-friendly) */
.card-list li:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.10); }
.card-list li:focus-within { outline: 3px solid var(--blue-100); outline-offset: 2px; }

/* spacing harmony with your grid */
.grid-list.card-list { gap: 1rem 1.25rem; }

/* Watermark host positioning for gallery tiles */
.gallery-card,
.gallery-item { position: relative; overflow: hidden; }

/* Brochure headline treatment */
.section h2{
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
  border-bottom: 3px solid var(--blue-100);
  padding-bottom: .25rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.btn-cta{
  background: var(--blue-100);
  color: var(--gold-100);
  border: 2px solid var(--gold-100);
  font-weight: 700;
  padding: .55rem 1rem;
  border-radius: .5rem;
  text-decoration: none;
  display: inline-block;
  transition: background .25s, color .25s, transform .04s;
}
.btn-cta:hover{ background: var(--gold-100); color: var(--blue-100); }
.btn-cta:active{ transform: translateY(1px); }


/* Hero top fade into header color (brochure band) */
.hero{ position: relative; }
#hero-rotator .hero-wrapper::before{
  content:"";
  position:absolute; inset:0 0 auto 0; height:64px;
  z-index:1;
  background: linear-gradient(to bottom, rgba(35,53,101,.88), transparent); /* navy */
  pointer-events:none;
}
@media (min-width:900px){ #hero-rotator .hero-wrapper::before{ height:96px; } }

/* Even spacing above/below brochure sections */
.home .section{ margin-block: clamp(1.25rem, 2.4vw, 2.25rem); }

/* Remove faux dot when using card-list */
.grid-list.card-list li::before{ content:none; }

/* === Contact Page Refinement === */
.contact-wrapper,
.section.contact,
.contact-form,
main.container section {
  background: #ffffff;                /* pure white panels */
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

/* Outer grey remains from the html background */
body.contact-page {
  background-color: var(--gray-100);  /* light grey outside area */
}

/* Form Inputs – white theme */
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: var(--font-primary);
  background: #fff;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

form input:focus,
form textarea:focus {
  border-color: var(--blue-100);
  box-shadow: 0 0 0 2px rgba(35,53,101,0.15);
  outline: none;
}

/* Buttons */
button, input[type="submit"] {
  background: var(--blue-100);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
button:hover,
input[type="submit"]:hover {
  background: var(--gold-100);
  color: var(--blue-100);
}
button:active,
input[type="submit"]:active {
  transform: translateY(1px);
}

.contact-wrapper h1 {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 3px solid var(--blue-100);
  padding-bottom: 0.25rem;
  display: inline-block;
  margin-bottom: 1rem;
}

#galleryWrap img, #grid img { width:100%; height:auto; aspect-ratio:1/1; object-fit:cover; }

/* if you need a generic version on interior pages, scope it so it won’t touch the header */
main .nav-toggle{
  font: inherit;
  border: 2px solid var(--brand-blue-100);
  background: #fff;
  padding: .35rem .55rem;
  border-radius: .5rem;
  cursor: pointer;
  line-height: 1;
}
main .nav-toggle:focus-visible{
  outline: 2px solid var(--brand-blue-100);
  outline-offset: 2px;
}

/* Theme-safe containers */
.container,
.content,
.section,
.panel,
.card,
.box,
.callout,
.pill,
.rounded,
.feature,
.grid > *[class*="card"] {
  background: var(--surface);
  color: var(--text);   /* bridged to --fg in brand.css */
  border: 1px solid var(--border);
}

/* If you have lighter “inset” blocks, use surface-2 */
.surface-2,
.panel.alt,
.card.alt {
  background: var(--surface-2);
}

/* === THEME PATCH (append-only) — make all panels/cards use tokens === */

/* Global text/background (in case any earlier rule overrode them) */
html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

/* Panels, sections, cards, boxes — stop using #fff and follow tokens */
main.container,
.section,
.content,
.panel,
.card,
.tile,
.box,
.callout,
.rounded,
.feature,
.pill,
.grid > *[class*="card"],
.grid-list.card-list li,
.contact-wrapper,
.section.contact,
.contact-form,
main.container section,
.gallery-card,
.gallery-item {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

/* Lighter inset option */
.surface-2,
.panel.alt,
.card.alt {
  background: var(--surface-2) !important;
}

/* Gallery caption should follow theme text color */
.gallery-cap { color: var(--text) !important; }

/* Optional: tone down white-ish shadows on dark */
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .grid-list.card-list li {
  box-shadow: none !important;
}


/* Prevent overlaps with watermark button etc. */
main{ scroll-margin-top: 72px; }

/* === Theme toggle: size + centering === */
/* === Theme toggle: next-state color cue === */
/* === Theme toggle: color-balanced next-state cue === */
#themeToggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;height:44px;
  padding:0;
  border-radius:9999px;
  border:2px solid var(--brand-gold,#ea9e2d);
  line-height:1;
  font-family:"Segoe UI Symbol","Segoe UI",sans-serif;
  transition:background .25s,color .25s,border-color .25s,box-shadow .25s;
}

/* Light theme → about to go dark */
:root[data-theme="light"] #themeToggle{
  background:#1a264d;                      /* deeper navy backdrop */
  color:#fff;                              /* white moon */
  box-shadow:0 0 0 2px var(--brand-gold,#ea9e2d) inset;
}

/* Dark theme → about to go light */
:root[data-theme="dark"] #themeToggle{
  background:#1a264d;                      /* deeper navy backdrop */
  color:#fff;                              /* bright sun */
  border-color:var(--brand-gold,#ea9e2d);
  box-shadow:0 0 0 2px var(--brand-gold,#ea9e2d) inset;
}

/* icon sizing */
#themeToggle .theme-icon{
  display:block;
  font-size:0;
  line-height:1;
  transform: translateY(-1px);
}

#themeToggle .theme-icon::before{
  display:block;
  font-size:20px;
  line-height:1;
}

:root[data-theme="light"] #themeToggle .theme-icon::before{ content:"☾"; }
:root[data-theme="dark"] #themeToggle .theme-icon::before{ content:"☀"; }

/* --- Phase 5: universal text inset polish --- */
main.container,
.section,
.card-list li,
.card,
.tile,
.panel,
.feature,
.contact-wrapper,
.section.contact,
.contact-form {
  padding-inline: 0.75rem;     /* small left–right inset */
  padding-block: 0.5rem;       /* soft top/bottom breathing room */
}

.home .section p,
.home .section li,
.home .section a,
.home .section h2,
.home .section h3 {
  padding-inline: 0.25rem;     /* soft text indentation for readability */
}

/* extra nudge for the Get in touch section */
.section.contact {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* === Contact page layout hardening === */
.page-contact .card {
  padding: 1rem 1.25rem;         /* inner breathing room inside each card */
}

.page-contact form {             /* keep fields off the walls */
  padding-inline: .25rem;
}

.page-contact .row {             /* two-up on wide, single on phone */
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem 1rem;              /* row gap / column gap */
}
@media (min-width: 700px) {
  .page-contact .row { grid-template-columns: 1fr 1fr; }
}

.page-contact label {
  display: block;
  font-weight: 600;
  padding-inline: .25rem;        /* tiny text inset so labels align nicely */
}

.page-contact input[type="text"],
.page-contact input[type="email"],
.page-contact input[type="tel"],
.page-contact textarea {
  width: 100%;
  box-sizing: border-box;        /* prevents edge creep */
  margin-top: .35rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.page-contact textarea { resize: vertical; }

.page-contact .btn { margin-top: .75rem; } /* a little air over the button */

@media print {
  :root { color-scheme: light; }
  html, body { background: #fff !important; color: #000 !important; }
  #siteHeader, #siteFooter, header, .site-footer,
  .wm-toggle, .watermark-label { display: none !important; }

  .container { max-width: none; padding: 0.5in; }
  .section, .card { box-shadow: none !important; border: 1px solid #c8c8c8 !important; }

  a { color: #000 !important; text-decoration: underline; }
  .btn, button { background: #fff; color: #000; border: 1px solid #000; }

  /* Hide hero-only chrome when printing */
  .hero-frame figcaption,
  .hero-pagination,
  .nav-toggle,
  #themeToggle,
  .wm-toggle {
    display: none !important;
  }
}


/* === Contact page: dark-mode readability for helper/disclaimer text === */
.page-contact .subhead,
.page-contact .lede,
.page-contact .helptext,
.page-contact .notice,
.page-contact .disclaimer,
.page-contact .privacy,
.page-contact .fineprint,
:root[data-theme="dark"] .page-contact .section p.small,
:root[data-theme="dark"] .page-contact .section .muted {
  color: var(--text) !important;   /* use the bright theme text token */
  opacity: 0.95 !important;        /* undo any dimming */
}

/* keep links readable in dark mode too */
:root[data-theme="dark"] .page-contact a {
  color: var(--link);
}

/* divider in that page — visible on dark */
.page-contact hr,
.page-contact .rule {
  border-color: var(--border);
  opacity: .85;
}


/* Close the open gap under the hero */
#hero-rotator.hero {
  margin-bottom: 0;   /* no extra space below hero */
  min-height: 0;      /* rotator uses its image frame height; avoid mobile 50vh gap */
}
.hero + main.container { padding-top: .75rem; }       /* small, controlled top padding */
.hero + main.container .section:first-child { margin-top: 0; } /* kill the section's top margin */

/* Fixed header safe smooth-scrolling */
:root { --header-h: 72px; }          /* desktop fallback */
@media (max-width:700px){ :root{ --header-h: 56px; } }

.section, [id] { scroll-margin-top: var(--header-h); } /* anchors not hidden */

/* Z-index layering so header is always on top */
header, .mobile-banner { z-index: 1200; }
.wm-toggle, .watermark-label { z-index: 1090; }

/* Mobile banner should never appear on tablet/desktop */
@media (min-width: 768px) {
  .mobile-banner { display: none !important; }
}

/* =============================
   Component: Requested List
   ============================= */
.request-list .section-head { 
  margin-block-end: 0.75rem;
}

.request-list .h2 {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
}

.request-list .lede {
  color: var(--ink-muted, rgba(0,0,0,.68));
  margin-block: .25rem 1rem;
}

.request-list .checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .5rem;
}

.request-list .checklist li {
  background: var(--surface, #fff);
  border: 1px solid var(--surface-border, rgba(0,0,0,.08));
  border-radius: 10px;
  padding: .5rem .75rem;
}

.request-list details {
  display: block;
}

.request-list summary {
  cursor: pointer;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  font-weight: 600;
  color: var(--ink, #111);
}

.request-list summary::-webkit-details-marker { display: none; }

.request-list .item-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.request-list .state {
  font-size: .75rem;
  line-height: 1;
  padding: .35rem .55rem;
  border-radius: 999px;
  background: var(--gray-100, #d0d0cf);
  color: var(--ink, #111);
  border: 1px solid rgba(0,0,0,.08);
}

/* status variants */
.request-list .state.inprogress { background: var(--accent-100, #ea9e2d); color: #111; }
.request-list .state.done       { background: var(--success-100, #b7e1c1); color: #0b4d32; }

.request-list .item-notes {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--surface-border, rgba(0,0,0,.12));
  color: var(--ink, #111);
}

@media (prefers-reduced-motion: no-preference) {
  .request-list li { transition: background .2s ease, border-color .2s ease; }
  .request-list summary:focus-visible { outline: 3px solid var(--gold-100, #ea9e2d); outline-offset: 3px; }
}

/* ===== Header polish (token-consistent) ===== */
.site-header{
  background: var(--header-bg);
  color: var(--header-ink);
  border-bottom: 1px solid var(--surface-border);
}

/* Links/icons inside header */
.site-header a,
.site-header .brand-sub,
.site-header .brand-motto{
  color: var(--header-ink);
  text-decoration: none;
}

/* thin gold accent bar under header */
.site-header::after{
  content:"";
  display:block;
  height:4px;
  background: var(--header-accent);
}

/* Desktop header: centered logo and utility row, centered navigation below. */
.header-inner{
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    ". brand actions"
    "nav nav nav";
  align-items:center;
  column-gap:1rem;
  row-gap:.45rem;
  padding:.75rem 1.25rem;
  position:relative;
}

.site-header .header-navigation{
  grid-area:nav;
  display:flex;
  align-items:center;
  min-width:0;
  width:100%;
  justify-self:center;
  justify-content:center;
}

.site-header .header-navigation .nav{
  grid-column:auto;
  width:100%;
  justify-content:center;
}

/* === Header hardening patch (do not remove previous rules) === */

/* Ensure header uses theme tokens even if earlier rules conflict */
header.site-header,
.site-header,
.header-inner {
  background: var(--header-bg) !important;
  color: var(--header-ink) !important;
}

/* Centered brand lockup – larger logo with tagline beneath */
.brand-home{
  grid-area:brand;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0;
  min-width:0;
  justify-self:center;
  text-align:center;
}

.site-header .header-actions{
  grid-area:actions;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.5rem;
  flex:0 0 auto;
  white-space:nowrap;
  justify-self:end;
}

.brand-home img{
  width:clamp(220px, 20vw, 280px);
  height:70px;
  max-width:100%;
  object-fit:contain;
}

/* Logo subtitle + motto use correct ink in all themes */
.site-header .brand-sub,
.site-header .brand-motto {
  color: var(--header-ink) !important;
}

/* Prevent white flashes on theme switch */
:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .header-inner {
  background: var(--header-bg) !important;
  color: var(--header-ink) !important;
}

.site-header #themeToggle{
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  flex:0 0 44px;
  width:44px;
  height:44px;
  margin:0;
  justify-self:end;
}

@media (min-width:768px) and (max-width:1050px){
  .brand-home img{
    width:clamp(160px, 18vw, 190px);
    height:48px;
  }
  .site-header #site-nav{
    gap:clamp(.4rem, 1vw, .8rem);
  }
  .site-header .nav a{
    padding:.2rem;
    font-size:clamp(.72rem, 1.25vw, .85rem);
  }
}

@media (max-width:767.98px){
  .header-inner{
    grid-template-columns:44px minmax(0, 1fr) 44px;
    grid-template-areas:"nav brand actions";
    align-items:center;
    padding:.55rem clamp(.25rem, 2vw, .5rem);
  }
  .site-header .header-navigation{
    width:auto;
    justify-self:start;
    justify-content:flex-start;
  }
  .site-header .header-navigation,
  .site-header .header-actions{
    align-self:center;
  }
  .brand-home img{
    width:clamp(160px, 50vw, 200px);
    height:50px;
  }
  .site-header #themeToggle,
  .site-header .nav-toggle{
    box-sizing:border-box;
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px;
    padding:0;
    margin:0;
    display:grid;
    place-items:center;
  }
  .site-header #themeToggle{
    flex-basis:44px;
  }
  .site-header .nav-toggle > span[aria-hidden="true"]{
    display:block;
    font-size:1.55rem;
    font-weight:800;
    line-height:1;
    transform:translateY(-1px);
  }
}

/* Sandwich the nav panel underneath header correctly */
header.site-header {
  position: relative;
  z-index: 2000;
}

/* Make sure the gold accent is always visible on dark/light */
.site-header::after {
  background: var(--header-accent) !important;
}

/* Tagline: keep together, stronger legibility */
.header-motto{font-weight:600;letter-spacing:.08em;text-transform:uppercase;font-size:.85rem;white-space:nowrap}
.header-motto .gold,.header-motto .blue{white-space:nowrap}



/* styles.css – section/panel basics */
.section,
.panel,
.card {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow, rgba(0,0,0,.15));
}

.section h2,
.panel h2,
.card h2 {
  color: var(--text-high);
}

.badge,
.status {
  background: var(--surface-muted);
  color: var(--text);
  border-color: var(--border);
}

/* styles.css – hero frame */
.hero-frame {
  background: var(--surface-elevated);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 16px;
}

.hero-frame figcaption {
  color: var(--text-low);
}

/* Hero caption watermark – screen */
.hero-frame figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  padding-left: 0.25rem;
  color: var(--text-low);
  opacity: 0.7;
}

/* Slightly lighter in light mode so it doesn’t look like a glitch */
html[data-theme="light"] .hero-frame figcaption {
  color: rgba(0,0,0,.45);
}



/* Hero pagination / progress dots (RSI-style) */
.hero-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.hero-pagination[hidden] {
  display: none;
}

.hero-dot {
  --hero-dot-size: 10px;

  position: relative;
  width: var(--hero-dot-size);
  height: var(--hero-dot-size);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.hero-dot::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--gold-100);
  opacity: 0.85;
}

/* Active slide: animate fill over the interval */
.hero-dot.is-active::before {
  animation: heroDotFill var(--hero-progress-ms, 7000ms) linear forwards;
}

/* Slides we’ve already passed on this cycle */
.hero-dot.is-complete::before {
  transform: scaleX(1);
}

.hero-dot:focus-visible {
  outline: 2px solid var(--gold-100);
  outline-offset: 2px;
}

@keyframes heroDotFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  /* Keep hero dots readable even when animations are disabled */
  .hero-dot.is-active::before,
  .hero-dot.is-complete::before {
    animation: none !important;
    transform: scaleX(1) !important; /* full gold fill, but no motion */
  }
}
/* --- Hero dots: theme-aware contrast fix --- */

/* Light theme (default html) */
html[data-theme="light"] .hero-dot {
  border-color: var(--ink);       /* darker border */
}
html[data-theme="light"] .hero-dot::before {
  background: var(--gold-100);    /* gold fill still works on light BG */
}

/* Dark theme */
html[data-theme="dark"] .hero-dot {
  border-color: var(--surface-4); /* lighter border for dark backgrounds */
}
html[data-theme="dark"] .hero-dot::before {
  background: var(--gold-100);
}
@media (max-width: 640px) {
  .hero-dot {
    --hero-dot-size: 12px;
  }
}



/* Footer (token consumer) */
.site-footer {
  background: var(--surface);
  border-top: 4px solid var(--header-accent); /* <- gold accent */
  color: var(--text);
}

.site-footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer a[href^="tel:"],
.site-footer a[href^="mailto:"] {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer a[href^="tel:"]:hover,
.site-footer a[href^="mailto:"]:hover {
  color: var(--link-hover);
}
.site-footer a:focus-visible {
  text-decoration: underline;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Legal/support links remain recognizable in light, dark, and A11y modes. */
.page_legal .page-main a,
.page-legal .page-main a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.page_legal .page-main a:visited,
.page-legal .page-main a:visited {
  color: var(--link);
}

.page_legal .page-main a:hover,
.page-legal .page-main a:hover {
  color: var(--link-hover);
}

/* === A11y base (Phase 6 – pass 1) === */

/* Focus rings */
:where(a,button,[role="button"],input,select,textarea):focus-visible {
  outline: 2px solid var(--focus-ring, #00a2ff);
  outline-offset: 2px;
}

/* Decorative icons should be ignored by AT */
.icon[aria-hidden="true"] { pointer-events: none; }

/* High-contrast/forced-colors support */
@media (forced-colors: active) {
  :focus { outline: 2px solid CanvasText !important; outline-offset: 2px; }
}

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}


/* === Services overview cards === */
.section.services { margin-top: 2rem; }
.section.services .section-head { margin-bottom: 1rem; }
.section.services .section-note { color: var(--ink-400); }

.cards {
  --gap: 1rem;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(12, 1fr);
}
.cards > .card { grid-column: span 12; }

@media (min-width: 700px) and (max-width: 1199px) {
  .cards > .card { grid-column: span 6; }
}

@media (min-width: 1200px) {
  .cards > .card { grid-column: span 4; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  overflow: clip;
  height: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: border-color .2s ease, transform .2s ease;
}
.card-link {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.card:hover { border-color: var(--brand-gold-300); transform: translateY(-2px); }

.card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-900);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body { padding: .9rem 1rem 1rem; }
.card-title { font-size: 1.15rem; margin: 0 0 .25rem; }
.card-text { margin: 0 0 .5rem; color: var(--ink-500); }
.card-cta { font-weight: 600; color: var(--brand-gold-600); }

/* Accessible What We Do roll-up cards. */
.card-details {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  color: inherit;
}

.card-summary {
  display: grid;
  grid-template-rows: auto auto;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.card-summary::-webkit-details-marker { display: none; }

.card-summary::after {
  content: "＋";
  position: absolute;
  right: .75rem;
  bottom: .65rem;
  color: var(--brand-gold-600);
  font-size: 1.35rem;
  line-height: 1;
}

.card-details[open] .card-summary::after { content: "−"; }

.card-summary-title {
  padding: .75rem 1rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.card-details > .card-body { padding: .9rem 1rem 1rem; }
.card-details .card-cta { display: inline-block; }

.card-summary:focus-visible {
  outline: 2px solid var(--brand-gold-600);
  outline-offset: 3px;
}

/* Dark-mode tweaks inherit your token system */
html[data-theme="dark"] .card { background: var(--surface-900); border-color: var(--surface-700); }
html[data-theme="dark"] .card:hover { border-color: var(--brand-gold-500); }
html[data-theme="dark"] .card-text { color: var(--ink-300); }

.cta-strip{display:flex;gap:.5rem;justify-content:flex-end;margin:.5rem 0 1rem;}
.btn{display:inline-block;padding:.55rem .9rem;border:1px solid var(--surface-border);
     border-radius:10px;background:var(--surface);color:var(--ink);text-decoration:none;}
.btn:hover{border-color:var(--brand-gold-400)}
.btn-accent{background:var(--brand-gold-400);border-color:var(--brand-gold-500);color:#222;}
html[data-theme="dark"] .btn{background:var(--surface-900)}

/* Media fill + tidy hover */
.card:hover .card-cta { text-decoration: underline; }

/* Slightly tighter grid on small screens */
@media (max-width: 480px) {
  .cards { gap: .75rem; }
}

/* Compact two-up service thumbnails on mobile. */
@media (max-width: 699.98px) {
  .section.services .cards {
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.75rem;
  }

  .section.services .cards > .card {
    grid-column:auto;
    min-width:0;
    padding:0;
  }

  .section.services .cards > .card:has(.card-details[open]) {
    grid-column:1 / -1;
  }

  .section.services .card-summary-title {
    padding:.65rem 1.55rem .65rem .65rem;
    font-size:clamp(.875rem, 3.8vw, 1rem);
    line-height:1.25;
    overflow-wrap:anywhere;
  }

  .section.services .card-summary::after {
    right:.45rem;
    bottom:.65rem;
    font-size:1.1rem;
  }
}

.section.about { margin-top: 2rem; line-height: 1.6; }
.section.about ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.section.about li { margin-bottom: .4rem; }

.cta-banner{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  padding:1rem 1.25rem;margin-top:2rem;
  background:var(--surface-alt, var(--surface));
  border-top:2px solid var(--brand-gold-400);
}
.cta-buttons .btn{margin-left:.5rem}
html[data-theme="dark"] .cta-banner{background:var(--surface-900)}

/* Respect reduced-motion preferences (ok for all viewports) */
@media (prefers-reduced-motion: reduce) {
  #site-nav {
    transition: none !important;
    transform: none !important;
  }
  #site-nav.is-open {
    transform: none !important;
  }
}

/* Footer blocks layout */
.footer-block {
  min-width: 220px;
}

.site-footer .footer-inner {
  align-items: flex-start;
}

@media (max-width: 700px) {
  .site-footer .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.site-footer__bottom {
  border-top: 1px solid var(--surface-border);
  padding: .75rem 1rem;
  font-size: .875rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  justify-content: space-between;
}

/* Footer blocks layout */
.site-footer .site-footer__inner{display:flex;gap:1.25rem 2rem;align-items:flex-start;flex-wrap:wrap}
.footer-block{min-width:240px}
.site-footer__bottom{border-top:1px solid var(--surface-border);padding:.75rem 1rem;font-size:.875rem;display:flex;flex-wrap:wrap;gap:.5rem 1rem;justify-content:space-between}
@media (max-width:700px){.site-footer .site-footer__inner{flex-direction:column}}


.product-grid{
  display:grid;
  gap:1rem;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
}
.product-card{
  display:block;
  text-decoration:none;
  color:inherit;
  border:1px solid var(--surface-border);
  border-radius:.5rem;
  overflow:hidden;
  background:var(--surface);
  transition:transform .12s ease, box-shadow .12s ease;
}
.product-card:hover{ transform:translateY(-2px); box-shadow:0 6px 14px rgba(0,0,0,.10) }

.product-figure{ margin:0; aspect-ratio: 4 / 3; position:relative; }
.product-figure img{ width:100%; height:100%; object-fit:cover; display:block; }
.product-caption{ display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.5rem .75rem; font-weight:600; }
.product-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }

.product-category-stack{
  display:grid;
  gap:1.25rem;
  margin-top:1rem;
}

.product-category{
  display:grid;
  gap:.75rem;
}

.product-category-title{
  margin:0;
}

.product-slot-empty{
  margin:0;
  padding:.75rem 1rem;
  border:1px dashed var(--surface-border);
  border-radius:.75rem;
  color:var(--ink-400);
  background:var(--surface-alt, var(--surface));
}

.badge{ display:inline-block; padding:.125rem .375rem; border-radius:.25rem; font-size:.75rem; line-height:1; }
.badge--draft{ background:#9a6700; color:#fff; }
.img-fallback{ filter:grayscale(100%); opacity:.85; }

/* Landing page visual callouts */
.section-visual{
  margin: 1rem 0 0;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.section-visual img{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  object-fit:cover;
}

.section-visual figcaption{
  padding:.5rem .75rem;
  font-size:.9rem;
  color:var(--ink-500);
}

/* === Editorial typography + visual rhythm ===========================
   Keep display typography aligned with the Oversized Impact reference,
   while body copy and controls remain clean, theme-aware sans-serif UI.
====================================================================== */
body {
  font-family: var(--font-body);
  font-size: calc(1rem * var(--scale, 1));
  line-height: 1.6;
  letter-spacing: .005em;
  overflow-wrap: break-word;
}

h1, h2, h3, h4,
.section-head h2,
.cta-banner h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.012em;
  text-transform: none;
}

h1 { font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.9rem, 3.2vw, 3rem); line-height: 1.1; }
h3 { font-size: clamp(1.45rem, 2vw, 2rem); line-height: 1.15; }
h4 { font-size: 1.2rem; line-height: 1.2; }

.section-head {
  display: grid;
  gap: .5rem;
  margin-bottom: clamp(1.25rem, 2vw, 1.75rem);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.1;
  border-bottom: 0;
  padding-bottom: 0;
}

.section-note {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: .9rem;
  letter-spacing: .03em;
  line-height: 1.5;
}

.card-summary-title,
.card-list-title {
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  line-height: 1.2;
}

/* What We Do stays in the readable UI family at every breakpoint. */
.section.services :is(h2, h3, h4, .card-summary-title, .card-list-title) {
  font-family:var(--font-ui);
  font-weight:700;
  letter-spacing:.01em;
}

.card-text,
.section p,
.section li {
  line-height: 1.62;
}

.btn,
.card-cta,
.site-header .nav a {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: .055em;
  line-height: 1.15;
}

.btn { padding: .7rem 1.05rem; }
.cta-buttons { gap: .75rem; }

@media (max-width: 700px) {
  h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .section-head h2 { font-size: clamp(1.75rem, 8vw, 2.35rem); }
  .section-note { font-size: .875rem; }
  .btn { padding: .65rem .9rem; }
}

/* Customer-facing gallery preview */
.gallery-preview-trigger {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.gallery-preview-trigger:focus-visible {
  outline: 3px solid var(--accent, #f0a12b);
  outline-offset: 3px;
}

#gallery-app .gallery-preview-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-image-unavailable {
  place-items: center;
  width: 100%;
  min-height: 12rem;
  padding: 1rem;
  background: var(--surface-900);
  color: var(--ink-500);
  font-weight: 700;
  text-align: center;
}

.gallery-preview-trigger .gallery-image-unavailable {
  display: grid;
  height: 100%;
}

.gallery-lightbox__panel .gallery-image-unavailable {
  display: grid;
  min-height: min(60vh, 30rem);
}

.gallery-image-unavailable[hidden] {
  display: none;
}

#askcGalleryList figcaption small,
.gallery-lightbox__caption small {
  display: block;
  margin-top: .25rem;
}

body.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  width: min(96vw, 1200px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--border, #d6dbe6);
  border-radius: .75rem;
  background: var(--surface, #fff);
  color: var(--text, #111);
}

.gallery-lightbox::backdrop {
  background: rgb(0 0 0 / 82%);
}

.gallery-lightbox__panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: 3.5rem 1rem 1rem;
}

.gallery-lightbox__panel figure {
  min-width: 0;
  margin: 0;
  text-align: center;
}

.gallery-lightbox__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(94vh - 8rem);
  margin: 0 auto;
  object-fit: contain;
}

.gallery-lightbox__caption {
  margin-top: .75rem;
}

/* Paige visual cleanup: keep hierarchy without boxing every content row. */
.home .site-wrap > .section,
.home #gallery-app,
.page_legal .page-main > section {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.home #services .card-list li,
#askcGalleryList > li {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.home #services .card-list li {
  padding-block: .2rem;
  border-radius: 0;
}

.home main.container > h1,
.home .section-head,
.page_legal .page-main > h1 {
  text-align: center;
}

.page_legal .page-main > :is(p, section) {
  width: min(100%, 72ch);
  margin-inline: auto;
}

.page_legal .page-main > section :is(h2, h3, h4, p, ul, ol, li),
.page_legal .page-main > p {
  text-align: left;
}

.home .section-note {
  margin-inline: auto;
  text-align: center;
}

.home :is(.section p, .section li),
#askcGalleryList figcaption,
.page_legal .page-main :is(p, li) {
  text-align: left;
}

.gallery-lightbox__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
}

.gallery-lightbox__nav,
.gallery-lightbox__close {
  min-height: 44px;
  padding: .55rem .8rem;
  border: 1px solid currentColor;
  border-radius: .4rem;
  background: var(--surface, #fff);
  color: inherit;
  cursor: pointer;
}

@media (max-width: 700px) {
  .gallery-lightbox__panel {
    grid-template-columns: 1fr 1fr;
    padding-top: 3.5rem;
  }

  .gallery-lightbox__panel figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .gallery-lightbox__prev,
  .gallery-lightbox__next {
    width: 100%;
  }
}

/* Paige spacing addendum: one shared gap and container-safe hero controls. */
#hero-rotator {
  --cta-control-gap: .75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  column-gap: var(--cta-control-gap);
  padding-inline: 1rem;
}

#hero-rotator .hero-wrapper {
  grid-column: 1 / -1;
  width: calc(100% + 2rem);
  margin-inline: -1rem;
}

#hero-rotator .hero-referral-row {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
}

#hero-rotator .hero-pagination {
  grid-column: 2;
  grid-row: 3;
  justify-self: center;
  margin: .75rem 0 1rem;
}

#hero-rotator .hero-toggle {
  grid-column: 1;
  grid-row: 3;
  margin: .75rem 0 1rem;
  justify-self: start;
}

#hero-rotator .cta-strip {
  grid-column: 3;
  grid-row: 3;
  align-self: end;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: var(--cta-control-gap);
  margin: .75rem 0 1rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.cta-buttons .btn {
  margin-left: 0;
}

@media (max-width: 700px) {
  #hero-rotator {
    grid-template-columns: 1fr;
    padding-inline: .75rem;
  }

  #hero-rotator .hero-wrapper {
    grid-column: 1;
    width: calc(100% + 1.5rem);
    margin-inline: -.75rem;
  }

  #hero-rotator .hero-pagination,
  #hero-rotator .hero-referral-row,
  #hero-rotator .hero-toggle,
  #hero-rotator .cta-strip {
    grid-column: 1;
    grid-row: auto;
  }

  #hero-rotator .cta-strip,
  .cta-buttons {
    width: 100%;
  }

  .cta-buttons .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* Paige final cleanup: remove decorative nesting without weakening controls. */
.home #hero-rotator {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: visible;
}

.home #hero-rotator .hero-wrapper {
  border: 0 !important;
  border-radius: 16px;
  box-shadow: none !important;
  background: transparent !important;
  overflow: hidden;
}

.home main.container,
.home .site-wrap > .section,
.home #services .card,
.home .section-visual,
.page_legal .page-main,
.page_legal .page-main > section {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Flat, filled Landing actions. */
.home .btn {
  border: 0;
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  box-shadow: none;
}

.home .btn-accent {
  background: var(--button-accent-bg);
  color: var(--button-accent-text);
}

html[data-theme="dark"] body.home .btn {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
}

html[data-theme="dark"] body.home .btn-accent {
  background: var(--button-accent-bg);
  color: var(--button-accent-text);
}

.home .btn:hover {
  filter: brightness(.92);
}

.home .btn:active {
  filter: brightness(.84);
}

.home .btn:disabled,
.home .btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}

.home .btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
