/*
 * Roofing landing page.
 *
 * Committed to a single light treatment rather than following the system theme.
 * A landing page is a brand surface that gets screenshotted into ad reviews and
 * compliance files, and a consent disclosure that renders differently for
 * different consumers is a worse problem than a dark mode nobody asked for.
 *
 * Mobile first throughout: the traffic is a homeowner standing in a driveway
 * looking at their roof, not somebody at a desk.
 */

:root {
  color-scheme: light;

  --ink: #16202b;
  --muted: #5a6775;
  --line: #dde3ea;
  --bg: #f5f7fa;
  --panel: #ffffff;

  --navy: #123a5e;
  --navy-dark: #0d2b47;
  /* One accent, used only on the primary action. */
  --accent: #d2691e;
  --accent-dark: #b4551a;
  --good: #1c6b45;
  --good-bg: #e9f5ef;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 48, 0.06), 0 6px 20px rgba(16, 32, 48, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

h1, h2 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
p { margin: 0 0 14px; }

/* --------------------------------------------------------------- header -- */

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  padding: 14px 20px;
  background: var(--navy-dark);
  color: #fff;
}
.brand { font-weight: 700; letter-spacing: -0.01em; }
.bar-note { font-size: 0.8rem; color: #a8c2d8; }

/* ----------------------------------------------------------------- main -- */

main { max-width: 660px; margin: 0 auto; padding: 0 20px 8px; }

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero { padding: 32px 0 8px; }
.lede { color: var(--muted); font-size: 1.05rem; }
.lede.small { font-size: 0.95rem; }

/* ------------------------------------------------------------- zip step -- */

.zip-form {
  margin: 24px 0 20px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.zip-form > label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

/* Stacked on a phone so both targets are full width and thumb sized. */
.row { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 480px) {
  .row { flex-direction: row; align-items: stretch; }
  .row input { flex: 1; min-width: 0; }
  .row button { flex: none; }
}

/* ---------------------------------------------------------------- forms -- */

label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 14px; }

input, select {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 12px;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* 16px minimum, or iOS Safari zooms the viewport on focus. */
  font-size: 16px;
}
select { appearance: none; background-image: none; }
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
input[readonly] { background: #eef2f6; color: var(--muted); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: #b3261e; }

button {
  padding: 13px 22px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
button:hover { background: var(--navy-dark); }
button:disabled { opacity: 0.55; cursor: default; }

.cta {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 15px 22px;
  font-size: 1.05rem;
  background: var(--accent);
}
.cta:hover { background: var(--accent-dark); }

.grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 560px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .grid .wide { grid-column: 1 / -1; }
  .grid .narrow { grid-column: span 1; }
}

.check { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; font-weight: 400; }
.check input { width: auto; flex: none; margin-top: 3px; }

.consent {
  padding: 14px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fineprint { margin: 10px 0 0; font-size: 0.78rem; color: var(--muted); }

/* --------------------------------------------------------------- panels -- */

.panel {
  margin: 8px 0 32px;
  padding: 24px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 16px;
}
.panel.quiet { box-shadow: none; }

.signal {
  margin: 0 0 4px;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--good);
  background: var(--good-bg);
  border-left: 4px solid var(--good);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.signal-source { margin: 0 0 20px; font-size: 0.75rem; color: var(--muted); }

.done { text-align: center; padding: 12px 0 4px; }

.notice { min-height: 1.4em; margin: 12px 0 0; font-size: 0.9rem; color: var(--muted); }
.notice.error { color: #b3261e; font-weight: 600; }

/* --------------------------------------------------------------- trust --- */

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.trust li::before {
  content: "\2713";
  margin-right: 6px;
  font-weight: 700;
  color: var(--good);
}

/* ------------------------------------------------------- how / why ------ */

.how, .why { padding: 8px 0 24px; border-top: 1px solid var(--line); }

.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 14px; color: var(--muted); font-size: 0.95rem; }
.steps strong { display: block; color: var(--ink); font-size: 1rem; }

.why p { color: var(--muted); font-size: 0.95rem; }

/* -------------------------------------------------------------- footer -- */

footer {
  max-width: 660px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--line);
}
.disclosure { font-size: 0.75rem; line-height: 1.6; color: var(--muted); }
footer nav { margin: 12px 0; }
footer a { margin-right: 18px; font-size: 0.85rem; color: var(--navy); }
.copyright { margin: 0; font-size: 0.75rem; color: var(--muted); }

@media (min-width: 700px) {
  h1 { font-size: 2.1rem; }
  .hero { padding-top: 44px; }
  .panel { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ------------------------------------------------------- sharing notice -- */

/*
 * Sits above the consent box and outside it. Styled as information rather than
 * as fine print: it is the sentence that explains where the data goes, and
 * burying it would recreate the problem that moving it out of the consent
 * sentence was meant to solve.
 */
.sharing {
  margin: 18px 0 0;
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  background: #f7f9fb;
  border-left: 3px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.sharing a { color: var(--navy); }

/* --------------------------------------------------------- legal pages -- */

.legal { max-width: 720px; margin: 0 auto; padding: 36px 20px 48px; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { margin: 32px 0 10px; font-size: 1.1rem; }
.legal h3 { margin: 20px 0 6px; font-size: 0.95rem; }
.legal p, .legal li { color: var(--muted); font-size: 0.94rem; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--navy); }
.legal strong { color: var(--ink); }

.updated { font-size: 0.8rem; color: var(--muted); margin-bottom: 28px; }

.legal .callout {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.back { display: inline-block; margin-top: 28px; font-size: 0.9rem; }

/*
 * Contact details the business has to supply. Deliberately loud: these are the
 * addresses a consumer uses to exercise a legal right, and a placeholder that
 * shipped unnoticed would be a broken opt-out channel rather than a typo.
 */
.fill {
  padding: 1px 6px;
  font-weight: 700;
  color: #7a3b00;
  background: #ffe9c7;
  border: 1px dashed #d2691e;
  border-radius: 4px;
}

/* ----------------------------------------------------- corporate root ---- */

/*
 * Spec 65.1: this surface exists to be checked by a rail, a platform reviewer
 * or a partner, not to convert anyone. Deliberately plain. No hero image, no
 * call to action, no motion. A page that tries to sell on the corporate root
 * reads as a landing page wearing a company's clothes, which is the opposite
 * of the credibility it is there to establish.
 *
 * Shares the design tokens with the acquisition experiences so the two do not
 * look like different companies to a consumer who follows a footer link.
 */

.corp { background: var(--panel); }

.corp-bar {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 0;
}
.corp-mark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy-dark);
}

.corp-main { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.corp-hero { padding: 64px 0 72px; border-bottom: 1px solid var(--line); }
.corp-hero h1 {
  max-width: 15ch;
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.corp-lede {
  max-width: 56ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.corp-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
.corp-steps h2 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}
.corp-steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.corp-cats { padding: 40px 0; border-bottom: 1px solid var(--line); }
.corp-cats h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}
.corp-cats ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  max-width: 30rem;
}
.corp-cats li { margin-bottom: 8px; font-size: 0.98rem; }
.corp-cats p { margin: 16px 0 0; color: var(--muted); font-size: 0.95rem; }
.corp-note { font-size: 0.85rem !important; }

.corp-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  font-size: 0.85rem;
  color: var(--muted);
}
.corp-foot nav { margin-bottom: 10px; }
.corp-foot a { margin-right: 20px; color: var(--navy); }
.corp-foot p { margin: 0; }

@media (min-width: 620px) {
  .corp-hero h1 { font-size: 2.8rem; }
  .corp-steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* The product statement. The one line a buyer needs to read. */
.corp-product {
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink) !important;
}

/* ------------------------------------------------------ explainability --- */

/*
 * Spec 67. Present on the page, closed by default, and openable without
 * leaving it or running any script. Deliberately quiet rather than hidden:
 * a consumer looking for it finds it, and one who is not is not interrupted.
 */
.why-this {
  margin: 0 0 32px;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.why-this > summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 600;
  padding: 6px 0;
}
.why-this > summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.why-this p {
  margin: 8px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  line-height: 1.6;
  max-width: 60ch;
}
.why-this a { color: var(--navy); }

/*
 * Legal pages sit on the corporate surface, so their prose column has to line
 * up with the mark above it and the footer below it. Without this the text
 * measure is 720/20 while the corporate chrome is 760/24, and the page reads as
 * two designs stacked.
 */
.corp .legal {
  max-width: 760px;
  padding: 40px 24px 48px;
}
