/* Sonoran Lighting Co. — desert dusk palette, Fraunces + Figtree */
:root {
  --night-950: #080a18;
  --night-900: #0d1020;
  --night-800: #151a33;
  --night-700: #222850;
  --cream: #fff8ec;
  --sand: #f4ead8;
  --ink: #1d1a2b;
  --ink-muted: #5a5568;
  --on-night: #f6efe2;
  --on-night-muted: #b9b4cc;
  --amber: #ffb23e;
  --amber-hover: #ffc566;
  --gold-dark: #9a5a0c;
  --line-night: rgba(255, 255, 255, 0.1);
  --line-cream: rgba(29, 26, 43, 0.12);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--on-night);
  background: var(--night-900);
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.section--cream :focus-visible, .section--sand :focus-visible, .quiz :focus-visible { outline-color: var(--gold-dark); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--amber); color: #1a1204; padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }
.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* season switch: set CONFIG.season in script.js */
body[data-season="year-round"] [data-only="christmas"],
body[data-season="christmas"] [data-only="year-round"] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0.7em 1.35em; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}
.btn--primary { background: var(--amber); color: #1a1204; }
.btn--primary:hover { background: var(--amber-hover); }
.btn--ghost { border-color: rgba(246, 239, 226, 0.35); color: var(--on-night); background: transparent; }
.btn--ghost:hover { border-color: var(--on-night); background: rgba(255, 255, 255, 0.06); }
.btn--lg { min-height: 56px; padding: 0.8em 1.6em; font-size: 1.0625rem; }
.btn--sm { min-height: 44px; padding: 0.5em 1.1em; font-size: 0.95rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(13, 16, 32, 0.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-night); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; text-decoration: none; }
.brand__emblem { height: 34px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; padding-left: 10px; border-left: 1px solid var(--line-night); }
.brand__name { font-weight: 600; font-size: 1.02rem; letter-spacing: 0.24em; text-transform: uppercase; }
.brand__sub { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: #dea456; margin-top: 5px; }

.nav-toggle { display: none; }
.nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 26px); }
.nav a:not(.btn) { white-space: nowrap; text-decoration: none; font-weight: 500; font-size: 0.97rem; color: var(--on-night-muted); padding: 10px 0; transition: color 0.15s; }
.nav a:not(.btn):hover { color: var(--on-night); }
.nav__phone { display: inline-flex; align-items: center; gap: 6px; color: var(--on-night) !important; font-weight: 700 !important; }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line-night); background: transparent; color: var(--on-night); cursor: pointer; }
  .nav-toggle .icon { width: 24px; height: 24px; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--night-900); border-bottom: 1px solid var(--line-night); display: none; }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line-night); font-size: 1.05rem; }
  .nav .btn { margin-top: 14px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 88px); background: var(--night-900); isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 70% 100%; transform: scaleX(-1); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
    linear-gradient(90deg, rgba(13, 16, 32, 0.9) 0%, rgba(13, 16, 32, 0.55) 55%, rgba(13, 16, 32, 0.35) 100%),
    linear-gradient(180deg, rgba(13, 16, 32, 0) 60%, rgba(13, 16, 32, 0.75) 100%); }
.hero__grid { display: grid; gap: clamp(32px, 4vw, 56px); align-items: start; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1fr minmax(400px, 460px); padding-top: 24px; } }

.eyebrow { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }
.eyebrow--dark { color: var(--gold-dark); }

.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 600; letter-spacing: -0.025em; max-width: 14ch; }
.hero__lead { margin-top: 20px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: #d6d1e4; max-width: 46ch; }
.hero__offer { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 1rem; color: var(--on-night); max-width: 46ch; }
.hero__badge { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--amber); color: #1a1204; font-weight: 700; font-size: 0.92rem; }
.hero__trust { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-night); display: grid; gap: 10px; color: #d6d1e4; font-size: 0.98rem; max-width: 46ch; }
.hero__trust li { display: flex; align-items: flex-start; gap: 10px; }
.hero__trust .icon { margin-top: 0.15em; color: var(--amber); stroke-width: 2.4; }
.hero__trust a { color: var(--on-night); font-weight: 700; text-underline-offset: 3px; }

/* ---------- quiz ---------- */
.quiz { background: #fff; color: var(--ink); border-radius: 18px; padding: clamp(20px, 3vw, 28px); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); }
.quiz__title { font: 600 1.3rem/1.2 var(--font-display); }
.quiz__meta { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.quiz__count { margin-left: auto; font-size: 0.85rem; font-weight: 600; color: var(--ink-muted); }
.quiz__back { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px 0 0; border: 0; background: none; color: var(--ink); font: 600 0.92rem var(--font-body); cursor: pointer; }
.quiz__back .icon { width: 1.1em; height: 1.1em; }
.quiz__bar { margin-top: 8px; height: 4px; border-radius: 4px; background: #eee8dc; overflow: hidden; }
.quiz__bar span { display: block; height: 100%; width: 20%; background: var(--gold-dark); border-radius: 4px; transition: width 0.3s ease; }

.quiz__form { margin: 0; }
.quiz__step { border: 0; margin: 22px 0 0; padding: 0; min-width: 0; }
.quiz__q { display: block; padding: 0; font: 600 1.35rem/1.25 var(--font-display); outline: none; }
.quiz__hint { margin-top: 6px; font-size: 0.95rem; color: var(--ink-muted); }
.opts { margin: 16px 0 18px; display: grid; gap: 10px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { position: relative; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 46px 10px 10px; border: 1.5px solid #ddd6c8; border-radius: 12px; font-weight: 600; line-height: 1.25; transition: border-color 0.15s, background-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.opt span::after { content: ""; position: absolute; right: 14px; top: 50%; margin-top: -11px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #c9c1b1; background: #fff center / 14px no-repeat; transition: transform 0.15s; }
.opt input[type="checkbox"] + span::after { border-radius: 6px; }
.opt__icon { width: 44px; height: 44px; flex: none; padding: 9px; border-radius: 10px; background: #f6efe2; color: var(--gold-dark); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: background-color 0.15s, transform 0.2s; }
.opt__icon--art { padding: 4px; }
.opt:hover span { border-color: #a89f8d; transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgba(29, 26, 43, 0.35); }
.opt input:checked + span { border-color: var(--gold-dark); background: #fbf3e3; }
.opt input:checked + span .opt__icon { background: #fff; transform: scale(1.06); }
.opt input:checked + span::after { border-color: var(--gold-dark); background-color: var(--gold-dark); background-image: 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.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); transform: scale(1.08); }
.opt input:focus-visible + span { outline: 3px solid var(--gold-dark); outline-offset: 2px; }

/* step 1: tiles with the icon on top */
.opts--tiles { grid-template-columns: 1fr 1fr; }
.opts--tiles .opt:not(.opt--wide) span { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 104px; padding: 12px 12px 14px; }
.opts--tiles .opt:not(.opt--wide) span::after { top: 12px; margin-top: 0; right: 12px; }
.opt--wide { grid-column: 1 / -1; }

.quiz__step:not([hidden]) { animation: step-in 0.28s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.quiz__summary { margin-top: 14px; font-size: 0.92rem; color: var(--ink-muted); }
.quiz__summary strong { color: var(--ink); }
.quiz__final .offer-note { margin-top: 14px; }
.offer-note { padding: 10px 14px; border-left: 3px solid var(--gold-dark); border-radius: 3px 8px 8px 3px; background: #fbf3e3; color: #5a3300; font-weight: 600; font-size: 0.93rem; line-height: 1.45; }
.quiz__jobber { position: relative; margin: -36px -8px -28px; } /* Jobber's frame has blank space at its top and bottom */
.quiz__jobber .jobber-inline-work-request { position: relative; max-width: none; margin: 0; }
.quiz__jobber .jobber-spinner { min-height: 520px; }
.quiz__jobber iframe.jobber-work-request { display: block; width: 100%; max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; }
.quiz__final .offer-note, .quiz__final .quiz__summary { position: relative; z-index: 1; }
.fine { margin-top: 16px; font-size: 0.8rem; color: var(--ink-muted); line-height: 1.5; }

.quiz__alt { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eee8dc; text-align: center; }
.quiz__alt button { min-height: 40px; border: 0; background: none; color: var(--ink-muted); font: 500 0.92rem var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quiz__alt button:hover { color: var(--ink); }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--cream { background: var(--cream); color: var(--ink); }
.section--sand { background: var(--sand); color: var(--ink); }
.section--night { background: var(--night-900); }
.section__head { max-width: 680px; }
.section h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.lead { margin-top: 18px; font-size: clamp(1.05rem, 1.4vw, 1.15rem); color: var(--on-night-muted); max-width: 58ch; }
.section--cream .lead, .section--sand .lead { color: var(--ink-muted); }
.lead a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.section__cta { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.textlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; text-underline-offset: 4px; }

.split { display: grid; gap: 24px 64px; }
@media (min-width: 900px) { .split { grid-template-columns: 0.85fr 1.15fr; } .split .lead:first-child { margin-top: 0; } }
.split__cta { margin-top: 24px; }

.features { margin-top: 48px; display: grid; gap: 32px; }
@media (min-width: 820px) { .features { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.features article { padding-top: 22px; border-top: 2px solid var(--ink); }
.features h3 { font-size: 1.35rem; margin-bottom: 10px; }
.features p { color: var(--ink-muted); }

.steps { margin-top: 48px; display: grid; gap: 32px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps li { padding-top: 22px; border-top: 1px solid var(--line-night); }
.steps__num { display: block; font: 600 0.95rem var(--font-display); color: var(--amber); letter-spacing: 0.08em; margin-bottom: 12px; }
.steps h3 { font-size: 1.3rem; margin-bottom: 8px; }
.steps p { color: var(--on-night-muted); }

.checks { margin-top: 24px; display: grid; gap: 12px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; }
.checks .icon { margin-top: 0.2em; color: var(--gold-dark); stroke-width: 2.4; }

/* faq */
.faq__list { border-top: 1px solid var(--line-cream); }
details { border-bottom: 1px solid var(--line-cream); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 4px; font-weight: 700; font-size: 1.08rem; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary .icon { transition: transform 0.25s ease; color: var(--gold-dark); }
details[open] summary .icon { transform: rotate(45deg); }
details p { padding: 0 4px 22px; color: var(--ink-muted); max-width: 62ch; }

/* service area + map */
.areas__list { font: 600 clamp(1.1rem, 1.8vw, 1.3rem)/1.6 var(--font-display); color: var(--on-night); }
.svcmap__frame { margin-top: 40px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-night); background: var(--night-800); }
.svcmap__frame iframe { display: block; width: 100%; height: clamp(380px, 44vw, 460px); border: 0; }

/* closing */
.closing { padding: clamp(56px, 7vw, 88px) 0; background: var(--night-800); border-top: 1px solid var(--line-night); }
.closing__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.closing h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); max-width: 20ch; }
.closing__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* footer */
.site-footer { background: var(--night-950); padding: 56px 0 24px; color: var(--on-night-muted); }
.footer__inner { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer__inner { grid-template-columns: 1.2fr 1fr 1.2fr; } }
.footer__logo { width: min(240px, 100%); height: auto; margin: -8px 0 10px -6px; }
.footer__muted { color: var(--on-night-muted); font-size: 0.95rem; }
.site-footer a { text-underline-offset: 3px; }
.site-footer p { margin-bottom: 6px; }
.footer__legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-night); font-size: 0.88rem; }

/* sticky mobile action bar */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .mobile-bar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(8, 10, 24, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line-night); }
  .mobile-bar a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; border: 1.5px solid rgba(246, 239, 226, 0.3); text-decoration: none; font-weight: 700; }
  .mobile-bar .mobile-bar__quote { background: var(--amber); color: #1a1204; border-color: var(--amber); }
}

@media (max-width: 979px) {
  .hero__bg { object-position: 30% 100%; }
  .hero::after { background: linear-gradient(180deg, rgba(13, 16, 32, 0.82) 0%, rgba(13, 16, 32, 0.6) 40%, rgba(13, 16, 32, 0.92) 75%, var(--night-900) 100%); }
  .hero__trust { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
