@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@800;900&family=Inter:wght@400;500&display=swap');

/* ==========================================================================
   BASE.CSS — structural layout only, shared by every base × every theme.
   Visual identity comes entirely from CSS custom properties (theme.css).
   Do not hardcode color/font/radius values in this file.
   ========================================================================== */

:root {
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-utility: 'Inter', system-ui, sans-serif;

  --color-bg: #FFFFFF;
  --color-surface: #F7F7F7;
  --color-text: #1A1A1A;
  --color-text-muted: #5B5B5B;
  --color-primary: #1A1A1A;
  --color-primary-text: #FFFFFF;
  --color-accent: #1A1A1A;
  --color-accent-2: #1A1A1A;
  --color-border: #E2E2E2;
  --color-warn-bg: #1A1A1A;
  --color-warn-text: #FFFFFF;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);

  --border-width: 1px;
  --container-width: 1180px;
  --transition: 200ms ease;
  --letter-spacing-eyebrow: 0.08em;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body { margin: 0; font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5em; color: var(--color-text); }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--color-accent); }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-family: var(--font-utility); text-transform: uppercase; letter-spacing: var(--letter-spacing-eyebrow); font-size: 0.8rem; font-weight: 600; color: var(--color-accent); margin: 0 0 0.75em; }

/* ---- Emergency / top banner ---- */
.emergency-banner { background: var(--color-warn-bg); color: var(--color-warn-text); font-family: var(--font-utility); }
.emergency-banner .container { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 24px; font-size: 0.88rem; text-align: center; flex-wrap: wrap; }
.emergency-banner a { color: var(--color-warn-text); font-weight: 700; text-decoration: underline; }

/* ---- Buttons ---- */
/* appearance:none + -webkit-appearance:none is the actual fix for the
   long-standing "shaded box with an outline" look: without it, Safari
   (desktop and especially iOS) renders its own native button chrome
   underneath/around any custom button styling -- a filled, bordered box
   that has nothing to do with focus state, loading state, or anything
   else -- it's just what a <button> looks like by default on that
   platform until you explicitly opt out. -webkit-tap-highlight-color
   removes the separate grey/blue flash box mobile browsers draw on tap. */
.btn {
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75em 1.4em;
  border-radius: var(--radius-sm);
  font-family: var(--font-utility);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: var(--border-width) solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), opacity var(--transition);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--color-primary); color: var(--color-primary-text); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-lg { padding: 0.95em 1.8em; font-size: 1.02rem; }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn:disabled { cursor: not-allowed; opacity: 0.6; box-shadow: none; transform: none; }

/* Loading spinner: a real child element (<span class="btn-spinner">,
   see contact_form() in build_bases.py), shown/hidden via the `hidden`
   attribute from JS -- not a ::before pseudo-element. A real element is
   simpler to get right under an appearance:none button and easier to
   debug (it shows up in devtools like anything else). */
.btn-spinner {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: lwl-btn-spin 0.6s linear infinite;
}
.btn-spinner[hidden] { display: none; }
@keyframes lwl-btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 1.5s; }
}

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-bg); border-bottom: var(--border-width) solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-text); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.logo-icon { width: 30px; height: 30px; color: var(--color-accent); flex-shrink: 0; }
.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; gap: 28px; }
.nav-list a { text-decoration: none; color: var(--color-text); font-family: var(--font-utility); font-weight: 500; font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color var(--transition), color var(--transition); }
.nav-list a:hover, .nav-list a[aria-current="page"] { border-color: var(--color-accent); color: var(--color-accent); }
.nav-toggle { display: none; background: none; border: none; padding: 6px; cursor: pointer; color: var(--color-text); }
.nav-toggle svg { width: 26px; height: 26px; }
.header-cta { flex-shrink: 0; }
.header-cta span { white-space: nowrap; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; order: 3; margin-left: 12px; }
  .logo { order: 1; }
  .header-cta { order: 2; }
  .main-nav { order: 3; }
  .nav-list { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--color-bg); border-bottom: var(--border-width) solid var(--color-border); max-height: 0; overflow: hidden; transition: max-height var(--transition); }
  .main-nav.open .nav-list { max-height: 400px; }
  .nav-list a { display: block; padding: 14px 24px; border-bottom: var(--border-width) solid var(--color-border); }
  .header-cta span { display: none; }
}

/* ---- Hero (split) ---- */
.hero { padding: 64px 0; background: var(--color-surface); }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-content h1 { margin-bottom: 0.4em; }
.hero-lede { font-size: 1.1rem; color: var(--color-text-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.5em 0; }
.hero-trust-list { display: flex; flex-wrap: wrap; gap: 20px; font-family: var(--font-utility); font-size: 0.9rem; color: var(--color-text-muted); }
.hero-trust-list li { display: flex; align-items: center; gap: 6px; }
.hero-trust-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); flex-shrink: 0; }
.hero-media-placeholder { aspect-ratio: 4/3; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--color-accent), var(--color-surface)); opacity: 0.85; display: flex; align-items: center; justify-content: center; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-media { order: -1; } }

/* ---- Hero (centered, for structural variety across bases) ---- */
.hero-centered { padding: 88px 0 72px; background: var(--color-surface); text-align: center; }
.hero-centered .container { max-width: 760px; }
.hero-centered .hero-lede { margin: 0 auto; }
.hero-centered .hero-actions { justify-content: center; }
.hero-centered .hero-trust-list { justify-content: center; }

/* ---- Sections / headings ---- */
.section { padding: 72px 0; }
.section-heading { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-lede { color: var(--color-text-muted); }
.section-cta { text-align: center; margin-top: 32px; }
.section-alt { background: var(--color-surface); }

/* ---- Grids & cards ---- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--color-bg); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-accent); margin-bottom: 16px; }
.card-icon svg { width: 24px; height: 24px; }
.card-link { display: inline-block; margin-top: 8px; font-family: var(--font-utility); font-weight: 600; text-decoration: none; color: var(--color-accent); }

/* ---- Badges ---- */
.badge-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--color-surface); border: var(--border-width) solid var(--color-border); font-family: var(--font-utility); font-size: 0.85rem; font-weight: 600; color: var(--color-text); }
.badge svg { width: 16px; height: 16px; color: var(--color-accent); }

/* ---- Process steps ---- */
.process-steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-step { position: relative; padding-top: 8px; }
.process-step::before { counter-increment: step; content: counter(step); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-accent); color: var(--color-primary-text); font-family: var(--font-display); font-weight: 700; margin-bottom: 14px; }
@media (max-width: 860px) { .process-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-steps { grid-template-columns: 1fr; } }

/* ---- Before / after ---- */
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.before-after-panel { border-radius: var(--radius-lg); padding: 28px; border: var(--border-width) solid var(--color-border); }
.before-after-panel.is-before { background: var(--color-surface); }
.before-after-panel.is-after { background: var(--color-bg); border-color: var(--color-accent); }
.before-after-label { font-family: var(--font-utility); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 10px; }
@media (max-width: 720px) { .before-after { grid-template-columns: 1fr; } }

/* ---- Pricing table ---- */
.pricing-table { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.pricing-tier { border: var(--border-width) solid var(--color-border); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.pricing-tier.is-featured { border-color: var(--color-accent); box-shadow: var(--shadow-md); }
.pricing-tier-name { font-family: var(--font-utility); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--color-text-muted); }
.pricing-tier-price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.pricing-tier-price span { font-size: 0.95rem; font-weight: 400; color: var(--color-text-muted); }
.pricing-tier-features { display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; flex-grow: 1; }
.pricing-tier-features li { display: flex; gap: 8px; }
.pricing-tier-features li::before { content: '✓'; color: var(--color-accent); flex-shrink: 0; }
@media (max-width: 860px) { .pricing-table { grid-template-columns: 1fr; } }

/* ---- Team grid ---- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card { text-align: center; }
.team-photo-placeholder { aspect-ratio: 1; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--color-accent), var(--color-surface)); opacity: 0.85; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; }
.placeholder-label { font-family: var(--font-utility); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.03em; text-align: center; color: var(--color-primary-text); background: rgba(0,0,0,0.35); padding: 6px 12px; border-radius: var(--radius-sm); }
.team-card h3 { margin-bottom: 2px; }
.team-role { font-family: var(--font-utility); font-size: 0.85rem; color: var(--color-text-muted); }
@media (max-width: 860px) { .team-grid { grid-template-columns: 1fr 1fr; } }

/* ---- FAQ ---- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; }
.faq-item { border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); padding: 6px 20px; background: var(--color-bg); }
.faq-item summary { cursor: pointer; font-family: var(--font-utility); font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--color-accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { color: var(--color-text-muted); padding-bottom: 16px; margin: 0; }

/* ---- Split feature row (about-story style, reused generically) ---- */
.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-row.is-reverse { direction: rtl; }
.split-row.is-reverse > * { direction: ltr; }
.split-media-placeholder { aspect-ratio: 4/3; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--color-surface), var(--color-accent)); opacity: 0.85; display: flex; align-items: center; justify-content: center; }
.split-text p { color: var(--color-text-muted); }
@media (max-width: 860px) { .split-row, .split-row.is-reverse { grid-template-columns: 1fr; direction: ltr; } }

/* ---- Stats band ---- */
.stats-band { background: var(--color-primary); color: var(--color-primary-text); padding: 48px 0; }
.stats-grid { text-align: center; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-number { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; }
.stat-label { font-family: var(--font-utility); font-size: 0.85rem; opacity: 0.85; }

/* ---- Reviews ---- */
.review-card { background: var(--color-surface); border-radius: var(--radius-lg); padding: 26px; margin: 0; border-left: 4px solid var(--color-accent); }
.review-card p { font-size: 1.02rem; margin-bottom: 14px; }
.review-card footer { font-family: var(--font-utility); font-size: 0.85rem; color: var(--color-text-muted); display: flex; flex-direction: column; gap: 2px; }
.review-card cite { font-style: normal; font-weight: 600; color: var(--color-text); }
.review-meta { opacity: 0.8; }

/* ---- CTA band ---- */
.cta-band { background: var(--color-surface); }
.cta-band-inner { text-align: center; max-width: 620px; margin: 0 auto; }
.cta-band-inner p { color: var(--color-text-muted); margin-bottom: 1.5em; }

/* ---- Footer ---- */
.site-footer { background: var(--color-primary); color: var(--color-primary-text); padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { color: var(--color-primary-text); opacity: 0.75; max-width: 34ch; }
.footer-brand .logo { color: var(--color-primary-text); }
.footer-brand .logo-icon { color: var(--color-primary-text); }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { font-family: var(--font-utility); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; margin-bottom: 14px; color: var(--color-primary-text); }
.footer-col li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-col a { color: var(--color-primary-text); text-decoration: none; opacity: 0.85; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { border-top: var(--border-width) solid rgba(255,255,255,0.15); padding: 20px 24px; text-align: center; font-size: 0.82rem; opacity: 0.7; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } .footer-nav { grid-template-columns: 1fr 1fr; } }

/* ---- Page header ---- */
.page-header { padding: 56px 0 24px; }
.page-header.is-centered { text-align: center; }
.page-header.is-centered .page-header-lede { margin: 0 auto; }
.page-header-lede { max-width: 60ch; color: var(--color-text-muted); font-size: 1.05rem; }

/* ---- Services page (row layout) ---- */
.service-row { display: grid; grid-template-columns: 64px 1fr 220px; gap: 28px; align-items: start; padding: 32px 0; border-bottom: var(--border-width) solid var(--color-border); }
.service-row:first-child { padding-top: 0; }
.service-row-icon { width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-accent); display: flex; align-items: center; justify-content: center; }
.service-row-icon svg { width: 28px; height: 28px; }
.service-row-body p { color: var(--color-text-muted); }
.service-features { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 0.92rem; }
.service-features li { display: flex; gap: 8px; align-items: baseline; }
.service-features li::before { content: '—'; color: var(--color-accent); flex-shrink: 0; }
.service-row-price { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; }
.price-from { font-size: 0.78rem; color: var(--color-text-muted); font-family: var(--font-utility); }
.price-amount { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.price-period { font-size: 0.9rem; font-weight: 400; color: var(--color-text-muted); }
@media (max-width: 720px) { .service-row { grid-template-columns: 1fr; } .service-row-price { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; } }

/* ---- Contact page (form-free: map + info) ---- */
.contact-grid { align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-info-block h3 { margin-bottom: 4px; font-size: 0.95rem; }
.contact-info-link { text-decoration: none; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--color-text); }
.hours-list li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: var(--border-width) dashed var(--color-border); font-size: 0.92rem; }
.map-embed-wrap { border-radius: var(--radius-lg); overflow: hidden; border: var(--border-width) solid var(--color-border); aspect-ratio: 16/10; }
.map-embed-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---- Contact form (emails the business via the gallery backend relay) ---- */
.contact-form-section { max-width: 640px; margin: 0 auto; }
.contact-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact-form .form-row { display: flex; flex-direction: column; gap: 6px; }
.contact-form label { font-family: var(--font-utility); font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted); }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--color-text); background: var(--color-surface);
  border: var(--border-width) solid var(--color-border); border-radius: var(--radius-sm); padding: 0.7em 0.9em; resize: vertical;
}
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
/* Neutralize the browser's own default :invalid styling (a box-shadow
   or outline that Firefox/Chrome apply automatically to any required-
   but-empty field, even with novalidate on the form -- novalidate only
   suppresses the popup bubble, not this default rendering). Without
   this override every empty required field shows a stray shaded/
   outlined box from the moment the page loads, regardless of anything
   in this file. Validity is communicated only through aria-invalid +
   .field-error below, both fully in our control. */
.contact-form input:invalid,
.contact-form textarea:invalid,
.contact-form input:-moz-ui-invalid,
.contact-form textarea:-moz-ui-invalid {
  box-shadow: none;
  outline: none;
}
.contact-form-submit { align-self: flex-start; }
.contact-form[hidden] { display: none; }
/* Field-level errors: an icon + a line of text sitting directly under
   the offending input, no background/border box. A "shaded box with an
   outline" reads as generic/wrong on half these themes (a boxed alert
   makes no sense next to e.g. neubrutalism's own thick-bordered
   elements, or a hairline-only theme like Swiss Minimalism) -- so this
   never draws its own surface at all. Color comes entirely from
   --color-text (body copy, same weight as a label) with the icon in
   --color-accent, so it always matches whatever palette the active
   theme defines -- nothing here is a fixed red/green. */
.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 0;
  font-family: var(--font-utility);
  font-size: 0.85rem;
  color: var(--color-text);
}
.field-error[hidden] { display: none; }
/* Real inline <svg> icon (see FIELD_ERROR_ICON in build_bases.py), not a
   CSS mask/background-image trick. The old approach painted the icon by
   masking a background-color through an SVG data-URI, gated behind an
   @supports(mask-image) check -- but some mobile browser engines report
   support for the property while still failing to clip it correctly,
   rendering a plain solid box instead of the icon shape (exactly the
   stray "shaded box" that check was meant to prevent). A real <svg>
   element has no such feature-detection gamble: it either renders as the
   icon it is, everywhere, or -- in a truly ancient browser with no SVG
   support at all -- collapses to nothing, never a wrong box. */
.field-error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--color-accent);
}
/* Percentage sizing on a nested <svg> inside a flex item is a known weak
   spot in several mobile engines (notably iOS Safari, some Android
   WebViews) -- they don't always resolve width/height:100% against the
   flex item's box reliably, and fall back to the SVG's undeclared
   intrinsic default size instead (historically ~300x150), which reads as
   a suddenly-huge icon. The <svg> tag itself now also carries explicit
   width="16" height="16" attributes (see FIELD_ERROR_ICON in
   build_bases.py) as the real fix -- markup attributes aren't subject to
   this percentage-resolution quirk at all, so this CSS rule is now just
   a belt-and-suspenders backstop, not the only thing holding the size.
   color: inherit is likewise explicit here rather than assumed: some of
   the same mobile engines don't reliably carry `color` from the wrapping
   span into stroke="currentColor" on a nested SVG without it being
   restated directly on the svg element. */
.field-error-icon svg { width: 100%; height: 100%; display: block; color: inherit; }
.contact-form-error { margin-top: 4px; }
.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] { border-color: var(--color-accent); }

/* Success view: the entire form is swapped out for this (see gallery.js),
   rather than stacking a banner above/below the still-visible form --
   the form has done its job, so nothing about it needs to stay on
   screen. Circle + check use --color-accent/--color-primary-text (the
   same pairing the primary button already uses for this theme), so it
   always reads as "this theme's own accent color," never a fixed green. */
.contact-form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0;
  text-align: center;
}
.contact-form-success[hidden] { display: none; }
.contact-form-success .success-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-form-success .success-check svg { width: 28px; height: 28px; }
.contact-form-success p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 700;
  color: var(--color-text);
}

/* ---- AI chat widget (only rendered when the business has AI enabled --
   see admin-settings.html / gallery_widgets, injected server-side by
   gallery.js) ---- */
#lwl-ai-widget { position: fixed; right: 20px; bottom: 20px; z-index: 200; font-family: var(--font-body); }
#lwl-ai-toggle {
  width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--color-primary); color: var(--color-primary-text);
  /* Deliberately NOT var(--shadow-md): themes like Neubrutalism use a hard,
     zero-blur offset-duplicate shadow that reads fine on rectangular cards
     but renders as a second solid circle behind this round button (looks
     like two stacked chat icons). Floating action controls keep their own
     soft, realistic shadow regardless of theme. */
  box-shadow: 0 4px 16px rgba(0,0,0,0.25); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform var(--transition);
}
#lwl-ai-toggle:hover { transform: translateY(-2px); }
#lwl-ai-panel {
  position: absolute; right: 0; bottom: 68px; width: min(340px, 88vw); max-height: 60vh; display: flex; flex-direction: column;
  background: var(--color-bg); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden;
}
#lwl-ai-panel[hidden] { display: none; }
#lwl-ai-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--color-primary); color: var(--color-primary-text); font-weight: 600; }
#lwl-ai-header button { background: none; border: none; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
#lwl-ai-messages { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.lwl-ai-msg { max-width: 85%; padding: 8px 12px; border-radius: var(--radius-md); font-size: 0.92rem; line-height: 1.4; }
.lwl-ai-msg.user { align-self: flex-end; background: var(--color-primary); color: var(--color-primary-text); }
.lwl-ai-msg.assistant { align-self: flex-start; background: var(--color-surface); color: var(--color-text); border: var(--border-width) solid var(--color-border); }
#lwl-ai-form { display: flex; gap: 8px; padding: 10px; border-top: var(--border-width) solid var(--color-border); }
#lwl-ai-input { flex: 1; font-family: var(--font-body); font-size: 0.92rem; padding: 0.6em 0.8em; border: var(--border-width) solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); }
#lwl-ai-input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
#lwl-ai-form button[type="submit"] { padding: 0.6em 1em; border-radius: var(--radius-sm); border: none; background: var(--color-primary); color: var(--color-primary-text); font-weight: 600; cursor: pointer; }
@media (max-width: 480px) { #lwl-ai-panel { width: calc(100vw - 24px); right: -8px; } }

/* ==== THEME: Exaggerated Minimalism ==== */

:root{
  --font-display:'Archivo',sans-serif; --font-body:'Inter',sans-serif; --font-utility:'Inter',sans-serif;
  --color-bg:#FFFFFF; --color-surface:#FAFAFA; --color-text:#000000; --color-text-muted:#4A4A4A;
  --color-primary:#000000; --color-primary-text:#FFFFFF; --color-accent:#FF4B1F; --color-border:#EAEAEA;
  --radius-sm:0px; --radius-md:0px; --radius-lg:0px;
  --shadow-sm:none; --shadow-md:none; --border-width:0px; --transition:180ms ease; --letter-spacing-eyebrow:0.15em;
}
h1{ font-weight:900; letter-spacing:-0.04em; text-transform:uppercase; }
.hero{ padding:96px 0; }
.card{ border:none; padding:0; box-shadow:none; }
.card:hover{ transform:none; }
.card-icon{ background:none; border-radius:0; }

