/* Fire Risk Assessment Hertfordshire — "the assessor's record sheet" */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F7F8F6;
  --surface: #FFFFFF;
  --ink: #1B2A3A;
  --graphite: #4A5560;
  --rule: #D5DAD8;
  --exit-green: #1E7A4C;
  --exit-green-dark: #155c38;
  --amber: #B7791F;
  --amber-text: #8F5E18; /* darkened for WCAG AA on text; --amber stays for borders/accents */
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Atkinson Hyperlegible", Arial, sans-serif;
  --max-text: 720px;
  --max-wide: 960px;
  --max-page: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  padding-bottom: 0;
}

body.has-sticky-cta { padding-bottom: 72px; }

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

a { color: var(--exit-green); text-decoration: underline; }
a:hover { color: var(--exit-green-dark); }

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: 2.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.7rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 2rem 0 0.75rem; }

p, ul, ol { max-width: var(--max-text); }
.wide { max-width: var(--max-wide); }

.container {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}

/* Compliance ribbon */
.ribbon {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--graphite);
  padding: 0.35rem 0;
}
.ribbon .container { max-width: var(--max-page); }
@media (min-width: 1024px) {
  .ribbon { position: sticky; top: 0; z-index: 20; }
}
@media (max-width: 767px) {
  .ribbon { font-size: 0.68rem; line-height: 1.3; padding: 0.3rem 0; }
  .ribbon .container { padding: 0 0.85rem; }
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 0.65rem 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
@media (max-width: 767px) {
  .brand { font-size: 1.02rem; line-height: 1.25; max-width: 190px; }
}
.main-nav {
  display: none;
}
@media (min-width: 900px) {
  .main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 1rem;
  }
  .main-nav a { color: var(--ink); text-decoration: none; }
  .main-nav a:hover { color: var(--exit-green); text-decoration: underline; }
}
.header-right { display: flex; align-items: center; gap: 1rem; }
.mobile-menu { display: block; }
@media (min-width: 900px) {
  .mobile-menu { display: none; }
}
@media (max-width: 767px) {
  /* The sticky bottom CTA bar already offers "Get quotes" on mobile, so the header button is redundant here. */
  .site-header .header-right > a.btn { display: none; }
}
.mobile-menu summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu[open] summary { border-color: var(--exit-green); }
.mobile-menu nav {
  position: absolute;
  right: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.5rem 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  z-index: 30;
}
.mobile-menu nav a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.mobile-menu nav a:hover { background: var(--paper); }

.btn {
  display: inline-block;
  background: var(--exit-green);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.2;
  text-align: center;
}
.btn:hover { background: var(--exit-green-dark); color: #fff; }
.btn-block { display: block; width: 100%; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--graphite);
  margin: 1.25rem 0 0;
}
.breadcrumb a { color: var(--graphite); }

/* Hero */
.hero {
  padding: 0.75rem 0 1rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  }
}
.hero h1 { font-size: 1.85rem; margin-bottom: 0.65rem; }
@media (min-width: 640px) {
  .hero h1 { font-size: 2.2rem; }
}
.opening-answer {
  font-size: 1.1rem;
  color: var(--ink);
  max-width: var(--max-text);
  margin: 0;
}

/* Trust strip */
.trust-strip {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
@media (min-width: 540px) {
  .trust-strip { grid-template-columns: 1fr 1fr 1fr; }
}
.trust-strip li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--graphite);
}
.trust-strip svg { flex-shrink: 0; margin-top: 0.15rem; }

/* DAB */
.dab {
  color: var(--ink);
}

/* Evidence table */
figure.evidence {
  margin: 1.5rem 0;
  max-width: var(--max-wide);
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
}
figure.evidence table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 0.95rem;
}
figure.evidence caption { text-align: left; }
figure.evidence th, figure.evidence td {
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0.9rem;
  text-align: left;
}
figure.evidence thead th {
  background: var(--paper);
  font-family: var(--font-heading);
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
}
figure.evidence tbody tr:last-child td { border-bottom: none; }
figure.evidence figcaption {
  font-size: 0.85rem;
  color: var(--graphite);
  margin-top: 0.5rem;
}

/* Callout */
.callout {
  border: 1px solid var(--amber);
  border-left-width: 4px;
  background: var(--surface);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  max-width: var(--max-text);
  border-radius: 4px;
}
.callout p { margin: 0; }
.callout strong { color: var(--amber-text); }

/* CTA band */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 2.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-wide);
}
.cta-band p { margin: 0; font-family: var(--font-heading); font-weight: 600; font-size: 1.1rem; max-width: none; }

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.4rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq p { margin: 0.5rem 0 0.75rem; }

@media (prefers-reduced-motion: no-preference) {
  .faq details[open] summary ~ * { animation: fade-in 0.15s ease-in; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Quote form */
.quote-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.15rem;
}
#quote.quote-card { padding-top: 0.75rem; }
.quote-card h2, .quote-card h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.1rem; }
.form-row { margin-bottom: 0.5rem; }
.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
  min-height: 44px;
}
.form-row textarea { min-height: 80px; }
.form-row.consent { display: flex; align-items: flex-start; gap: 0.6rem; }
.form-row.consent input { width: auto; min-height: auto; margin-top: 0.3rem; }
.form-row.consent label { font-weight: 400; margin-bottom: 0; }
.form-note { font-size: 0.8rem; color: var(--graphite); margin: 0 0 0.6rem; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }
details.more-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--exit-green);
  margin-bottom: 0.5rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  color: var(--graphite);
  font-size: 0.9rem;
}
.site-footer p { max-width: none; margin: 0 0 1rem; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.footer-links a { color: var(--graphite); }

/* Sticky mobile CTA bar */
.sticky-cta {
  display: none;
}
@media (max-width: 767px) {
  .sticky-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--rule);
    padding: 0.6rem 1rem;
    z-index: 40;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  }
  .sticky-cta .btn { width: 100%; }
  .ribbon { position: static; }
}

main { padding-bottom: 1rem; }
section { max-width: var(--max-page); margin: 0 auto; padding: 0 1.25rem; }
.hero .container { padding: 0 1.25rem; }

ol.steps { padding-left: 1.4rem; }
ol.steps li { margin-bottom: 0.5rem; }

ul.plain-list { padding-left: 1.4rem; }
ul.plain-list li { margin-bottom: 0.4rem; }

.areas-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.3rem 1rem; max-width: var(--max-wide); padding-left: 0; list-style: none; }
@media (min-width: 640px) { .areas-list { grid-template-columns: repeat(3, 1fr); } }
