/* All colors and fonts come from branding.json via CSS custom properties
   set in site.js. Change the config, not this file, to rebrand. */

:root {
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --ink: #1C1B17;
  --muted: #6B675C;
  --brand: #14342B;
  --accent: #D97D2E;
  --font-display: Georgia, serif;
  --font-body: system-ui, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }

/* The chat panel uses display:flex, which would override the browser's
   default [hidden] handling - this rule keeps hidden elements hidden. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

h1, h2 { font-family: var(--font-display); line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: 0.3em 0; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }

a { color: var(--brand); }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.12); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn-ghost { background: transparent; color: var(--brand); }
.btn-small { padding: 8px 14px; font-size: 0.9rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.header-row { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.site-nav { display: flex; gap: 18px; align-items: center; }
.site-nav a { text-decoration: none; font-weight: 500; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-logo {
  height: clamp(140px, 24vw, 210px);
  width: auto;
  /* Wide wordmark logos: cap the box at the viewport and letterbox inside
     it instead of forcing horizontal scroll. Squarish logos never hit the
     cap and render exactly as before. */
  max-width: 88vw;
  object-fit: contain;
  display: block;
  margin: 0 auto 18px;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.35));
}
.hero:has(.hero-logo) .wrap { text-align: center; }
.hero:has(.hero-logo) .hero-actions { justify-content: center; }
.hero.has-hero {
  background-image: linear-gradient(rgba(12, 10, 8, 0.62), rgba(12, 10, 8, 0.62)), var(--hero-image);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 104px 0 88px;
}
.hero.has-hero .lede { color: rgba(255, 255, 255, 0.88); }
.hero.has-hero .btn-ghost { color: #fff; border-color: #fff; }
.logo-img { height: 48px; width: auto; max-width: min(56vw, 300px); object-fit: contain; object-position: left center; display: block; }
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0;
}
/* No hours set: an empty eyebrow must render nothing — templates like
   sundae/marquee give it a background and border, which otherwise shows
   as a blank pill. */
.eyebrow:empty { display: none !important; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.contact-book { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Services */
.services { padding: 40px 0; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.service-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
}
.service-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.service-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Contact */
.contact { padding: 48px 0 72px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; }
.contact-details { color: var(--muted); }
.lead-form {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  gap: 14px;
}
.lead-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.lead-form .optional { font-weight: 400; color: var(--muted); }
.lead-form input, .lead-form textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  caret-color: var(--ink);
}
/* Keep typed + autofilled text readable on dark brand palettes:
   browsers force their own light autofill background unless overridden */
input, textarea, select {
  color: var(--ink);
  caret-color: var(--ink);
  background: var(--bg);
}
::placeholder { color: var(--muted); opacity: 1; }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  box-shadow: 0 0 0 1000px var(--bg) inset;
  transition: background-color 999999s ease-in-out 0s;
}
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-weight: 600; color: var(--brand); min-height: 1.2em; }

/* Footer */
.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  padding: 20px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Chat widget */
.chat-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  background: var(--accent); color: #fff;
  border: none; border-radius: 999px;
  padding: 13px 20px; font: inherit; font-weight: 700;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  cursor: pointer;
}
.chat-panel {
  position: fixed; right: 18px; bottom: 78px; z-index: 40;
  width: min(360px, calc(100vw - 36px));
  height: min(480px, 70vh);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-head {
  background: var(--brand); color: #fff;
  padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-close { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.msg { padding: 9px 12px; border-radius: 12px; max-width: 85%; font-size: 0.95rem; }
.msg-user { background: var(--brand); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.msg-bot { background: color-mix(in srgb, var(--ink) 7%, var(--surface)); justify-self: start; border-bottom-left-radius: 4px; }
.msg-typing { color: var(--muted); font-style: italic; }
.msg-bot a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.chat-form input { flex: 1; font: inherit; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 8px; }

.chat-note { margin: 0; padding: 0 12px 8px; font-size: 0.72rem; color: var(--muted); text-align: center; }

@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
  .site-nav a:not(.btn) { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero > .wrap { animation: rise 0.5s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Recommended links ring (optional module — configured via links_ring in branding.json) */
.links-ring { padding: 70px 0 60px; background: var(--surface); }
.links-head { text-align: center; }
.links-sub { color: var(--muted); margin-top: 0.2em; }
.lr-bleed { overflow: hidden; }
.lr-stage {
  position: relative;
  height: clamp(300px, 46vw, 400px);
  display: flex; align-items: center; justify-content: center;
  perspective: 1300px;
  touch-action: pan-y;
  cursor: grab; user-select: none; outline: none;
}
.lr-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); border-radius: var(--radius); }
.lr-stage.dragging { cursor: grabbing; }
.lr-ring {
  position: relative;
  width: var(--lr-card-w, 300px); height: var(--lr-card-h, 220px);
  transform-style: preserve-3d;
}
.lr-card {
  position: absolute; inset: 0;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
  overflow: hidden;
  will-change: filter, opacity;
}
.lr-chrome {
  height: 28px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 11px;
  background: rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.lr-chrome i { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,0.16); }
.lr-chrome .lr-url {
  font-size: 0.66rem; color: var(--muted);
  margin-left: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lr-art {
  position: absolute; inset: 28px 0 0 0;
  background-size: cover; background-position: top center;
  background-color: var(--bg);
}
.lr-panel { text-align: center; }
.lr-panel h3 { font-family: var(--font-display); font-size: 1.4rem; margin: 0.8em 0 0.2em; }
.lr-panel p { margin: 0.3em 0 1em; color: var(--muted); min-height: 1.6em; }
.lr-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 1.1rem; }
.lr-nav button {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: 2px solid var(--brand); color: var(--brand);
  font: inherit; cursor: pointer;
}
.lr-nav button:hover { background: var(--brand); color: #fff; }
.lr-dots { display: flex; gap: 7px; }
.lr-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(0,0,0,0.18);
  transition: background 0.3s, transform 0.3s;
}
.lr-dots i.on { background: var(--accent); transform: scale(1.35); }
@media (max-width: 640px) {
  .lr-ring { --lr-card-w: 220px; --lr-card-h: 168px; }
  .lr-stage { perspective: 950px; }
}

/* Event banner + events module (optional — configured via events.json) */
.event-banner {
  position: sticky; top: 0; z-index: 60;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.eb-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.eb-text { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.eb-count { font-variant-numeric: tabular-nums; opacity: 0.92; font-size: 0.92rem; }
.eb-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.event-banner .btn { background: var(--accent); border-color: var(--accent); }
.eb-close {
  background: none; border: none; color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px 8px; opacity: 0.8;
}
.eb-close:hover { opacity: 1; }

.events { padding: 70px 0 60px; }
.event-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  margin-top: 22px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.event-card h3 { font-family: var(--font-display); margin: 0 0 4px; font-size: 1.45rem; }
.event-when { color: var(--accent); font-weight: 600; margin: 0 0 2px; }
.event-where { color: var(--muted); margin: 0 0 10px; }
.event-desc { margin: 0 0 16px; }
.event-meta { color: var(--muted); font-size: 0.88rem; margin: 0 0 14px; }
.rsvp-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.rsvp-form label { display: block; font-size: 0.85rem; font-weight: 600; }
.rsvp-form .rsvp-check { display: flex; gap: 8px; align-items: center; font-weight: 500; grid-column: 1 / -1; }
.rsvp-form .rsvp-check input { width: 18px; height: 18px; margin: 0; }
.rsvp-form input,
.rsvp-form select {
  width: 100%; margin-top: 4px;
  padding: 10px 12px; font: inherit;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: var(--radius);
  background: var(--bg);
}
.rsvp-status { grid-column: 1 / -1; margin: 6px 0 0; font-weight: 600; min-height: 1.4em; }
.event-past { opacity: 0.65; }
@media (max-width: 640px) {
  .rsvp-form { grid-template-columns: 1fr; }
  .eb-row { flex-wrap: wrap; }
}

.rsvp-qty select {
  width: 100%; margin-top: 4px;
  padding: 10px 12px; font: inherit;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: var(--radius);
  background: var(--bg);
}
@media (min-width: 641px) {
  .rsvp-form { grid-template-columns: 1fr 1fr minmax(90px, auto) auto; }
}

/* Demo-site badge (shown only when demo_badge: true in branding.json) */
.demo-badge {
  background: color-mix(in srgb, var(--ink) 92%, var(--bg));
  color: var(--bg);
  font-size: 0.92rem;
  padding: 14px 0;
  text-align: center;
}
.demo-badge a { color: inherit; font-weight: 700; white-space: nowrap; }
/* Second line: the dashboard peek. Deliberately quieter than the first line —
   it's scaffolding around the demo, not a feature of the business's own site. */
.demo-badge-peek {
  display: block;
  margin-top: 6px;
  font-size: 0.85em;
  opacity: 0.78;
}
.demo-badge-peek a { text-decoration: underline; text-underline-offset: 2px; }
.demo-badge-peek code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.94em;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 22%, transparent);
}

/* Location map (optional module — configured via location_map in branding.json) */
.location { padding: 70px 0 10px; }
.loc-note { color: var(--muted); margin: -6px 0 18px; }
.loc-frame {
  border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  aspect-ratio: 16 / 9;
}
.loc-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.loc-address { margin-top: 12px; font-size: 0.95rem; }
@media (max-width: 640px) { .loc-frame { aspect-ratio: 4 / 3; } }

/* Video testimonials (optional module — configured via testimonials in branding.json) */
.testimonials { padding: 70px 0 40px; }
.tm-sub { color: var(--muted); margin: -6px 0 8px; }
.tm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 320px));
  justify-content: center;
  gap: 22px; margin-top: 20px;
}
.tm-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.tm-video { position: relative; aspect-ratio: 9 / 16; background: #000; cursor: pointer; }
.tm-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-video .tm-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.tm-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.18); border: none; cursor: pointer; transition: background 0.2s;
}
.tm-play:hover { background: rgba(0,0,0,0.05); }
.tm-play::before {
  content: ""; width: 62px; height: 62px; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  position: absolute;
}
.tm-play::after {
  content: ""; position: relative; left: 3px;
  border-style: solid; border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--brand);
}
.tm-play[hidden] { display: none; }
.tm-body { padding: 14px 16px 16px; }
.tm-name { font-weight: 700; }
.tm-context { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }

/* Add-to-calendar row */
.event-cal, .t-cal {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline;
  font-size: 0.88rem; margin: 10px 0 0;
}
.cal-label { color: var(--muted); }
.cal-link {
  color: var(--brand); text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}
.cal-link:hover { color: var(--accent); }
.t-cal { justify-content: center; margin-top: 18px; }

.site-footer .social-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 12px 0 0; }
.site-footer .social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); color: var(--ink);
}
.site-footer .social-row a svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.site-footer .social-row a:hover { border-color: var(--accent); color: var(--accent); }
/* When the floating chat button is on, give the footer room so it never
   covers the social icons or privacy link. */
body.has-chat .site-footer { padding-bottom: 88px; }
.site-footer .footer-links { margin: 10px 0 0; font-size: 0.8rem; }

/* FAQ accordion */
.faq { padding: 40px 0; }
.faq-item { border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); padding: 4px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; position: relative; padding-right: 28px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; color: var(--brand); font-weight: 700; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0 0 14px; color: var(--muted); }

/* =====================================================================
   Templates (Phase: multi-template)
   A template is STRUCTURE ONLY: layout, type treatment, button and card
   shapes. It never sets the six color roles or the font families — those
   are inline CSS variables from the client's own branding, which always
   win. site.js sets body[data-template] from branding.template; no
   template key = the classic look above, byte-for-byte unchanged.
   ===================================================================== */

/* Panel hero (storefront, ledger, lantern, sundae): the hero photo shows
   as a framed panel under the text instead of a full-bleed background,
   so the section keeps the client's page colors. Marquee keeps full-bleed. */
body[data-template="storefront"] .hero.has-hero,
body[data-template="ledger"] .hero.has-hero,
body[data-template="lantern"] .hero.has-hero,
body[data-template="sundae"] .hero.has-hero {
  background-image: none;
  color: var(--ink);
  padding: 64px 0 56px;
}
body[data-template="storefront"] .hero.has-hero .lede,
body[data-template="ledger"] .hero.has-hero .lede,
body[data-template="lantern"] .hero.has-hero .lede,
body[data-template="sundae"] .hero.has-hero .lede { color: var(--muted); }
body[data-template="storefront"] .hero.has-hero .btn-ghost,
body[data-template="ledger"] .hero.has-hero .btn-ghost,
body[data-template="lantern"] .hero.has-hero .btn-ghost,
body[data-template="sundae"] .hero.has-hero .btn-ghost { color: var(--brand); border-color: var(--brand); }
body[data-template="storefront"] .hero.has-hero .wrap::after,
body[data-template="ledger"] .hero.has-hero .wrap::after,
body[data-template="lantern"] .hero.has-hero .wrap::after,
body[data-template="sundae"] .hero.has-hero .wrap::after {
  content: "";
  display: block;
  margin-top: 34px;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
}

/* ---- Storefront: warm, friendly, rounded ---- */
body[data-template="storefront"] { --radius: 16px; }
body[data-template="storefront"] .btn { border-radius: 999px; }
body[data-template="storefront"] .eyebrow { letter-spacing: 0.12em; }
body[data-template="storefront"] .service-card {
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 8%, transparent);
}
body[data-template="storefront"] .event-card,
body[data-template="storefront"] .tm-card {
  box-shadow: 0 10px 26px color-mix(in srgb, var(--ink) 9%, transparent);
}
body[data-template="storefront"] .hero.has-hero .wrap::after {
  aspect-ratio: 5 / 3;
  box-shadow: 0 16px 38px color-mix(in srgb, var(--ink) 16%, transparent);
}

/* ---- Marquee: bold poster, full-bleed hero ---- */
body[data-template="marquee"] { --radius: 0px; }
body[data-template="marquee"] .wordmark { text-transform: uppercase; letter-spacing: 0.06em; }
body[data-template="marquee"] h1 {
  text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  letter-spacing: -0.01em;
}
body[data-template="marquee"] h2 { text-transform: uppercase; letter-spacing: 0.02em; }
body[data-template="marquee"] .eyebrow {
  background: var(--brand);
  color: #fff;
  display: inline-block;
  padding: 5px 12px;
}
body[data-template="marquee"] .hero { padding: 96px 0 72px; }
body[data-template="marquee"] .hero.has-hero {
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 84px;
  background-image: linear-gradient(180deg, rgba(10, 10, 12, 0.25), rgba(10, 10, 12, 0.82)), var(--hero-image);
}
body[data-template="marquee"] .hero.has-hero .eyebrow { background: var(--accent); }
body[data-template="marquee"] .service-card {
  border: 2px solid color-mix(in srgb, var(--ink) 70%, transparent);
  box-shadow: none;
}
body[data-template="marquee"] .event-card {
  border: 2px solid color-mix(in srgb, var(--ink) 70%, transparent);
  box-shadow: none;
}

/* ---- Ledger: quiet editorial, hairline rules ---- */
body[data-template="ledger"] { --radius: 2px; }
body[data-template="ledger"] .site-header { background: var(--bg); backdrop-filter: none; }
body[data-template="ledger"] .header-row {
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
}
body[data-template="ledger"] .hero .wrap { text-align: center; }
body[data-template="ledger"] .hero-actions { justify-content: center; }
body[data-template="ledger"] .lede { margin-left: auto; margin-right: auto; }
body[data-template="ledger"] h1 { font-weight: 500; font-size: clamp(2.3rem, 6.5vw, 3.8rem); }
body[data-template="ledger"] .eyebrow { color: var(--muted); letter-spacing: 0.22em; font-weight: 600; }
body[data-template="ledger"] .btn { border-radius: 0; }
body[data-template="ledger"] .service-card {
  background: transparent;
  border: none;
  border-top: 1px solid var(--ink);
  border-radius: 0;
  padding: 18px 4px 0;
}
body[data-template="ledger"] .event-card {
  box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
}
body[data-template="ledger"] .links-ring { background: transparent; }
body[data-template="ledger"] .hero.has-hero .wrap::after {
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 0;
  aspect-ratio: 21 / 9;
}

/* ---- Lantern: dark-friendly, warm glow (glow tints from the accent) ---- */
body[data-template="lantern"] { --radius: 14px; }
body[data-template="lantern"] .hero { position: relative; overflow: hidden; }
body[data-template="lantern"] .hero .wrap { text-align: center; position: relative; }
body[data-template="lantern"] .hero-actions { justify-content: center; }
body[data-template="lantern"] .lede { margin-left: auto; margin-right: auto; }
body[data-template="lantern"] .hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%);
  pointer-events: none;
}
body[data-template="lantern"] .btn {
  border-radius: 999px;
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 38%, transparent);
}
body[data-template="lantern"] .btn-ghost { box-shadow: none; }
body[data-template="lantern"] .service-card {
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
body[data-template="lantern"] .hero.has-hero .wrap::after {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 42px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ---- Sundae: playful, chunky borders, sticker energy ---- */
body[data-template="sundae"] { --radius: 22px; }
body[data-template="sundae"] .hero .wrap { text-align: center; }
body[data-template="sundae"] .hero-actions { justify-content: center; }
body[data-template="sundae"] .lede { margin-left: auto; margin-right: auto; }
body[data-template="sundae"] .eyebrow {
  background: color-mix(in srgb, var(--accent) 32%, var(--surface));
  color: var(--ink);
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}
body[data-template="sundae"] .btn {
  border-radius: 16px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
body[data-template="sundae"] .btn:hover {
  filter: none;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
body[data-template="sundae"] .btn-ghost { background: var(--surface); color: var(--ink); }
body[data-template="sundae"] .service-card,
body[data-template="sundae"] .event-card,
body[data-template="sundae"] .tm-card,
body[data-template="sundae"] .lead-form {
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 color-mix(in srgb, var(--ink) 14%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  body[data-template="sundae"] .service-grid .service-card:nth-child(2n) { transform: rotate(0.5deg); }
  body[data-template="sundae"] .service-grid .service-card:nth-child(2n + 1) { transform: rotate(-0.5deg); }
}
body[data-template="sundae"] .hero.has-hero .wrap::after {
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
  transform: rotate(-1.5deg);
  margin-top: 40px;
}

/* Panel hero for the second template wave (split, editorial, mono, haven,
   headline): photo as a framed panel, page keeps the client's colors.
   Glass keeps a full-bleed hero like marquee. */
body[data-template="split"] .hero.has-hero,
body[data-template="editorial"] .hero.has-hero,
body[data-template="mono"] .hero.has-hero,
body[data-template="haven"] .hero.has-hero,
body[data-template="headline"] .hero.has-hero {
  background-image: none;
  color: var(--ink);
  padding: 64px 0 56px;
}
body[data-template="split"] .hero.has-hero .lede,
body[data-template="editorial"] .hero.has-hero .lede,
body[data-template="mono"] .hero.has-hero .lede,
body[data-template="haven"] .hero.has-hero .lede,
body[data-template="headline"] .hero.has-hero .lede { color: var(--muted); }
body[data-template="split"] .hero.has-hero .btn-ghost,
body[data-template="editorial"] .hero.has-hero .btn-ghost,
body[data-template="mono"] .hero.has-hero .btn-ghost,
body[data-template="haven"] .hero.has-hero .btn-ghost,
body[data-template="headline"] .hero.has-hero .btn-ghost { color: var(--brand); border-color: var(--brand); }
body[data-template="split"] .hero.has-hero .wrap::after,
body[data-template="editorial"] .hero.has-hero .wrap::after,
body[data-template="mono"] .hero.has-hero .wrap::after,
body[data-template="haven"] .hero.has-hero .wrap::after,
body[data-template="headline"] .hero.has-hero .wrap::after {
  content: "";
  display: block;
  margin-top: 34px;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
}

/* ---- Split: photo beside the words, half-and-half hero ---- */
body[data-template="split"] { --radius: 10px; }
@media (min-width: 761px) {
  body[data-template="split"] .hero.has-hero .wrap {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    column-gap: 44px;
    align-items: center;
  }
  body[data-template="split"] .hero.has-hero .wrap > * { grid-column: 1; }
  body[data-template="split"] .hero.has-hero .wrap::after {
    grid-column: 2;
    grid-row: 1 / span 8;
    margin-top: 0;
    aspect-ratio: auto;
    align-self: stretch;
    min-height: 380px;
    box-shadow: 0 14px 34px color-mix(in srgb, var(--ink) 14%, transparent);
  }
}
body[data-template="split"] .service-card {
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}
body[data-template="split"] .event-card,
body[data-template="split"] .tm-card {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 8%, transparent);
}

/* ---- Editorial: magazine rules, numbered services ---- */
body[data-template="editorial"] { --radius: 2px; }
body[data-template="editorial"] .site-header { background: var(--bg); backdrop-filter: none; }
body[data-template="editorial"] .header-row {
  border-bottom: 3px solid var(--ink);
  padding-bottom: 12px;
}
body[data-template="editorial"] .eyebrow {
  color: var(--brand);
  letter-spacing: 0.3em;
  font-weight: 700;
}
body[data-template="editorial"] h1 { font-weight: 700; letter-spacing: -0.015em; }
body[data-template="editorial"] h2 {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  padding-bottom: 10px;
}
body[data-template="editorial"] .btn { border-radius: 0; }
body[data-template="editorial"] .service-grid { counter-reset: ed-svc; }
body[data-template="editorial"] .service-card {
  background: transparent;
  border: none;
  border-top: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: 0;
  padding: 16px 4px 0;
  counter-increment: ed-svc;
}
body[data-template="editorial"] .service-card::before {
  content: counter(ed-svc, decimal-leading-zero);
  display: block;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}
body[data-template="editorial"] .event-card {
  box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
}
body[data-template="editorial"] .links-ring { background: transparent; }
body[data-template="editorial"] .hero.has-hero .wrap::after {
  border-top: 6px solid var(--brand);
  border-radius: 0;
  aspect-ratio: 3 / 2;
}

/* ---- Mono: hard edges, drafting-table energy ---- */
body[data-template="mono"] { --radius: 0px; }
body[data-template="mono"] .site-header {
  border-bottom: 2px solid var(--ink);
  background: var(--bg);
  backdrop-filter: none;
}
body[data-template="mono"] .wordmark { letter-spacing: 0.08em; }
body[data-template="mono"] .eyebrow {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 3px 10px;
  letter-spacing: 0.18em;
}
body[data-template="mono"] h2::before { content: "/ "; color: var(--brand); }
body[data-template="mono"] .btn {
  border-radius: 0;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
body[data-template="mono"] .btn:hover {
  filter: none;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
body[data-template="mono"] .btn-ghost { background: var(--surface); color: var(--ink); }
body[data-template="mono"] .service-card,
body[data-template="mono"] .event-card,
body[data-template="mono"] .tm-card,
body[data-template="mono"] .lead-form {
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}
body[data-template="mono"] .links-ring { background: transparent; }
body[data-template="mono"] .hero.has-hero .wrap::after {
  border: 2px solid var(--ink);
  border-radius: 0;
}

/* ---- Haven: airy, centered, soft ---- */
body[data-template="haven"] { --radius: 18px; }
body[data-template="haven"] .hero { padding: 96px 0 72px; }
body[data-template="haven"] .hero .wrap { text-align: center; }
body[data-template="haven"] .hero-actions { justify-content: center; }
body[data-template="haven"] .lede { margin-left: auto; margin-right: auto; }
body[data-template="haven"] h1 { font-weight: 400; }
body[data-template="haven"] .eyebrow { color: var(--muted); letter-spacing: 0.26em; }
body[data-template="haven"] .btn { border-radius: 999px; }
body[data-template="haven"] .service-card,
body[data-template="haven"] .event-card,
body[data-template="haven"] .tm-card {
  border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--ink) 7%, transparent);
}
body[data-template="haven"] .hero.has-hero .wrap::after {
  border-radius: 26px;
  box-shadow: 0 22px 48px color-mix(in srgb, var(--ink) 12%, transparent);
  margin-top: 42px;
}

/* ---- Glass: full-bleed photo, frosted panels ---- */
body[data-template="glass"] { --radius: 16px; }
body[data-template="glass"] .hero.has-hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 110px 0 80px;
  background-image: linear-gradient(180deg, rgba(8, 10, 16, 0.4), rgba(8, 10, 16, 0.7)), var(--hero-image);
}
body[data-template="glass"] .hero.has-hero .wrap {
  background: color-mix(in srgb, var(--surface) 24%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 34px 30px;
}
body[data-template="glass"] .btn { border-radius: 12px; }
body[data-template="glass"] .service-card,
body[data-template="glass"] .event-card,
body[data-template="glass"] .tm-card {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

/* ---- Headline: the name is the hero ---- */
body[data-template="headline"] { --radius: 4px; }
body[data-template="headline"] .hero { padding: 84px 0 56px; }
body[data-template="headline"] h1 {
  font-size: clamp(2.9rem, 11vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
body[data-template="headline"] .eyebrow {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.28em;
}
body[data-template="headline"] h2 {
  border-top: 4px solid var(--ink);
  padding-top: 16px;
}
body[data-template="headline"] .btn {
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
body[data-template="headline"] .service-card {
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  box-shadow: none;
}
body[data-template="headline"] .event-card { box-shadow: none; border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
body[data-template="headline"] .hero.has-hero .wrap::after {
  aspect-ratio: 21 / 7;
  margin-top: 38px;
}

/* ---------------------------------------------------------------------------
   Shop + cart (Pro store module). Cards reuse the event-card recipe so the
   templates' surface/radius/accent variables re-skin them automatically. */
.shop { padding: 56px 0 48px; }
.shop-ship-note { color: var(--muted); margin: 2px 0 0; }
.shop-success { color: var(--accent); font-weight: 600; margin: 10px 0 0; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.shop-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}
.shop-art {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: color-mix(in srgb, var(--ink) 6%, var(--surface));
}
.shop-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shop-body h3 { margin: 0; font-size: 1.05rem; }
.shop-price { margin: 0; color: var(--accent); font-weight: 700; }
.shop-desc { margin: 0; color: var(--muted); font-size: 0.92rem; }
.shop-tag { margin: 0; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.shop-add { margin-top: auto; align-self: start; }
.shop-more-row { text-align: center; margin: 22px 0 0; }

/* Cart pill: bottom-left so it never fights the chat bubble (bottom-right) */
.cart-pill {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 60;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: 600 0.95rem/1 var(--font-body, system-ui);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.cart-pill:hover { filter: brightness(1.08); }
body.has-cart .site-footer { padding-bottom: 88px; }

.cart-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,0.45);
}
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 71;
  width: min(380px, 92vw);
  background: var(--surface);
  color: var(--ink);
  border-left: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  box-shadow: -12px 0 40px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.cart-head h3 { margin: 0; font-size: 1.15rem; }
.cart-close {
  background: none; border: 0; color: var(--ink);
  font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 8px; opacity: 0.75;
}
.cart-close:hover { opacity: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-empty { color: var(--muted); }
.cart-row { padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.cart-row-info { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.cart-row-controls { display: flex; align-items: center; gap: 10px; }
.cart-row-controls button {
  background: color-mix(in srgb, var(--ink) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 8px;
  color: var(--ink);
  width: 30px; height: 30px;
  font: 700 1rem/1 var(--font-body, system-ui);
  cursor: pointer;
}
.cart-row-controls .cart-rm {
  width: auto; padding: 0 10px; margin-left: auto;
  font-weight: 500; font-size: 0.82rem; color: var(--muted);
  background: none; border: 0;
}
.cart-row-controls .cart-rm:hover { color: var(--ink); text-decoration: underline; }
.cart-foot { padding: 14px 20px 18px; border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.cart-subtotal { display: flex; justify-content: space-between; margin: 0 0 6px; }
.cart-shipline { margin: 0 0 10px; color: var(--muted); font-size: 0.88rem; }
.cart-checkout { width: 100%; }
.cart-status { margin: 8px 0 0; font-weight: 600; min-height: 1.3em; }
