/* Wehrle Holiday Lighting — mobile-first styles */

:root {
  --black: #121212;
  --evergreen: #0f2a1d;
  --evergreen-2: #17402b;
  --gold: #d4ae5c;
  --gold-deep: #b48d3c;
  --warm: #ffd98a;
  --red: #c4161c;
  --red-bright: #e8333b;
  --green: #1d6b3d;
  --cream: #f8f3ea;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #5f5a52;
  --line: #e5dccb;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(18, 18, 18, 0.12);
  --font-display: "Merriweather", Georgia, "Times New Roman", serif;
  --font-caps: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --action-bar-h: 64px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  /* room for the sticky phone action bar */
  padding-bottom: calc(var(--action-bar-h) + env(safe-area-inset-bottom));
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 900; color: var(--black); }
h3 { font-size: 1.3rem; color: var(--black); }
p { margin: 0 0 1em; }
svg { flex-shrink: 0; }

[hidden] { display: none !important; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--black);
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 22px rgba(196, 22, 28, 0.4); }
.btn-primary:hover { background: #d9222a; }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.06); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn-large { min-height: 56px; font-size: 1.125rem; padding: 14px 28px; }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; box-shadow: none; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 18, 18, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.brand img { width: auto; height: 54px; }
.site-nav { display: none; }
.header-call {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: var(--black);
}
.header-call svg { width: 22px; height: 22px; }

/* ---------- Light strings ---------- */
.mini-string {
  position: relative;
  display: flex; justify-content: space-between;
  overflow: hidden;
}
.mini-string::before {
  content: ""; position: absolute; left: 0; right: 0; top: 6px;
  height: 2px; background: #2a2a2a;
}
.bulb {
  position: relative; flex: 0 0 auto;
  width: 14px; height: 22px; margin-top: 6px;
  display: flex; flex-direction: column; align-items: center;
}
.bulb::before { /* socket */
  content: ""; width: 7px; height: 7px; background: var(--gold-deep); border-radius: 1px;
}
.bulb::after { /* C9 glass */
  content: "";
  width: 14px; height: 18px;
  background: var(--bulb, var(--warm));
  border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
  box-shadow: 0 0 10px 2px var(--bulb, var(--warm)), 0 0 26px 6px color-mix(in srgb, var(--bulb, var(--warm)) 45%, transparent);
  animation: twinkle 3.2s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}
@media (prefers-reduced-motion: reduce) { .bulb::after { animation: none; } }

[data-lights="multi"] .bulb:nth-child(5n + 1) { --bulb: #ff3b3b; }
[data-lights="multi"] .bulb:nth-child(5n + 2) { --bulb: #2fd16a; }
[data-lights="multi"] .bulb:nth-child(5n + 3) { --bulb: #4da3ff; }
[data-lights="multi"] .bulb:nth-child(5n + 4) { --bulb: #ffa53d; }
[data-lights="multi"] .bulb:nth-child(5n + 5) { --bulb: #ffd23d; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(23, 64, 43, 0.95), transparent 75%),
    var(--black);
  overflow: hidden;
}
.hero-inner { padding: 28px 20px 120px; text-align: center; }

.hero-logo { margin: 0 auto 22px; max-width: 520px; }
.hero-logo img { width: 100%; height: auto; }
.hero-lede { max-width: 34ch; margin: 0 auto 28px; font-size: 1.15rem; color: #ece6da; }
.hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; max-width: 360px; margin: 0 auto; }
.hero-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-phone { margin: 18px 0 0; font-weight: 700; letter-spacing: 0.06em; color: var(--gold); }

/* simple house roofline silhouette */
.roofline {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 90px;
  background: var(--cream);
  clip-path: polygon(0 100%, 0 70%, 18% 70%, 32% 20%, 46% 70%, 54% 70%, 54% 45%, 70% 45%, 80% 10%, 90% 45%, 100% 45%, 100% 100%);
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
section[id] { scroll-margin-top: 64px; }
.section-kicker {
  margin: 0 0 8px;
  font: 700 0.78rem/1.2 var(--font-caps); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--red);
}

/* About */
.about { padding-top: 32px; }
.trust-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.trust-list li {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.trust-list svg {
  width: 40px; height: 40px; padding: 9px; border-radius: 10px;
  background: var(--black); color: var(--gold);
}

/* Services */
.services { background: var(--paper); }
.service-grid { display: grid; gap: 16px; margin-top: 24px; }
.service-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.service-card p:last-child { margin-bottom: 0; }
.service-feature { background: var(--evergreen); color: #ece6da; border-color: var(--evergreen); overflow: hidden; }
.service-feature h3 { color: #fff; }
.mini-string { height: 38px; margin: -24px -24px 16px; padding: 0 10px; }
.service-icon { width: 56px; height: 56px; color: var(--green); margin-bottom: 8px; }
.color-toggle {
  display: inline-flex; padding: 4px; gap: 4px; margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.08); border-radius: 999px;
}
.color-toggle button {
  min-height: 40px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: transparent; color: #ece6da; font: 700 0.95rem var(--font-body); cursor: pointer;
}
.color-toggle button[aria-pressed="true"] { background: var(--gold); color: var(--black); }
.fine-print { font-size: 0.95rem; color: #bdb6a6; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; counter-reset: none; }
.steps li {
  position: relative;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px 76px;
}
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }
.step-num {
  position: absolute; left: 20px; top: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--black);
  font: 700 1.2rem var(--font-display);
  box-shadow: 0 0 16px rgba(212, 174, 92, 0.6);
}
.lease-note {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 24px; padding: 20px;
  border-radius: var(--radius);
  background: var(--evergreen); color: #ece6da;
  border-top: 3px solid var(--gold);
}
.lease-note strong { color: #fff; }
.lease-note p { margin: 0; }
.lease-note svg { width: 30px; height: 30px; color: var(--gold); filter: drop-shadow(0 0 8px rgba(212, 174, 92, 0.7)); }

/* Portfolio */
.portfolio { background: var(--paper); }
.gallery { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--black); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: 10px 14px; color: #ece6da; font-size: 0.95rem; }

/* Quote form */
.quote { background: linear-gradient(180deg, var(--cream), #f1e9da); }
.quote-intro a { color: var(--red); font-weight: 700; }
.quote-form {
  margin-top: 24px; padding: 24px 20px;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; gap: 18px;
}
.field { display: grid; gap: 6px; margin: 0; min-width: 0; }
fieldset.field { border: 0; padding: 0; }
.field-row { display: grid; gap: 18px; }
.field label, .field legend { font-weight: 700; color: var(--black); padding: 0; }
.optional { font-weight: 400; color: var(--muted); }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea {
  width: 100%; min-height: 50px;
  padding: 12px 14px;
  font: 1rem var(--font-body); /* 16px+ prevents iOS zoom on focus */
  color: var(--ink); background: #fff;
  border: 1.5px solid #cdc3b0; border-radius: 10px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(212, 174, 92, 0.35); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.choice {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 12px;
  border: 1.5px solid #cdc3b0; border-radius: 10px; cursor: pointer;
  font-weight: 600 !important; color: var(--ink) !important; line-height: 1.25;
}
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--red); }
.choice:has(input:checked) { border-color: var(--gold-deep); background: #fbf3e1; }
.form-status { margin: 0; font-weight: 700; min-height: 1.5em; }
.form-status.is-error { color: var(--red); }
.form-status.is-success { color: var(--green); }
.quote-form.is-sent { text-align: center; }

/* Footer */
.site-footer { background: var(--black); color: #d3ccbd; padding: 44px 0 32px; }
.footer-inner { display: grid; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 240px; height: auto; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 40px; word-break: break-all; }
.footer-contact a:hover { color: #fff; }
.footer-contact svg { width: 20px; height: 20px; color: var(--gold); }
.footer-copy { margin: 0; font-size: 0.9rem; color: #8f897c; }

/* Sticky action bar (phones) */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(18, 18, 18, 0.97);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.action-bar a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; border-radius: 12px;
  color: #fff; text-decoration: none; font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}
.action-bar svg { width: 20px; height: 20px; color: var(--gold); }
.action-bar .action-quote { background: var(--red); color: #fff; }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .trust-list { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .quote-form { padding: 32px; }
}

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .action-bar { display: none; }
  .header-call { display: none; }
  .site-nav { display: flex; align-items: center; gap: 22px; }
  .site-nav a:not(.btn) { color: #ece6da; text-decoration: none; font-weight: 600; }
  .site-nav a:not(.btn):hover { color: #fff; }

  .hero-inner { padding: 64px 20px 150px; }
  .hero-actions { flex-direction: row; max-width: none; justify-content: center; align-items: center; }
  .hero-contact { display: flex; }
  .roofline { height: 120px; }

  .section { padding: 88px 0; }
  .about { padding-top: 48px; }
  .service-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 76px 20px 22px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .footer-copy { grid-column: 1 / -1; }
}
