/* Pro Roofing Services — homepage sample
   Fonts: Playfair Display (headings) + Poppins (UI/body) */

:root {
  --navy-900: #061329;
  --navy-800: #0a1c3a;
  --navy-700: #0e2448;
  --blue-600: #1449b8;
  --blue-500: #1d5bd6;
  --blue-panel: #0c3a8e;
  --gold: #f5b82e;
  --ink: #0d1d3a;
  --muted: #5d6b82;
  --line: rgba(255, 255, 255, .14);
  --white: #fff;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --section-y: clamp(72px, 9vw, 128px);   /* more breathing room than the mockup */
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--white);
  background: var(--navy-800);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 32px; }
.section { padding-block: var(--section-y); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  margin-bottom: 20px;
}
h1, h2 { font-family: var(--serif); line-height: 1.1; letter-spacing: -.005em; }
h1 { font-size: clamp(44px, 6.2vw, 84px); }
h2 { font-size: clamp(34px, 4vw, 54px); margin-bottom: 26px; }
.split-copy p:not(.eyebrow) { font-size: 17px; line-height: 1.7; max-width: 520px; color: rgba(255,255,255,.88); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; padding: 17px 30px; border-radius: 3px; border: 1.5px solid transparent;
  cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.btn .arrow { font-size: 17px; line-height: 1; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--blue-600); color: var(--white); border-color: #3f74e0; }
.btn-primary:hover { background: var(--blue-500); }
.btn-ghost { background: rgba(6, 19, 41, .55); color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(6, 19, 41, .8); }
.btn-outline { color: var(--white); border-color: rgba(255,255,255,.65); }
.btn-outline:hover { background: rgba(255,255,255,.08); }
.btn-sm { padding: 13px 22px; font-size: 12px; }
.split-copy .btn { margin-top: 40px; }

/* ---------- Header ---------- */
.site-header { background: var(--navy-900); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-block: 18px; }
.brand { flex-shrink: 0; }
.brand img { width: 150px; }
.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav ul { display: flex; gap: 26px; }
.primary-nav a, .btn { white-space: nowrap; }
.primary-nav ul a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.primary-nav ul a:hover, .primary-nav ul a[aria-current="page"] { border-color: var(--white); }
.header-phone { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; text-decoration: none; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); cursor: pointer; padding: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 52vw, 760px);
  display: flex; align-items: center;
  padding-block: 120px;
  background:
    linear-gradient(90deg, rgba(6,19,41,.88) 0%, rgba(6,19,41,.62) 32%, rgba(6,19,41,.05) 58%, rgba(6,19,41,0) 100%),
    url("assets/hero.jpg") center right / cover no-repeat;
}
.hero .eyebrow { letter-spacing: .3em; margin-bottom: 26px; }
.hero h1 { margin-bottom: 30px; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero-lede { font-size: clamp(17px, 1.5vw, 21px); max-width: 520px; line-height: 1.6; margin-bottom: 44px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- Stats ---------- */
.stats { background: var(--navy-900); padding-block: 56px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding-inline: 16px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-top { display: flex; align-items: center; gap: 14px; }
.stat-top strong { font-size: 34px; font-weight: 600; line-height: 1; }
.stat-top > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.stat-top img { width: 46px; }
.stat > span { font-size: 16px; font-weight: 500; line-height: 1.4; }
.stars { color: var(--gold); letter-spacing: .12em; font-size: 16px; line-height: 1; }

/* ---------- Brands ---------- */
.brands { background: var(--white); padding-block: 56px 48px; }
.brand-logos { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.brand-logos img { height: 42px; width: auto; }
.brand-logos li:nth-child(4) img { height: 56px; }
.brands-tagline { display: flex; align-items: center; gap: 24px; margin-top: 40px; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; }
.brands-tagline::before, .brands-tagline::after { content: ""; flex: 1; height: 1px; background: #d3d9e4; }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }

/* ---------- Services ---------- */
.services { background: radial-gradient(120% 140% at 0% 0%, #102a55 0%, var(--navy-800) 55%, var(--navy-900) 100%); }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.service-card {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18); text-decoration: none; aspect-ratio: 16 / 9.2;
}
.service-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.service-card:hover img { transform: scale(1.04); }
.service-card > span {
  position: absolute; inset: auto 0 0 0; padding: 40px 20px 16px;
  font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(transparent, rgba(4, 12, 28, .85));
}

/* ---------- Projects ---------- */
.projects {
  background:
    linear-gradient(90deg, rgba(6,19,41,.72) 0%, rgba(6,19,41,.9) 45%, var(--navy-900) 75%),
    url("assets/projects-bg.jpg") left center / cover no-repeat;
}
.split-projects { grid-template-columns: 1fr 1.45fr; }
.project-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.project-track::-webkit-scrollbar { display: none; }
.project-track img { width: 100%; aspect-ratio: 156 / 140; object-fit: cover; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.2); scroll-snap-align: start; }
.slider-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 28px; }
.slider-controls .dots { grid-column: 2; }
.arrows { grid-column: 3; justify-self: end; display: flex; gap: 16px; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blue-600); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.round-btn:hover { background: var(--blue-500); }
.dots { display: flex; gap: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); }
.dots span.active { background: var(--white); }

/* ---------- Financing ---------- */
.financing { display: grid; grid-template-columns: 1fr 1.28fr .55fr; background: var(--navy-900); min-height: 440px; }
.financing-photo { position: relative; }
.financing-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.financing-panel {
  position: relative; background: var(--blue-panel); padding: var(--section-y) 48px var(--section-y) 32px;
  display: flex; flex-direction: column; justify-content: center;
}
.financing-panel::before {   /* angled edge over the photo */
  content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 60px;
  background: var(--blue-panel); clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.financing-panel h2 { margin-bottom: 22px; }
.financing-panel p:not(.eyebrow) { max-width: 520px; font-size: 16px; line-height: 1.7; color: rgba(255,255,255,.9); }
.financing-panel .btn { margin-top: 36px; align-self: flex-start; }
.financing-partner { background: var(--navy-800); padding: 48px 36px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.financing-partner img { width: 160px; }
.financing-partner hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.financing-partner p { display: flex; align-items: center; gap: 14px; font-size: 14px; line-height: 1.4; }

/* ---------- Reviews ---------- */
.reviews { background: #f3f6fb; color: var(--ink); }
.reviews .split-copy p:not(.eyebrow) { color: #2b3a55; }
.reviews .split { grid-template-columns: 1fr 1fr; }
.reviews .btn-primary { background: #0d3f97; border-color: #0d3f97; }
.review-slider { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.chev { background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }
.review-card { margin: 0; background: var(--white); border-radius: 10px; padding: 36px 40px; box-shadow: 0 18px 40px rgba(13, 29, 58, .08); }
.review-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.review-head .stars { font-size: 22px; }
.review-card blockquote { margin: 0 0 22px; font-size: 17px; line-height: 1.65; }
.review-card figcaption { display: flex; flex-direction: column; font-size: 16px; }
.review-card figcaption strong { font-weight: 500; }
.review-card figcaption span { color: var(--muted); }
.dots-light { grid-column: 2; justify-self: center; margin-top: 8px; }
.dots-light span { background: #c9d3e4; }
.dots-light span.active { background: var(--blue-600); }

/* ---------- Service area ---------- */
.area {
  background:
    linear-gradient(90deg, var(--navy-900) 0%, rgba(6,19,41,.92) 32%, rgba(6,19,41,.5) 60%, rgba(6,19,41,.25) 100%),
    url("assets/hamilton.jpg") right 42% / cover no-repeat,
    var(--navy-900);
}
.area-title { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 32px; }
.area-title svg { margin-top: 30px; flex-shrink: 0; }
.area-kicker { font-size: 17px; }
.area h2 { font-size: clamp(40px, 4.4vw, 58px); margin: 2px 0 6px; }
.area-sub { font-size: 21px; font-weight: 600; }
.area-list { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 56px; row-gap: 10px; margin-bottom: 44px; }
.area-list li { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.area-list li::before {
  content: ""; width: 16px; height: 12px; flex-shrink: 0;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M1.5 6.5 6 11 14.5 1.5' fill='none' stroke='white' stroke-width='2.6'/%3E%3C/svg%3E");
}

/* ---------- Estimate ---------- */
.estimate { display: grid; grid-template-columns: 1fr 3fr; background: var(--navy-900); }
.estimate-photo { position: relative; min-height: 360px; }
.estimate-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% center; }
.estimate-body {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center;
  padding: var(--section-y) max(32px, calc((100vw - var(--container)) / 2 + 32px)) var(--section-y) 64px;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
}
.estimate-copy p:not(.eyebrow) { font-size: 17px; line-height: 1.7; color: rgba(255,255,255,.88); }
.estimate-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  background: rgba(14, 44, 98, .55); border: 1.5px solid #1d4fb0; border-radius: 10px; padding: 28px;
}
.field.full, .estimate-form .full { grid-column: 1 / -1; }
.estimate-form input, .estimate-form select, .estimate-form textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--white);
  background: rgba(6, 19, 41, .45); border: 1px solid rgba(120, 160, 230, .45); border-radius: 4px; padding: 13px 16px;
}
.estimate-form ::placeholder { color: rgba(255,255,255,.75); }
.estimate-form select { appearance: none; color: rgba(255,255,255,.75); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; }
.estimate-form select option { color: var(--ink); }
.estimate-form textarea { resize: vertical; min-height: 92px; }
.estimate-form input:focus, .estimate-form select:focus, .estimate-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.estimate-form .btn { margin-top: 6px; padding-block: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); border-top: 1px solid var(--line); padding-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1.5fr; gap: 40px; padding-bottom: 64px; }
.footer-brand img { width: 160px; margin-bottom: 22px; }
.footer-brand p { font-size: 18px; line-height: 1.45; }
.site-footer h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 4px; font-size: 15px; color: rgba(255,255,255,.85); }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.footer-contact { border-left: 1px solid var(--line); padding-left: 40px; }
.footer-contact ul { gap: 12px; }
.footer-contact li { display: flex; gap: 14px; align-items: flex-start; }
.footer-contact li svg { flex-shrink: 0; margin-top: 2px; }
.social { display: flex; gap: 14px; margin-top: 22px; }
.social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: transform .2s; }
.social a:hover { transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; }
.s-fb { background: #1877f2; }
.s-ig { border: 0; }
.s-ig svg { width: 28px; height: 28px; }
.s-g { background: #1a73e8; }
.s-in { background: #0a66c2; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-block: 26px; font-size: 13px; color: rgba(255,255,255,.8); }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }
.footer-bottom span { margin-inline: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
  .primary-nav ul { gap: 20px; }
  .primary-nav ul a { font-size: 14px; }
  .header-phone { font-size: 16px; }
}
@media (max-width: 1180px) {
  .header-phone { display: none; }
}
@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .brand-logos { justify-content: center; gap: 32px 56px; }
  .hero { background-image: linear-gradient(90deg, rgba(6,19,41,.88), rgba(6,19,41,.55)), url("assets/hero.jpg"); background-position: 0 0, 68% center; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 24px;
    background: var(--navy-900); padding: 24px 32px 32px; border-top: 1px solid var(--line);
  }
  .nav-open .primary-nav { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 6px; }
  .header-phone { display: inline-flex; }
  .split, .split-projects, .reviews .split { grid-template-columns: 1fr; gap: 48px; }
  .financing { grid-template-columns: minmax(0, 1fr); }
  .financing-photo { min-height: 300px; }
  .financing-panel { padding: 72px 32px; }
  .financing-panel::before { display: none; }
  .estimate { grid-template-columns: minmax(0, 1fr); }
  .estimate-photo { min-height: 280px; }
  .estimate-body { grid-template-columns: 1fr; padding: 72px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-contact { border-left: 0; padding-left: 0; }
}
@media (max-width: 720px) {
  .container { padding-inline: 20px; }
  .hero { padding-block: 96px; background-position: 0 0, 68% center; }
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .stat:nth-child(3) { border-left: 0; }
  .brand-logos { justify-content: center; gap: 28px 40px; }
  .brand-logos img { height: 34px; }
  .brands-tagline { font-size: 11px; letter-spacing: .2em; text-align: center; }
  .service-grid { grid-template-columns: 1fr; }
  .project-track { grid-auto-columns: 82%; }
  .review-slider { grid-template-columns: 1fr; }
  .review-slider .chev { display: none; }
  .dots-light { grid-column: 1; }
  .review-card { padding: 28px 24px; }
  .area-list { grid-template-columns: 1fr; }
  .area { background: linear-gradient(rgba(6,19,41,.8), rgba(6,19,41,.72)), url("assets/hamilton.jpg") 60% center / cover no-repeat, var(--navy-900); }
  .estimate-form { grid-template-columns: 1fr; padding: 20px; }
  .estimate-body, .financing-panel { padding-inline: 20px; }
  .stat > span { font-size: 14px; }
  .stat-top strong { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
/* ---------- Motion ---------- */
/* Spinning outline on primary buttons (same treatment as the 24 Hour Web CTAs) */
@property --glow-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes glowSpin { to { --glow-angle: 360deg; } }

.btn { position: relative; isolation: isolate; }
.btn:hover { transform: translateY(-2px); }
.btn-primary, .btn-primary:hover { background: transparent; border-color: transparent; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--blue-600); transition: background .2s;
}
.btn-primary:hover::after { background: var(--blue-500); }
.btn-primary::before {
  content: ""; position: absolute; inset: -2px; z-index: -2; border-radius: 5px;
  background: conic-gradient(from var(--glow-angle), rgba(120, 165, 245, .35) 0 60%, #e4edff 80%, rgba(120, 165, 245, .35) 100%);
  animation: glowSpin 4.5s linear infinite;
}
.btn-primary:hover { box-shadow: 0 10px 28px -6px rgba(29, 91, 214, .65); }
.reviews .btn-primary, .reviews .btn-primary:hover { background: transparent; }
.reviews .btn-primary::after { background: #0d3f97; }
.reviews .btn-primary:hover::after { background: var(--blue-600); }
.reviews .btn-primary::before { background: conic-gradient(from var(--glow-angle), rgba(13, 63, 151, .25) 0 60%, #5d8ef0 80%, rgba(13, 63, 151, .25) 100%); }
.btn-ghost:hover, .btn-outline:hover { border-color: var(--white); }

/* Hero entrance */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero .container > * { animation: fadeUp .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero .eyebrow { animation-delay: .1s; }
.hero h1 { animation-delay: .22s; }
.hero-lede { animation-delay: .36s; }
.hero .btn-row { animation-delay: .5s; }

/* Scroll reveal (classes added by script, so content shows without JS) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.service-card.reveal.is-in:hover img { transform: scale(1.04); }
.project-track img { transition: transform .4s, opacity .7s ease; }
.project-track img.is-in:hover { transform: translateY(-4px); }
.social a.reveal.is-in:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .btn:hover { transform: none; }
}
