/* ==========================================================================
   flatroofingdorset.co.uk - KNJ Roofing
   Palette sampled from client brand: dark navy/charcoal + lime green
   ========================================================================== */

:root {
  --color-bg: #0e111d;
  --color-bg-alt: #161b2b;
  --color-panel: #1b2033;
  --color-accent: #7fcd63;
  --color-accent-dark: #5fa347;
  --color-accent-light: #a4e08a;
  --color-white: #ffffff;
  --color-text-muted: #b7bccb;
  --color-border: #2a3049;
  --font-display: 'Poppins', 'Arial Black', sans-serif;
  --font-body: 'Inter', Arial, sans-serif;
  --radius: 4px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-white);
  color: #1b1f2a;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #0e111d;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--color-accent-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent); color: #0e111d; }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 24px;
}
.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo-link img { height: 56px; width: auto; }

.main-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 10px 12px;
  border-radius: var(--radius);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current > a { color: var(--color-accent); }

.main-nav .dropdown-toggle { display: flex; align-items: center; gap: 4px; }
.main-nav .dropdown-toggle .caret { font-size: 0.6em; transition: transform 0.15s ease; }
.main-nav > ul > li.open .caret { transform: rotate(180deg); }

.main-nav .dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
  display: none;
  z-index: 50;
}
.main-nav > ul > li.open .dropdown-menu { display: block; }
.main-nav .dropdown-menu li a {
  display: block;
  padding: 10px 12px;
  color: var(--color-white);
  font-size: 0.85rem;
  border-radius: var(--radius);
}
.main-nav .dropdown-menu li a:hover { background: var(--color-bg-alt); color: var(--color-accent); }

.header-cta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-phone { text-align: right; }
.header-phone .label {
  color: var(--color-accent);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}
.header-phone a {
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  margin: 5px auto;
  transition: all 0.2s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: var(--color-bg);
  color: var(--color-white);
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, rgba(127,205,99,0.10) 0%, rgba(127,205,99,0) 70%);
  pointer-events: none;
}
.hero .eyebrow {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.hero h1 { color: var(--color-white); max-width: 900px; }
.hero h1 .accent { color: var(--color-accent); }
.hero .lede {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-badges {
  display: flex;
  gap: 24px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-badges .badge {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-badges .badge::before {
  content: "\2713";
  color: var(--color-accent);
  font-weight: 700;
}

/* generic page header (non-home) */
.page-header {
  background: var(--color-bg);
  color: var(--color-white);
  padding: 48px 0 56px;
}
.page-header .eyebrow {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.page-header h1 { color: var(--color-white); }
.page-header .lede { color: var(--color-text-muted); max-width: 700px; font-size: 1.05rem; }
.breadcrumbs {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs .sep { margin: 0 6px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: #f4f6f2; }
.section-dark { background: var(--color-bg); color: var(--color-white); }
.section-dark h2 { color: var(--color-white); }
.section-header { max-width: 700px; margin: 0 0 40px; }
.section-header .eyebrow {
  color: var(--color-accent-dark);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
}
.section-dark .section-header .eyebrow { color: var(--color-accent); }

/* Services grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--color-white);
  border: 1px solid #e4e7de;
  border-radius: var(--radius);
  padding: 28px;
}
.card .icon-roof {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 10px; text-transform: none; letter-spacing: normal;}
.card p { color: #4a4f5c; font-size: 0.95rem; margin-bottom: 16px; }
.card a.card-link { color: var(--color-accent-dark); font-weight: 700; font-size: 0.9rem; }
.card a.card-link:hover { text-decoration: underline; }

/* About split */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.split img { border-radius: var(--radius); width: 100%; height: auto; }
.stat-row { display: flex; gap: 32px; margin: 24px 0; flex-wrap: wrap; }
.stat { }
.stat .num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--color-accent-dark); }
.stat .label { font-size: 0.85rem; color: #555; text-transform: uppercase; letter-spacing: 0.03em; }
.section-dark .stat .num { color: var(--color-accent); }
.section-dark .stat .label { color: var(--color-text-muted); }

/* Points list */
.check-list { list-style: none; margin: 0 0 24px; padding: 0; }
.check-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 12px;
}
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent-dark);
  font-weight: 700;
  background: rgba(127,205,99,0.15);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.section-dark .check-list li::before { color: var(--color-accent); background: rgba(127,205,99,0.15); }

/* Process steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 56px;
  border-left: 2px solid var(--color-border);
  margin-left: 20px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -21px;
  top: -2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #0e111d;
  font-family: var(--font-display);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Testimonials */
.testimonial-card {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--color-white);
}
.testimonial-card .stars { color: var(--color-accent); letter-spacing: 2px; margin-bottom: 12px; font-size: 0.9rem;}
.testimonial-card p { color: var(--color-text-muted); font-style: italic; font-size: 0.95rem; }
.testimonial-card .source { color: var(--color-accent); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }

/* Areas */
.areas-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.areas-list li a {
  display: block;
  background: var(--color-white);
  border: 1px solid #e4e7de;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-weight: 600;
  color: #1b1f2a;
}
.areas-list li a:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.section-dark .areas-list li a {
  background: var(--color-panel);
  border-color: var(--color-border);
  color: var(--color-white);
}
.section-dark .areas-list li a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-white);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--color-accent); font-size: 1.4rem; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--color-text-muted); margin-top: 12px; margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: var(--color-accent);
  color: #0e111d;
  padding: 48px 0;
  text-align: center;
}
.cta-band h2 { color: #0e111d; }
.cta-band .btn { background: #0e111d; color: var(--color-white); }
.cta-band .btn:hover { background: #1b2033; }

/* Contact form */
.contact-form { display: grid; gap: 16px; max-width: 560px; }
.contact-form label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 6px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-error {
  background: #fdecec;
  border: 1px solid #e0b4b4;
  border-left: 4px solid #c0392b;
  color: #7d2018;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.form-error a { color: #7d2018; font-weight: 600; }
.form-note { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 4px; }

/* Footer */
.site-footer { background: #0a0c14; color: var(--color-text-muted); padding: 56px 0 24px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--color-white); font-size: 0.85rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--color-accent); }
.footer-logo img { height: 44px; margin-bottom: 16px; }
.footer-bottom {
  border-top: 1px solid #1e2333;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}
.footer-bottom a:hover { color: var(--color-accent); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.icon-svg { color: var(--color-accent); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-cta { gap: 10px; }
  .header-phone .label { display: none; }
  .header-phone a { font-size: 0.95rem; }
  .header-cta > a.btn { display: none; }
}

@media (max-width: 400px) {
  .header-phone { display: none; }
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 0 0 0 30%;
    background: var(--color-bg);
    padding: 90px 24px 24px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    z-index: 90;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li > a { padding: 14px 4px; border-bottom: 1px solid var(--color-border); }
  .main-nav .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--color-bg-alt);
    margin-top: 4px;
  }
  .footer-grid { grid-template-columns: 1fr; }
}
