/* ==========================================================================
   Desert Peak Roofing — DEMO landing page
   Desert-editorial: warm paper, sand, terracotta clay, umber.
   Contrast (WCAG): ink/paper 15:1 · muted/paper 7.2:1 · paper/clay 5.7:1
                    clay/sand 4.9:1 · on-dark/umber 13.9:1 · clay-light/umber 6.5:1
   ========================================================================== */

:root {
  --paper: #F6EFE4;
  --sand: #ECDFCB;
  --ink: #231914;
  --muted: #5C4B3F;
  --line: rgba(35, 25, 20, 0.16);
  --clay: #A13F1C;
  --clay-deep: #7E2F13;
  --clay-light: #E58A5E;
  --umber: #271A14;
  --on-dark: #F3E8D8;
  --on-dark-muted: #C8B6A0;

  --focus: var(--clay-deep);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 6px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(72px, 10vw, 128px);
  --header-h: 72px;
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; }

p { margin: 0; max-width: 65ch; text-wrap: pretty; }

ul, ol { margin: 0; padding: 0; list-style: none; }

figure, blockquote { margin: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

svg { display: block; }

::selection { background: var(--clay); color: var(--paper); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 26px;
  border: 0;
  border-radius: var(--radius);
  font: 600 1.0625rem/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 1px 0 rgba(35, 25, 20, 0.25), 0 8px 20px -10px rgba(161, 63, 28, 0.6);
}

.btn__icon { width: 20px; height: 20px; flex: none; }

.link-arrow {
  display: inline-flex;
  gap: 8px;
  font-weight: 600;
  color: var(--clay);
  text-decoration: underline;
  text-decoration-color: rgba(161, 63, 28, 0.35);
}
.link-arrow span { transition: transform 200ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--clay-deep); }
  .link-arrow:hover { text-decoration-color: currentColor; }
  .link-arrow:hover span { transform: translateX(3px); }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--display);
  font-size: 1.3125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.logo em { font-style: italic; font-weight: 400; color: var(--clay); }
.logo__mark { width: 30px; height: 30px; color: var(--ink); }

.site-nav {
  display: none;
  gap: 28px;
  margin-left: auto;
}
.site-nav a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  padding-block: 6px;
  transition: color 160ms var(--ease-out);
}

.header-phone {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
  text-decoration: none;
}
.header-phone__label { font-size: 0.875rem; color: var(--muted); }
.header-phone__num {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover { color: var(--ink); }
  .header-phone:hover .header-phone__num { text-decoration: underline; }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 112px); }

.hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.hero__sub {
  margin-top: 24px;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  color: var(--muted);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 36px;
}
.hero__phone { font-size: 1rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.proof {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.proof dt { font-size: 0.875rem; color: var(--muted); }
.proof dd { margin: 2px 0 0; font-weight: 600; font-size: 1rem; }

.hero__art {
  position: relative;
  overflow: hidden;
  height: clamp(260px, 60vw, 560px);
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--sand);
}
.hero__art svg { width: 100%; height: 100%; }

.hero__tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 10px 14px;
  background: var(--paper);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--ink);
  box-shadow: 0 6px 18px -8px rgba(35, 25, 20, 0.45);
}

/* ---------- Climate problem ---------- */

.climate { background: var(--sand); }

.climate__head {
  display: grid;
  gap: 20px;
  align-items: end;
}
.climate__head p { color: var(--muted); font-size: 1.1875rem; }

.climate__body {
  display: grid;
  gap: 24px;
  margin-top: 56px;
}

.stressor h3 { margin-bottom: 10px; }
.stressor p { color: var(--muted); }

.stressor--lead {
  padding: clamp(28px, 4vw, 48px);
  background: var(--paper);
  border-radius: var(--radius);
}
.stressor--lead h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

.stressor__stat {
  margin-bottom: 20px;
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 7.5rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--clay);
  font-variant-numeric: lining-nums;
}

.stressor-pair {
  display: grid;
  align-content: center;
}
.stressor-pair .stressor { padding-block: 28px; }
.stressor-pair .stressor + .stressor { border-top: 1px solid var(--line); }

/* Season strip — the page's one authored scroll moment */
.season { margin-top: 64px; }

.season__cap {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.season__chart {
  --cols: repeat(24, minmax(0, 1fr));
  padding: 20px 16px 24px;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
}

.season__months {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.season__bands {
  display: grid;
  grid-template-columns: var(--cols);
  row-gap: 14px;
}

.band {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.band::before {
  content: "";
  height: 14px;
  border-radius: 999px;
  transform-origin: left center;
}
.band span {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
}

/* 24 half-month columns: line 1 = Jan 1, line 25 = Dec 31 */
.band--inspect { grid-column: 5 / 11; }
.band--inspect::before { background: #5E6B4E; }

.band--heat { grid-column: 9 / 19; align-items: flex-end; }
.band--heat::before { background: var(--clay-light); align-self: stretch; }

.band--monsoon { grid-column: 12 / 19; align-items: flex-end; }
.band--monsoon::before { background: var(--umber); align-self: stretch; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .band::before {
      animation: band-grow linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 40%;
    }
    .band--heat::before { animation-range: entry 20% cover 45%; }
    .band--monsoon::before { animation-range: entry 30% cover 50%; }
  }
}

@keyframes band-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- Services ---------- */

.services__grid { display: grid; gap: 48px; }

.services__intro p { margin-top: 20px; color: var(--muted); }
.services__intro .link-arrow { margin-top: 24px; }

.service-list { counter-reset: svc; }

.service {
  counter-increment: svc;
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 8px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }

.service::before {
  content: counter(svc, decimal-leading-zero);
  grid-row: 1 / 4;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--clay);
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
}
.service h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }
.service p { margin-top: 8px; color: var(--muted); }
.service .service__meta {
  margin-top: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Why us (dark band) ---------- */

.why {
  --focus: var(--on-dark);
  background: var(--umber);
  color: var(--on-dark);
}

.why h2 { font-size: clamp(2.25rem, 5vw, 4rem); max-width: 18ch; }
.why__accent { color: var(--clay-light); font-style: italic; font-weight: 400; }

.why__cols {
  display: grid;
  gap: 48px;
  margin-top: 56px;
}

.why__col h3 { margin-bottom: 20px; font-size: 1.25rem; }

.ticks li,
.crosses li {
  position: relative;
  padding: 14px 0 14px 36px;
  border-top: 1px solid rgba(243, 232, 216, 0.14);
}
.ticks li::before,
.crosses li::before {
  position: absolute;
  left: 0;
  top: 14px;
  font-weight: 700;
}
.ticks li::before { content: "✓"; color: var(--clay-light); }
.ticks strong { color: var(--on-dark); }

.why__col--not { color: var(--on-dark-muted); }
.why__col--not h3 { color: var(--on-dark); }
.crosses li::before { content: "✕"; color: var(--on-dark-muted); }

/* ---------- Reviews ---------- */

.reviews__grid {
  display: grid;
  gap: 40px;
}

.score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 28px;
}
.score__num {
  font-family: var(--display);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.score__of { color: var(--muted); }
.score__note { margin-top: 6px; color: var(--muted); font-size: 1rem; }
.stars { color: var(--clay); letter-spacing: 2px; margin-right: 6px; }

.quote blockquote p {
  font-size: 1.125rem;
}
.quote figcaption {
  margin-top: 14px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.quote figcaption strong { color: var(--ink); }

.quote:not(.quote--feature) {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.quote--feature {
  position: relative;
  padding-top: 40px;
}
.quote--feature::before {
  content: "“";
  position: absolute;
  top: -12px;
  left: -4px;
  font-family: var(--display);
  font-size: 6rem;
  line-height: 1;
  color: var(--clay);
}
.quote--feature blockquote p {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.8vw, 2.125rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 32ch;
}

/* ---------- Service areas ---------- */

.areas { padding-top: 0; }

.areas .wrap {
  padding-top: var(--section-y);
  border-top: 1px solid var(--line);
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin-top: 36px;
  font-family: var(--display);
  font-size: clamp(1.625rem, 3.6vw, 2.75rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.area-list li + li::before {
  content: "/";
  margin-inline: 0.35em;
  color: var(--clay);
  font-weight: 300;
}

.areas__note { margin-top: 28px; color: var(--muted); }
.areas__note a { color: var(--clay); font-weight: 600; }

/* ---------- FAQ ---------- */

.faq { background: var(--sand); }

.faq__grid { display: grid; gap: 40px; }

.faq__head p { margin-top: 16px; color: var(--muted); }
.faq__head a { color: var(--clay); font-weight: 600; }

.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }

.faq__item summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-size: 1.1875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::before,
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--clay);
  transition: transform 220ms var(--ease-out);
}
.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0deg); }

.faq__body { padding: 0 48px 24px 0; }
.faq__body p { color: var(--muted); }

.faq__item[open] .faq__body { animation: faq-in 240ms var(--ease-out); }

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Final CTA ---------- */

.final {
  --focus: var(--paper);
  padding-block: var(--section-y);
  background: var(--clay);
  color: var(--paper);
}

.final__grid { display: grid; gap: 48px; align-items: end; }

.final h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); max-width: 16ch; }

.final__phone {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--display);
  font-size: clamp(2.5rem, 7.5vw, 4.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
  text-decoration-color: rgba(246, 239, 228, 0.45);
  transition: text-decoration-color 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.final__phone:active { transform: scale(0.97); }

.final__alt { margin-top: 20px; }
.final__alt a { color: var(--paper); font-weight: 600; word-break: break-word; }

@media (hover: hover) and (pointer: fine) {
  .final__phone:hover { text-decoration-color: var(--paper); }
}

.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 0 16px 52px;
  border-top: 1px solid rgba(246, 239, 228, 0.3);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
}

/* ---------- Footer ---------- */

.site-footer {
  --focus: var(--on-dark);
  padding-block: 56px;
  background: var(--umber);
  color: var(--on-dark-muted);
  font-size: 1rem;
}
.site-footer__grid { display: grid; gap: 28px; }
.site-footer p + p { margin-top: 8px; }
.site-footer a { color: var(--on-dark); }
.logo--footer { color: var(--on-dark); }
.logo--footer em { color: var(--clay-light); }
.site-footer__fine {
  padding-top: 24px;
  border-top: 1px solid rgba(243, 232, 216, 0.14);
  font-size: 0.875rem;
}

/* ---------- Sticky mobile call bar ---------- */

.call-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -12px rgba(35, 25, 20, 0.3);
}
.call-bar__btn { width: 100%; }

@media (max-width: 899px) {
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ---------- Breakpoints ---------- */

@media (min-width: 640px) {
  .proof { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .proof > div { padding-inline: 20px; border-left: 1px solid var(--line); }
  .proof > div:first-child { padding-left: 0; border-left: 0; }

  .season__chart { padding: 28px 32px 32px; }
  .season__months { font-size: 0.875rem; }

  .why__cols { grid-template-columns: 1fr 1fr; gap: 64px; }

  .reviews__grid { grid-template-columns: 1fr 1fr; }
  .reviews__score,
  .quote--feature { grid-column: 1 / -1; }

  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__fine { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .header-phone { display: flex; }
  .call-bar { display: none; }

  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 64px; }

  .climate__head { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
  .climate__body { grid-template-columns: 7fr 5fr; gap: 48px; }
  .stressor-pair .stressor { padding-inline: 8px; }

  .services__grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .services__intro { position: sticky; top: calc(var(--header-h) + 40px); }

  .reviews__grid {
    grid-template-columns: 4fr 4fr 4fr;
    column-gap: 56px;
    row-gap: 48px;
  }
  .reviews__score { grid-column: 1; grid-row: 1 / 3; }
  .quote--feature { grid-column: 2 / 4; grid-row: 1; }

  .faq__grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .faq__head { position: sticky; top: calc(var(--header-h) + 40px); }

  .final__grid { grid-template-columns: 7fr 5fr; gap: 80px; }

  .site-footer__grid { grid-template-columns: 2fr 1fr; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:active,
  .final__phone:active { transform: none; }
}
