/* sm-site.css: the shared look for every page of Santa Maria Deck Builders (design-lead, 2026-11-18).
   Palette 3 (Midnight + Amber), Fraunces + Nunito Sans, from DESIGN-DIRECTION.md and deliver/boards/board.css.
   Every page loads this file; each page type adds its own file (sm-home.css, sm-service.css ...), loaded only there.

   Scope:
   - The header (.hdr), footer (.ftr), skip link and back-to-top button are styled by their own classes, so they look the
     same on a page that still carries LocusPilot's Tailwind file.
   - Base type and the shared components (.button, .form, .faq, .wrap, .band) are scoped to <body class="sm-page">, so a
     page not yet rebuilt keeps its own body look until its builder runs.

   Colors: amber (--cta) is a button and background color only, never text on a light ground. Small accents on light
   (ticks, arrows, icons) use --accent, the darker gold. Links on light grounds are the brand blue.

   Photo slots (REWRITE-STANDARD 13.17, 2026-11-19): every photo on the site renders at a ratio from one short list,
   4:3, 3:2, 16:9, 3:1, 4:5 and 1:1, and every thumbnail at 3:2 in three sizes (180 x 120, 150 x 100, 96 x 64). The list,
   which slot uses which, and the two named exceptions (the town story photo that runs off the page edge at 16:10, the
   guide title photo that fills its cell) are in HTML Build/DESIGN-DIRECTION.md and HTML Build/photo-slots.json. A new
   layout picks the nearest standard; it never invents a ratio a few pixels off one. */

:root {
  --brand: #183449;          /* headings, footer, feature sections */
  --brand-deep: #10263a;     /* a deeper step of the brand, for a surface on a brand band */
  --brand-soft: #dde5ec;     /* a pale tint of the brand, for chips and small fills on light */
  --bg: #F7F8F6;             /* main background, off-white */
  --alt: #E6E8E5;            /* alternate sections, light stone */
  --card: #ffffff;
  --cta: #E9AF41;            /* estimate buttons (dark text on it) */
  --cta-hover: #d99c2c;
  --cta-ink: #222B2D;        /* text on the button */
  --accent: #A8740F;         /* ticks, arrows, icons ON LIGHT grounds (bright amber is about 2:1 on off-white) */
  --accent-text: #8a5f0c;    /* the gold when it is TEXT on light (a current menu item): AA at any size */
  --link: #183449;           /* links on light grounds */
  --ink: #222B2D;            /* body text */
  --muted: #566064;
  --line: #d5d9d6;           /* hairlines on light */
  --on-brand: #ffffff;
  --on-brand-muted: #b7c5d0; /* body text on the brand color */
  --line-on-brand: #2c4b63;

  --head: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 10px; --r: 16px; --r-lg: 24px;
  --wrap: 1240px;
  --gutter: 20px;
  --band-pad: 56px;
  --h2: 30px;
  /* No H1 on any page is bigger than the homepage H1 at the same width (Dan's rule): 36 / 48 / 52. */
  --h1-max: 36px;
  --hdr-h: 60px;             /* the floating bar's height */
  --hdr-top: 10px;           /* the gap above it */
}
@media (min-width: 768px) { :root { --h1-max: 48px; --gutter: 24px; --band-pad: 72px; --h2: 36px; --hdr-h: 68px; --hdr-top: 14px; } }
@media (min-width: 1024px) { :root { --h1-max: 52px; --band-pad: 96px; --h2: 42px; --hdr-top: 16px; } }

/* ---------- base (rebuilt pages only) ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + var(--hdr-top) + 16px); }
body.sm-page { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
.sm-page *, .sm-page *::before, .sm-page *::after { box-sizing: border-box; }
.sm-page img { display: block; max-width: 100%; height: auto; }
.sm-page h1, .sm-page h2, .sm-page h3, .sm-page h4 { font-family: var(--head); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em;
  margin: 0; color: var(--brand); text-wrap: balance; font-optical-sizing: auto; }
.sm-page h1 { font-size: var(--h1-max); line-height: 1.1; }
.sm-page h2 { font-size: var(--h2); }
.sm-page p, .sm-page li { text-wrap: pretty; }
/* the tail a no-widows pass holds together when it carries a hyphen (lp-kit/apply-no-widows.js); applies on every page */
.nw { white-space: nowrap; }
.sm-page p { margin: 0; }
.sm-page a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sm-page a:hover { text-decoration-thickness: 2px; }
.sm-page :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sm-page main { display: block; }
.sm-page main:focus { outline: none; }

/* shared helpers */
.sm-page .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sm-page .band { padding: var(--band-pad) 0; }
.sm-page .band-alt { background: var(--alt); }
.sm-page .band-brand { background: var(--brand); color: var(--on-brand-muted); --accent: var(--cta); --link: var(--on-brand); --line: var(--line-on-brand); }
.sm-page .band-brand h2, .sm-page .band-brand h3 { color: var(--on-brand); }
.sm-page .muted { color: var(--muted); }
.sm-page .band-brand .muted { color: var(--on-brand-muted); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* buttons: a full pill, amber with dark text; never uppercase */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 28px; border-radius: 999px;
  background: var(--cta); color: var(--cta-ink) !important; font: 700 16px/1.1 var(--body); text-decoration: none !important; border: 0; cursor: pointer;
  transition: background-color .15s ease; text-align: center; }
.button:hover { background: var(--cta-hover); }
.button-ghost { background: transparent; color: var(--brand) !important; box-shadow: inset 0 0 0 1.5px currentColor; }
.button-ghost:hover { background: var(--card); }

/* the iframe takes focus when the form loads; Firefox then drew the focus ring around it as an orange border
   (Dan, 2026-11-19: "Eliminate the orange border around the form"). The fields inside show their own focus. */
.sm-page .form iframe:focus, .sm-page .form iframe:focus-visible { outline: none; }

/* the estimate form frame: the heading, then the Lead Simplify form, nothing between */
/* NO BOX (Dan, 2026-11-19: "Take the form OUT of the damned white box!!!!!!!!"): Lead Simplify draws its own panel and
   padding, so nothing here or in a page file puts a background, border or shadow around it. The heading is never
   bigger than 24 px, nor bigger than any H2 on the page ("it should NEVER outshine the H2s"). check-layout.js measures both. */
.sm-page .form { background: none; border: 0; box-shadow: none; padding: 0; color: var(--ink); }
.sm-page .form > h2, .sm-page .form > h3 { font-size: 22px; line-height: 1.2; text-align: center; margin: 0 0 12px; color: var(--brand); }
.sm-page .form iframe { display: block; width: 100%; border: 0; }
@media (min-width: 768px) { .sm-page .form > h2, .sm-page .form > h3 { font-size: 24px; } }

/* FAQ: one component, every FAQ on the site (Dan, 2026-11-19: "Use the design from fortcollinsdeckcontractors.com for the
   FAQs"). Fort Collins deck's layout in this site's tokens: each question a white card on a tray tinted from the brand,
   the open card edged in gold with a filled amber marker, every answer on white (REWRITE-STANDARD 12.2). One open at a
   time via <details name="faq">. No eyebrows, no numerals, no drop shadows. Amber is only the marker's fill (a background);
   the small marks on white use --accent. The summary may hold the question as text or as an <h3>. */
.sm-page .faq { --faq-tray: color-mix(in srgb, var(--brand) 14%, var(--bg)); display: grid; gap: 10px; padding: 12px; background: var(--faq-tray);
  border-radius: var(--r); }
.sm-page .faq > details { margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s; }
.sm-page .faq > details:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.sm-page .faq > details[open] { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.sm-page .faq > details > summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 20px 22px 20px 26px; border-radius: 12px; font: 600 20px/1.35 var(--head); color: var(--brand); text-wrap: balance; }
.sm-page .faq > details > summary::-webkit-details-marker { display: none; }
.sm-page .faq > details > summary::marker { content: ""; }
.sm-page .faq > details > summary h3 { display: block; margin: 0; font: inherit; color: inherit; }
.sm-page .faq > details > summary:hover { color: var(--accent-text); }
.sm-page .faq > details > summary::after { content: "+"; flex: none; width: 32px; height: 32px; margin-top: -2px; border-radius: 50%; border: 1.5px solid var(--accent);
  display: grid; place-items: center; font: 500 21px/1 var(--body); color: var(--accent); background: var(--card); }
.sm-page .faq > details[open] > summary::after { content: "\2212"; background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.sm-page .faq > details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sm-page .faq > details > :not(summary) { margin: 0; padding: 0 26px 24px; font: 16.5px/1.7 var(--body); color: var(--ink); }
.sm-page .faq > details > :not(summary) + :not(summary) { margin-top: -10px; }
.sm-page .faq > details a { color: var(--link); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
@media (max-width: 640px) {
  .sm-page .faq { padding: 8px; gap: 8px; border-radius: 14px; }
  .sm-page .faq > details > summary { padding: 16px 16px 16px 20px; gap: 14px; font-size: 18px; }
  .sm-page .faq > details > :not(summary) { padding: 0 20px 20px; font-size: 16px; }
}

/* ---------- skip link ---------- */
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 18px; border-radius: 999px; background: var(--brand); color: var(--on-brand);
  font: 700 15px/1.2 var(--body); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- header: a floating rounded bar ---------- */
.hdr { position: sticky; top: 0; z-index: 60; padding: var(--hdr-top) var(--gutter) 0; pointer-events: none;
  font-family: var(--body); }
.hdr-bar { pointer-events: auto; position: relative; max-width: var(--wrap); margin: 0 auto; height: var(--hdr-h); padding: 0 8px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 6px 18px -12px rgba(24, 52, 73, .35); }
.hdr-logo { display: block; flex: none; line-height: 0; }
.hdr-logo img { display: block; height: 36px; width: auto; max-width: none; }
.hdr-nav { display: none; }
.hdr-cta { display: none; }
.hdr a.hdr-cta, .hdr-mobile a.hdr-cta { align-items: center; justify-content: center; padding: 12px 20px; border-radius: 999px; background: var(--cta); color: var(--ink);
  font: 700 15px/1 var(--body); text-decoration: none; white-space: nowrap; transition: background-color .15s ease; }
.hdr a.hdr-cta:hover, .hdr-mobile a.hdr-cta:hover { background: var(--cta-hover); color: var(--ink); }
.hdr-toggle { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); cursor: pointer; }
.hdr-toggle svg { width: 22px; height: 22px; display: block; }
.hdr-toggle .i-close { display: none; }
.hdr.is-open .hdr-toggle .i-open { display: none; }
.hdr.is-open .hdr-toggle .i-close { display: block; }

/* the phone and tablet menu: a rounded panel under the bar */
.hdr-mobile { pointer-events: auto; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--hdr-top) + var(--hdr-h) + 8px);
  max-width: var(--wrap); margin: 0 auto; max-height: calc(100vh - var(--hdr-h) - var(--hdr-top) - 24px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 12px 16px 18px; box-shadow: 0 18px 40px -18px rgba(24, 52, 73, .45); }
.hdr-mobile[hidden] { display: none; }
.hdr-mobile ul { list-style: none; margin: 0; padding: 0; }
.hdr-mobile li { margin: 0; }
.hdr-mobile .m-row { display: flex; align-items: center; border-bottom: 1px solid var(--alt); }
.hdr-mobile .m-link { flex: 1; display: block; padding: 13px 6px; color: var(--brand); font: 700 17px/1.3 var(--body); text-decoration: none; }
.hdr-mobile .m-link[aria-current="page"] { color: var(--accent-text); }
.hdr-mobile .m-sub-toggle { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--brand); cursor: pointer; border-radius: 50%; }
.hdr-mobile .m-sub-toggle svg { width: 18px; height: 18px; transition: transform .2s ease; }
.hdr-mobile .m-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.hdr-mobile .m-sub { padding: 4px 0 10px 14px; border-bottom: 1px solid var(--alt); }
.hdr-mobile .m-sub[hidden] { display: none; }
.hdr-mobile .m-sub a[aria-current="page"] { color: var(--accent-text); font-weight: 700; }
.hdr-mobile .m-sub a { display: block; padding: 8px 6px; color: var(--ink); font: 600 16px/1.35 var(--body); text-decoration: none; }
.hdr-mobile .m-cta { padding-top: 16px; }
.hdr-mobile .m-cta .hdr-cta { display: flex; width: 100%; padding: 15px 20px; font-size: 16px; }

@media (min-width: 600px) {
  .hdr-bar { padding: 0 10px 0 20px; }
  .hdr-logo img { height: 42px; }
  .hdr a.hdr-cta { display: inline-flex; margin-left: auto; }
  .hdr-mobile .m-cta { display: none; }
}
@media (min-width: 1024px) {
  .hdr-bar { padding: 0 12px 0 22px; gap: 20px; }
  .hdr-logo img { height: 46px; }
  .hdr-toggle, .hdr-mobile { display: none !important; }
  .hdr a.hdr-cta { margin-left: 0; padding: 13px 22px; }
  .hdr-nav { display: flex; align-items: center; height: 100%; margin-left: auto; }
  .hdr-nav > ul { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 28px); height: 100%; list-style: none; margin: 0; padding: 0; }
  .hdr-item { position: relative; height: 100%; display: flex; align-items: center; margin: 0; }
  .hdr-item > a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font: 600 15px/1 var(--body); text-decoration: none;
    padding: 8px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .hdr-item > a:hover, .hdr-item > a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--accent); }
  .hdr-item > a svg { width: 15px; height: 15px; transition: transform .2s ease; }
  .hdr-item:hover > a svg, .hdr-item:focus-within > a svg { transform: rotate(180deg); }
  .hdr-drop { position: absolute; left: -18px; top: calc(100% - 6px); min-width: 250px; padding: 10px; list-style: none; margin: 0;
    background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(24, 52, 73, .45);
    visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s; }
  .hdr-item:hover .hdr-drop, .hdr-item:focus-within .hdr-drop { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .hdr-item.is-closed .hdr-drop { visibility: hidden; opacity: 0; }
  .hdr-drop li { margin: 0; }
  .hdr-drop a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--ink); font: 600 15px/1.3 var(--body); text-decoration: none; white-space: nowrap; }
  .hdr-drop a:hover, .hdr-drop a:focus-visible { background: var(--alt); color: var(--brand); }
  .hdr-drop a[aria-current="page"] { color: var(--accent-text); }
}
/* the bar keeps its logo, menu and button on one line from 1024 up; below 1100 the gaps tighten */
@media (min-width: 1024px) and (max-width: 1099px) { .hdr-bar { gap: 14px; } .hdr a.hdr-cta { padding: 12px 16px; font-size: 14px; } .hdr-item > a { font-size: 14.5px; } }

/* ---------- footer: on midnight ---------- */
.ftr { background: var(--brand); color: var(--on-brand-muted); font: 16px/1.6 var(--body); }
.ftr .ftr-in { max-width: var(--wrap); margin: 0 auto; padding: 56px var(--gutter) 28px; }
.ftr .ftr-grid { display: grid; gap: 36px; }
.ftr .ftr-logo { display: inline-block; line-height: 0; }
.ftr .ftr-logo img { display: block; height: 46px; width: auto; max-width: 100%; }
.ftr .ftr-about p { margin: 18px 0 0; max-width: 400px; color: var(--on-brand-muted); text-wrap: pretty; }
.ftr .ftr-about p[data-credential] { color: var(--on-brand); font-weight: 700; }
.ftr .ftr-head { margin: 0 0 14px; color: var(--on-brand); font: 600 19px/1.2 var(--head); }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ftr li { margin: 0; }
.ftr a { color: var(--on-brand-muted); text-decoration: none; }
.ftr a:hover { color: var(--on-brand); text-decoration: underline; text-underline-offset: 3px; }
.ftr a:focus-visible { outline: 3px solid var(--cta); outline-offset: 3px; border-radius: 4px; }
.ftr .ftr-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-on-brand); font-size: 14px; color: var(--on-brand-muted); }
.ftr .ftr-base p { margin: 0; }
@media (min-width: 640px) { .ftr .ftr-grid { grid-template-columns: 1fr 1fr; } .ftr .ftr-about { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .ftr .ftr-in { padding: 72px var(--gutter) 32px; }
  .ftr .ftr-grid { grid-template-columns: 1.6fr 1fr 1fr 0.8fr; gap: 48px; }
  .ftr .ftr-about { grid-column: auto; }
}

/* ---------- back to top ---------- */
.back-top { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: var(--brand); color: var(--on-brand); cursor: pointer; box-shadow: 0 6px 18px -8px rgba(24, 52, 73, .6); }
.back-top[hidden] { display: none; }
.back-top svg { width: 20px; height: 20px; }
.back-top:hover { background: var(--brand-deep); }
@media (min-width: 1024px) { .back-top { right: 24px; bottom: 24px; } }

/* H1 MATCH (Dan's rule, 2026-11-16 on Fort Collins deck; REWRITE-STANDARD 7): every inner page's H1 is the service page's
   size, never bigger than the homepage H1 (--h1-max). One token, used by sm-service/town/guide/about/contact.css. */
:root { --h1-inner: 32px; }
@media (min-width: 768px) { :root { --h1-inner: 38px; } }
@media (min-width: 1024px) { :root { --h1-inner: 40px; } }
