/* ============================================================
   LOPEZ BROTHERS ROOFING
   Design system: warm editorial (Squarespace-inspired), static.
   Reskin surface = the tokens block below.
   Fonts: Fraunces (display serif) + Inter (body), self-hosted.
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 300 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 600; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  /* neutrals — warm, layered (depth comes from the luminance steps) */
  --page:      #faf8f5;
  --surface:   #ffffff;
  --band:      #f1ece4;
  --ink:       #1a1815;
  --ink-2:     #6b6560;
  --hairline:  #e7e1d8;
  --dark:      #201d1a;
  --dark-soft: #2c2824;
  --on-dark:   #efe9e1;
  --on-dark-2: #b3aaa0;

  /* brand — burnt orange from the logo, charcoal from the field */
  --accent:      #c2410c;   /* 5.2:1 on white */
  --accent-ink:  #9a3412;   /* hover */
  --accent-bright:#e8813a;  /* accents on dark only */
  --accent-tint: #fbede4;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(26,24,21,.05), 0 6px 18px rgba(26,24,21,.07);
  --shadow-md: 0 10px 34px rgba(26,24,21,.12), 0 3px 8px rgba(26,24,21,.06);

  --section-y: clamp(4.25rem, 3rem + 6vw, 8rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --wrap: 1240px;
  --measure: 62ch;
  --mobile-cta-h: 74px;
}

/* ============================================================
   BASE (mobile-first)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.125rem/1.65 var(--sans);
  color: var(--ink);
  background: var(--page);
  padding-bottom: var(--mobile-cta-h);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); }

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0 0 .4em; }
h1 { font-size: clamp(2.35rem, 5.2vw + 1rem, 3.6rem); line-height: 1.04; letter-spacing: -.02em; }
h2 { font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem); line-height: 1.1; letter-spacing: -.015em; }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }

.eyebrow {
  font: 600 .8125rem/1.4 var(--sans);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 1rem;
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent-ink); display: inline-block; }

.section { padding-block: var(--section-y); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 2.5rem); }
.prose { max-width: var(--measure); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 4vw + 0.5rem, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.lede { font-size: 1.18rem; color: var(--ink-2); }

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

/* scroll reveal — gated on .js so content is never hidden without JS */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.4,0,.2,1); }
.js .reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1 var(--sans); letter-spacing: .01em;
  min-height: 52px; padding: .95rem 1.6rem;
  border-radius: var(--radius-sm); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(194,65,12,.30); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-lg { min-height: 58px; padding: 1.1rem 2rem; font-size: 1.05rem; }

/* text link with animated underline */
.link { position: relative; font-weight: 600; text-decoration: none; color: var(--accent-ink); }
.link::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.4,0,.2,1); }
.link:hover::after { transform: scaleX(1); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
  padding: .7rem clamp(1.25rem, 5vw, 2.5rem);
  background: rgba(250,248,245,.88); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; flex-direction: column; justify-content: center; min-height: 44px; line-height: 1; text-decoration: none; text-transform: uppercase; }
.brand-name { font: 800 .8rem/1 var(--sans); letter-spacing: .05em; color: var(--ink); }
.brand-accent { font: 800 1.05rem/1 var(--sans); letter-spacing: .09em; color: var(--accent); margin-top: .18em; }

.header-calls { display: flex; flex-wrap: nowrap; gap: .55rem; justify-content: flex-end; }
.header-call {
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm); text-decoration: none; font: 700 .95rem/1 var(--sans);
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; white-space: nowrap;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.header-call::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.8 19.8 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.362 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.338 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.8 19.8 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.362 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.338 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.header-call:hover { background: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(194,65,12,.28); }

/* second header number: quieter outline twin so it doesn't compete with the primary CTA */
.header-call-alt { background: transparent; color: var(--accent-ink); border: 1.5px solid var(--accent); }
.header-call-alt:hover { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(194,65,12,.2); }

/* mobile (<768px): icon-only round buttons so BOTH numbers fit a compact sticky header */
.header-call { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.header-call-alt { width: 42px; height: 42px; min-height: 42px; }
.header-call .call-label, .header-call .call-number { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  min-height: min(590px, calc(100svh - 70px));
  display: flex; align-items: center;
  padding: 4rem clamp(1.25rem, 5vw, 2.5rem) 3.5rem;
  background: var(--dark);
}
/* background carousel */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
/* dark overlay above the slides, below the content */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20,18,16,.82) 0%, rgba(20,18,16,.55) 48%, rgba(20,18,16,.28) 100%),
    linear-gradient(0deg, rgba(20,18,16,.55), rgba(20,18,16,0) 45%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-inner { max-width: 720px; width: 100%; margin-inline: auto; }
.wrap > .hero-inner, .hero .hero-inner { }
.hero .eyebrow { color: #fff; }
.hero .eyebrow::before { background: var(--accent-bright); }
.hero h1 { color: #fff; margin: 0 0 clamp(1.5rem, 2.5vw, 1.9rem); }
.hero-logo-wrap { margin: 0 0 clamp(1.5rem, 2.5vw, 1.9rem); }
/* strong dark halo hugs the logo so it pops off the photo */
.hero-logo { width: min(100%, 380px); height: auto;
  filter: drop-shadow(0 0 9px rgba(6,4,3,1)) drop-shadow(0 0 22px rgba(6,4,3,.98)) drop-shadow(0 0 46px rgba(6,4,3,.9)) drop-shadow(0 4px 12px rgba(0,0,0,.6)); }
.hero-sub { font-size: 1.15rem; line-height: 1.55; color: rgba(255,255,255,.92); max-width: 40rem; margin: 0 0 clamp(2rem, 3vw, 2.4rem); }
.hero-phones { margin: clamp(1.4rem, 2.5vw, 1.65rem) 0 0; font-size: 1rem; color: rgba(255,255,255,.9); }
.hero-phones a { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--accent-bright); padding-bottom: 1px; white-space: nowrap; }
.hero-ctas { display: flex; flex-direction: column; gap: .9rem; max-width: 340px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.hero .btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.hero-chip {
  display: inline-flex; align-items: center; gap: .55rem; margin-top: 2rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: .5rem .95rem; font: 600 .875rem/1 var(--sans); color: #fff;
  backdrop-filter: blur(4px);
}
.hero-chip .stars { color: var(--accent-bright); letter-spacing: 1px; }

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar { background: var(--surface); border-bottom: 1px solid var(--hairline); }
.trust-bar .wrap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .85rem 2.25rem; padding-block: clamp(1.4rem, 2.6vw, 1.9rem); }
.trust-bar li { list-style: none; font: 600 .95rem/1.3 var(--sans); color: var(--ink); display: flex; align-items: center; gap: .55rem; }
.trust-bar ul { display: contents; margin: 0; padding: 0; }
.trust-bar li svg { flex: none; }

/* ============================================================
   STAT BAND (charcoal)
   ============================================================ */
.stats { background: var(--dark); color: var(--on-dark); }
.stats .wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; padding-block: clamp(3rem, 5.5vw, 4.5rem); }
.stat { text-align: center; position: relative; }
.stat-num { font: 500 clamp(2.6rem, 7vw, 3.6rem)/1 var(--display); color: var(--accent-bright); letter-spacing: -.02em; }
.stat-label { font: 600 .8125rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--on-dark-2); margin-top: .6rem; }

/* ============================================================
   SERVICES
   ============================================================ */
.card-grid { display: grid; gap: var(--gap); }
.card {
  position: relative; background: var(--surface);
  border: 1px solid var(--hairline); border-top: 3px solid var(--accent);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-img { aspect-ratio: 4/3; width: 100%; object-fit: cover; filter: saturate(.96) contrast(1.03); }
.card-body { padding: clamp(1.6rem, 3vw, 2.25rem); display: flex; flex-direction: column; flex: 1 1 auto; }
.card-num { font: 500 1rem/1 var(--display); color: var(--accent); opacity: .5; }
.card h3 { margin: .6rem 0 .6rem; }
.card p { color: var(--ink-2); font-size: 1rem; margin-bottom: 1.35rem; }
.card .link { margin-top: auto; align-self: flex-start; }
.services-more { max-width: 44rem; margin: clamp(2rem,4vw,3rem) auto 0; text-align: center; color: var(--ink-2); }
.services-more strong { color: var(--ink); }

/* ============================================================
   WORK GALLERY
   ============================================================ */
.work { background: var(--band); }
.photo-grid { display: grid; gap: clamp(.85rem, 2vw, 1.15rem); }
.photo-grid figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.photo-grid img { aspect-ratio: 4/3; width: 100%; object-fit: cover; filter: saturate(.96) contrast(1.03); transition: transform .5s cubic-bezier(.4,0,.2,1); }
.photo-grid figure:hover img { transform: scale(1.05); }
.photo-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  font: 500 .875rem/1.3 var(--sans); color: #fff; padding: 1.4rem .95rem .8rem;
  background: linear-gradient(0deg, rgba(20,18,16,.78), rgba(20,18,16,0));
}

/* ============================================================
   REVIEWS
   ============================================================ */
.review-grid { display: grid; gap: var(--gap); }
.review { margin: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: clamp(1.75rem, 3vw, 2.5rem); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.review .stars { color: var(--accent); letter-spacing: 2px; font-size: 1.05rem; margin-bottom: 1rem; }
.review p { font: italic 400 1.2rem/1.55 var(--display); color: var(--ink); margin-bottom: 1.5rem; }
.review cite { margin-top: auto; font-style: normal; font-weight: 700; color: var(--ink); }
.review cite span { font-weight: 500; color: var(--ink-2); }
.reviews-more { text-align: center; margin-top: clamp(1.75rem,3vw,2.5rem); }
.link, .reviews-more a, .cta-phone a, .site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* ============================================================
   ABOUT (image + text)
   ============================================================ */
.about { background: var(--surface); }
.about .wrap { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.about-media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.about-media img { aspect-ratio: 4/3; width: 100%; object-fit: cover; filter: saturate(.96) contrast(1.03); }
.about-area {
  display: inline-block; margin-top: .5rem; background: var(--accent-tint); color: var(--accent-ink);
  border-radius: var(--radius-sm); padding: .8rem 1.1rem; font-weight: 600; font-size: .98rem;
}
.about-media::after {
  content: "Real Lopez Brothers job site";
  position: absolute; inset: auto 0 0; padding: 1.4rem 1rem .85rem;
  color: #fff; font: 600 .9rem/1.3 var(--sans);
  background: linear-gradient(0deg, rgba(20,18,16,.8), rgba(20,18,16,0));
}

/* ============================================================
   CTA / CONTACT (dark closer)
   ============================================================ */
.cta { background: var(--dark); color: var(--on-dark); }
.cta .wrap { display: grid; gap: clamp(2.25rem, 5vw, 4rem); align-items: center; }
.cta .eyebrow { color: var(--accent-bright); }
.cta .eyebrow::before { background: var(--accent-bright); }
.cta h2 { color: #fff; }
.cta-copy p { color: var(--on-dark-2); font-size: 1.12rem; }
.cta-phone { margin-top: 1.75rem; font-size: 1.05rem; color: var(--on-dark); }
.cta-phone a { color: #fff; font-weight: 700; }
.estimate-card { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: clamp(1.75rem, 3.5vw, 2.75rem); box-shadow: var(--shadow-md); }
.estimate-card h3 { margin-bottom: 1.5rem; }
.estimate-form { display: grid; gap: .3rem; }
.estimate-form label { font-weight: 600; font-size: .95rem; margin-top: .9rem; }
.estimate-form input, .estimate-form textarea {
  width: 100%; font: inherit; padding: .9rem 1rem;
  border: 1.5px solid var(--hairline); border-radius: var(--radius-sm); background: var(--page); color: var(--ink);
  transition: border-color .15s ease;
}
.estimate-form input:focus, .estimate-form textarea:focus { border-color: var(--accent); outline: none; }
.estimate-form .btn { margin-top: 1.5rem; width: 100%; }
.form-note { font-size: .85rem; color: var(--ink-2); text-align: center; margin: .75rem 0 0; }
.hp { position: absolute; left: -9999px; }
.form-success { color: #1e7d32; font-weight: 700; text-align: center; font-size: 1.05rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--dark-soft); color: var(--on-dark-2); text-align: center; padding: clamp(3rem, 6vw, 4.5rem) 1.5rem; font-size: .95rem; }
.site-footer strong { color: var(--on-dark); }
.site-footer a { color: var(--on-dark); }
.site-footer p:not(.footer-brand) { margin: .5rem auto; max-width: 62ch; }
.footer-brand { font: 800 1.05rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 1.1rem; }
.footer-brand span { color: var(--accent-bright); }

/* ============================================================
   STICKY MOBILE CTA
   ============================================================ */
.mobile-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(250,248,245,.97); border-top: 1px solid var(--hairline);
  height: var(--mobile-cta-h);
}
.mobile-cta .btn { min-height: 50px; padding: .7rem 1rem; }

/* ============================================================
   TABLET >= 768px
   ============================================================ */
@media (min-width: 768px) {
  .header-call, .header-call-alt { width: auto; height: auto; min-height: 46px; padding: .55rem 1.05rem; border-radius: var(--radius-sm); }
  .header-call-alt { padding: .5rem 1rem; }
  .header-call .call-label, .header-call .call-number { display: inline; }
  .header-call .call-label { margin-right: .3em; }
  .hero { min-height: clamp(620px, 80vh, 780px); }
  .hero-ctas { flex-direction: row; max-width: none; }
  .hero-logo { width: min(100%, 540px); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .wrap { grid-template-columns: repeat(4, 1fr); }
  .about .wrap { grid-template-columns: 1fr 1.2fr; }
  .about-media { order: -1; }
  .cta .wrap { grid-template-columns: 1.05fr 1fr; }
  .mobile-cta { display: none; }
  body { padding-bottom: 0; }
}

@media (max-height: 700px) and (max-width: 767px) {
  .hero { min-height: calc(100svh - 70px); padding-block: 2rem; }
  .hero h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .hero-sub { margin-bottom: 1rem; font-size: 1rem; }
  .hero .eyebrow { margin-bottom: .65rem; }
  .hero .btn { min-height: 48px; padding-block: .75rem; }
}

/* ============================================================
   DESKTOP >= 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .review-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { margin-inline: 0; }
  .hero .wrap { width: 100%; }
}
