/* Apollo Home Solutions - design system v2 "night catalog" (2026-08-17)
   Warm night-sky canvas, photography carries color, single amber accent.
   Young Serif display + Hanken Grotesk text. ASCII only. */

:root {
  --night: oklch(0.16 0.012 265);
  --night-2: oklch(0.19 0.014 265);
  --night-3: oklch(0.24 0.018 265);
  --hairline: color-mix(in oklch, var(--night-3) 70%, transparent);
  --ink: oklch(0.96 0.006 85);
  --ink-dim: oklch(0.74 0.012 85);
  --ink-faint: oklch(0.58 0.012 85);
  --amber: oklch(0.8 0.14 75);
  --amber-deep: oklch(0.68 0.13 65);
  --amber-ghost: color-mix(in oklch, var(--amber) 14%, transparent);
  --serif: "Figtree", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: "Figtree", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-deep); }
::selection { background: var(--amber); color: var(--night); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* ---------- Type scale ---------- */
h1, h2, .display {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.1rem); line-height: 1.12; max-width: 21ch; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.55rem); line-height: 1.2; margin-bottom: 20px; max-width: 26ch; }
h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -0.005em; margin-bottom: 8px; }
p { max-width: 68ch; }

.kicker, .section-kicker {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 18px;
}
.answer-first { font-size: 1.18rem; line-height: 1.65; color: var(--ink); max-width: 62ch; margin-bottom: 18px; }
.section-intro { color: var(--ink-dim); max-width: 62ch; margin-bottom: 36px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.solid, body.no-hero .site-header {
  background: color-mix(in oklch, var(--night) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px); height: 72px; }
.brand { display: flex; align-items: baseline; gap: 9px; color: var(--ink); line-height: 1; }
.brand:hover { color: var(--ink); }
.brand .name { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.015em; }
.brand .tag { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-dim); }
.nav { display: flex; gap: clamp(14px, 2vw, 26px); align-items: center; margin-left: auto; }
.nav a { color: var(--ink-dim); font-size: 0.92rem; font-weight: 500; transition: color 0.25s var(--ease); white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.site-header .btn { white-space: nowrap; }
.header-phone { font-weight: 700; font-size: 0.95rem; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.header-phone:hover { color: var(--amber); }

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: 0.97rem; border: 0; cursor: pointer;
  font-family: var(--sans); line-height: 1.35;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--night); }
.btn-primary:hover { background: var(--amber-deep); color: var(--night); }
.btn-ghost { border: 1px solid color-mix(in oklch, var(--ink) 34%, transparent); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.7rem; cursor: pointer; margin-left: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero-slides, .hero::before { position: absolute; inset: 0; z-index: -2; }
.hero-slides .slide {
  position: absolute; inset: -4%;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1);
  animation: heroSlide 21s infinite;
}
.hero-slides .slide:nth-child(1) { animation-delay: 0s; }
.hero-slides .slide:nth-child(2) { animation-delay: 7s; }
.hero-slides .slide:nth-child(3) { animation-delay: 14s; }
@keyframes heroSlide {
  0% { opacity: 0; transform: scale(1); }
  6% { opacity: 1; }
  33.3% { opacity: 1; transform: scale(1.07); }
  39.3% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; }
}
/* fallback single image if .hero has inline bg (interior pages) */
.hero::before { content: ""; background: var(--hero-img, none) center/cover no-repeat; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(92deg,
      color-mix(in oklch, var(--night) 72%, transparent) 0%,
      color-mix(in oklch, var(--night) 38%, transparent) 46%,
      transparent 78%),
    linear-gradient(180deg,
      color-mix(in oklch, var(--night) 55%, transparent) 0%,
      color-mix(in oklch, var(--night) 10%, transparent) 42%,
      color-mix(in oklch, var(--night) 78%, transparent) 82%,
      var(--night) 100%);
}
.hero .wrap { position: relative; padding-top: 140px; padding-bottom: clamp(56px, 9vh, 110px); }
.hero p.lede { margin: 22px 0 34px; font-size: clamp(1.08rem, 1.6vw, 1.24rem); line-height: 1.65; color: var(--ink); max-width: 56ch; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.trust-line { margin-top: 30px; color: var(--ink-dim); font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.trust-line strong { color: var(--amber); font-weight: 700; white-space: nowrap; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .hero-slides .slide { animation: none; }
  .hero-slides .slide:nth-child(1) { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 118px) 0; }
section.tight { padding: clamp(48px, 6vw, 80px) 0; }
.band { background: var(--night-2); border-block: 1px solid var(--hairline); }

/* Editorial split */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.flip { grid-template-columns: 7fr 5fr; }
.split .media img { border-radius: 18px; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* Fact list (replaces stat cards) */
.facts { list-style: none; margin-top: 30px; border-top: 1px solid var(--hairline); }
.facts li { display: flex; align-items: baseline; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.facts .n { font-family: var(--serif); font-size: 1.7rem; color: var(--amber); min-width: 4.4ch; }
.facts .d { color: var(--ink-dim); font-size: 0.99rem; }
.facts .d strong { color: var(--ink); font-weight: 700; }

/* Occasion photo tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tile {
  position: relative; display: block; border-radius: 18px; overflow: hidden;
  aspect-ratio: 16 / 10; color: var(--ink); isolation: isolate;
}
.tile.tall { grid-row: span 2; aspect-ratio: auto; min-height: 100%; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.tile:hover img { transform: scale(1.045); }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 42%, color-mix(in oklch, var(--night) 86%, transparent) 100%);
}
.tile .tile-copy { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 2; }
.tile h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; margin-bottom: 4px; }
.tile p { color: var(--ink-dim); font-size: 0.93rem; line-height: 1.5; max-width: 44ch; }
.tile .go { position: absolute; right: 20px; bottom: 20px; z-index: 2; color: var(--amber); font-size: 1.3rem; transition: transform 0.3s var(--ease); }
.tile:hover .go { transform: translateX(4px); }
.tile:hover { color: var(--ink); }

/* Feature rows (replaces chips) */
.features { border-top: 1px solid var(--hairline); }
.features .row { display: grid; grid-template-columns: minmax(180px, 26%) 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.features .row h3 { font-size: 1.1rem; color: var(--ink); margin: 0; }
.features .row p { color: var(--ink-dim); font-size: 0.98rem; margin: 0; }

/* Legacy chips (interior pages) restyled quiet */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid var(--hairline); background: var(--night-2); border-radius: 999px; padding: 8px 16px; font-size: 0.88rem; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 9px; }
.chip .sw { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 1px solid color-mix(in oklch, var(--ink) 25%, transparent); }

/* Cards (interior pages) as quiet panels */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--night-2); border: 1px solid var(--hairline); border-radius: 18px; overflow: hidden; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card .pad { padding: 24px; }
.card p { color: var(--ink-dim); font-size: 0.97rem; }

/* Stats (legacy) as fact-style, no boxes */
.stat { text-align: left; padding: 20px 0; border-top: 2px solid var(--amber); }
.stat .num { font-family: var(--serif); font-size: 2.1rem; color: var(--ink); }
.stat .lbl { color: var(--ink-dim); font-size: 0.92rem; }

/* Pull-quote photo band */
.photo-band { position: relative; padding: clamp(96px, 14vw, 170px) 0; overflow: hidden; isolation: isolate; }
.photo-band .bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.photo-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in oklch, var(--night) 62%, transparent); }
.photo-band .display { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.3; max-width: 30ch; }

/* CTA band */
.cta-band { background: var(--night-2); border-block: 1px solid var(--hairline); text-align: center; }
.cta-band h2 { margin-inline: auto; }
.cta-band p { color: var(--ink-dim); margin: 0 auto 26px; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gallery-grid img { border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* FAQ rows: bare h3s sitting directly in a .wrap are Q&A headings */
.faq-rows h3, .wrap > h3 { padding-top: 22px; border-top: 1px solid var(--hairline); margin-top: 8px; }
.faq-rows p { margin-bottom: 22px; }

/* Focus states */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.btn-primary:focus-visible { outline-color: var(--ink); }
.quote-form input:focus-visible, .quote-form select:focus-visible, .quote-form textarea:focus-visible { outline: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 56px 0 36px; color: var(--ink-dim); font-size: 0.93rem; background: var(--night-2); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 34px; }
.site-footer h4 { color: var(--ink); font-size: 0.95rem; margin-bottom: 12px; font-weight: 700; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-dim); }
.site-footer a:hover { color: var(--ink); }
.footer-brand { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); margin-bottom: 8px; }
.footer-legal { border-top: 1px solid var(--hairline); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--ink-faint); }

/* ---------- Forms ---------- */
.quote-form {
  display: grid; gap: 15px; max-width: 560px;
  background: var(--night-2); border: 1px solid var(--hairline);
  border-radius: 20px; padding: clamp(24px, 4vw, 36px);
}
.quote-form input, .quote-form select, .quote-form textarea {
  background: var(--night-2); border: 1px solid var(--night-3); border-radius: 12px;
  color: var(--ink); padding: 14px 16px; font-size: 1rem; width: 100%; font-family: var(--sans);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus {
  outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-ghost);
}
label { font-size: 0.88rem; color: var(--ink-dim); }

/* Pages without a hero: solid header + clearance */
body.no-hero main { padding-top: 104px; }

/* ---------- Quote modal ---------- */
.qm-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in oklch, var(--night) 72%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.qm-overlay.qm-in { opacity: 1; }
.qm {
  background: var(--night-2); border: 1px solid var(--hairline); border-radius: 20px;
  width: min(560px, 100%); max-height: min(86svh, 780px); overflow-y: auto;
  padding: 30px 32px; position: relative;
  transform: translateY(12px); transition: transform 0.3s var(--ease);
}
.qm-overlay.qm-in .qm { transform: none; }
.qm h3 { font-size: 1.5rem; margin-bottom: 4px; }
.qm .qm-sub { color: var(--ink-dim); font-size: 0.95rem; margin-bottom: 22px; }
.qm-close {
  position: absolute; top: 16px; right: 16px; background: none; border: 0;
  color: var(--ink-dim); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 6px;
}
.qm-close:hover { color: var(--ink); }
.qm .seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qm .seg button {
  background: var(--night); border: 1px solid var(--night-3); border-radius: 10px;
  color: var(--ink-dim); padding: 11px 6px; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; font-family: var(--sans); transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.qm .seg button.on { border-color: var(--amber); color: var(--ink); }
.qm .qm-msg { font-size: 0.95rem; margin-top: 12px; }
.qm .qm-msg.err { color: oklch(0.72 0.16 25); }
.qm-done { text-align: center; padding: 28px 6px; }
.qm-done .big { font-size: 2.4rem; color: var(--amber); }
body.qm-open { overflow: hidden; }
@media (max-width: 480px) { .qm { padding: 24px 20px; } .qm .seg { grid-template-columns: 1fr 1fr; } }

/* ---------- Scroll reveals ---------- */
body.js .rv { opacity: 0; transform: translateY(14px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); transition-delay: var(--rvd, 0s); }
body.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .split, .split.flip { grid-template-columns: 1fr; }
  .split .media { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .features .row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 680px) {
  .nav { display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: var(--night); border-bottom: 1px solid var(--hairline); flex-direction: column; padding: 28px 24px; align-items: flex-start; gap: 20px; overflow-y: auto; }
  .nav.open { display: flex; }
  body.nav-open { overflow: hidden; }
  .nav a { font-size: 1.15rem; }
  .nav-toggle { display: block; }
  .header-phone .lbl { display: none; }
  .kicker, .section-kicker { letter-spacing: 0.12em; }
  .site-header .wrap .btn { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .tile.tall { grid-row: auto; aspect-ratio: 16 / 10; }
  .hero { min-height: 86svh; }
}

/* Phone-only hero crop. At phone widths the hero box is tall and narrow, so
   background-size:cover on the near-square desktop photo crops it to a
   meaningless vertical slice of the house. This portrait crop is framed on the
   gable cluster and porch so the lit roofline still reads at 375-560px.
   Scoped to 560px, NOT the 680px breakpoint: between 560 and 680 the box gets
   wider and shorter, and a portrait source would band badly there.
   !important is required because the slide's background-image is an inline style. */
@media (max-width: 560px) {
  .hero-slides .slide:nth-child(1) {
    background-image: url(/assets/img/hero-home-permanent-lighting-mobile.jpg) !important;
    background-position: center 42%;
  }
}

/* ---------- Blog: long-form prose + hub ----------
   The global reset zeroes every margin, so blog copy had no rhythm at all:
   paragraphs, headings and lists all ran together. Everything a post needs is
   scoped to .prose so the marketing pages keep their own tighter spacing. */
.prose { --flow: 24px; }
.prose p { color: var(--ink-dim); max-width: 68ch; margin-bottom: var(--flow); }
.prose p strong { color: var(--ink); font-weight: 700; }
/* the answer-first opener - the passage AI engines quote */
.prose > p:first-of-type {
  font-size: 1.2rem; line-height: 1.65; color: var(--ink);
  max-width: 62ch; margin-bottom: 8px;
}
.prose h2 {
  margin-top: clamp(52px, 6vw, 78px); margin-bottom: 18px;
  font-size: clamp(1.6rem, 3vw, 2.1rem); max-width: 26ch;
}
/* short amber rule instead of a full hairline: h2 is max-width capped, so a
   border-top on it renders as a stubby half-width line. */
.prose h2::before {
  content: ""; display: block; width: 56px; height: 2px;
  background: var(--amber); margin-bottom: clamp(20px, 2.4vw, 28px);
}
.prose h3 {
  margin-top: 36px; margin-bottom: 10px;
  font-size: 1.22rem; color: var(--ink); max-width: 46ch;
}
.prose h3 + p { margin-bottom: 22px; }
.prose ul { list-style: none; margin: 4px 0 var(--flow); }
.prose li {
  position: relative; padding-left: 26px; margin-bottom: 14px;
  color: var(--ink-dim); max-width: 66ch;
}
.prose li::before {
  content: ""; position: absolute; left: 4px; top: 0.72em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
}
.prose li strong { color: var(--ink); }
.crumbs { font-size: 0.84rem; color: var(--ink-faint); margin-bottom: clamp(28px, 4vw, 44px); }
.crumbs a { color: var(--ink-dim); }
.crumbs a:hover { color: var(--amber); }

/* In-post photography from real installs */
.post-fig { margin: clamp(34px, 5vw, 52px) 0; }
.post-fig img {
  width: 100%; border-radius: 18px; aspect-ratio: 16 / 10; object-fit: cover;
  border: 1px solid var(--hairline);
}
.post-fig figcaption {
  margin-top: 12px; font-size: 0.88rem; color: var(--ink-faint);
  max-width: 60ch;
}

.post-cta {
  margin-top: clamp(44px, 6vw, 64px); margin-bottom: 18px !important;
  padding: clamp(24px, 3vw, 32px); border-radius: 18px;
  background: var(--night-3); border: 1px solid var(--hairline);
  color: var(--ink) !important; max-width: none !important;
}
.post-cta .btn { margin-right: 10px; }

/* Hub */
.post-list { display: grid; gap: 22px; }
.post-card {
  padding: clamp(24px, 3vw, 34px); border-radius: 18px;
  background: var(--night-3); border: 1px solid var(--hairline);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.post-card:hover { border-color: var(--amber-ghost); transform: translateY(-2px); }
.post-card h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.65rem); margin-bottom: 6px;
  max-width: 34ch; border-top: 0; padding-top: 0; margin-top: 0;
}
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--amber); }
.post-date { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 12px; }
.post-card p { color: var(--ink-dim); margin-bottom: 14px; }
@media (min-width: 860px) { .post-list { grid-template-columns: repeat(2, 1fr); } }
