/* ==========================================================================
   London Chimney Liners — chimneyliningchelsea.co.uk
   Design tokens drawn from the brand logo (oxblood/terracotta roofline mark)
   and the trade itself (brick, soot, aged brass flue liners, stone facades).
   ========================================================================== */

:root {
  /* Colour */
  --soot:        #211a19;   /* near-black warm charcoal — nav, footer */
  --soot-2:      #2e2422;
  --brick:       #6b3f3f;   /* primary — oxblood brick, from logo */
  --brick-dark:  #522f2f;
  --ember:       #a3675c;   /* secondary — warm terracotta, from logo */
  --brass:       #a5824f;   /* accent — aged brass/copper, flue-liner material */
  --brass-light: #c7a476;
  --stone:       #f5efe6;   /* background — London stucco cream */
  --stone-2:     #ece2d4;   /* card / section alt background */
  --stone-3:     #e2d5c2;
  --ink:         #2a221e;   /* body text */
  --ink-soft:    #5c5049;   /* secondary text */
  --white:       #ffffff;
  --line:        #d9cbb8;   /* hairline borders on stone */
  --line-dark:   rgba(255,255,255,0.14);
  --success:     #4a6b4f;
  --error:       #a13c3c;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Scale (major third-ish, hand tuned) */
  --step--1: clamp(0.86rem, 0.83rem + 0.15vw, 0.94rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.9rem + 2.2vw, 3.6rem);
  --step-5:  clamp(3rem, 2.3rem + 3.2vw, 4.6rem);

  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 14px;
  --shadow-card: 0 1px 2px rgba(33,26,25,0.06), 0 12px 28px -14px rgba(33,26,25,0.28);
  --container: 1180px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--stone);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--soot);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

.eyebrow-none {} /* intentionally no tracked-out eyebrow labels site-wide */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: var(--step--1);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brick); color: var(--white); }
.btn-primary:hover { background: var(--brick-dark); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-outline-dark { background: transparent; color: var(--soot); border-color: var(--soot); }
.btn-outline-dark:hover { background: var(--soot); color: var(--white); }
.btn-brass { background: var(--brass); color: var(--soot); }
.btn-brass:hover { background: var(--brass-light); }
.btn-block { width: 100%; }

/* ---------------------------------- Header ---------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--soot);
  border-bottom: 1px solid var(--line-dark);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }

.main-nav > ul {
  list-style: none; display: flex; align-items: center; gap: 30px;
  margin: 0; padding: 0;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  color: var(--stone); font-size: var(--step--1); font-weight: 500;
  padding: 8px 2px; display: inline-block; position: relative;
}
.main-nav > ul > li > a::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 2px;
  background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.main-nav > ul > li > a:hover::after { transform: scaleX(1); }

.dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; font: inherit; color: var(--stone); font-size: var(--step--1); font-weight: 500; padding: 8px 2px; }
.dropdown-toggle svg { width: 11px; height: 11px; transition: transform 0.2s ease; }
.dropdown-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.dropdown-panel {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--white); border-radius: var(--radius-m); box-shadow: var(--shadow-card);
  min-width: 260px; padding: 10px; display: none; border: 1px solid var(--line);
}
.dropdown-panel.open { display: block; }
.dropdown-panel a { display: block; padding: 10px 12px; border-radius: var(--radius-s); color: var(--ink); font-size: 0.92rem; }
.dropdown-panel a:hover { background: var(--stone-2); color: var(--brick); }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header-phone { display: flex; align-items: center; gap: 8px; color: var(--white); font-weight: 600; font-size: var(--step--1); }
.header-phone svg { width: 17px; height: 17px; color: var(--brass); flex-shrink: 0; }
.header-phone span.num { font-family: var(--font-display); font-size: 1.05rem; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .main-nav { position: fixed; inset: 66px 0 0 0; background: var(--soot); padding: 20px 24px; overflow-y: auto;
    transform: translateX(100%); transition: transform 0.25s ease; z-index: 49; }
  .main-nav.open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav > ul > li > a { padding: 14px 4px; border-bottom: 1px solid var(--line-dark); }
  .dropdown-panel { position: static; transform: none; box-shadow: none; border: none; background: var(--soot-2); margin-top: 4px; }
  .dropdown-panel a { color: var(--stone); }
  .dropdown-panel a:hover { background: rgba(255,255,255,0.06); color: var(--brass-light); }
  .header-phone .txt { display: none; }
  .header-phone .num { display: none; }
  .nav-toggle { display: block; }
  .header-actions .btn-brass { display: none; }
  .header-actions { gap: 8px; }
}
@media (max-width: 420px) {
  .brand img { height: 32px; }
}
@media (min-width: 961px) { .nav-toggle { display: none; } }

/* ---------------------------------- Hero ---------------------------------- */
.hero { background: var(--soot); color: var(--stone); position: relative; overflow: hidden; padding: 64px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.85fr; gap: 56px; align-items: center; padding-bottom: 70px; position: relative; z-index: 2; }
.hero h1 { color: var(--white); font-size: var(--step-5); margin-bottom: 0.35em; }
.hero h1 em { font-style: italic; color: var(--brass-light); }
.hero-sub { color: #d8c9bb; font-size: 1.1rem; max-width: 46ch; margin-bottom: 1.6em; }
.trust-bullets { list-style: none; padding: 0; margin: 0 0 2.2em; display: flex; flex-direction: column; gap: 11px; }
.trust-bullets li { display: flex; align-items: flex-start; gap: 10px; color: #ece3d8; font-size: 0.96rem; }
.trust-bullets svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--brass); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-roofline { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: 1; opacity: 0.9; }

/* Callback form card */
.callback-card {
  background: var(--white); border-radius: var(--radius-l); padding: 32px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.45); position: relative; z-index: 2;
}
.callback-card h3 { font-size: 1.3rem; margin-bottom: 0.2em; }
.callback-card .form-note { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.3em; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid #ddd2c3; border-radius: var(--radius-s);
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink); background: var(--white);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--brick); outline: none; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-reassurance { display: flex; gap: 8px; align-items: flex-start; font-size: 0.78rem; color: var(--ink-soft); margin-top: 12px; }
.form-reassurance svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--ember); }
.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }
[hidden] { display: none !important; }
.form-error {
  padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radius-s);
  background: #fbeaea; border: 1px solid #eabcbc; color: var(--error); font-size: 0.88rem; line-height: 1.5;
}
.form-error a { color: var(--error); font-weight: 600; }
.footer-form-card .form-error {
  background: rgba(161,60,60,0.16); border-color: rgba(161,60,60,0.4); color: #e39a9a;
}
.footer-form-card .form-error a { color: #e39a9a; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 50px; }
  .hero h1 { font-size: var(--step-4); }
}

/* ---------------------------------- Roofline divider (signature motif) ---------------------------------- */
.roofline-divider { display: block; width: 100%; height: auto; }
.roofline-divider.flip { transform: scaleY(-1); }

/* ---------------------------------- Sections ---------------------------------- */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin: 0; }

.bg-stone-2 { background: var(--stone-2); }
.bg-soot { background: var(--soot); color: var(--stone); }
.bg-soot h2, .bg-soot h3 { color: var(--white); }
.bg-soot p { color: #d8c9bb; }

/* Service cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service-card {
  background: var(--white); border-radius: var(--radius-m); padding: 30px 26px;
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.service-card .icon { width: 46px; height: 46px; margin-bottom: 18px; color: var(--brick); }
.service-card h3 { font-size: 1.2rem; margin-bottom: 0.4em; }
.service-card p { font-size: 0.94rem; margin-bottom: 1em; }
.service-card a.card-link { color: var(--brick); font-weight: 600; font-size: 0.88rem; }

@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

/* Process steps */
.process-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.process-list li { counter-increment: step; position: relative; padding-top: 46px; }
.process-list li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 36px; height: 36px;
  border-radius: 50%; background: var(--brass); color: var(--soot); font-family: var(--font-display); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.process-list h4 { margin-bottom: 0.4em; }
.process-list p { font-size: 0.92rem; }
@media (max-width: 900px) { .process-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-list { grid-template-columns: 1fr; } }

/* Two column split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split img, .split .art { border-radius: var(--radius-l); }

.tag-list { list-style: none; padding: 0; margin: 1.4em 0 0; display: flex; flex-direction: column; gap: 12px; }
.tag-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 0.96rem; }
.tag-list svg { width: 18px; height: 18px; color: var(--brick); flex-shrink: 0; margin-top: 2px; }

/* Liner grade art panel */
.grade-panel { background: var(--soot); border-radius: var(--radius-l); padding: 40px; color: var(--stone); }
.grade-panel .grade { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line-dark); }
.grade-panel .grade:last-child { border-bottom: none; padding-bottom: 0; }
.grade-panel .grade .badge {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%; background: var(--brass);
  color: var(--soot); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
}
.grade-panel h4 { color: var(--white); margin-bottom: 0.25em; }
.grade-panel p { color: #cbbba9; font-size: 0.9rem; margin: 0; }

/* Areas grid */
.areas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.area-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 20px; text-align: left;
}
.area-card h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.35em; color: var(--brick); }
.area-card p { font-size: 0.86rem; margin: 0; }
@media (max-width: 900px) { .areas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .areas-grid { grid-template-columns: 1fr; } }

/* FAQ accordion */
.faq-list { border-top: 1px solid var(--line); max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 4px; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--soot); gap: 20px;
}
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--brick); transition: transform 0.2s ease; }
.faq-q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-a-inner { padding: 0 4px 20px; }
.faq-a-inner p { font-size: 0.95rem; }

/* Trust strip */
.trust-strip { background: var(--stone-3); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; }
.trust-strip-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.trust-strip-item { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.trust-strip-item svg { width: 19px; height: 19px; color: var(--brick); flex-shrink: 0; }

/* CTA band */
.cta-band { background: var(--brick); color: var(--white); border-radius: var(--radius-l); padding: 54px 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin-bottom: 0.2em; font-size: var(--step-2); }
.cta-band p { color: #f0dfd7; margin: 0; }
@media (max-width: 700px) { .cta-band { padding: 36px 26px; flex-direction: column; text-align: center; } }

/* ---------------------------------- Footer ---------------------------------- */
.site-footer { background: var(--soot); color: #cbbfb5; padding: 76px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 46px; margin-bottom: 56px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; color: #b3a599; }
.footer-col h4 { color: var(--white); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.02em; margin-bottom: 1.1em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: #c9bcb0; }
.footer-col a:hover { color: var(--brass-light); }
.footer-nap { font-size: 0.9rem; color: #c9bcb0; font-style: normal; line-height: 1.7; }
.footer-nap a { color: #c9bcb0; }
.footer-nap a:hover { color: var(--brass-light); }

.footer-form-card { background: var(--soot-2); border: 1px solid var(--line-dark); border-radius: var(--radius-m); padding: 26px; }
.footer-form-card h4 { color: var(--white); margin-bottom: 0.3em; font-family: var(--font-display); font-size: 1.1rem; }
.footer-form-card .form-row label { color: #d8c9bb; }
.footer-form-card .form-row input, .footer-form-card .form-row textarea {
  background: var(--soot); border-color: rgba(255,255,255,0.18); color: var(--stone);
}
.footer-form-card .form-row input::placeholder, .footer-form-card .form-row textarea::placeholder { color: #7d6f65; }

.footer-bottom { border-top: 1px solid var(--line-dark); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: #8d7f74; }
.footer-bottom a { color: #8d7f74; }
.footer-bottom a:hover { color: var(--brass-light); }

@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------------------------------- Inner page hero ---------------------------------- */
.page-hero { background: var(--soot); color: var(--stone); padding: 60px 0 76px; position: relative; overflow: hidden; }
.page-hero .container { position: relative; z-index: 2; }
.page-hero .breadcrumb { font-size: 0.82rem; color: #b3a599; margin-bottom: 18px; }
.page-hero .breadcrumb a:hover { color: var(--brass-light); }
.page-hero h1 { color: var(--white); font-size: var(--step-4); margin-bottom: 0.3em; }
.page-hero p { color: #d8c9bb; max-width: 60ch; }

/* Content page basics */
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; font-size: 1.3rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose { max-width: 760px; }

.legal-page section { padding: 60px 0; }

/* 404 */
.error-hero { text-align: center; padding: 130px 0; }
.error-hero .roof-icon { width: 90px; height: 90px; margin: 0 auto 26px; color: var(--brick); }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brass); color: var(--soot);
  padding: 10px 16px; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }
