/* =========================================================
   FERNCROFT – builders and trades website template
   EDIT YOUR COLOURS AND FONTS HERE. Everything else follows.
   ========================================================= */
:root {
  --char: #1b2026;       /* dark header, intro and projects band */
  --char-2: #262d35;
  --char-line: #39424c;
  --steel: #5c6670;
  --paper: #f4f3ef;      /* page background */
  --line: #dcdad3;       /* lines and borders */
  --amber: #f2a900;      /* accent and main buttons */
  --amber-soft: #fff6df;
  --ink: #15191e;        /* body text */
  --muted: #5a626b;      /* secondary text */
  --on-dark: #b9c0c8;    /* secondary text on dark */
  --font-head: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

/* ---------- Fonts (included in assets/fonts, free under the SIL Open Font Licence) ---------- */
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url(fonts/archivo-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url(fonts/archivo-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 800; font-display: swap; src: url(fonts/archivo-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--font-body); color-scheme: light; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.015em; margin: 0; line-height: 1.1; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
[id] { scroll-margin-top: 16px; }

/* ---------- Header ---------- */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px max(20px, 5vw); background: var(--char); color: #fff; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--font-head); text-transform: uppercase; color: #fff; text-decoration: none; letter-spacing: .02em; }
.logo span:last-child { font-weight: 600; color: var(--amber); }
.logo-mark { width: 22px; height: 22px; background: var(--amber); clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a { color: #d7dbe0; text-decoration: none; font-weight: 500; font-size: 15px; }
.nav .nav-btn { background: var(--amber); color: var(--char); padding: 10px 16px; font-weight: 700; white-space: nowrap; }

/* ---------- Intro ---------- */
.intro { padding: 36px max(20px, 5vw) 0; background: var(--char); color: #fff; }
.kicker { font: 500 13px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.intro h1 { font-size: 30px; line-height: 1.2; margin-top: 12px; max-width: 30ch; }
.intro-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-top: 14px; }
.lede { font-size: 17px; color: var(--on-dark); max-width: 52ch; }
.quote-wrap .lede { color: var(--muted); margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px; background: var(--amber); color: var(--char); border: 0; font: 700 16px/1 var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn[disabled] { opacity: .6; cursor: progress; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 32px 0 0; border-top: 1px solid var(--char-line); }
.stats div { padding: 22px 20px 26px 0; border-right: 1px solid var(--char-line); }
.stats div + div { padding-left: 20px; }
.stats div:last-child { border-right: 0; }
.stats dt { font: 700 17px/1.2 var(--font-head); }
.stats dd { margin: 6px 0 0; color: #9aa3ad; font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding: 48px max(20px, 5vw); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 28px; margin-bottom: 24px; }
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--ink); }
.services article { padding: 24px 20px 24px 0; display: flex; flex-direction: column; gap: 10px; }
.services article + article { padding-left: 20px; border-left: 1px solid var(--line); }
.num { font: 500 13px/1 var(--font-mono); color: var(--steel); }
.services h3 { font-size: 19px; }
.services p { color: var(--muted); font-size: 15px; }
.weeks { margin-top: auto; font: 500 13px/1 var(--font-mono); padding-top: 12px; }
.dark { background: var(--char); color: #fff; border-bottom: 0; }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.plan { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; background: var(--char-2); border: 1px solid var(--char-line); padding: 16px; }
img.plan { padding: 0; }
.place { font: 500 12.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--amber); margin-top: 18px; }
.projects h3 { font-size: 19px; margin-top: 8px; }
.meta { color: #9aa3ad; font-size: 14.5px; margin-top: 8px; }

/* ---------- Quote request ---------- */
.quote-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.quote-wrap h2 { margin-bottom: 0; }
.quote { background: #fff; border: 1px solid var(--line); padding: 28px; display: grid; gap: 16px; }
.progress { height: 4px; background: var(--line); }
.progress i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .25s; }
.step-label { font: 500 12.5px/1 var(--font-mono); color: var(--muted); }
.quote fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.quote legend { font: 800 20px/1.2 var(--font-head); margin-bottom: 16px; padding: 0; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; min-height: 56px; padding: 12px 14px; border: 1.5px solid var(--line); background: var(--paper); font: 500 15.5px/1.3 var(--font-body); color: var(--ink); cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt:hover { border-color: var(--ink); }
.opt:has(input:checked) { border-color: var(--amber); background: var(--amber-soft); }
.opt:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; }
.contact { display: grid; gap: 12px; }
.contact legend { margin-bottom: 4px; }
.contact label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.contact input:not([type="file"]):not(.trap), .contact textarea { min-height: 48px; border: 1.5px solid var(--line); padding: 10px 12px; font: 400 16px/1.4 var(--font-body); background: var(--paper); color: var(--ink); width: 100%; }
.contact textarea { resize: vertical; }
.contact input:invalid.touched { border-color: #c2410c; }
.file input { font: 400 14px/1.4 var(--font-body); padding: 10px; border: 1.5px dashed var(--line); background: var(--paper); width: 100%; }
.opt-note { font-weight: 400; color: var(--muted); }
.file-list { list-style: none; margin: -4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 8px; font: 400 13px/1.2 var(--font-mono); background: var(--paper); border: 1px solid var(--line); padding: 4px 8px 4px 4px; }
.file-list img { width: 40px; height: 40px; object-fit: cover; }
.summary { font: 500 13.5px/1.4 var(--font-mono); background: var(--paper); padding: 10px 12px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.thanks { display: grid; gap: 6px; }
.form-error { color: #c2410c; font-weight: 500; }
.back { justify-self: start; background: none; border: 0; padding: 0; font: 500 14px/1 var(--font-body); color: var(--muted); cursor: pointer; }

/* ---------- Areas ---------- */
.areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.areas li { padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 500; }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px max(20px, 5vw); font-size: 14px; color: #9aa3ad; background: var(--char); }

/* ---------- Phones and tablets ---------- */
@media (max-width: 900px) {
  .stats, .services { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(3) { padding-left: 0; }
  .services article:nth-child(3) { padding-left: 0; border-left: 0; }
  .projects { grid-template-columns: 1fr; }
  .quote-wrap { grid-template-columns: 1fr; gap: 28px; }
  .areas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav nav a:not(.nav-btn) { display: none; }
}
@media (max-width: 520px) {
  .stats, .services, .opts { grid-template-columns: 1fr; }
  .stats div, .stats div + div { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--char-line); }
  .services article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .areas { grid-template-columns: 1fr 1fr; }
  .quote { padding: 20px; }
  .logo { font-size: 16px; gap: 8px; }
  .nav .nav-btn { padding: 9px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .progress i { transition: none; } }

/* Lite: contact card and footer link */
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px; border: 1.5px solid var(--ink); color: var(--ink); font: 600 16px/1 var(--font-body); text-decoration: none; }
.footer a { color: inherit; }
