/* Raven Roofing — free estimate funnel
   Cloned from the Plumber Pro page (Project 23); branding is Raven Roofing (ravenroofingpdx.com).
   Gaby (2026-10-05): no background graphics, beige background, green for highlights/CTAs. */

:root {
  --rv-green: #075f3d;       /* site primary */
  --rv-green-dark: #054a2f;
  --rv-green-tint: #e6f0eb;
  --rv-beige: #ecd3b4;       /* site secondary */
  --rv-beige-soft: #f7ede1;
  --rv-brown: #9c7354;       /* logo wordmark */
  --rv-ink: #12241b;         /* header / footer / modal */
  --rv-text: #1f2a24;
  --rv-paper: #ffffff;
  --rv-ground: #fbf7f1;
  --rv-rule: #e4d8c8;
  --rv-muted: #6b6359;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  /* the hero's 100vmax bleed shadow must never open a horizontal scrollbar */
  max-width: 100%;
  overflow-x: hidden;
  background: var(--rv-ground);
  color: var(--rv-text);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--rv-ink);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.header-inner {
  max-width: 82rem;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem clamp(1rem, 3vw, 2rem);
}

.brand { display: flex; align-items: center; }
.brand img { height: 60px; width: auto; display: block; }

.header-right { display: flex; align-items: center; gap: 1rem; }

.service-line {
  border-left: 1px solid rgba(255, 255, 255, .25);
  padding-left: .75rem;
  color: var(--rv-beige);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone svg { width: 18px; height: 18px; color: var(--rv-beige); }
.header-phone:hover { color: var(--rv-beige); }

/* ---------- progress ---------- */

.progress {
  height: 6px;
  background: var(--rv-rule);
}
.progress-fill {
  height: 100%;
  width: 33.33%;
  background: var(--rv-green);
  transition: width .25s ease;
}

/* ---------- main split layout ---------- */

.quiz-main {
  max-width: 82rem;
  margin: 0 auto;
  /* deliberately NOT 100dvh — forcing viewport height left a dead band
     under the hero on short content (Jess, 2026-09-28). Padding sets the height. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, 540px);
  /* top-aligned, not centred — centring left a dead band above the hero copy (Jess, 2026-09-28) */
  align-items: start;
  gap: clamp(3rem, 8vw, 9rem);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2rem) clamp(2.5rem, 5vw, 4rem);
  /* plain beige, no grid (Gaby's Loom, 2026-10-05) */
  background-color: var(--rv-beige);
  box-shadow: 0 0 0 100vmax var(--rv-beige);
  clip-path: inset(0 -100vmax);
}

.quiz-aside {
  color: var(--rv-text);
  /* no top padding: the eyebrow should sit level with the card's green cap */
  padding: 0 0 1rem clamp(0rem, 2vw, 1rem);
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--rv-green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.display {
  max-width: 690px;
  margin: 0;
  color: var(--rv-ink);
  font-size: clamp(2.9rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.02;
}

.aside-sub {
  max-width: 44ch;
  margin: 1.4rem 0 0;
  color: #4a4035;
  font-size: 1rem;
  line-height: 1.65;
}

.aside-rule {
  width: 176px;
  height: 8px;
  margin-top: 2rem;
  background: var(--rv-green);
  height: 5px;
}

/* ---------- google proof chip (hero) ---------- */

.aside-proof {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: 1.9rem;
  border: 1px solid rgba(18, 36, 27, .18);
  background: rgba(255, 255, 255, .55);
  padding: .7rem .95rem;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}
.aside-proof:hover { background: #fff; border-color: var(--rv-green); }

.g-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #fff;
}
.g-mark svg { width: 17px; height: 17px; }

.aside-proof-text { display: flex; flex-direction: column; gap: .1rem; }
.aside-proof-label { color: var(--rv-ink); font-size: .82rem; font-weight: 600; }

.stars { color: #fbbc05; font-size: .8rem; letter-spacing: .12em; line-height: 1; }

/* ---------- card ---------- */

.card-slot { min-width: 0; }

.step {
  width: 100%;
  max-width: 540px;
  border-top: 8px solid var(--rv-green);
  background: var(--rv-paper);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 12px 12px rgba(7, 95, 61, .9);
}
.step[hidden] { display: none; }

.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.btn-back {
  border: 0;
  background: none;
  padding: 0;
  color: var(--rv-muted);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.btn-back:hover:not(:disabled) { color: var(--rv-ink); }
.btn-back:disabled { opacity: .4; cursor: not-allowed; }

.step-counter {
  flex: 0 0 auto;
  background: var(--rv-ink);
  padding: .45rem .65rem;
  color: var(--rv-beige);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.question-label {
  max-width: 25ch;
  margin: 0 0 1.4rem;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
}

/* ---------- options ---------- */

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.option-grid--simple { grid-template-columns: 1fr; }

.option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-height: 104px;
  border: 1px solid var(--rv-rule);
  background: #fdfaf6;
  padding: 1rem 1.05rem;
  text-align: left;
  font-family: inherit;
  color: var(--rv-ink);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.option-grid--simple .option { min-height: 64px; align-items: center; }

.option:hover { border-color: var(--rv-green); transform: translateY(-2px); }
.option[data-selected="true"] {
  border-color: var(--rv-green);
  background: var(--rv-green-tint);
  box-shadow: inset 4px 0 0 var(--rv-green);
}

.option-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--rv-beige-soft);
  color: var(--rv-green);
}
.option-icon svg { width: 20px; height: 20px; }

.option-text { flex: 1 1 auto; min-width: 0; }

.option-title {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.option-desc {
  display: block;
  margin-top: .25rem;
  color: var(--rv-muted);
  font-size: .8rem;
  line-height: 1.4;
}

/* ---------- contact form ---------- */

.contact-disclaimer {
  margin: -0.9rem 0 1.35rem;
  color: var(--rv-muted);
  font-size: .875rem;
}

#contact-form { display: flex; flex-direction: column; gap: 1rem; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }

.field label {
  color: var(--rv-ink);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.field input,
.field textarea {
  border: 1px solid #cfc2b1;
  background: #fdfaf6;
  color: var(--rv-text);
  font-family: inherit;
  font-size: 1rem;
}
.field input { min-height: 52px; padding: 0 .85rem; }
.field textarea { padding: .7rem .85rem; line-height: 1.5; resize: vertical; min-height: 84px; }

.field input:focus,
.field textarea:focus {
  border-color: var(--rv-green);
  outline: 2px solid rgba(7, 95, 61, .2);
  outline-offset: 1px;
}

/* the notes prompt is a full sentence — let it wrap instead of clipping */
.field label[for="notes"] { font-weight: 600; line-height: 1.45; }

.field-error, .form-error {
  margin: 0;
  color: #c62828;
  font-size: .75rem;
  font-weight: 500;
}

.btn-primary {
  min-height: 52px;
  border: 0;
  background: var(--rv-green);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn-primary:hover:not(:disabled) { background: var(--rv-green-dark); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary--link {
  display: grid;
  place-items: center;
  margin-top: 1.5rem;
  text-decoration: none;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  color: var(--rv-muted);
  font-size: .72rem;
  line-height: 1.55;
  cursor: pointer;
}
.consent input { margin-top: .15rem; width: 16px; height: 16px; accent-color: var(--rv-green); flex: 0 0 auto; }

.secure-note { margin: 0; color: var(--rv-muted); font-size: .72rem; text-align: center; }

/* ---------- thanks ---------- */

.thanks-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  background: var(--rv-green);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
}
.thanks-copy { margin: 0 0 .9rem; color: #4a4035; font-size: 1rem; line-height: 1.65; }

/* ---------- reviews ---------- */

.reviews {
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2rem);
  background: var(--rv-ground);
  border-bottom: 1px solid var(--rv-rule);
}
.reviews-inner { max-width: 82rem; margin: 0 auto; }

.reviews-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.reviews-heading {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.reviews-link {
  flex: 0 0 auto;
  color: var(--rv-green);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.reviews-link:hover { text-decoration: underline; }

.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

.review {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rv-rule);
  border-top: 6px solid var(--rv-green);
  background: var(--rv-paper);
  padding: 1.5rem;
  box-shadow: 8px 8px rgba(18, 36, 27, .06);
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}
.review-top .stars { font-size: 1rem; }
.review-quote { color: var(--rv-beige); font-size: 3rem; font-weight: 800; line-height: .6; height: 1.4rem; }

.review-body {
  flex: 1 1 auto;
  margin: 0 0 1.25rem;
  color: #4a4035;
  font-size: .92rem;
  line-height: 1.7;
}

.review-name {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rv-rule);
  font-size: .88rem;
  font-weight: 700;
}
.review-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--rv-green);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
}

/* ---------- estimate modal ---------- */
/* Dan asked for the funnel to greet visitors on load (2026-09-30). The card node is
   moved into .modal-slot rather than duplicated, so form state and ids stay unique. */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem) 1rem;
  overflow-y: auto;
  background: rgba(18, 36, 27, .72);
  animation: modal-fade .18s ease;
}
.modal-overlay[hidden] { display: none; }

.modal-box {
  position: relative;
  width: 100%;
  min-width: 0;          /* flex item: without this the card's intrinsic width overflows on phones */
  max-width: 560px;
  margin: auto;
  background: var(--rv-ink);
  box-shadow: 16px 16px rgba(0, 0, 0, .35);
  animation: modal-rise .22s ease;
}

.modal-progress { height: 6px; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 3vw, 1.5rem) .95rem;
}
.modal-eyebrow {
  margin: 0 0 .25rem;
  color: var(--rv-beige);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.modal-title {
  margin: 0;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
}
.modal-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: transparent;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.modal-close:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); }

/* the card keeps its own green cap + shadow; inside the modal it just needs to fill the box */
.modal-slot { min-width: 0; padding: 0 clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.5rem); }
.modal-slot .step { width: 100%; max-width: 100%; box-shadow: none; }

body.modal-open { overflow: hidden; }

@keyframes modal-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-box { animation: none; }
}

/* ---------- why us ---------- */

.why-us {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 3vw, 2rem);
  background: var(--rv-paper);
}
.why-us-inner { max-width: 82rem; margin: 0 auto; }

.why-eyebrow {
  margin: 0 0 .75rem;
  color: var(--rv-green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.why-heading {
  margin: 0 0 2.25rem;
  max-width: 760px;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

.why-grid article {
  border: 1px solid var(--rv-rule);
  border-top: 6px solid var(--rv-green);
  padding: 1.5rem;
  background: #fdfaf6;
}
.why-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  background: var(--rv-green);
  color: #fff;
}
.why-icon svg { width: 22px; height: 22px; }
.why-grid h3 { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 700; }
.why-grid p { margin: 0; color: var(--rv-muted); font-size: .9rem; line-height: 1.6; }

/* ---------- footer ---------- */

/* beige, not ink: separates it from the dark CTA band above (Gaby, 2026-10-06) */
.site-footer {
  padding: 2rem clamp(1rem, 3vw, 2rem) 2.5rem;
  background: var(--rv-beige);
  color: #4a4035;
  text-align: center;
  font-size: .82rem;
  line-height: 1.7;
}
.site-footer p { margin: 0; }
.site-footer strong { color: var(--rv-ink); }
.site-footer a { color: var(--rv-green); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-legal { margin-top: .5rem !important; font-size: .75rem; }


/* ---------- hero offer ---------- */
/* from the site's top banner */
.aside-offer {
  display: inline-block;
  margin: 1.25rem 0 0;
  background: var(--rv-green);
  padding: .45rem .75rem;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ---------- mid-page CTA bands ---------- */
/* Gaby (2026-10-05): keep the pop-up, plus extra "Get your free estimate" buttons
   while scrolling. Each one reopens the modal via data-open-modal. */

.cta-band {
  padding: clamp(2.25rem, 5vw, 3.25rem) clamp(1rem, 3vw, 2rem);
  background: var(--rv-beige);
  text-align: center;
}
.cta-band--dark { background: var(--rv-ink); }
.cta-band-title {
  margin: 0 0 1.1rem;
  color: var(--rv-ink);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.cta-band--dark .cta-band-title { color: #fff; }
.cta-band-sub { margin: -.5rem 0 1.25rem; color: #4a4035; font-size: .95rem; }
.cta-band--dark .cta-band-sub { color: #c9c1b4; }

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 2rem;
  border: 0;
  background: var(--rv-green);
  color: #fff;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 6px 6px rgba(18, 36, 27, .9);
  transition: transform .12s ease, background .12s ease;
}
.btn-cta:hover { background: var(--rv-green-dark); transform: translateY(-2px); }
.cta-band--dark .btn-cta { box-shadow: 6px 6px rgba(236, 211, 180, .35); }

/* ---------- certified by ---------- */

.certified {
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2rem);
  background: var(--rv-ground);
  border-top: 1px solid var(--rv-rule);
}
.certified-inner {
  max-width: 82rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.certified-label {
  margin: 0;
  color: var(--rv-green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.certified-badges { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: clamp(1.25rem, 3vw, 2.5rem); }
.certified-badges a { display: block; transition: transform .12s ease; }
.certified-badges a:hover { transform: translateY(-2px); }
.certified-badges img { display: block; height: 104px; width: auto; }
.certified-badges img.badge-wide { height: 52px; }
.footer-license { margin-top: .35rem !important; font-size: .75rem; }

/* ---------- responsive ---------- */

@media (max-width: 1023px) {
  .quiz-main {
    display: block;
    min-height: auto;
    padding: 2rem 1rem 3rem;
  }
  .quiz-aside { padding: 0 0 1.8rem; }
  .display { font-size: clamp(2.4rem, 10vw, 3.4rem); }
  .aside-sub { font-size: .95rem; }
  .step { max-width: none; padding: 1.25rem; box-shadow: 7px 7px rgba(7, 95, 61, .9); }
  .question-label { font-size: clamp(1.7rem, 7.5vw, 2.2rem); margin-bottom: 1.1rem; }
  .option-grid { grid-template-columns: 1fr; gap: .65rem; }
  .option { min-height: 64px; align-items: center; padding: .8rem .9rem; }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside-proof { margin-top: 1.5rem; }
  .reviews-grid { grid-template-columns: 1fr; }
  .reviews-head { flex-direction: column; align-items: flex-start; gap: .75rem; }
}

@media (max-width: 640px) {
  .brand img { height: 42px; }
  .service-line { display: none; }
  .header-phone span { font-size: .85rem; }
  .field-row { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .btn-cta { width: 100%; padding: 0 1rem; }
  .certified-badges img { height: 84px; }
  .certified-badges img.badge-wide { height: 44px; }
}
