/* ============================================================
   Phillips Roofing — site styles
   Palette & type per brand-guide.md (Brand Guidelines 2025)
   ============================================================ */

:root {
  /* Brand */
  --color-primary:    #400813; /* Oxblood — CTAs, headings, key accents */
  --color-primary-dk: #2A0510; /* Oxblood, darker (hover) */
  --color-deep:       #250101; /* Deep Wine — dark backgrounds */
  --color-crimson:    #5A081F; /* Crimson — accents, dividers, stars */
  --color-mauve:      #A68689; /* Dusty Mauve — warm accent */
  --color-parchment:  #F2F2F2; /* Parchment — light section bg */
  --color-white:      #FFFFFF;

  /* Neutrals (warm grey) */
  --color-stone-200:  #E6DEDF;
  --color-stone-300:  #CFC4C6;
  --color-ash-400:    #8C8082;
  --color-graphite:   #564E50;
  --color-slate-600:  #3D3437;
  --color-ink:        #2A2326; /* charcoal — body text */

  /* Back-compat aliases (used by existing rules) */
  --color-dark:       #250101; /* Deep Wine */
  --color-sand:       #F2F2F2; /* Parchment */

  --font-heading: 'Barlow Semi Condensed', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius-btn:  8px;
  --radius-card: 12px;
  --max-width:   1140px;
  --shadow:      0 10px 30px rgba(37, 1, 1, 0.10);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.12;
  color: var(--color-primary);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.section { padding: 80px 0; }
.section--sand { background: var(--color-parchment); }
.section__head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section__head h2 { font-size: 38px; margin: 8px 0 12px; }
.section__head p { color: var(--color-graphite); font-size: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 700; font-size: 17px;
  letter-spacing: 0.01em;
  min-height: 48px; padding: 0 26px;
  border-radius: var(--radius-btn); border: 2px solid transparent;
  cursor: pointer; transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dk); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn--ghost:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.btn--light { background: #fff; color: var(--color-primary); }
.btn--light:hover { background: var(--color-parchment); text-decoration: none; }
.btn--lg { min-height: 54px; font-size: 18px; padding: 0 32px; }

/* ---------- Top bar ---------- */
.topbar {
  background: #fff; color: #000;
  border-bottom: 1px solid var(--color-stone-200);
  font-size: 14px;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 16px; }
.topbar a { color: #000; font-weight: 600; }
.topbar__badges { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar__badges span { display: inline-flex; align-items: center; gap: 6px; color: #000; }

/* ---------- Header / nav ---------- */
.header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--color-stone-200); }
.header .container { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand { display: flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--color-ink); font-weight: 600; font-size: 16px; }
.nav a:hover { color: var(--color-primary); text-decoration: none; }
.header__cta { display: flex; align-items: center; gap: 14px; }
.header__phone { font-family: var(--font-heading); font-weight: 800; font-size: 20px; color: var(--color-primary); white-space: nowrap; }
.header__phone:hover { color: var(--color-primary-dk); text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  width: 44px; height: 44px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-ink); margin: 5px auto; transition: 0.2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(37,1,1,0.82), rgba(37,1,1,0.90)),
    url("https://images.unsplash.com/photo-1632759145351-1d592919f522?auto=format&fit=crop&w=1600&q=70") center/cover no-repeat;
  color: #fff;
}
.hero__inner { max-width: 720px; padding: 96px 0 104px; }
.hero .eyebrow { color: var(--color-mauve); }
.hero h1 { color: #fff; font-size: 56px; font-weight: 800; margin: 14px 0 18px; }
.hero p { font-size: 20px; color: #EFE7E8; max-width: 600px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero__points { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 34px; }
.hero__points li { list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.hero__points svg { width: 20px; height: 20px; color: var(--color-mauve); flex: none; }

/* ---------- Trust strip ---------- */
.trust { background: var(--color-deep); color: var(--color-parchment); }
.trust .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 28px 24px; text-align: center; }
.trust__num { font-family: var(--font-heading); font-weight: 800; font-size: 34px; color: #fff; }
.trust__label { font-size: 14px; color: var(--color-mauve); }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--color-stone-200);
  border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(37,1,1,0.16); }
.card__icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(64,8,19,0.08); color: var(--color-primary);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--color-graphite); font-size: 16px; }

/* ---------- Why us ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why__list { display: grid; gap: 22px; margin-top: 22px; }
.why__item { display: flex; gap: 14px; }
.why__item svg { width: 26px; height: 26px; color: var(--color-primary); flex: none; margin-top: 2px; }
.why__item h4 { font-size: 19px; margin-bottom: 4px; }
.why__item p { color: var(--color-graphite); font-size: 16px; }
.why__media {
  border-radius: var(--radius-card); overflow: hidden; min-height: 380px;
  background:
    linear-gradient(180deg, rgba(37,1,1,0.05), rgba(37,1,1,0.30)),
    url("../photos/phillips-roofing-crew-installing-tile-roof.jpg") center/cover no-repeat;
}

/* ---------- Service areas ---------- */
.areas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 880px; margin: 0 auto; }
.area-chip {
  background: #fff; border: 1px solid var(--color-stone-200);
  border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 15px;
  color: var(--color-ink); display: inline-flex; align-items: center; gap: 8px;
}
.area-chip svg { width: 16px; height: 16px; color: var(--color-primary); }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review {
  background: #fff; border: 1px solid var(--color-stone-200);
  border-radius: var(--radius-card); padding: 26px; box-shadow: var(--shadow);
}
.review__stars { color: var(--color-crimson); display: flex; gap: 2px; margin-bottom: 12px; }
.review__stars svg { width: 18px; height: 18px; }
.review p { font-size: 16px; color: var(--color-slate-600); }
.review__name { margin-top: 14px; font-family: var(--font-heading); font-weight: 700; color: var(--color-primary); }
.review__loc { font-size: 14px; color: var(--color-ash-400); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-primary); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; font-size: 38px; margin-bottom: 10px; }
.cta-band p { font-size: 19px; margin-bottom: 26px; color: #F3E6E9; }
.cta-band .btn--light { color: var(--color-primary); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; }
.contact__info h3 { font-size: 26px; margin-bottom: 16px; }
.contact__info ul { list-style: none; display: grid; gap: 16px; }
.contact__info li { display: flex; gap: 12px; align-items: flex-start; color: var(--color-slate-600); }
.contact__info svg { width: 22px; height: 22px; color: var(--color-primary); flex: none; margin-top: 2px; }
.contact__info a { color: var(--color-ink); font-weight: 600; }

.form { background: #fff; border: 1px solid var(--color-stone-200); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--color-ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-family: var(--font-body); font-size: 16px;
  border: 1px solid var(--color-stone-300); border-radius: 8px; background: #fff; color: var(--color-ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary);
}
.field textarea { resize: vertical; min-height: 110px; }
.field__error { color: var(--color-crimson); font-size: 13px; margin-top: 4px; display: none; }
.field--invalid .field__error { display: block; }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--color-crimson); }
.form__success { display: none; background: rgba(46,158,91,0.10); color: #1f7a44; border-radius: 8px; padding: 14px; font-weight: 600; margin-bottom: 16px; }
.form__success.is-visible { display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--color-deep); color: var(--color-mauve); padding: 56px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer a { color: var(--color-mauve); }
.footer a:hover { color: #fff; }
.footer__brand img { height: 42px; margin-bottom: 14px; }
.footer__brand p { color: var(--color-stone-300); }
.footer ul { list-style: none; display: grid; gap: 8px; font-size: 15px; }
.footer__bottom { border-top: 1px solid rgba(242,242,242,0.12); margin-top: 40px; padding-top: 20px; font-size: 13px; color: var(--color-ash-400); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .why, .contact { grid-template-columns: 1fr; }
  .cards, .reviews { grid-template-columns: repeat(2, 1fr); }
  .trust .container { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .why__media { min-height: 280px; }
}
@media (max-width: 760px) {
  .nav, .header__phone { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 76px; left: 0; right: 0; background: #fff;
    padding: 16px 24px; box-shadow: var(--shadow); border-top: 1px solid var(--color-stone-200);
  }
  .nav.is-open a { padding: 10px 0; width: 100%; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 18px; }
  .section { padding: 56px 0; }
  .section__head h2, .cta-band h2 { font-size: 30px; }
  .topbar__badges { display: none; }
}
@media (max-width: 520px) {
  .cards, .reviews { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}

/* Our work gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery__item {
  margin: 0; border-radius: var(--radius-card); overflow: hidden;
  box-shadow: var(--shadow); background: var(--color-stone-200);
}
.gallery__item img {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 1;
  object-fit: cover; transition: transform 300ms ease;
}
.gallery__item:hover img { transform: scale(1.04); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }