/* Contact affordances and a complete light palette; vehicle paint is independent. */
:root { color-scheme: dark; --ui-shadow: 0 18px 50px #0003; }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f6f7f9;
  --panel-2: #eef1f5;
  --text: #17202c;
  --muted: #576373;
  --line: #d6dce4;
  --gold: #876526;
  --gold-strong: #775414;
  --ui-shadow: 0 16px 45px #17202c0d;
}

.hero { height: auto; min-height: max(850px, 100svh); padding: 142px 0 108px; }
.hero-content { margin: 0 auto; }
.hero-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
.finance-help { width: min(100%, 550px); padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border: 1px solid #d6b77888; border-radius: 10px; color: var(--text); background: #0b0e13eb; text-align: left; cursor: pointer; box-shadow: var(--ui-shadow); transition: border-color .2s, background .2s; }
.finance-help:hover { background: #171b22; border-color: #f0d49a; }
.finance-help-copy { min-width: 0; display: grid; gap: 8px; }
.finance-help-copy > strong { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.finance-help-topics { display: flex; flex-wrap: wrap; gap: 5px 16px; color: #c6ccd5; font-size: .875rem; }
.finance-help-topics > span + span { padding-left: 14px; border-left: 1px solid #d6b77870; }
.finance-help-action { display: grid; justify-items: center; gap: 4px; color: #f0d49a; font-size: .875rem; }
.finance-help-action > span { font-size: 1.35rem; line-height: 1; }
.theme-switch { flex: 0 0 auto; display: grid; gap: 7px; }
.theme-switch-label { color: var(--text); font-size: .875rem; }
.theme-switch-options { padding: 4px; display: flex; gap: 3px; border: 1px solid #ffffff30; border-radius: 9px; background: #090d13e8; }
.theme-switch button { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; color: #bfc7d2; background: transparent; font-size: .875rem; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { color: #fff; background: #303947; border-color: #5b6573; }
.theme-dot { width: 13px; height: 13px; flex: 0 0 auto; border: 1px solid #8d97a6; border-radius: 50%; }
.theme-dot-light { background: #fff; }
.theme-dot-dark { background: #121720; }
:is(.finance-help, .theme-switch button, .contact-channel, [data-max-contact], #max-copy-phone):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.messenger { width: 40px; height: 40px; padding: 5px; cursor: pointer; background: transparent; border: 1px solid var(--line); }
.messenger img { width: 28px; height: 28px; object-fit: contain; display: block; }
.contact-icon { background: transparent; border: 0; }
.contact-icon img { width: 34px; height: 34px; object-fit: contain; display: block; }
.direct-contacts button { width: 100%; padding: 15px 0; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 13px; text-align: left; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.direct-contacts button > span:last-child { display: flex; flex-direction: column; }
.ai-chat-contact a { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; }
.contact-app-icon { width: 19px; height: 19px; object-fit: contain; flex: 0 0 auto; vertical-align: middle; }
.chat-message-actions a { display: inline-flex; align-items: center; gap: 6px; }
.floating-contact img { width: 32px; height: 32px; object-fit: contain; display: block; }

.contact-dialog { width: min(490px, calc(100% - 28px)); max-height: calc(100svh - 36px); margin: auto; padding: 38px 28px 28px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--panel); box-shadow: 0 30px 100px #0005; }
.contact-dialog::backdrop { background: #03060bcc; }
.contact-dialog .dialog-close { width: 44px; height: 44px; top: 6px; right: 8px; line-height: 1; border-radius: 50%; }
.contact-dialog .eyebrow { margin-bottom: 12px; font-size: .875rem; letter-spacing: .09em; }
.contact-dialog h2 { margin: 0 0 12px; font-family: var(--display); font-size: 2rem; line-height: 1.08; letter-spacing: -.02em; }
.contact-dialog > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.contact-dialog-options { display: grid; gap: 10px; margin-top: 24px; }
.contact-channel { width: 100%; min-height: 82px; padding: 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--bg); text-align: left; cursor: pointer; }
.contact-channel:hover { background: var(--panel-2); border-color: var(--gold); }
.contact-channel > img { width: 44px; height: 44px; object-fit: contain; }
.contact-channel > span:nth-child(2) { display: grid; gap: 3px; overflow-wrap: anywhere; }
.contact-channel strong { font-size: 1rem; }
.contact-channel small { font-size: .875rem; color: var(--muted); }
.contact-channel > span:last-child { font-size: 1.15rem; color: var(--muted); }
.max-contact-details { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.max-contact-details[hidden] { display: none; }
.max-contact-details > p { margin: 0 0 8px; font-size: .875rem; color: var(--muted); }
.max-contact-details > strong { display: block; margin-bottom: 12px; }
#max-copy-phone { min-height: 44px; padding: 10px 14px; border: 1px solid var(--gold); border-radius: 6px; color: var(--text); background: var(--panel); cursor: pointer; }
.max-contact-details > p:last-child { margin: 12px 0 0; }

/* White surfaces, dark copy and readable fields across every working section. */
:root[data-theme="light"] .site-header { background: #fffffff2; border-bottom: 1px solid var(--line); }
:root[data-theme="light"] .site-header.is-scrolled { background: #fffffff5; }
:root[data-theme="light"] :is(.main-nav, .brand-copy small, .header-email) { color: var(--text); }
:root[data-theme="light"] .menu-toggle { background: #fff; }
:root[data-theme="light"] .hero-overlay { background: linear-gradient(90deg, #fffffffa 0%, #ffffffee 30%, #ffffff63 66%, #ffffff14 100%), linear-gradient(0deg, #ffffffb3, transparent 55%); }
:root[data-theme="light"] .hero-copy { color: #354153; }
:root[data-theme="light"] .hero-scroll { color: var(--text); }
:root[data-theme="light"] .finance-help { color: var(--text); background: #ffffffed; border-color: #b38a44; }
:root[data-theme="light"] .finance-help:hover { background: #f6f7f9; }
:root[data-theme="light"] .finance-help-topics { color: #485466; }
:root[data-theme="light"] .finance-help-action { color: var(--gold-strong); }
:root[data-theme="light"] .theme-switch-options { background: #fff; border-color: var(--line); }
:root[data-theme="light"] .theme-switch button { color: #485466; }
:root[data-theme="light"] .theme-switch button[aria-pressed="true"] { color: #17202c; background: #edf0f4; border-color: #b4bfcd; }
:root[data-theme="light"] .vehicle-finder { background: #f6f7f9; }
:root[data-theme="light"] :is(.finder-form, .catalog-cta, .detailing-service-card, .calculator-rate-summary, .calculator-form, .film-grid article, .detail-service-options label, .policy-dialog) { background: #fff; border-color: var(--line); box-shadow: var(--ui-shadow); }
:root[data-theme="light"] :is(.finder-field input, .field input, .field select, .field textarea, .detail-field input, .detail-field select, .detail-field textarea, .calc-field input, .calc-field select) { background: #fff; color: var(--text); border-color: #b9c3d0; }
:root[data-theme="light"] :is(input, textarea)::placeholder { color: #647184; }
:root[data-theme="light"] :is(.finder-field label, .finder-result, .car-specs dd, .paint-palette legend, .finish-picker legend, .viewer-reset, .sparkle-control label, .detail-field label, .detail-service-options legend, .field label, .calc-field label, .calculator-market-note span, .calculator-breakdown dd, .calculator-monthly) { color: var(--text); }
:root[data-theme="light"] :is(.finder-field small, .filter, .car-card-top, .car-specs dt, .custom-paint small, .custom-paint output, .paint-selection-copy p, .wrap-studio .paint-palette legend span, .sparkle-control p, .configurator-note, .wrap-studio .configurator-note, .model-credit, .model-credit a, .detailing-configurator-facts span, .detailing-service-card li, .film-grid small, .calculator-rate-summary span, .calculator-rate-summary small, .calculator-market-note small, .calculator-result-label, .calculator-result-caption, .calculator-breakdown dt, .calculator-disclaimer, .footer-bottom) { color: var(--muted); }
:root[data-theme="light"] .button-ghost { color: var(--text); background: #ffffffd9; border-color: #7d8795; }
:root[data-theme="light"] .button-outline { border-color: #8f9baa; }
:root[data-theme="light"] :is(.button-primary, .finish-choice.is-active, .filter.is-active, .chat-launcher-icon, .ai-chat-avatar, .ai-chat-form button) { color: #17202c; background: linear-gradient(135deg, #ecd49b, #c8a467); border-color: #b6924f; }
:root[data-theme="light"] :is(.service-featured, .film-block) { background: linear-gradient(135deg, #fbf8f1, #f5f7fa 70%); }
:root[data-theme="light"] .detailing { background: #f4f6f9; }
:root[data-theme="light"] :is(.detailing-configurator, .calculator-shell) { background: #fff; border-color: var(--line); box-shadow: var(--ui-shadow); }
:root[data-theme="light"] :is(.configurator-controls, .detailing-request-card, .calculator-result) { background: #fff; border-color: var(--line); box-shadow: none; }
:root[data-theme="light"] :is(.custom-paint, .custom-paint input, .viewer-reset, .detail-service-options label, .detailing-service-card li) { border-color: var(--line); }
:root[data-theme="light"] .finish-choice:not(.is-active) { color: #485466; background: #f3f5f8; border-color: #bdc7d3; }
:root[data-theme="light"] .paint-swatch { border-color: #8090a3; }
:root[data-theme="light"] .paint-swatch.is-active { border-color: #775414; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #775414; }
:root[data-theme="light"] .detailing-configurator-facts { background: #edf1f6; border-color: var(--line); }
:root[data-theme="light"] .detail-service-options label:has(input:checked) { color: #604518; background: #f8efd9; border-color: #aa7a30; }
:root[data-theme="light"] .leasing-calculator { background: #f4f6f9; }
:root[data-theme="light"] .calculator-rate-summary a { color: var(--gold-strong); }
:root[data-theme="light"] .request { background: #f5f7fa; }
:root[data-theme="light"] .footer { background: #fff; }
:root[data-theme="light"] :is(.chat-launcher, .floating-contact, .ai-chat) { color: var(--text); background: #fff; box-shadow: var(--ui-shadow); }
:root[data-theme="light"] .ai-chat-header { background: #f1f4f8; }
:root[data-theme="light"] .chat-message-bot { color: var(--text); background: #f2f5f8; border-color: var(--line); }
:root[data-theme="light"] :is(.ai-chat-header span, .ai-chat-close, .chat-quick-replies button, .ai-chat-contact > span, .ai-chat-contact a) { color: #485466; border-color: var(--line); }
:root[data-theme="light"] .ai-chat-close:hover { color: #17202c; background: #e1e6ed; }
:root[data-theme="light"] .ai-chat-form { background: #fff; border-color: #b9c3d0; }
:root[data-theme="light"] .ai-chat-form input { color: var(--text); }
:root[data-theme="light"] .ai-chat-contact a:hover { color: #17202c; border-color: #8f9baa; }
:root[data-theme="light"] .form-result { color: #185f37; background: #eaf7ef; border-color: #7cbd95; }
:root[data-theme="light"] .form-result.is-error { color: #962d2d; background: #fff0f0; border-color: #d89696; }

/* Photographic scenes retain their intended lighting and original brand colors. */
:root[data-theme="light"] :is(.cinematic, .service-detailing, .car-viewer-shell, .hero-visual-picker) { --text: #f4f1ea; --muted: #aab2bf; --gold: #d6b778; --gold-strong: #f0d49a; color: #f4f1ea; }
:root[data-theme="light"] .service-detailing { background: linear-gradient(90deg, #0a0d12fc, #0a0d12c9), url("ndcar-showroom-hero.png") center 54% / cover; }

@media (max-width: 1240px) {
  :root[data-theme="light"] .main-nav { background: #fff; }
}
@media (max-width: 800px) {
  .hero-tools { align-items: flex-start; flex-wrap: wrap; gap: 20px; }
  .finance-help { width: 100%; }
}
@media (max-width: 720px) {
  .hero { min-height: 100svh; padding: 108px 0 80px; }
  .hero-tools { margin-bottom: 32px; }
  .finance-help { padding: 16px; gap: 14px; }
  .finance-help-copy > strong { font-size: 1rem; }
  .finance-help-action { font-size: .875rem; }
  .theme-switch { gap: 6px; }
  .site-header { grid-template-columns: minmax(0, 1fr) auto 38px; gap: 8px; padding: 0 16px; }
  .header-contact { grid-column: 2; grid-row: 1; margin-right: 0; }
  .menu-toggle { grid-column: 3; grid-row: 1; width: 38px; height: 38px; }
  .brand-mark, .site-header.is-scrolled .brand-mark { width: 38px; height: 38px; }
  .brand { gap: 6px; }
  .brand-copy strong { font-size: .8rem; }
  .messenger-links-small { gap: 4px; }
  .messenger-links-small .messenger { width: 36px; height: 36px; padding: 4px; }
  .messenger-links-small .messenger img { width: 26px; height: 26px; }
  :root[data-theme="light"] .hero-overlay { background: linear-gradient(180deg, #ffffff63, #ffffffdb 30%, #fffffffa 67%); }
  .contact-dialog { padding: 36px 20px 22px; }
}
@media (max-width: 370px) {
  .site-header { padding: 0 12px; gap: 6px; grid-template-columns: minmax(0, 1fr) auto 36px; }
  .brand-mark, .site-header.is-scrolled .brand-mark { width: 32px; height: 32px; }
  .brand-copy strong { font-size: .72rem; }
  .brand-copy small { font-size: .45rem; }
  .messenger-links-small .messenger { width: 32px; height: 34px; padding: 3px; }
  .messenger-links-small .messenger img { width: 24px; height: 24px; }
  .menu-toggle { width: 36px; }
  .finance-help-action { display: none; }
  .finance-help-topics { gap: 6px 10px; }
  .finance-help-topics > span + span { padding-left: 9px; }
}
