/* Application layer on top of the approved V3 visual system (site.css is the unmodified V3 stylesheet incl. its final height fixes).
   Everything here adds working-app behaviour (menu button, tabs, forms, gallery, dialogs, sticky actions, policy pages)
   or small, documented legibility/focus corrections. No inline styles anywhere: strict CSP (style-src 'self'). */

/* ---- Legibility floor (approved V3 used 8–10px labels; raised to 11px minimum, proportions unchanged) ---- */
.private-note { font-size: 11px; }
.eyebrow { font-size: 11px; }
.image-caption, .custom-photo figcaption { font-size: 11px; }
.service-hero figcaption { font-size: 11px; }
.demo-label { font-size: 11px; }
.form-bottom p { font-size: 11px; max-width: 240px; }
.footer-bottom { font-size: 11px; }
.field-note, .scope-item span, .service-tabs .tab-note, .step-note, .review-only { font-size: 12px; }
.step-number, .scope-detail h3 span, .priority-lines span, .service-tabs button span:first-child { font-size: 11px; }
@media (max-width: 700px) {
  .private-note { font-size: 10px; }
  .eyebrow, .demo-label, .footer-bottom, .step-note, .form-bottom p, .breadcrumb, .service-hero figcaption, .service-tabs button span:first-child { font-size: 11px; }
  .service-tabs button { font-size: 12px; }
}

/* ---- Utilities / focus ---- */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.custom-section a:focus-visible, .custom-section button:focus-visible, .site-footer a:focus-visible, .private-note a:focus-visible { outline-color: var(--yellow); }
.service-tabs button:focus-visible { outline-offset: -4px; }
.brand { display: block; line-height: 0; }
.brand img { width: 196px; height: auto; }
@media (max-width: 1100px) { .brand img { width: 180px; } }
@media (max-width: 700px) { .brand img { width: 168px; height: auto; } }
.menu-button { min-height: 44px; }
.navigation a { min-height: 44px; display: inline-flex; align-items: center; }
.navigation .header-quote { justify-content: center; }
@media (max-width: 700px) { .navigation a { display: flex; } }
html { scroll-padding-top: 24px; }

/* ---- Footer contact + policy links ---- */
.footer-contact { list-style: none; margin: 14px 0 0; padding: 0; font-size: 13px; color: #e5edf7; display: grid; gap: 4px; }
.footer-contact a { text-underline-offset: 3px; }
.footer-links { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .footer-links { justify-content: start; } }

/* ---- Mobile sticky actions: Call + Request a quote (phones only; footer/page reserve space so nothing is covered) ---- */
.sticky-bar { display: none; }
@media (max-width: 700px) {
  .sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 20px #14376f1f; transition: transform .2s ease-out; }
  .sticky-bar .button { min-height: 48px; padding: 12px 10px; gap: 8px; font-size: 14px; }
  .sticky-bar .button.outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
  .sticky-bar.is-hidden { transform: translateY(110%); }
  .site-footer { padding-bottom: 96px; }
  html { scroll-padding-bottom: 96px; }
}
.button.outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.button.outline:hover { background: var(--sage); }

/* ---- Pages: shared hero without image (gallery, areas, quote, policy, 404) ---- */
.page-hero { background: var(--cream); }
.page-hero-inner { padding: 18px 0 52px; max-width: 760px; }
.page-hero h1 { font-size: 46px; margin: 14px 0 20px; }
.page-hero .lead { font-size: 16px; color: var(--muted); max-width: 560px; }
.page-hero .hero-actions { margin-top: 26px; }
@media (max-width: 700px) { .page-hero h1 { font-size: 36px; } .page-hero-inner { padding-bottom: 34px; } .page-hero .lead { font-size: 14px; } }
.prose { max-width: 760px; padding: 8px 0 24px; }
.prose h2 { font-size: 26px; margin: 38px 0 12px; }
.prose p, .prose li { font-size: 15px; color: var(--ink); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 8px; }
.callout { background: var(--sage); border-left: 4px solid var(--green); padding: 18px 20px; font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.callout strong { color: var(--navy); }
.notfound-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 30px; }
.big-404 { font-size: 96px; font-weight: 700; letter-spacing: -.05em; color: #cfdad3; line-height: 1; }

/* ---- Home preview form + CTA band ---- */
.cta-band .quote-intro { border-right: 0; }
.cta-band .quote-box { grid-template-columns: 1fr auto; align-items: center; }
.cta-band .cta-actions { padding: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 700px) { .cta-band .quote-box { display: block; } .cta-band .cta-actions { padding: 0 24px 28px; } .cta-band .cta-actions .button { width: 100%; } }
.preview-follow { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
dialog .text-link { margin-left: 6px; }
dialog .dialog-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
dialog .dialog-actions .button { width: auto; }

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.shot { margin: 0; position: relative; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: var(--sage); aspect-ratio: 3 / 4; overflow: hidden; position: relative; cursor: zoom-in; touch-action: manipulation; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease-out; }
.shot button:hover img { transform: scale(1.04); }
.shot .tag { position: absolute; left: 10px; bottom: 10px; font-size: 11px; background: #fffef1ef; color: var(--ink); padding: 6px 10px; }
@media (max-width: 1100px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.lightbox { max-width: min(92vw, 620px); padding: 0; overflow: visible; background: transparent; box-shadow: none; }
.lightbox::backdrop { background: #0b2449d9; }
.lightbox figure { background: #fff; }
.lightbox img { width: 100%; max-height: 76vh; object-fit: contain; background: #0b2449; }
.lightbox figcaption { padding: 12px 16px; font-size: 14px; color: var(--navy); font-weight: 700; }
.lightbox .close { position: absolute; top: -54px; right: 0; width: auto; min-height: 44px; padding: 10px 20px; border: 2px solid #fff; background: var(--navy); color: #fff; font-weight: 700; }
.lightbox .close:focus-visible { outline-color: #fff; }

/* ---- Real demo quote form (/quote/) ---- */
.quote-page-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 0; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--green); }
.quote-page-grid .quote-intro { padding: 40px; }
.contact-card { margin-top: 28px; padding: 20px; background: var(--sage); border-top: 3px solid var(--green); }
.contact-card h3 { font-size: 20px; margin-bottom: 8px; }
.contact-card a { font-weight: 700; color: var(--navy); }
.contact-card .big { display: block; font-size: 28px; letter-spacing: -.03em; text-decoration: none; color: var(--green); margin: 4px 0 8px; }
.contact-card p { font-size: 13px; color: var(--muted); }
.real-form { padding: 35px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; align-content: start; }
.real-form .wide, .real-form fieldset, .real-form .privacy-note, .real-form .demo-tools, .real-form .form-actions, .real-form .status, .real-form .error-summary { grid-column: 1 / -1; }
.real-form .field label, .real-form legend, .real-form .label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--navy); padding: 0; }
.real-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.real-form .field input, .real-form .field select, .real-form .field textarea { width: 100%; border: 1px solid #7d93a3; border-radius: 0; background: #fff; padding: 0 12px; color: var(--ink); font-size: 15px; }
.real-form .field input, .real-form .field select { height: 50px; }
.real-form .field textarea { min-height: 120px; padding: 12px; resize: vertical; font: inherit; font-size: 15px; }
.real-form .field input:focus-visible, .real-form .field select:focus-visible, .real-form .field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--navy); }
.req { color: #b3261e; font-weight: 700; }
.hint { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.err { display: none; margin: 6px 0 0; color: #a3221b; font-size: 13px; font-weight: 700; }
.err::before { content: "\26A0\00a0"; }
.has-error .err { display: block; }
.has-error input, .has-error select, .has-error textarea { border: 2px solid #b3261e; background: #fdf1ef; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; margin: 0; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 8px 14px; border: 1px solid #7d93a3; background: #fff; color: var(--navy); font-weight: 700; font-size: 15px; }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.demo-banner { grid-column: 1 / -1; display: block; padding: 14px 16px; background: #fff7d1; border: 2px solid #d9a900; color: #4a3600; font-size: 14px; }
.demo-banner strong { color: #3a2a00; }
.privacy-note { background: var(--sage); padding: 14px 16px; font-size: 13px; color: var(--muted); }
.privacy-note strong { color: var(--navy); }
.demo-tools { border: 1px dashed #7d93a3 !important; padding: 12px 14px !important; }
.demo-tools legend { font-size: 12px !important; }
.demo-tools select { height: 46px; width: 100%; border: 1px solid #7d93a3; padding: 0 10px; font-size: 14px; background: #fff; }
.lbl-plain { font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.status { display: none; padding: 16px 18px; font-size: 14px; font-weight: 700; }
.status.is-on { display: block; }
.status.busy { background: #eaf4fb; border: 2px solid #3a8bc8; color: var(--navy); }
.status.fail { background: #fdecea; border: 2px solid #b3261e; color: #6b130d; }
.status.done { background: #e4f3e9; border: 2px solid var(--green); color: #124a28; }
.status h3 { font-size: 20px; color: inherit; margin-bottom: 8px; letter-spacing: -.02em; }
.status p { margin: 0 0 12px; font-weight: 400; font-size: 14px; }
.status .button { min-height: 46px; }
.spinner { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border: 3px solid #3a8bc8; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-summary { display: none; padding: 16px 18px; border: 2px solid #b3261e; background: #fdecea; color: #6b130d; }
.error-summary.is-on { display: block; }
.error-summary h3 { font-size: 17px; color: inherit; margin-bottom: 6px; }
.error-summary ul { margin: 0; padding-left: 1.2rem; font-size: 14px; }
.error-summary a { color: #6b130d; font-weight: 700; }
.real-form .button[disabled] { opacity: .55; cursor: not-allowed; }
@media (max-width: 1100px) { .real-form { padding: 30px; } .quote-page-grid .quote-intro { padding: 30px; } }
@media (max-width: 820px) { .quote-page-grid { grid-template-columns: .8fr 1.2fr; } }
@media (max-width: 700px) {
  .quote-page-grid { display: block; }
  .quote-page-grid .quote-intro { padding: 28px 24px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .real-form { display: block; padding: 25px 24px; }
  .real-form > * { margin-bottom: 18px; }
  .real-form .form-actions .button { width: 100%; }
  .contact-card .big { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .shot img, .sticky-bar { transition: none !important; } }
.err.is-on { display: block; }
#preview-error { grid-column: 1 / -1; margin: 0; }
.no-zoom-cursor { cursor: default; }
.navigation .header-quote[aria-current="page"], .navigation .header-quote:hover { color: #fff; }
.navigation .header-quote[aria-current="page"] { background: #185e32; }
.page-hero .big-404 { margin-top: 36px; }
/* Contrast fix (QA): home preview selects need a >=3:1 boundary; V3 site.css (#aabac5) left unmodified. Same border as the full quote form fields. */
#preview-form select { border-color: #7d93a3; }
