/* ==========================================================================
   Base stylesheet — shared foundation for all demo sites.
   Customize per-site by overriding the :root variables in css/theme.css.
   ========================================================================== */

:root {
  /* Brand colors (override in theme.css) */
  --c-primary: #1f4fd8;
  --c-primary-dark: #163aa3;
  --c-accent: #ffb703;
  --c-ink: #14161a;          /* main text */
  --c-muted: #5b6270;        /* secondary text */
  --c-bg: #ffffff;
  --c-surface: #f4f5f7;      /* alt section background */
  --c-dark: #111318;         /* dark sections / footer */
  --c-on-dark: #f3f4f6;
  --c-on-primary: #ffffff;
  --c-border: #e3e5ea;

  /* Typography (override in theme.css) */
  --f-head: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fw-head: 800;

  /* Layout */
  --container: 1180px;
  --gutter: 20px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(17, 19, 24, .08);
  --shadow-lg: 0 20px 50px rgba(17, 19, 24, .16);
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.65; color: var(--c-ink); background: var(--c-bg); overflow-x: hidden; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: var(--fw-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--alt { background: var(--c-surface); }
.section--dark { background: var(--c-dark); color: var(--c-on-dark); }
.section--dark .section-head p, .section--dark .muted { color: color-mix(in srgb, var(--c-on-dark) 75%, transparent); }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--c-muted); font-size: 1.1rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-primary); margin-bottom: .6em; }
.section--dark .eyebrow { color: var(--c-accent); }
.muted { color: var(--c-muted); }

.grid { display: grid; gap: 24px; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split--reverse > :first-child { order: 2; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--primary { background: var(--c-primary); color: var(--c-on-primary); box-shadow: 0 8px 20px color-mix(in srgb, var(--c-primary) 35%, transparent); }
.btn--primary:hover { background: var(--c-primary-dark); color: var(--c-on-primary); }
.btn--accent { background: var(--c-accent); color: var(--c-ink); }
.btn--accent:hover { color: var(--c-ink); filter: brightness(1.05); }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(255,255,255,.1); color: inherit; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--c-bg) 92%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--c-border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink); font-family: var(--f-head); font-weight: var(--fw-head); font-size: 1.15rem; line-height: 1.1; }
.brand:hover { color: var(--c-ink); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; align-items: center; }
.nav-links a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--c-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover { background: var(--c-surface); }
.nav-cta { display: none; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-bg); cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: var(--c-ink); position: relative; transition: transform .25s var(--ease), background .2s; content: ""; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: var(--nav-h) 0 auto 0; background: var(--c-bg); border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-lg); padding: 12px var(--gutter) 24px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s var(--ease); max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
.mobile-menu.is-open { transform: none; opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; margin: 0 0 16px; padding: 0; }
.mobile-menu a:not(.btn) { display: block; padding: 14px 4px; border-bottom: 1px solid var(--c-border); color: var(--c-ink); text-decoration: none; font-weight: 600; font-size: 1.1rem; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle, .mobile-menu { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--c-dark); overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10,12,16,.88) 0%, rgba(10,12,16,.65) 55%, rgba(10,12,16,.35) 100%); }
.hero-inner { padding: clamp(72px, 14vw, 150px) 0 clamp(64px, 10vw, 120px); max-width: 720px; }
.hero p.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: rgba(255,255,255,.88); max-width: 600px; }
.hero .btn-row { margin-top: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 32px; padding: 0; list-style: none; font-size: .95rem; color: rgba(255,255,255,.85); }
.hero-badges li { display: flex; align-items: center; gap: 8px; }
.hero-badges svg { width: 18px; height: 18px; color: var(--c-accent); flex: none; }

/* ---------- Cards ---------- */
.card { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s; height: 100%; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { margin-top: 4px; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-primary) 12%, transparent); color: var(--c-primary); margin-bottom: 16px; }
.card-icon svg { width: 26px; height: 26px; }
.card--media { padding: 0; overflow: hidden; }
.card--media img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card--media .card-body { padding: 24px; }
.section--dark .card { background: color-mix(in srgb, var(--c-on-dark) 6%, var(--c-dark)); border-color: rgba(255,255,255,.08); color: var(--c-on-dark); box-shadow: none; }

/* ---------- Stats / features ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat strong { display: block; font-family: var(--f-head); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: var(--fw-head); color: var(--c-primary); line-height: 1.1; }
.section--dark .stat strong { color: var(--c-accent); }
.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: 10px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%; background: var(--c-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------- Photo placeholder notice ---------- */
.photo-note { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .02em; background: #fff8db; color: #6b4e00; border: 1px dashed #d4a800; border-radius: 6px; padding: 4px 10px; margin-top: 10px; }
.media-frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.media-frame img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.media-frame .photo-note { position: absolute; left: 12px; bottom: 12px; margin: 0; }

/* ---------- Reviews / testimonials ---------- */
.quote { position: relative; }
.quote blockquote { margin: 0 0 16px; font-size: 1.05rem; }
.quote cite { font-style: normal; font-weight: 700; font-size: .95rem; }
.label-sample { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); background: var(--c-surface); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.stars { color: #f5a524; letter-spacing: 2px; font-size: 1.1rem; }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-sm); overflow: hidden; display: block; width: 100%; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s var(--ease); }
.gallery button:hover img { transform: scale(1.05); }
.lightbox { position: fixed; inset: 0; z-index: 500; background: rgba(8,9,12,.92); display: none; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 82vh; max-width: min(1100px, 100%); border-radius: var(--radius-sm); object-fit: contain; }
.lightbox-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; font-size: .95rem; padding: 0 60px; }
.lightbox-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox-btn:hover { background: rgba(255,255,255,.28); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Location / map ---------- */
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--c-border); background: var(--c-surface); }
.map-embed iframe { width: 100%; height: 380px; border: 0; }
.info-list { list-style: none; padding: 0; margin: 0 0 24px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.info-list svg { width: 22px; height: 22px; color: var(--c-primary); flex: none; margin-top: 3px; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.hours td:last-child { text-align: right; font-weight: 600; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-bg); min-height: 48px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 18%, transparent); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c62828; }
.field-error { display: none; color: #c62828; font-size: .875rem; margin-top: 6px; }
.field.has-error .field-error { display: block; }
.form-success { display: none; text-align: center; padding: 32px 16px; }
.form-success.is-visible { display: block; }
.form-success svg { width: 56px; height: 56px; color: #2e7d32; margin: 0 auto 12px; }
.form-card { background: var(--c-bg); color: var(--c-ink); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-lg); border: 1px solid var(--c-border); }

/* ---------- Demo badges ---------- */
.demo-tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: #ffe08a; color: #4a3600; border-radius: 4px; padding: 2px 8px; vertical-align: middle; }
.demo-banner { background: #1b1d22; color: #e8e8e8; font-size: .85rem; text-align: center; padding: 8px var(--gutter); }
.demo-banner a { color: #ffd166; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--c-primary); color: var(--c-on-primary); padding: clamp(48px, 7vw, 72px) 0; }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-dark); color: var(--c-on-dark); padding: 56px 0 28px; font-size: .95rem; }
.site-footer a { color: var(--c-on-dark); text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; color: var(--c-on-dark); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { font-size: 1rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; opacity: .7; font-size: .85rem; }

/* ---------- Sticky mobile call bar ---------- */
.call-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; background: var(--c-bg); border-top: 1px solid var(--c-border); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.call-bar .btn { min-height: 46px; padding: 10px 12px; font-size: .95rem; }
body.has-call-bar { padding-bottom: 70px; }
@media (min-width: 960px) { .call-bar { display: none; } body.has-call-bar { padding-bottom: 0; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
