/* Roof By Roof Exteriors — home page
   Inspired by klindworthroofing.com: warm cream + charcoal, serif display caps, pill menu.
   Gold accent taken from the RRI house logo. */

:root {
  --cream: #EEEAE2;
  --cream-2: #E4DFD5;
  --charcoal: #24262B;
  --ink: #1A1B1F;
  --stone: #6B6A66;
  --stone-light: #A9A59D;
  --gold: #D9A934;
  --gold-deep: #9A7419;
  --line-dark: rgba(238, 234, 226, .16);
  --line-light: rgba(36, 38, 43, .16);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Satoshi", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--charcoal); color: var(--cream); padding: 8px 14px; }
.skip:focus { left: 8px; }

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

/* ---------- Type ---------- */
.display, .headline, .giant, h3 { font-family: var(--serif); font-weight: 400; font-optical-sizing: auto; }
.display {
  font-size: clamp(48px, 7vw, 104px);
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 18px 0 26px;
}
.headline {
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 24px;
}
.giant {
  font-size: clamp(88px, 22vw, 330px);
  line-height: .8;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--cream);
}
.eyebrow {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 10px;
}
.center { text-align: center; }
.lede { max-width: 560px; margin: 0 auto; color: var(--stone); }
.lede.center { margin-bottom: 56px; }

.side-label {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--stone-light);
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 30px;
  border-radius: 999px;
  font-weight: 500; font-size: 16px; line-height: 1; text-align: center;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-outline { border: 1px solid var(--charcoal); color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--cream); }
.btn-dark { background: var(--charcoal); color: var(--cream); border: 0; }
.btn-dark:hover { background: var(--gold-deep); }
.text-link { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; border-bottom: 1px solid transparent; transition: border-color .2s; }
.text-link:hover { border-color: currentColor; }

.round {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid currentColor; background: transparent; color: inherit;
  display: grid; place-items: center; font-size: 18px;
  transition: background .2s, color .2s, opacity .2s;
}
.round:hover { background: var(--charcoal); color: var(--cream); }
.dark .round:hover { background: var(--cream); color: var(--charcoal); }

/* ---------- Header ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 52px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 22px; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin-top: 3px; }
.header-phone { font-weight: 500; font-size: 17px; }
.header-phone span { display: inline-block; transition: transform .2s; }
.header-phone:hover span { transform: translateX(4px); }

.menu-pill {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 60;
  width: 96px; height: 46px; border-radius: 999px; border: 0;
  background: #fff; color: var(--charcoal);
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  display: grid; place-items: center;
  transition: background .3s, color .3s;
}
.menu-lines { display: grid; gap: 5px; width: 22px; }
.menu-lines span { display: block; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.menu-pill[aria-expanded="true"] { background: var(--gold); }
.menu-pill[aria-expanded="true"] .menu-lines span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-pill[aria-expanded="true"] .menu-lines span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--charcoal); color: var(--cream);
  display: flex; align-items: center;
  opacity: 0; transition: opacity .35s var(--ease);
}
.menu.is-open { opacity: 1; }
.menu-inner {
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 100px var(--gutter) 40px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end;
}
.menu-links a {
  display: flex; align-items: baseline; gap: 18px;
  font-family: var(--serif); font-size: clamp(36px, 5.5vw, 68px); line-height: 1.15;
  transition: color .2s, padding .3s var(--ease);
}
.menu-links a span { flex: 0 0 22px; font-family: var(--sans); font-size: 13px; color: var(--stone-light); letter-spacing: .1em; }
.menu-links a:hover { color: var(--gold); padding-left: 10px; }
.menu-side { display: grid; gap: 10px; color: var(--stone-light); }
.menu-side .eyebrow { color: var(--stone-light); }
.menu-phone { font-family: var(--serif); font-size: 40px; color: var(--cream); }
.menu-side a:hover { color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: max(680px, 100svh);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  overflow: hidden;
}
.hero-copy { padding: 130px 0 80px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); max-width: min(680px, 44vw); position: relative; z-index: 2; }
.hero-lede { font-size: 19px; color: #46474B; max-width: 470px; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 34px; font-size: 14px; color: var(--stone); }
.hero-notes li::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); margin-right: 10px; vertical-align: 2px; }

.hero-art { position: absolute; top: 0; right: 0; bottom: 0; width: 54%; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.chev { stroke: var(--cream); stroke-width: 40; }
.chev-2 { stroke-width: 26; }
.hero-art image { animation: heroZoom 14s var(--ease) both; transform-origin: 50% 60%; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.scroll-cue { position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); bottom: 32px; width: 26px; height: 42px; border: 1px solid var(--stone-light); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 3px; height: 7px; margin-left: -1.5px; background: var(--charcoal); border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.dark { background: var(--charcoal); color: var(--cream); }
.dark .eyebrow { color: var(--stone-light); }
.light { background: var(--cream); }

/* intro */
.intro { display: grid; grid-template-columns: 180px 1fr; gap: 40px; margin-bottom: clamp(60px, 8vw, 110px); }
.intro .side-label { writing-mode: vertical-rl; transform: rotate(180deg); justify-self: start; align-self: start; }
.intro-text { font-size: clamp(22px, 2.3vw, 31px); line-height: 1.42; margin: 0; max-width: 900px; letter-spacing: -.005em; }
.intro-text em { font-style: normal; color: var(--gold); }

/* services grid (alternating large/small like the inspiration) */
.services { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(36px, 5vw, 70px) clamp(20px, 3vw, 40px); align-items: end; }
.svc-lg { grid-column: span 8; }
.svc-sm { grid-column: span 4; }
.svc figure { overflow: hidden; border-radius: var(--radius); aspect-ratio: 11 / 8; background: #2E3036; }
.svc-sm figure { aspect-ratio: 4 / 5; }
.svc img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.svc:hover img { transform: scale(1.05); }
.svc h3 { font-family: var(--sans); font-weight: 500; font-size: 18px; margin: 16px 0 2px; }
.svc h3 span { display: inline-block; transition: transform .25s; }
.svc:hover h3 span { transform: translateX(5px); }
.svc p { margin: 0; color: var(--stone-light); font-size: 15px; }

.claims-card {
  aspect-ratio: 4 / 5; border-radius: var(--radius);
  background: var(--gold); color: var(--ink);
  padding: clamp(22px, 3vw, 36px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  transition: background .3s;
}
.claims-card .eyebrow { color: rgba(26,27,31,.7); margin: 0; }
.claims-card p { color: rgba(26,27,31,.8); margin: 0; font-size: 15px; }
.claims-card .claims-big { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); line-height: 1.05; color: var(--ink); }
.svc-claims:hover .claims-card { background: #E6B94A; }

/* work: sticky stacked cards */
.work { padding-top: 40px; }
.work .giant { margin-bottom: clamp(40px, 6vw, 80px); }
.stack { display: grid; gap: 0; }
.proj {
  position: sticky; top: 90px;
  display: grid; grid-template-columns: 1fr 1.45fr;
  min-height: min(560px, 72vh);
  margin-bottom: 40px;
  background: #2D2F35; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 -20px 50px rgba(0,0,0,.25);
}
.proj:nth-child(2) { top: 110px; }
.proj:nth-child(3) { top: 130px; }
.proj:nth-child(4) { top: 150px; }
.proj img { width: 100%; height: 100%; object-fit: cover; }
.proj-copy { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.proj-num { font-size: 13px; letter-spacing: .14em; color: var(--gold); }
.proj h3 { font-size: clamp(34px, 4vw, 60px); line-height: 1; text-transform: uppercase; margin: 0; }
.proj p { margin: 0; color: var(--stone-light); max-width: 380px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags li { font-size: 13px; padding: 5px 14px; border: 1px solid var(--line-dark); border-radius: 999px; color: var(--cream); }

/* process carousel */
#process .headline { max-width: 900px; margin: 0 auto 60px; text-align: center; }
.carousel-wrap { position: relative; padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(270px, 30vw, 400px);
  gap: clamp(20px, 3vw, 40px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-right: var(--gutter); padding-bottom: 6px;
}
.carousel::-webkit-scrollbar { display: none; }
.step { scroll-snap-align: start; }
.step figure { aspect-ratio: 11 / 8; overflow: hidden; border-radius: var(--radius); }
.step img { width: 100%; height: 100%; object-fit: cover; }
.step h3 { font-family: var(--sans); font-weight: 500; font-size: 18px; margin: 18px 0 6px; }
.step p { margin: 0; color: var(--stone); font-size: 15.5px; }
.carousel-nav { display: flex; gap: 12px; justify-content: flex-end; max-width: var(--wrap); margin: 34px auto 0; padding-right: var(--gutter); }
.carousel-nav .round:disabled { opacity: .3; pointer-events: none; }

/* warranty */
.warranty { padding-top: 0; }
.warranty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; border-top: 1px solid var(--line-light); padding-top: clamp(70px, 9vw, 120px); }
.warranty-copy .side-label { color: var(--gold-deep); margin-bottom: 18px; }
.warranty-copy p { color: #4A4B4F; max-width: 520px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); margin: 0; }
.stat { background: var(--cream); padding: clamp(22px, 3vw, 36px); }
.stat dt { font-family: var(--serif); font-size: clamp(36px, 4vw, 54px); line-height: 1; white-space: nowrap; }
.stat dt small { font-size: .4em; margin-left: 4px; color: var(--stone); }
.stat dd { margin: 10px 0 0; color: var(--stone); font-size: 15px; }

.offer { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; margin-top: clamp(70px, 9vw, 120px); }
.offer-copy h3 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; margin: 0 0 16px; }
.offer-copy p:not(.eyebrow) { color: #4A4B4F; margin: 0 0 22px; max-width: 460px; }
.offer-copy .eyebrow { color: var(--gold-deep); }

/* before / after slider */
.ba { position: relative; aspect-ratio: 300 / 165; border-radius: var(--radius); overflow: hidden; user-select: none; background: var(--cream-2); }
.ba > img, .ba-before img { width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none; }
.ba-handle::after { content: "↔"; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: var(--charcoal); display: grid; place-items: center; font-size: 18px; box-shadow: 0 4px 16px rgba(0,0,0,.2); }

/* testimonials */
.quotes { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; margin-bottom: clamp(80px, 10vw, 140px); }
.quote-track { display: grid; }
.quote { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.quote.is-active { opacity: 1; transform: none; pointer-events: auto; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(26px, 2.9vw, 40px); line-height: 1.22; letter-spacing: -.01em; }
.quote figcaption { margin-top: 26px; font-size: 14px; color: var(--stone-light); letter-spacing: .04em; }
.quote-media { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
.quote-media img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); width: 100%; }
.carousel-nav.vertical { flex-direction: column; margin: 0; padding: 0; }

.badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 46px; max-width: 1100px; margin: clamp(40px, 6vw, 80px) auto 0; padding: 0 var(--gutter); }
.badges li { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 13px; color: var(--stone-light); text-transform: uppercase; letter-spacing: .1em; line-height: 1.3; }
.badges strong { font-family: var(--serif); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 24px; color: var(--cream); }
.badge-logo { background: #fff; border-radius: var(--radius); padding: 10px 14px; }
.badge-logo img { height: 40px; width: auto; }
.review-cta { text-align: center; margin: 46px 0 0; color: var(--gold); }

/* quote form */
.quote-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.field { display: grid; gap: 6px; }
.field.full, .form-foot.full { grid-column: 1 / -1; }
.field label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--charcoal);
  background: transparent; border: 0; border-bottom: 1px solid #B9B4AA;
  padding: 10px 0; border-radius: 0; width: 100%;
  transition: border-color .2s;
}
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2324262B' stroke-width='1.5'/%3E%3C/svg%3E") right 4px center no-repeat; padding-right: 24px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--charcoal); }
.field.invalid input { border-color: #B3261E; }
.hp { position: absolute; left: -9999px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 6px; }
.form-status { margin: 0; font-size: 15px; color: var(--stone); }
.form-status.ok { color: #2E6B3A; }
.form-status.err { color: #B3261E; }

.contact-card { background: var(--charcoal); color: var(--cream); padding: clamp(28px, 3.5vw, 44px); border-radius: var(--radius); display: grid; gap: 8px; }
.contact-card p { margin: 0; color: var(--stone-light); }
.contact-card .eyebrow { color: var(--gold); }
.contact-phone { font-family: var(--serif); font-size: clamp(34px, 3.4vw, 44px); line-height: 1.1; }
.contact-card a:hover { color: var(--gold); }
.checks { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-dark); display: grid; gap: 8px; font-size: 15px; }
.checks li::before { content: "✓"; color: var(--gold); margin-right: 10px; }

/* footer */
.site-footer { background: var(--cream-2); padding: 80px 0 30px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); margin: 0 0 14px; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: var(--gold-deep); }
.footer-tag { color: var(--stone); max-width: 260px; }
.footer-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--line-light); color: var(--stone); font-size: 14px; }
.footer-base p { margin: 0; }

.mobile-bar { display: none; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 120px var(--gutter) 30px; max-width: 720px; }
  .hero-art { position: relative; width: 100%; height: 62vw; min-height: 340px; }
  .hero-art svg { height: 100%; }
  .scroll-cue { display: none; }
  .intro { grid-template-columns: 1fr; gap: 18px; }
  .intro .side-label { writing-mode: horizontal-tb; transform: none; }
  .svc-lg, .svc-sm { grid-column: span 6; }
  .svc-sm figure, .claims-card { aspect-ratio: 11 / 8; }
  .proj { grid-template-columns: 1fr; min-height: 0; }
  .proj img { order: -1; aspect-ratio: 16 / 10; height: auto; }
  .warranty-grid, .offer, .quotes, .quote-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .menu-inner { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 64px; }
  .header-phone { display: none; }
  .site-header { padding: 18px var(--gutter); }
  .brand img { width: 42px; }
  .brand-name { font-size: 19px; }
  .menu-pill { left: auto; right: var(--gutter); transform: none; width: 64px; top: 18px; }
  .hide-sm { display: none; }
  .services { grid-template-columns: 1fr; }
  .svc-lg, .svc-sm { grid-column: auto; }
  .proj { position: relative; top: auto !important; margin-bottom: 24px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .quote-form { grid-template-columns: 1fr; }
  .quote-media { grid-template-columns: 1fr; }
  .quote-media img { aspect-ratio: 16 / 10; }
  .carousel-nav.vertical { flex-direction: row; justify-content: flex-end; }
  .badges { gap: 22px 30px; }
  .footer-grid { grid-template-columns: 1fr; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--charcoal);
  }
  .mobile-bar a { display: grid; place-items: center; height: 46px; border-radius: 999px; border: 1px solid var(--stone); color: var(--cream); font-weight: 500; }
  .mobile-bar .mb-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-art image, .scroll-cue span { animation: none; }
  .quote { transition: none; }
}
