/* Tallpine Roofing — concept landing page.
   Warm and light: cream ground, dark brown ink, one orange. */

:root {
  --bg: #f4efe9;
  --bg-tint: #ece5dd;
  --card: #ffffff;
  --ink: #26190f;
  --ink-dim: #6a5a4e;
  --line: rgba(38, 25, 15, 0.14);
  --accent: #c85a17;
  --accent-ink: #ffffff;
  --star: #e6a700;
  --pad: clamp(1rem, 4vw, 3rem);
  --r: 14px;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--bg); padding: 0.75rem 1rem; text-decoration: none; border-radius: 8px; }
.skip:focus { top: 1rem; }

.page { max-width: 90rem; margin-inline: auto; }

/* ---------- Pills (buttons) ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.5rem 1.1rem; border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-size: 0.9375rem; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.pill:active { transform: translateY(1px); }
.pill--lg { min-height: 3.25rem; padding-inline: 1.5rem; }
.pill--full { width: 100%; }
.pill--dark { background: var(--ink); color: #fff; }
.pill--dark:hover { background: var(--accent); }
.pill--light { background: #fff; color: var(--ink); }
.pill--light:hover { background: var(--ink); color: #fff; }
.pill--glass { background: rgba(20, 12, 6, 0.55); color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.pill--glass:hover { background: rgba(20, 12, 6, 0.8); }
.pill--accent { background: var(--accent); color: var(--accent-ink); }
.pill--accent:hover { background: #a94a10; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0.75rem; border-radius: calc(var(--r) + 6px);
  min-height: min(calc(100dvh - 1.5rem), 46rem);
  display: flex; flex-direction: column; color: #fff; background: #2a1c12;
}

/* Before-and-after. --pos is the divider's place, 0% to 100% from the left. */
.cmp { position: absolute; inset: 0; z-index: -1; }
.cmp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(20, 12, 6, 0.72), rgba(20, 12, 6, 0.3) 70%),
    linear-gradient(to bottom, rgba(20, 12, 6, 0.45), rgba(20, 12, 6, 0) 30%);
}
.cmp-tag {
  position: absolute; bottom: 1rem; padding: 0.3rem 0.8rem; border-radius: 999px;
  background: rgba(20, 12, 6, 0.7); border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.8125rem; font-weight: 500;
}
.cmp-tag--before { left: 1rem; }
.cmp-tag--after { right: 1rem; }
.cmp-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #fff; touch-action: none; cursor: ew-resize;
}
/* A wider invisible strip so the divider is easy to grab with a finger. */
.cmp-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -22px; right: -22px; }
.cmp-grip {
  position: absolute; left: 50%; bottom: 4.25rem; translate: -50% 0;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: #fff; color: var(--ink);
}
.cmp-range { position: absolute; left: 50%; bottom: 0.9rem; width: 1px; height: 1px; opacity: 0; }
.cmp-range:focus-visible ~ .cmp-handle .cmp-grip,
.cmp:has(.cmp-range:focus-visible) .cmp-grip { outline: 3px solid var(--accent); outline-offset: 3px; }

.bar {
  position: relative; z-index: 3; align-self: center;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: min(100% - 1.5rem, 46rem); margin-top: 0.75rem; padding: 0.4rem 0.4rem 0.4rem 1rem;
  background: #fff; color: var(--ink); border-radius: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.03em; text-decoration: none; }
.nav { display: none; gap: 1.5rem; font-size: 0.9375rem; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; color: var(--ink-dim); transition: color 0.2s ease; }
.nav a:hover { color: var(--accent); }
.bar-actions { display: flex; gap: 0.4rem; }
.menu-btn { background: var(--bg); color: var(--ink); }
.nav[data-open="true"] {
  display: grid; gap: 0; position: absolute; left: 0; right: 0; top: calc(100% + 0.4rem);
  padding: 0.5rem 1rem; background: #fff; border-radius: 12px;
}
@media (min-width: 760px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
}

.hero-copy {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2.5rem var(--pad) 7.5rem; text-align: center; pointer-events: none;
}
.hero-copy a { pointer-events: auto; }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; font-size: 0.8125rem; font-weight: 500; }
.hero-badges span { padding: 0.3rem 0.8rem; border-radius: 999px; background: rgba(20, 12, 6, 0.6); border: 1px solid rgba(255, 255, 255, 0.3); }
.hero h1 { margin-top: 1.1rem; font-size: clamp(2.25rem, 1.3rem + 4.2vw, 4.25rem); max-width: 13ch; }
.hero-sub { margin-top: 1rem; max-width: 44ch; font-size: 1.0625rem; color: #f3ebe4; }
.hero-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.75rem; }

/* ---------- Trust row ---------- */
.trust {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem;
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--pad); margin-inline: var(--pad);
  border-bottom: 1px solid var(--line); text-align: center;
}
.trust svg { color: var(--accent); margin-inline: auto; }
.trust h2 { margin-top: 0.75rem; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.trust p { margin: 0.4rem auto 0; max-width: 24ch; font-size: 0.9375rem; color: var(--ink-dim); }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Sections ---------- */
.sec { padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad); }
.sec--tint { background: var(--bg-tint); border-radius: calc(var(--r) + 6px); margin-inline: 0.75rem; }
.eyebrow { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); text-align: center; }
.sec-title { margin: 0.9rem auto 0; max-width: 18ch; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); text-align: center; }
.eyebrow--left, .sec-title--left { text-align: left; margin-inline: 0; }
.sec-sub { margin: 1rem auto 0; max-width: 46ch; text-align: center; color: var(--ink-dim); }
.sec-foot { margin: 2.5rem auto 0; max-width: 44ch; text-align: center; color: var(--ink-dim); }
.sample-note { margin: 1rem auto 0; max-width: 46ch; text-align: center; font-size: 0.875rem; color: var(--ink-dim); }

/* ---------- Services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; max-width: 62rem; margin: clamp(2rem, 5vw, 3.5rem) auto 0; }
.svc { position: relative; display: block; overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 5; background: #2a1c12; color: #fff; text-decoration: none; }
.svc img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.svc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 12, 6, 0.88), rgba(20, 12, 6, 0.1) 55%); }
.svc-name { position: absolute; z-index: 1; left: 1rem; right: 3.25rem; bottom: 1rem; font-size: 1.0625rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.svc-go {
  position: absolute; z-index: 1; right: 0.8rem; bottom: 0.8rem; display: grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 50%; background: rgba(255, 255, 255, 0.22); color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
}
@media (hover: hover) {
  .svc:hover img { transform: scale(1.05); }
  .svc:hover .svc-go { background: #fff; color: var(--ink); }
}
.svc:focus-visible .svc-go { background: #fff; color: var(--ink); }
@media (min-width: 760px) { .svc-grid { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } .svc-name { font-size: 1.25rem; } }

/* ---------- Reviews ---------- */
.rev-grid { display: grid; gap: 0.75rem; max-width: 62rem; margin: clamp(2rem, 5vw, 3.5rem) auto 0; }
.rev { display: flex; flex-direction: column; padding: 1.5rem; border-radius: var(--r); background: var(--card); }
.stars { color: var(--star); letter-spacing: 0.12em; font-size: 0.9375rem; }
.rev blockquote { margin-top: 0.9rem; font-size: 1rem; }
.rev figcaption { margin-top: auto; padding-top: 1.5rem; font-size: 0.9375rem; }
.rev figcaption b { display: block; font-weight: 600; }
.rev figcaption span { color: var(--ink-dim); }
@media (min-width: 760px) {
  .rev-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .rev:nth-child(2) { margin-top: 2rem; }
}

/* ---------- Why ---------- */
.why { display: grid; gap: 2.5rem; max-width: 68rem; margin-inline: auto; }
.why-img { position: relative; overflow: hidden; border-radius: var(--r); }
.why-img img { width: 100%; aspect-ratio: 7 / 8; object-fit: cover; }
.why-img figcaption {
  position: absolute; left: 1rem; bottom: 1rem; padding: 0.35rem 0.8rem; border-radius: 999px;
  background: #fff; font-size: 0.8125rem; font-weight: 500;
}
.why-list { margin: 2rem 0 2.25rem; display: grid; gap: 1.1rem; }
.why-list li { position: relative; padding-left: 1.75rem; color: var(--ink-dim); max-width: 46ch; }
.why-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--accent); }
.why-list b { color: var(--ink); font-weight: 600; }
@media (min-width: 860px) { .why { grid-template-columns: 0.9fr 1fr; align-items: center; gap: clamp(2.5rem, 6vw, 5rem); } }

/* ---------- Steps: slightly tilted cards that straighten on hover ---------- */
.step-grid { display: grid; gap: 0.9rem; max-width: 66rem; margin: clamp(2.5rem, 5vw, 4rem) auto 0; }
.step {
  display: flex; flex-direction: column; min-height: 14rem; padding: 1.5rem; border-radius: var(--r);
  background: var(--card); transition: rotate 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.step-n { font-size: 1.375rem; font-weight: 500; color: var(--accent); letter-spacing: -0.02em; }
.step h3 { margin-top: auto; padding-top: 2.5rem; font-size: 1.1875rem; }
.step p { margin-top: 0.5rem; font-size: 0.9375rem; color: var(--ink-dim); }
@media (min-width: 860px) {
  .step-grid { grid-template-columns: repeat(4, 1fr); }
  .step:nth-child(odd) { rotate: -1.6deg; }
  .step:nth-child(even) { rotate: 1.4deg; translate: 0 0.6rem; }
  .step:hover { rotate: 0deg; translate: 0 -0.25rem; }
}

/* ---------- Quote ---------- */
.quote { display: grid; gap: 2.5rem; max-width: 68rem; margin-inline: auto; }
.quote-copy > p { margin-top: 1.1rem; max-width: 40ch; color: var(--ink-dim); }
.promise { margin-top: 1.75rem; display: grid; gap: 0.7rem; }
.promise li { position: relative; padding-left: 1.75rem; }
.promise li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.42em; width: 0.9rem; height: 0.5rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); rotate: -45deg;
}
.quote-call a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; color: var(--ink); }
.form { padding: clamp(1.25rem, 3vw, 2rem); border-radius: calc(var(--r) + 4px); background: var(--card); }
.form label { display: block; margin: 1.1rem 0 0.45rem; font-size: 0.875rem; font-weight: 500; }
.form label:first-child { margin-top: 0; }
.form input, .form select {
  width: 100%; min-height: 3rem; padding: 0.6rem 0.9rem; border: 1px solid rgba(38, 25, 15, 0.28); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: inherit;
}
.form input::placeholder { color: #75665b; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.1rem; }
.form .pill { margin-top: 1.5rem; }
.form-note { margin-top: 0.9rem; font-size: 0.875rem; color: var(--ink-dim); text-align: center; }
@media (min-width: 860px) { .quote { grid-template-columns: 1fr minmax(0, 27rem); align-items: center; gap: 4rem; } }

/* ---------- Footer ---------- */
.foot { margin: 0 0.75rem 0.75rem; padding: clamp(2.5rem, 5vw, 4rem) var(--pad) 1.75rem; border-radius: calc(var(--r) + 6px); background: var(--ink); color: #f4efe9; }
.foot-grid { display: grid; gap: 2.25rem; }
.foot-grid p { margin-top: 0.75rem; max-width: 32ch; color: #cbbfb5; }
.foot h2 { margin-bottom: 0.9rem; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: #cbbfb5; }
.foot li { padding: 0.2rem 0; }
.foot-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(244, 239, 233, 0.16); font-size: 0.875rem; color: #cbbfb5; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ---------- Scroll reveal: only when motion is welcome ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; translate: 0 18px; transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .reveal.in { opacity: 1; translate: 0 0; }
  .js .step.reveal { transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), rotate 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
}
@media (min-width: 860px) and (prefers-reduced-motion: no-preference) {
  .js .step.reveal.in:nth-child(even) { translate: 0 0.6rem; }
  .js .step.reveal.in:hover { translate: 0 -0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .svc img, .step { transition: none; }
}
