/* ==========================================================================
   Site Builder — the PUBLIC website stylesheet.
   Everything a visitor sees. Kept entirely separate from app.css, which dresses
   the admin: the two share a page on no route, and a shared class would let a
   dashboard tweak silently restyle a paying customer's live site.

   Two tokens come from the page, both validated before they are injected:
     --sb-accent  (App\Site\Site::accent — hex only)
     --sb-font    (App\Site\Site::font  — from a fixed list)

   Mobile-first. Nothing here relies on an inline style, because an inline style
   outranks every media query in this file.
   ========================================================================== */

:root {
  --sb-accent: #0f172a;
  --sb-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --sb-ink: #0f172a;
  --sb-ink-2: #475569;
  --sb-ink-3: #64748b;
  --sb-bg: #ffffff;
  --sb-bg-2: #f8fafc;
  --sb-bg-3: #f1f5f9;
  --sb-line: #e2e8f0;
  --sb-radius: 14px;
  --sb-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --sb-gap: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

body.sb-site {
  margin: 0;
  font-family: var(--sb-font);
  color: var(--sb-ink);
  background: var(--sb-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sb-site img { max-width: 100%; height: auto; display: block; }

/* ⚠️ SPECIFICITY MATTERS HERE, AND IT BIT US ONCE.
   This was `body.sb-site a`, which scores 0,0,1,2 — higher than a single class.
   Every .sb-btn and every footer link therefore took the ACCENT colour instead of
   their own: the hero button rendered as a solid blue rectangle with invisible
   blue text, and the dark footer's links were unreadable navy-on-navy. Nothing
   errored, every page was a 200, and only a screenshot showed it.
   So the generic link rule is deliberately ONE class (0,0,1,1), and anything that
   overrides it is qualified with `a` to match and win on source order. */
.sb-site a { color: var(--sb-accent); text-decoration: none; }
.sb-site a:hover { text-decoration: underline; }

a.sb-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--sb-accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
a.sb-skip:focus { left: 0; }

/* ---- layout primitives -------------------------------------------------- */
.sb-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.sb-wrap-slim { max-width: 760px; }
.sb-sec { padding: 48px 0; }
.sb-sec + .sb-sec { border-top: 0; }

/* ---- header ------------------------------------------------------------- */
.sb-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--sb-line);
}
.sb-head-in { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }

a.sb-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--sb-ink); min-width: 0; }
a.sb-brand:hover { text-decoration: none; }
.sb-brand img { max-height: 40px; width: auto; }
.sb-brand-mark {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  background: var(--sb-accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 18px;
}
.sb-brand-text { display: flex; flex-direction: column; min-width: 0; }
.sb-brand-text b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-brand-text small { font-size: 11.5px; color: var(--sb-ink-3); line-height: 1.3; }

.sb-navtoggle {
  border: 1px solid var(--sb-line); background: #fff; color: var(--sb-ink);
  width: 40px; height: 40px; border-radius: 10px; font-size: 20px; cursor: pointer;
  display: grid; place-items: center;
}

.sb-nav { display: none; width: 100%; flex-direction: column; gap: 2px; padding: 8px 0 14px; }
.sb-nav.is-open { display: flex; }
.sb-nav a, .sb-nav a:link {
  color: var(--sb-ink-2); font-weight: 500; font-size: 15px;
  padding: 10px 12px; border-radius: 9px;
}
.sb-nav a:hover { background: var(--sb-bg-3); text-decoration: none; color: var(--sb-ink); }
.sb-nav a.is-here { color: var(--sb-accent); background: var(--sb-bg-3); font-weight: 600; }
.sb-nav-cta {
  background: var(--sb-accent) !important; color: #fff !important;
  text-align: center; font-weight: 600 !important; margin-top: 6px;
}

@media (min-width: 900px) {
  .sb-navtoggle { display: none; }
  .sb-nav { display: flex !important; flex-direction: row; align-items: center; width: auto; padding: 0; gap: 4px; }
  .sb-nav-cta { margin-top: 0; margin-left: 8px; padding: 9px 16px !important; }
}

/* ---- typography --------------------------------------------------------- */
.sb-h1 {
  font-size: clamp(28px, 6vw, 46px); line-height: 1.15; letter-spacing: -.02em;
  font-weight: 800; margin: 0 0 14px;
}
.sb-h2 {
  font-size: clamp(22px, 4vw, 32px); line-height: 1.25; letter-spacing: -.015em;
  font-weight: 700; margin: 0 0 12px;
}
.sb-h2-sm { font-size: clamp(15px, 2vw, 17px); font-weight: 600; color: var(--sb-ink-3); text-transform: uppercase; letter-spacing: .08em; }
.sb-lead { font-size: clamp(16px, 2.4vw, 19px); color: var(--sb-ink-2); margin: 0 0 22px; }
.sb-sub { font-size: 16px; color: var(--sb-ink-2); margin: 0 0 24px; }
.sb-body { font-size: 16.5px; color: var(--sb-ink-2); }

/* ---- buttons ------------------------------------------------------------ */
.sb-btn, a.sb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--sb-accent); color: #fff; font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, opacity .12s ease;
}
.sb-btn:hover, a.sb-btn:hover { text-decoration: none; opacity: .92; transform: translateY(-1px); }
.sb-btn-lg, a.sb-btn-lg { padding: 14px 28px; font-size: 16px; }

/* ---- hero --------------------------------------------------------------- */
.sb-hero {
  background: var(--sb-bg-2) center / cover no-repeat;
  padding: 64px 0; position: relative; text-align: center;
}
.sb-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .92));
}
.sb-hero-plain::before { display: none; }
.sb-hero-in { position: relative; max-width: 780px; }
.sb-owner-hint { margin-top: 28px; font-size: 13px; }
.sb-owner-hint a { color: var(--sb-ink-3); }

@media (min-width: 768px) { .sb-hero { padding: 96px 0; } }

/* ---- banner ------------------------------------------------------------- */
.sb-banner { background: var(--sb-bg-2); }
.sb-banner-in {
  display: flex; flex-direction: column; gap: 18px; align-items: flex-start;
  background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius);
  padding: 28px; box-shadow: var(--sb-shadow);
}
.sb-banner-in .sb-h2, .sb-banner-in .sb-sub { margin-bottom: 0; }
@media (min-width: 768px) {
  .sb-banner-in { flex-direction: row; align-items: center; justify-content: space-between; padding: 34px 38px; }
}

/* ---- cards / grid ------------------------------------------------------- */
.sb-grid { display: grid; grid-template-columns: 1fr; gap: var(--sb-gap); }
@media (min-width: 640px) { .sb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .sb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.sb-card {
  background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius);
  padding: 22px; display: flex; flex-direction: column; gap: 8px;
  min-width: 0; /* without this a long word stops the card shrinking in its grid track */
}
.sb-card b { font-size: 16.5px; font-weight: 700; }
.sb-card small { font-size: 14.5px; color: var(--sb-ink-2); line-height: 1.6; }
.sb-ic {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--sb-bg-3); color: var(--sb-accent); font-size: 21px; margin-bottom: 4px;
}

/* ---- stats -------------------------------------------------------------- */
.sb-stats { background: var(--sb-bg-2); }
.sb-stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sb-gap); }
@media (min-width: 768px) { .sb-stat-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.sb-stat { text-align: center; padding: 18px 10px; min-width: 0; }
.sb-stat .v { display: block; font-size: clamp(26px, 5vw, 38px); font-weight: 800; color: var(--sb-accent); letter-spacing: -.02em; }
.sb-stat .l { display: block; font-size: 14px; color: var(--sb-ink-2); margin-top: 4px; }

/* ---- steps -------------------------------------------------------------- */
.sb-step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.sb-step-list li { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.sb-step-list .n {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sb-accent); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
}
.sb-step-list b { display: block; font-size: 16.5px; }
.sb-step-list small { display: block; font-size: 14.5px; color: var(--sb-ink-2); line-height: 1.6; }

/* ---- how it works ------------------------------------------------------- */
.sb-hiw-list { display: grid; gap: 18px; }
@media (min-width: 768px) { .sb-hiw-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; } }
.sb-hiw-row { border-left: 3px solid var(--sb-accent); padding-left: 16px; min-width: 0; }
.sb-hiw-row b { display: block; font-size: 17px; margin-bottom: 4px; }
.sb-hiw-row p { margin: 0; color: var(--sb-ink-2); font-size: 15px; }

/* ---- testimonials ------------------------------------------------------- */
.sb-quotes { background: var(--sb-bg-2); }
.sb-quote { margin: 0; }
.sb-stars { color: #f59e0b; letter-spacing: 2px; font-size: 15px; }
.sb-quote blockquote { margin: 6px 0 12px; font-size: 15.5px; color: var(--sb-ink-2); line-height: 1.7; }
.sb-quote figcaption b { display: block; font-size: 15px; }
.sb-quote figcaption small { color: var(--sb-ink-3); font-size: 13.5px; }

/* ---- logos -------------------------------------------------------------- */
.sb-logo-row { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; justify-content: center; margin-top: 18px; }
.sb-logo { opacity: .75; filter: grayscale(1); transition: opacity .15s ease, filter .15s ease; }
.sb-logo:hover { opacity: 1; filter: none; }
.sb-logo img { max-height: 42px; width: auto; }
.sb-logo span { font-weight: 600; color: var(--sb-ink-3); font-size: 16px; }

/* ---- FAQ ---------------------------------------------------------------- */
.sb-faq-item { border-bottom: 1px solid var(--sb-line); padding: 4px 0; }
.sb-faq-item summary {
  cursor: pointer; list-style: none; padding: 14px 32px 14px 0; position: relative;
  font-weight: 600; font-size: 16px;
}
.sb-faq-item summary::-webkit-details-marker { display: none; }
.sb-faq-item summary::after {
  content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--sb-ink-3);
}
.sb-faq-item[open] summary::after { content: '−'; }
.sb-faq-item .a { padding: 0 0 16px; color: var(--sb-ink-2); font-size: 15.5px; }

/* ---- gallery ------------------------------------------------------------ */
.sb-gal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .sb-gal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.sb-gal-grid figure { margin: 0; border-radius: 12px; overflow: hidden; background: var(--sb-bg-3); min-width: 0; }
.sb-gal-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sb-gal-grid figcaption { font-size: 13px; color: var(--sb-ink-3); padding: 8px 10px; }

/* ---- video + map -------------------------------------------------------- */
.sb-embed { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.sb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sb-embed-map { aspect-ratio: 16 / 10; background: var(--sb-bg-3); }
.sb-address { font-size: 16px; color: var(--sb-ink-2); margin: 0 0 16px; }

/* ---- contact ------------------------------------------------------------ */
.sb-contact { background: var(--sb-bg-2); }
.sb-form { display: grid; gap: 14px; background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius); padding: 22px; box-shadow: var(--sb-shadow); }
.sb-form-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .sb-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sb-form label { display: block; font-size: 14px; font-weight: 600; color: var(--sb-ink); }
.sb-form label span { font-weight: 400; color: var(--sb-ink-3); }
/* 16px, not less: iOS Safari zooms the page on focus below that (measured
   2026-09-26 on /contact at 15px). This layout does not load appui.css, so the
   fleet's body.site floor never reaches it — the floor lives here. */
.sb-form input, .sb-form textarea {
  width: 100%; margin-top: 6px; font: inherit; font-size: 16px; color: var(--sb-ink);
  padding: 11px 13px; border: 1px solid var(--sb-line); border-radius: 10px; background: #fff;
}
.sb-form input:focus, .sb-form textarea:focus { outline: 2px solid var(--sb-accent); outline-offset: 1px; border-color: transparent; }
.sb-form textarea { resize: vertical; min-height: 110px; }
.sb-form .sb-btn { justify-self: start; }

.sb-note { border-radius: 10px; padding: 14px 16px; font-size: 15px; border: 1px solid var(--sb-line); background: #fff; }
.sb-note-ok { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.sb-note-err { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

/* ---- text block --------------------------------------------------------- */
.sb-rich.is-center { text-align: center; }

/* ---- footer ------------------------------------------------------------- */
.sb-foot { background: var(--sb-ink); color: #cbd5e1; margin-top: 8px; padding: 40px 0 20px; }
.sb-foot-in { display: grid; gap: 28px; }
@media (min-width: 768px) { .sb-foot-in { grid-template-columns: 2fr 1fr 1fr; gap: 40px; } }
.sb-foot-col { min-width: 0; }
.sb-foot-col b { display: block; color: #fff; font-size: 15px; margin-bottom: 10px; }
.sb-foot-col p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.6; }
.sb-foot a, a.sb-foot-link { color: #cbd5e1; }
.sb-foot a:hover { color: #fff; }
.sb-social { display: flex; gap: 10px; margin-top: 14px; }
.sb-social a {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); font-size: 17px;
}
.sb-social a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.sb-copy { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #94a3b8; }

/* ---- print -------------------------------------------------------------- */
@media print {
  .sb-head, .sb-foot, .sb-skip, .sb-navtoggle { display: none !important; }
  body.sb-site { color: #000; }
}

/* ---- flash messages (public side) --------------------------------------
   Sticky under the header so it is seen without scrolling — a message that
   appears above the fold of a long page is a message nobody reads. */
.sb-flash {
  display: flex; align-items: center; gap: 10px;
  max-width: 1140px; margin: 14px auto 0; padding: 12px 16px;
  border-radius: 11px; font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--sb-line); background: #fff;
}
.sb-flash i { font-size: 19px; flex: none; }
.sb-flash.is-ok  { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.sb-flash.is-err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
@media (max-width: 1171px) { .sb-flash { margin-left: 16px; margin-right: 16px; } }
