/* =========================================================
   West Energy Spray Foam — shared stylesheet
   Colours and fonts come from the West Energy brand guide.
   Every page links to this one file, so a change here
   updates the whole site at once.
   ========================================================= */

/* ---- 0. Brand fonts (stored in the /fonts folder, so no outside services needed) ---- */
@font-face { font-family: "Bebas Neue"; src: url("fonts/bebas-neue-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("fonts/raleway-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("fonts/raleway-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("fonts/raleway-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("fonts/raleway-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

/* ---- 1. Brand settings ---- */
:root {
  --green: #2E7D32;        /* primary brand green (buttons, accents on light) */
  --green-dark: #23622a;   /* button hover */
  --green-bright: #5fb347; /* brighter green for text on black, so it's readable */
  --black: #111111;        /* deep black */
  --charcoal: #333333;
  --char-2: #1c1c1c;       /* between black and charcoal, for cards on dark */
  --light: #EEEEEE;        /* light grey */
  --white: #FFFFFF;
  --text: #222222;
  --muted: #5c5c5c;
  --radius: 8px;
  --max: 1160px;
}

/* ---- 2. Basics ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  color: var(--text);
  line-height: 1.65;
  background: var(--white);
  font-variant-numeric: lining-nums; /* even, modern-looking numbers */
}
/* Headings use Bebas Neue — tall, bold, all caps (from the brand guide) */
h1, h2, h3 {
  font-family: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.02;
  margin: 0 0 .4em;
  color: var(--black);
}
h1 { font-size: clamp(2.8rem, 7vw, 4.8rem); }
h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h3 { font-size: 1.75rem; }
p  { margin: 0 0 1em; }
a  { color: var(--green); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--light { background: var(--light); }
.section--dark { background: var(--black); color: #d6d6d6; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section-intro { max-width: 660px; color: var(--muted); margin-bottom: 36px; }
.section--dark .section-intro { color: #b9b9b9; }

/* Small label above headings ("WHO WE WORK WITH") */
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--green); margin-bottom: 10px;
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--green-bright); }

/* Tapered green "accent line" — copied from the line in the logo */
.accent-line {
  display: block; width: 120px; height: 5px; margin: 6px 0 22px;
  background: var(--green);
  clip-path: polygon(0 35%, 100% 0, 100% 100%, 0 65%);
}

/* ---- 3. Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 4px; border: 2px solid transparent;
  font-family: "Raleway", sans-serif; font-weight: 700; font-size: .95rem;
  letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-dark); }
.btn--outline { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline:hover { background: var(--white); color: var(--black); }
.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: var(--charcoal); }

/* ---- 4. Header & navigation ---- */
.site-header {
  background: var(--black); color: var(--white);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 3px solid var(--green);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo img { height: 56px; width: auto; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  color: var(--white); text-decoration: none; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; font-size: .9rem;
}
.nav a:hover, .nav a.active { color: var(--green-bright); }
.nav .btn { padding: 11px 18px; color: var(--white); }
.nav .btn:hover { color: var(--white); }

/* Hamburger button — only shows on phones (see section 11) */
.menu-toggle {
  display: none; background: none; border: 0; color: var(--white);
  font-size: 1.9rem; cursor: pointer; padding: 6px;
}

/* ---- 5. Hero (big banner at the top of each page) ----
   The real job photo sits behind a dark gradient so the
   white text stays easy to read. */
.hero {
  background:
    linear-gradient(100deg, rgba(17,17,17,.96) 0%, rgba(17,17,17,.85) 45%, rgba(17,17,17,.45) 100%),
    url("images/job1-after-1.jpg") center / cover no-repeat;
  color: var(--white);
  padding: 110px 0 120px;
}
.hero h1 { color: var(--white); max-width: 760px; }
.hero h1 .green { color: var(--green-bright); }
.hero p { font-size: 1.15rem; max-width: 580px; color: #dcdcdc; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero--small { padding: 70px 0 74px; }
.hero--crawl { background-image:
    linear-gradient(100deg, rgba(17,17,17,.96) 0%, rgba(17,17,17,.82) 50%, rgba(17,17,17,.5) 100%),
    url("images/job3-crawlspace.jpg"); }
.hero--wall { background-image:
    linear-gradient(100deg, rgba(17,17,17,.96) 0%, rgba(17,17,17,.82) 50%, rgba(17,17,17,.5) 100%),
    url("images/job2-wall.jpg"); }

/* Tagline strip under the hero */
.tagline-bar { background: var(--green); color: var(--white); padding: 14px 0; text-align: center; }
.tagline-bar p {
  margin: 0; font-family: "Bebas Neue", sans-serif; font-size: 1.6rem; letter-spacing: .18em;
}

/* ---- 6. Cards & grids ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); align-items: center; gap: 52px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 30px;
  box-shadow: 0 4px 18px rgba(0,0,0,.07); border-bottom: 4px solid var(--green);
}
.card p { color: var(--muted); margin-bottom: 0; }
.section--dark .card { background: var(--char-2); box-shadow: none; }
.section--dark .card p { color: #b9b9b9; }

/* Line icons (inline SVG), styled like the brand guide's icon set */
.icon { display: block; width: 46px; height: 46px; margin-bottom: 14px; color: var(--green); }
.section--dark .icon { color: var(--green-bright); }
.icon svg { width: 100%; height: 100%; }

/* Highlights strip */
.highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.highlight .icon { margin: 0 auto 10px; width: 40px; height: 40px; }
.highlight strong { display: block; line-height: 1.1; margin-bottom: 4px; font-family: "Bebas Neue", sans-serif; font-size: 1.6rem; letter-spacing: .04em; color: var(--black); font-weight: 400; }
.highlight span { color: var(--muted); font-size: .92rem; }

/* Rounded photos */
.photo { border-radius: var(--radius); width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 1.2em; }
.checklist li { padding-left: 32px; position: relative; margin-bottom: 10px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--green);
  color: var(--green); font-weight: 900; font-size: .8rem; display: grid; place-items: center;
}
.section--dark .checklist li::before { border-color: var(--green-bright); color: var(--green-bright); }

/* ---- 7. Our Work — before/after ---- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shot { position: relative; margin: 0; }
.shot img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tag {
  position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 3px;
  font-family: "Bebas Neue", sans-serif; font-size: 1.15rem; letter-spacing: .1em;
  background: var(--black); color: var(--white);
}
.tag--after { background: var(--green); }
.job-caption { margin-top: 14px; }
.job-caption h3 { margin-bottom: .2em; }
.job-caption p { color: #b9b9b9; margin: 0; }
.job-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 36px; }
.job-grid .shot img { aspect-ratio: 1 / 1; }

/* Service blocks on the Services page */
.service { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; padding: 44px 0; border-bottom: 1px solid #e2e2e2; }
.service:last-child { border-bottom: 0; }
.service:nth-child(even) .service-media { order: 2; }
.service ul { padding-left: 20px; color: var(--muted); }
/* Dark panel shown where there's no job photo yet */
.icon-panel {
  aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--black);
  display: grid; place-items: center; text-align: center; color: var(--white); padding: 24px;
}
.icon-panel .icon { width: 84px; height: 84px; margin: 0 auto 12px; color: var(--green-bright); }
.icon-panel span { font-family: "Bebas Neue", sans-serif; font-size: 1.8rem; letter-spacing: .08em; }

/* Service-area box */
.area-box { background: var(--char-2); border-left: 5px solid var(--green-bright); padding: 28px 30px; border-radius: var(--radius); }
.area-box h3 { color: var(--white); }

/* Call-to-action band */
.cta-band { background: var(--green); padding: 52px 0; color: var(--white); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { margin: 0; color: var(--white); }
.cta-band p { margin: 4px 0 0; opacity: .9; }

/* ---- 8. Contact page & form ---- */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.form { background: var(--white); padding: 34px; border-radius: var(--radius); box-shadow: 0 4px 18px rgba(0,0,0,.07); border-top: 4px solid var(--green); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #c8c8c8; border-radius: 6px;
  font: inherit; font-size: 1rem; color: var(--text); background: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,125,50,.2);
}
.field textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: 6px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #e3f4e4; color: #1b5e20; }
.form-status.info { background: #fff4e0; color: #7a4a00; }
.info-box { background: var(--black); color: #d6d6d6; padding: 34px; border-radius: var(--radius); }
.info-box h3 { color: var(--white); }
.info-box a { color: var(--green-bright); word-break: break-word; }
.info-box strong { color: var(--white); }
.info-box .btn { color: var(--white); }

/* ---- 9. Footer ---- */
.site-footer { background: var(--black); color: #bdbdbd; padding: 52px 0 24px; font-size: .95rem; border-top: 3px solid var(--green); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 36px; }
.footer-logo { height: 70px; width: auto; margin-bottom: 14px; }
.site-footer h4 { color: var(--white); margin: 0 0 12px; font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: 1.4rem; letter-spacing: .06em; }
.site-footer a { color: #bdbdbd; text-decoration: none; word-break: break-word; }
.site-footer a:hover { color: var(--green-bright); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 18px; font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-bottom .promise { color: var(--green-bright); letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }

/* ---- 10. Floating "Call" button (phones only) ---- */
.call-fab {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60;
  background: var(--green); color: var(--white); font-weight: 800; text-decoration: none;
  text-transform: uppercase; letter-spacing: .06em; font-size: .9rem;
  padding: 14px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

/* ---- 11. Mobile layout (screens narrower than 900px) ----
   This is what makes the site mobile-friendly: grids
   collapse to one column and the menu becomes a hamburger. */
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .logo img { height: 46px; }
  .nav {
    display: none; position: absolute; top: 79px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--black); padding: 10px 20px 22px; border-bottom: 3px solid var(--green);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav .btn { margin-top: 14px; border-bottom: 0; }

  .grid-3, .grid-4, .grid-2, .service, .contact-layout, .footer-grid, .form-row, .job-grid { grid-template-columns: 1fr; }
  .service:nth-child(even) .service-media { order: 0; }
  .highlights { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .section { padding: 54px 0; }
  .hero { padding: 72px 0 80px; }
  .tagline-bar p { font-size: 1.25rem; letter-spacing: .12em; }
  .call-fab { display: inline-flex; }
  .site-footer { padding-bottom: 90px; }
}
@media (max-width: 520px) {
  .compare { grid-template-columns: 1fr; }
}
