/* Santa Clarita Door Co. — high sun
   Shade-dominant. One structural device: the hard cast-shadow edge.
   No border-radius, no drop shadows. The only shadow on this site is structural.
   Shares no class name, token name or selector with site 1 — see FOOTPRINT.md. */

:root {
  --shade-950: #171613;
  --shade-800: #24221D;
  --shade-600: #3B382F;
  --chaparral: #6E7358;
  --dust:      #C6BDAC;
  --glare:     #FBF9F4;
  --glare-deep:#EFEADF;
  --signal:    #D93A14;
  --signal-dk: #A82B0D;

  --ink:       var(--shade-950);
  --ink-soft:  #4A463C;
  --act:       var(--signal);
  --rule:      rgba(23,22,19,.18);
  --rule-glare:rgba(251,249,244,.20);

  --font-display: "Zilla Slab", Georgia, serif;
  --font-copy:    "Public Sans", system-ui, -apple-system, sans-serif;
  --font-util:    "Space Mono", ui-monospace, monospace;

  --t-display: clamp(2.5rem, 6.5vw, 4.25rem);
  --t-2xl:     clamp(1.7rem, 3.4vw, 2.4rem);
  --t-xl:      1.5rem;
  --t-lg:      1.25rem;
  --t-base:    1.0625rem;
  --t-sm:      .9375rem;
  --t-util:    .8125rem;

  --gap-1: .5rem;  --gap-2: .75rem; --gap-3: 1rem;   --gap-4: 1.5rem;
  --gap-5: 2rem;   --gap-6: 3rem;   --gap-7: 4rem;   --gap-8: 5.5rem;
  --measure: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-copy);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--glare);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin: 0 0 var(--gap-3);
}
h1 { font-size: var(--t-display); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); line-height: 1.2; }
p  { margin: 0 0 var(--gap-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--signal); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* Skip link: off-screen until focused, then a real target at the top-left. Keyboard users
   should not have to tab the whole header on every page. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--signal); color: #fff; padding: .85rem 1.25rem;
  font-family: var(--font-util); font-size: var(--t-util); font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { left: 0; }

img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; }

/* ---------- the shade line: the only divider ----------
   High sun throws an edge with no blur. Every boundary is one hard transition. */
.edge--shade { border-top: 2px solid var(--shade-950); }
.edge--glare { border-top: 1px solid var(--rule-glare); }

/* ---------- bands ---------- */
.band { padding: var(--gap-7) 0; }
.band--shade { background: var(--shade-950); color: var(--glare); }
.band--shade h1, .band--shade h2, .band--shade h3 { color: var(--glare); }
.band--shade p { color: var(--dust); }
.band--shade a { color: var(--glare); }
.band--glare { background: var(--glare); }
.band--glare-deep { background: var(--glare-deep); }

/* ---------- utility type ---------- */
.util, .strip, .crumbs, .fault-row dt, .zip {
  font-family: var(--font-util);
  font-size: var(--t-util);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* ---------- header ---------- */
.top { background: var(--shade-950); color: var(--glare); }
.top-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap-3); padding: var(--gap-3) 0;
}
/* The mark is inline SVG filled with currentColor, so the link must carry the
   header's colour — the base `a` rule would otherwise paint it dark on dark. */
.sign { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--glare); }
.sign-mark { width: 42px; height: 42px; }
.sign-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--glare); }
.sign-sub { font-family: var(--font-util); font-size: .6875rem; letter-spacing: .09em; text-transform: uppercase; color: var(--dust); }

.menu { display: flex; gap: var(--gap-4); list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--dust); text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.menu a:hover { color: var(--glare); text-decoration: underline; text-decoration-color: var(--signal); }

.top-call { display: flex; align-items: center; gap: .5rem; color: var(--glare); text-decoration: none; }
.top-call .num { font-family: var(--font-util); font-weight: 700; letter-spacing: .05em; }

.burger {
  position: absolute; width: 1px; height: 1px; opacity: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
}
.burger-lbl { display: none; }
.burger:focus-visible + .menu-wrap + .top-call + .burger-lbl,
.burger:focus-visible ~ .burger-lbl { outline: 3px solid var(--signal); outline-offset: 2px; }

/* ---------- actions ---------- */
.action {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: 0 1.6rem;
  font-family: var(--font-util); font-size: var(--t-util); font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.action--signal { background: var(--signal); color: #fff; }
.action--signal:hover { background: var(--signal-dk); }
.action--ghost { background: transparent; color: var(--glare); border-color: var(--dust); }
.action--ghost:hover { border-color: var(--glare); background: rgba(251,249,244,.08); }
.band--glare .action--ghost { color: var(--ink); border-color: var(--rule); }
.band--glare .action--ghost:hover { border-color: var(--ink); background: rgba(23,22,19,.05); }

/* ---------- hero ----------
   The diagonal in the photograph is the same gesture as the shade line.
   Wash runs across, not down: copy sits in shade on the left, glare survives right. */
.lead-in {
  position: relative;
  background-color: var(--shade-950);
  background-image: url('/assets/img/valley-noon.webp');
  background-size: cover;
  background-position: 60% 55%;
  color: var(--glare);
  padding: var(--gap-8) 0;
  overflow: hidden;
}
.lead-in::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg,
    rgba(23,22,19,.95) 0%, rgba(23,22,19,.93) 52%, rgba(23,22,19,.72) 100%);
}
.lead-in > .wrap { position: relative; z-index: 1; }
.lead-copy { max-width: 38rem; }
.lead-in h1 { color: var(--glare); max-width: 15ch; }
.lead-rule { width: 64px; height: 3px; background: var(--signal); margin: var(--gap-4) 0; }
.lead-sub { font-size: var(--t-lg); line-height: 1.55; max-width: 34rem; }
/* Only the hero's copy sits on the photograph; elsewhere .lead-sub is body text on a
   light band and must not inherit the light colour. Measured 1.00:1 before this. */
.lead-in .lead-sub { color: var(--glare); }
.lead-acts { display: flex; flex-wrap: wrap; gap: var(--gap-2); margin-top: var(--gap-5); }
.strip { color: var(--dust); margin-top: var(--gap-6); }

/* the one orchestrated moment: the sun moves once, then the edge is static forever */
.lead-in::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--signal); transform-origin: left center;
  animation: sweep 600ms ease-out both;
}
@keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.lead-copy > * { animation: rise 200ms ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- the fault index: the signature ----------
   Symptom, cause, fix. Not a places list — site 1 owns that shape. */
.faults { background: var(--glare); }
.fault-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--gap-2); margin-bottom: var(--gap-4);
}
.fault-note { font-family: var(--font-util); font-size: var(--t-util); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.fault-rows { margin: 0; display: grid; }
.fault-row {
  display: grid; gap: .35rem var(--gap-4); padding: var(--gap-3) 0;
  border-top: 2px solid var(--shade-950);
}
@media (min-width: 720px) {
  .fault-row { grid-template-columns: 20rem 1fr; align-items: baseline; }
}
.fault-row:last-child { border-bottom: 2px solid var(--shade-950); }
.fault-row dt { color: var(--ink); }
.fault-row dd { margin: 0; color: var(--ink-soft); }

/* ---------- tiles ---------- */
.tile-set { display: grid; gap: var(--gap-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tile { background: transparent; }
.tile-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-top: 2px solid var(--shade-950); }
.band--shade .tile-photo { border-top-color: var(--rule-glare); }
.tile h3 { margin-top: var(--gap-3); }
.tile-go { font-family: var(--font-util); font-size: var(--t-util); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--signal); text-decoration: none; }
.tile-go:hover { text-decoration: underline; }

/* ---------- lists ---------- */
.local-notes, .callflow { list-style: none; margin: 0; padding: 0; }
.local-notes li, .callflow li { padding: var(--gap-3) 0; border-top: 1px solid var(--rule); }
.band--shade .local-notes li, .band--shade .callflow li { border-top-color: var(--rule-glare); }
.callflow { counter-reset: step; }
.callflow li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-util); font-size: var(--t-util); color: var(--signal);
  margin-right: .75rem;
}

/* ---------- FAQ, on the page that raises it ---------- */
.qa { border-top: 1px solid var(--rule); padding: var(--gap-3) 0; }
.band--shade .qa { border-top-color: var(--rule-glare); }
.qa h3 { font-size: var(--t-lg); }

/* ---------- breadcrumbs ---------- */
.crumbs { color: var(--ink-soft); padding: var(--gap-3) 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--dust); }
.crumbs a { color: var(--ink-soft); }

/* ---------- form ---------- */
.field-set { display: grid; gap: var(--gap-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
label { display: block; font-size: var(--t-sm); font-weight: 600; margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; min-height: 52px; padding: .7rem .85rem;
  font-family: inherit; font-size: var(--t-base); color: var(--ink);
  background: #fff; border: 2px solid var(--rule);
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { border-color: var(--signal); outline: none; }

/* ---------- footer ---------- */
.foot { background: var(--shade-950); color: var(--dust); padding: var(--gap-6) 0 var(--gap-4); }
.foot h3 { color: var(--glare); font-size: var(--t-lg); }
.foot a { color: var(--dust); }
.foot a:hover { color: var(--glare); }
.foot-cols { display: grid; gap: var(--gap-5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { padding: .3rem 0; }
.foot-end { margin-top: var(--gap-5); padding-top: var(--gap-3); border-top: 1px solid var(--rule-glare); font-size: var(--t-sm); }

/* ---------- sticky call, small screens only ---------- */
.sticky-call { display: none; }

@media (max-width: 767px), (pointer: coarse) {
  .sticky-call {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    align-items: center; justify-content: center; gap: .6rem;
    min-height: 60px; background: var(--signal); color: #fff;
    font-family: var(--font-util); font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; text-decoration: none;
    border-top: 2px solid var(--shade-950);
  }
  body { padding-bottom: 60px; }
  .burger-lbl {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 48px; min-height: 48px; color: var(--glare); cursor: pointer;
  }
  .menu-wrap { display: none; width: 100%; }
  .burger:checked ~ .menu-wrap { display: block; }
  .burger:checked ~ .menu-wrap .menu {
    display: flex; flex-direction: column; width: 100%;
    padding: var(--gap-3) 0; border-top: 1px solid var(--rule-glare);
  }
  .top-in { flex-wrap: wrap; }
  .lead-in { padding: var(--gap-6) 0; }
  .lead-in::before {
    background: linear-gradient(180deg,
      rgba(23,22,19,.94) 0%, rgba(23,22,19,.92) 60%, rgba(23,22,19,.88) 100%);
  }
  .lead-acts .action { width: 100%; }
  /* min-height does nothing to an inline element, so standalone navigation links get
     padding instead. Links inside running prose are deliberately left alone: WCAG exempts
     text inline in a sentence, and padding there would wreck the line rhythm. */
  .action, button { min-height: 44px; }
  .tile-go, .local-notes a, .foot-cols a, .menu a, .crumbs a, .area-links a, .zip a {
    display: inline-block;
    padding-block: .75rem;
  }
}

@media (min-width: 768px) { .sticky-call { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .lead-in::after, .lead-copy > * { animation: none; }
  * { transition: none !important; }
}

/* ---------- reader preferences ----------
   Applied by assets/js/prefs.js. These are the visitor's own settings, not an attempt to
   repair the page at runtime — see the note at the top of that file. */
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.pref-bigger { font-size: 118%; }
.pref-contrast {
  --ink-soft: #1F1D18;
  --dust: #E7E1D6;
  --chaparral: #97A07C;
  --rule: rgba(23,22,19,.45);
  --rule-glare: rgba(251,249,244,.5);
}
.pref-underline a { text-decoration: underline !important; }
.pref-still *, .pref-still *::before, .pref-still *::after {
  animation: none !important; transition: none !important;
}

.prefs { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; }
.prefs-open {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; cursor: pointer;
  background: var(--shade-950); color: var(--glare);
  border: 2px solid var(--dust);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
}
.prefs-open:hover { border-color: var(--glare); }
.prefs-panel {
  position: absolute; right: 0; bottom: 60px; width: 16rem;
  background: var(--glare); color: var(--ink);
  border: 2px solid var(--shade-950); padding: var(--gap-3);
}
.prefs-title { font-size: var(--t-lg); margin-bottom: var(--gap-2); }
.prefs-row {
  display: flex; align-items: center; gap: .6rem;
  min-height: 44px; padding: .55rem 0; cursor: pointer;
  border-top: 1px solid var(--rule);
}
.prefs-row input { width: 22px; height: 22px; margin: 0; accent-color: var(--signal); }
.prefs-note { margin-top: var(--gap-2); font-size: var(--t-sm); color: var(--ink-soft); }

@media (max-width: 767px), (pointer: coarse) {
  .prefs { bottom: 72px; }
}
