/* Matlock Websites — shared stylesheet
   Brand name lives in the HTML (search "Matlock Websites") and in --brand on :root.
   Palette: Peak District stone, deep green, sky blue. */

@font-face {
  font-family: "DM Serif Display";
  src: url("../fonts/dm-serif-display.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Serif Display";
  src: url("../fonts/dm-serif-display-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: "Matlock Websites";
  --cream: #f7f4ef;
  --cream-2: #efe9e0;
  --paper: #fffdf9;
  --stone: #8a7968;
  --stone-2: #c4b8a8;
  --ink: #241f1b;
  --muted: #5c4f43;
  --green: #2d5a3d;
  --green-dark: #214530;
  --green-soft: #e6efe8;
  --sky: #2f6a96;
  --sky-bright: #4a8ec2;
  --sky-soft: #e8f2f8;
  --header-h: 4.15rem;
  --radius: 0.75rem;
  --shadow: 0 1px 2px rgba(36, 31, 27, 0.06), 0 8px 24px rgba(36, 31, 27, 0.06);
  --max: 70rem;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--sky);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img,
svg,
video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, .brand, .price-figure, .hero-title {
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1, .hero-title { font-size: clamp(2.15rem, 5.2vw, 3.85rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.55rem); margin: 0 0 0.75rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--sky);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--green-dark); }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  border-radius: 0.35rem;
}

.skip:focus { top: 1rem; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.wrap-narrow { width: min(100% - 2rem, 42rem); margin-inline: auto; }

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.6rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stone-2);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand:hover { color: var(--green-dark); }

.logo-mark {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.05rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  padding: 0.35rem 0;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] { color: var(--green); text-decoration: underline; }

.nav-list a.nav-cta {
  background: var(--green);
  color: var(--paper);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
}

.nav-list a.nav-cta:hover { background: var(--green-dark); color: var(--paper); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--stone-2);
  border-radius: 0.4rem;
  padding: 0.4rem 0.6rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.nav-toggle-bars {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
}

.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--stone-2);
    padding: 0.5rem 1rem 1rem;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 0.7rem 0.2rem; min-height: 2.75rem; }
  .nav-list a.nav-cta { display: inline-block; margin-top: 0.35rem; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn-primary { background: var(--green); color: var(--paper); }
.btn-primary:hover { background: var(--green-dark); color: var(--paper); }

.btn-light {
  background: var(--paper);
  color: var(--green-dark);
  border-color: var(--paper);
}
.btn-light:hover { background: var(--cream-2); color: var(--green-dark); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 253, 249, 0.8);
}
.btn-ghost:hover { background: rgba(255, 253, 249, 0.15); color: var(--paper); }

.btn-outline {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green);
}
.btn-outline:hover { background: var(--green-soft); color: var(--green-dark); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }

/* Hero */
.hero {
  position: relative;
  min-height: min(80vh, 40rem);
  display: grid;
  align-items: end;
  color: var(--paper);
  background: #1a2a22;
}

.hero-media,
.hero-media picture,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: center 45%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 24, 18, 0.25) 0%, rgba(20, 24, 18, 0.25) 35%, rgba(16, 22, 16, 0.78) 100%),
    linear-gradient(90deg, rgba(16, 22, 16, 0.45) 0%, rgba(16, 22, 16, 0.1) 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 5.5rem 0 3.25rem;
  max-width: 46rem;
  margin-left: max(1rem, calc((100% - min(100% - 2rem, var(--max))) / 2));
}

.hero-title,
.hero-content p { color: #fffdf9; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }

.hero-sub {
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-style: italic;
  line-height: 1.25;
  color: #fffdf9;
  margin: 0 0 0.9rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 4px 16px rgba(0, 0, 0, 0.5);
  max-width: 24em;
}
.hero-content p { font-size: 1.15rem; max-width: 38rem; }

.hero-content .eyebrow { color: #d8e8f4; }

/* Sections */
.section { padding: 4.25rem 0; }
.section-alt { background: var(--paper); }
.section-green { background: var(--green); color: var(--paper); }
.section-green h2,
.section-green h3,
.section-green .eyebrow { color: var(--paper); }
.section-green .eyebrow { color: #c5ddf0; }
.section-green p { color: #eef4ef; }
.lede { font-size: 1.15rem; max-width: 42rem; margin-bottom: 1.75rem; color: var(--muted); }
.section-green .lede { color: #eef4ef; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
}

/* Trade groups */
.trade-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.trade-group {
  background: var(--cream);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.2rem;
}

.section-alt .trade-group { background: var(--cream); }
.section:not(.section-alt) .trade-group { background: var(--paper); }

.trade-group h3 { font-size: 1.2rem; margin-bottom: 0.65rem; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pills li {
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.95rem;
}

.section-alt .pills li { background: var(--paper); }

@media (max-width: 640px) {
  .trade-groups { grid-template-columns: 1fr; }
}

/* Template cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card-preview {
  min-height: 8.5rem;
  padding: 1.25rem 1.1rem;
  color: #fffdf9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-preview .demo-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.card-preview h3 {
  color: #fffdf9;
  font-size: 1.55rem;
  margin: 0.2rem 0 0;
}

.card-body { padding: 1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; gap: 0.75rem; }
.card-body p { color: var(--muted); font-size: 1rem; flex: 1; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.card-actions .btn { font-size: 0.95rem; min-height: 2.6rem; padding: 0.4rem 0.85rem; }

.t-plumber { background: linear-gradient(160deg, #1b3a4b 0%, #0e2430 100%); }
.t-groomer { background: linear-gradient(160deg, #4a6b52 0%, #2e4634 100%); }
.t-hair { background: linear-gradient(160deg, #4a2c34 0%, #2c1a1f 100%); }
.t-cafe { background: linear-gradient(160deg, #6a4330 0%, #3d261b 100%); }
.t-cottage { background: linear-gradient(160deg, #355445 0%, #1e3329 100%); }
.t-clean { background: linear-gradient(160deg, #1f5f6b 0%, #123a42 100%); }

@media (max-width: 860px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.price-card {
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
}

.price-card.featured {
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
}

.price-card.featured h3,
.price-card.featured p,
.price-card.featured .price-figure { color: var(--paper); }

.price-figure {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  margin: 0.2rem 0 0.3rem;
  line-height: 1;
}

.price-figure span { font-size: 1.05rem; font-family: "Atkinson Hyperlegible", sans-serif; letter-spacing: 0; }

.price-card ul { margin: 0.85rem 0 0; padding-left: 1.15rem; }
.price-card li { margin: 0.35rem 0; }
.price-card.featured li { color: var(--paper); }
.price-card.featured a { color: #e8f3fb; }
.changes-bar { margin-top: 1.25rem; }

.extras { display: grid; gap: 0.75rem; }
.extra {
  background: var(--cream);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  padding: 0.95rem 1.05rem;
}
.section-alt .extra { background: var(--cream); }
.extra strong { display: block; font-size: 1.05rem; }

@media (max-width: 720px) {
  .price-grid { grid-template-columns: 1fr; }
}

/* Comparison table */
.table-note { font-size: 0.95rem; color: var(--muted); margin: 0 0 1rem; }

.compare-wrap { overflow: visible; }

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.compare th,
.compare td {
  text-align: left;
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--cream-2);
}

.compare th {
  background: var(--green);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.95rem;
}

.compare tbody tr:last-child td { border-bottom: 0; }
.compare tr.ours { background: var(--green-soft); }
.compare .option { font-weight: 700; }

@media (max-width: 700px) {
  .compare, .compare tbody, .compare tr, .compare td, .compare th { display: block; width: 100%; }
  .compare { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .compare thead { display: none; }
  .compare tr {
    background: var(--paper);
    border: 1px solid var(--stone-2);
    border-radius: var(--radius);
    margin-bottom: 0.9rem;
    padding: 0.4rem 0;
    box-shadow: var(--shadow);
  }
  .compare tr.ours { background: var(--green-soft); }
  .compare td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--cream-2);
    padding: 0.65rem 1rem;
  }
  .compare td::before {
    content: attr(data-label);
    font-weight: 700;
    flex: 0 0 42%;
    color: var(--ink);
  }
  .compare td:last-child { border-bottom: 0; }
}

/* Trust */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.trust-item {
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.3rem;
  box-shadow: var(--shadow);
}

.trust-item svg {
  width: 1.8rem;
  height: 1.8rem;
  margin-bottom: 0.55rem;
  color: var(--green);
}

@media (max-width: 640px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* FAQ */
.faq { width: min(100%, 46rem); display: grid; gap: 0.65rem; }

.faq details {
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  padding: 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.95rem 1.15rem;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  float: right;
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--green);
}

.faq details[open] summary::after { content: "–"; }

.faq details p { padding: 0 1.15rem 1.1rem; color: var(--muted); }

/* Form */
.form {
  display: grid;
  gap: 0.9rem;
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.45rem;
  box-shadow: var(--shadow);
  max-width: 40rem;
}

.form label { display: block; font-weight: 700; font-size: 0.98rem; margin-bottom: 0.3rem; }

.form .hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }

.form input,
.form textarea,
.form select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--stone-2);
  border-radius: 0.45rem;
  padding: 0.6rem 0.75rem;
}

.form textarea { min-height: 8rem; resize: vertical; }

.form input:focus-visible,
.form textarea:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 1px;
  background: var(--paper);
}

.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: none;
  padding: 0.8rem 1rem;
  border-radius: 0.45rem;
}

.form-status.is-visible { display: block; }
.form-status.is-error { background: #f8e6e6; color: #6b2424; }
.form-status.is-ok { background: var(--green-soft); color: var(--green-dark); }

.privacy-note { font-size: 0.95rem; color: var(--muted); }

/* Footer */
.site-footer {
  background: #1a2420;
  color: #e8ebe6;
  padding: 2.5rem 0 2rem;
  font-size: 1rem;
}

.site-footer a { color: #d5e6f4; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.site-footer h2 { color: #fffdf9; font-size: 1.45rem; }
.footer-meta { border-top: 1px solid #3a4640; padding-top: 1rem; color: #c5cbc4; font-size: 0.95rem; }

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin: 0.25rem 0; }

/* Gallery page hero (no photo) */
.page-hero {
  padding: 3.25rem 0 2rem;
  background:
    linear-gradient(180deg, #e8f2f8 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--stone-2);
}

/* Utility */
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.mt { margin-top: 1.25rem; }

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


/* Go-live guide */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}
.option-card {
  background: var(--paper);
  border: 1px solid var(--stone-2);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: var(--shadow);
}
.option-card h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
.option-card .price-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.4rem;
}
.option-card.paid {
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
}
.option-card.paid h2,
.option-card.paid p,
.option-card.paid li,
.option-card.paid .price-kicker { color: var(--paper); }
.option-card.paid .price-kicker { color: #d5e8f4; }
.option-card.paid a { color: #e8f3fb; }
.option-card ol,
.plain-steps {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}
.option-card li { margin: 0.45rem 0; }
.cost-box {
  background: var(--green-soft);
  border: 1px solid #c5d8cb;
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  max-width: 42rem;
}
.cost-box h2 { margin-bottom: 0.5rem; }
.choose {
  background: var(--paper);
  border-left: 4px solid var(--sky-bright);
  padding: 1rem 1.15rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 46rem;
}
.host-note {
  font-size: 0.98rem;
  color: var(--muted);
  margin-top: 0.85rem;
}
@media (max-width: 800px) {
  .option-grid { grid-template-columns: 1fr; }
}

.areas {
  max-width: 46rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
}
.areas strong { color: var(--ink); }
