/* ==========================================================
   Medico-legal services template — layout-faithful rebuild
   Edit the tokens below to re-brand the whole site.
   ========================================================== */
:root {
  --dark: #333333;
  --green: #80be43;
  --blue: #47a4de;
  --blue-deep: #0056a7;
  --light: #fafbff;
  --text: #212121;
  --head: #0f0f0f;
  --body-font: "Roboto", sans-serif;
  --alt-font: "Nunito", sans-serif;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 8px 14px; z-index: 2000;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; top: 0; left: 0; width: 100%; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; margin: 0 auto; padding: 14px 20px;
}
.logo { display: inline-block; line-height: 0; }
.logo img { width: 120px; height: 120px; object-fit: contain; }
.on-dark .logo img { filter: brightness(0) invert(1); } /* white logo over dark photos */

.nav-toggle {
  display: none;
  position: absolute; left: 50%; top: 40px; transform: translateX(-50%);
  width: 44px; height: 44px; background: transparent; border: 0; cursor: pointer; padding: 10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 24px; height: 3px; background: #fff; border-radius: 2px; position: relative; transition: .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

.main-nav ul { display: flex; gap: 34px; }
.main-nav a {
  color: #fff; font-weight: 500; font-size: 15px; text-transform: uppercase; letter-spacing: .5px;
  padding: 8px 0; border-bottom: 2px solid transparent; transition: .2s;
}
.main-nav a:hover, .main-nav a.active { border-bottom-color: var(--green); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 600px; display: flex; align-items: center;
  color: #fff; overflow: hidden;
  background: #26384a center / cover no-repeat; /* image is set inline per page */
}
.hero::before { /* darkening overlay so white text stays readable */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,32,40,.30) 0%, rgba(28,32,40,.55) 55%, rgba(28,32,40,.72) 100%);
}
.hero--right { background-position: right center; }
.hero .container { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 80px; }
.hero h1 { font-size: 60px; line-height: 1.15; font-weight: 700; max-width: 880px; margin-bottom: 22px; }
.hero p { font-size: 18px; line-height: 1.6; max-width: 620px; color: rgba(255,255,255,.95); }
.hero--short { min-height: 400px; }
.hero--short h1 { font-size: 48px; margin-bottom: 0; }
.hero--contact { min-height: 360px; }
.hero--contact::before { background: rgba(28,32,40,.2); }
.hero .squiggle { color: #fff; margin: 0 0 20px; }
.photo { position: relative; z-index: 1; width: 100%; height: auto; display: block; border-radius: 2px; }
.rows > .split + .split { margin-top: 90px; }
.narrow { max-width: 860px; }
.narrow h2.section-title:not(:first-child) { margin-top: 44px; }
.narrow .prose { margin-bottom: 8px; }

.color-bar { display: flex; height: 6px; }
.color-bar i { flex: 1; background: var(--dark); }
.color-bar i + i { background: var(--green); }

/* ---------- Generic section bits ---------- */
.section { padding: 90px 0; }
.section--light { background: var(--light); }
.eyebrow {
  display: block; font-size: 14px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--text);
  margin-bottom: 14px;
}
.section-title { font-size: 34px; line-height: 1.3; font-weight: 700; color: var(--head); }
.squiggle { width: 52px; height: 12px; margin: 16px 0 24px; color: var(--green); }
.text-center { text-align: center; }
.text-center .squiggle { margin-left: auto; margin-right: auto; }
.prose p { font-size: 16px; line-height: 1.6; margin-bottom: 16px; color: var(--text); }
.prose p:last-child { margin-bottom: 0; }

.btn {
  display: inline-block; background: var(--blue); color: #fff; font-weight: 500; font-size: 14px;
  letter-spacing: .5px; text-transform: uppercase; padding: 16px 38px; border: 0; border-radius: 2px;
  cursor: pointer; transition: background .2s;
}
.btn:hover { background: var(--blue-deep); }

/* ---------- Image placeholders ---------- */
.ph {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 2px; overflow: hidden;
  background: linear-gradient(135deg, #dfe8f1, #c4d3e2);
  display: flex; align-items: center; justify-content: center; color: #6b819a;
  font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
}
.ph::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 2px, transparent 2px 22px);
}
.ph span { position: relative; }
.ph--tall { aspect-ratio: 3 / 4; }
.ph--teal { background: linear-gradient(135deg, #8fc4d2, #5aa3b8); color: #2d6275; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split--top { align-items: start; }
.accent-frame { position: relative; }
.accent-frame::before {
  content: ""; position: absolute; top: -34px; right: -34px; width: 62%; height: 62%;
  background: var(--green); z-index: 0;
}
.accent-frame .ph { position: relative; z-index: 1; }

/* ---------- Services grid ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 30px; margin-top: 50px; }
.service { text-align: center; }
.service svg { width: 74px; height: 74px; margin: 0 auto 18px; }
.service img { width: 100px; height: 100px; margin: 0 auto 8px; }

/* ---------- Framed photos (green / blue corner blocks) ---------- */
.frame { position: relative; margin: 16px; }
.frame img { position: relative; z-index: 1; width: 100%; height: auto; display: block; }
.frame--about::before, .frame--about::after, .frame--tl::before, .frame--br::after {
  content: ""; position: absolute; width: 28%; height: 60%; z-index: 0;
}
.frame--about::before { top: -16px; right: -16px; background: var(--green); }
.frame--about::after  { bottom: -16px; left: -16px; background: var(--blue); }
.frame--tl::before    { top: -16px; left: -16px; background: var(--green); }
.frame--br::after     { bottom: -16px; right: -16px; background: var(--blue); }

/* ---------- Two-column feature block ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.duo .col { display: flex; flex-direction: column; gap: 26px; }
.duo .section-title { font-size: 34px; }
.prose--sm p { font-size: 14px; line-height: 1.35; }
.service h3 { font-size: 20px; font-weight: 600; color: var(--head); }

/* ---------- CTA ---------- */
.cta { padding: 60px 0 90px; }
.cta-wrap { position: relative; margin: 30px 16px; }
.cta-wrap::before, .cta-wrap::after { /* blue "[" bracket left, green "]" bracket right */
  content: ""; position: absolute; width: 116px; z-index: 0;
}
.cta-wrap::before { left: -16px; top: -8px; bottom: -16px; border: 15px solid var(--blue); border-right: 0; background: transparent; }
.cta-wrap::after  { right: -16px; top: -16px; bottom: -8px; border: 15px solid var(--green); border-left: 0; background: transparent; }
.cta-box {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  background: var(--light); padding: 44px 44px;
}
.cta-box h2 { font-size: 30px; font-weight: 700; color: var(--head); }
.cta-box .btn { padding: 14px 34px; font-size: 12px; font-weight: 700; }

/* ---------- Lists (inner pages) ---------- */
.check-list li {
  position: relative; padding: 14px 0 14px 34px; border-bottom: 1px solid #ebebeb; color: var(--text); line-height: 1.55;
}
.check-list li::before {
  content: ""; position: absolute; left: 4px; top: 21px; width: 10px; height: 6px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg);
}
.check-list b { font-weight: 600; color: var(--head); }
.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.chip-grid li {
  background: #fff; border: 1px solid #ebebeb; border-left: 4px solid var(--green);
  padding: 18px 22px; font-weight: 500; color: var(--head);
}

/* ---------- Text pages (Housing Disrepair / Medico-Legal) ---------- */
.section--tight { padding: 60px 0 80px; }
.content p { font-size: 16px; line-height: 1.6; color: var(--text); margin-bottom: 16px; }
.content h2 { font-size: 34px; line-height: 1.3; font-weight: 700; color: var(--head); margin: 30px 0 18px; }
.content b { font-weight: 700; color: var(--head); }
.content a { color: #3b1d9e; font-weight: 700; }
.content a:hover { text-decoration: underline; }
.content .more { margin-top: 24px; margin-bottom: 0; }
.bullets { list-style: disc; padding-left: 30px; margin: 0 0 18px; color: var(--text); }
.bullets--loose li { line-height: 1.5; margin-bottom: 8px; }
.bullets--tight li { line-height: 1.15; margin-bottom: 7px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; margin-top: 14px; }
.cols-2 .bullets { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 34px 0 30px; }
.card {
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  min-height: 88px; padding: 14px 16px; border-radius: 18px; color: #fff; font-size: 14px; font-weight: 500;
}
.card svg { width: 24px; height: 24px; flex: none; }
.card--salmon { background: #f8836d; }
.card--teal   { background: #8fc0cc; }
.card--sand   { background: #ecc374; }
.card--mint   { background: #63d9ac; }
.card--violet { background: #9a83ee; }
.card--rose   { background: #f76d98; }

/* ---------- Policy pages ---------- */
.hero--policy { min-height: 300px; }
.hero--policy .container { padding-top: 130px; padding-bottom: 60px; }
.hero--center .container { text-align: center; }
.hero--center h1 { margin-left: auto; margin-right: auto; margin-bottom: 12px; }
.hero--center .squiggle { margin: 0 auto; }
.doc { max-width: 1000px; }
.squiggle--left { margin: 0 0 22px; }
.doc h3 { font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--head); margin: 26px 0 10px; }
.doc h3:first-of-type { margin-top: 0; }
.doc p { font-size: 15px; line-height: 1.7; color: var(--text); margin-bottom: 16px; }
.doc ul { list-style: disc; padding-left: 28px; margin: 0 0 16px; color: var(--text); font-size: 15px; line-height: 1.7; }
.doc li { margin-bottom: 8px; }
.doc a { color: #3b1d9e; font-weight: 700; }
.doc a:hover { text-decoration: underline; }

/* ---------- Contact form ---------- */
.page-title { font-size: 36px; font-weight: 700; text-align: center; color: var(--head); padding: 34px 0 30px; }
.form-wrap { background: var(--light); padding: 60px 0 80px; }
.contact-form { max-width: 640px; margin: 0 auto; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 16px; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.field label .req { color: #d00; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--blue-deep); border-radius: 0; padding: 12px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(71,164,222,.4); outline-offset: 0; }
.field .error { display: none; color: #c0392b; font-size: 13px; margin-top: 6px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #c0392b; }
.field.invalid .error { display: block; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-msg { display: none; padding: 14px 18px; margin-bottom: 22px; font-size: 15px; border-radius: 2px; }
.form-msg.ok { display: block; background: #e8f5dc; color: #2e6a0e; border: 1px solid #b6dc92; }
.form-msg.fail { display: block; background: #fdeaea; color: #8b1f1f; border: 1px solid #f0b4b4; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #fff; }
.footer-top { position: relative; padding: 60px 0 56px; }
.footer-top::before { content: ""; position: absolute; top: 0; left: 0; width: 33%; height: 6px; background: var(--green); }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; }
.footer-grid h2 { font-size: 16px; font-weight: 600; margin-bottom: 18px; }
.footer-grid address { font-style: normal; font-size: 14px; line-height: 1.7; margin-bottom: 18px; }
.footer-grid .small { font-size: 11px; color: #cfcfcf; max-width: 360px; line-height: 1.5; }
.footer-nav li { margin-bottom: 18px; font-size: 14px; font-weight: 600; max-width: 150px; line-height: 1.35; }
.footer-nav a:hover, .footer-nav a.active { color: var(--green); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 36px 0 44px; text-align: center; font-size: 14px; color: #fff; }
.footer-bottom a { color: var(--blue); }
.footer-bottom a:hover { text-decoration: underline; }

/* ---------- Cookie consent ---------- */
.cookie {
  position: fixed; left: 20px; bottom: 20px; z-index: 1500; width: 350px; max-width: calc(100% - 40px);
  background: #fff; color: #222; padding: 22px; border-radius: 6px; box-shadow: 0 6px 30px rgba(0,0,0,.25);
}
.cookie[hidden] { display: none; }
.cookie h3 { font-size: 16px; margin-bottom: 10px; }
.cookie p { font-size: 13px; line-height: 1.5; margin-bottom: 16px; }
.cookie-actions { display: flex; gap: 6px; }
.cookie-actions button {
  flex: 1; font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 10px 4px;
  cursor: pointer; border: 2px solid #3a5bd9; background: #fff; color: #3a5bd9; border-radius: 2px;
}
.cookie-actions .primary { background: #3a5bd9; color: #fff; }
.cookie-prefs { display: none; margin-bottom: 14px; font-size: 13px; }
.cookie-prefs.open { display: block; }
.cookie-prefs label { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 96px; left: 0; width: 100%; background: rgba(20,24,30,.96);
    display: none; padding: 12px 24px 20px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .hero h1 { font-size: 48px; }
  .split { gap: 40px; }
}
@media (max-width: 767px) {
  .section { padding: 60px 0; }
  .hero { min-height: 520px; }
  .hero .container { padding-top: 130px; }
  .hero h1 { font-size: 36px; }
  .hero--short h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: -1; }
  .accent-frame::before { top: -18px; right: -10px; }
  .section-title, .cta-box h2 { font-size: 28px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 16px; }
  .service h3 { font-size: 17px; }
  .chip-grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; gap: 14px; }
  .content h2 { font-size: 28px; }
  .cta-box { flex-direction: column; text-align: center; padding: 40px 24px; }
  .cta-wrap::before, .cta-wrap::after { width: 60px; }
  .duo { display: flex; flex-direction: column; gap: 28px; }
  .duo .col { display: contents; }
  .duo .c-img1 { order: 1; } .duo .c-text1 { order: 2; } .duo .c-img2 { order: 3; } .duo .c-text2 { order: 4; }
  .footer-grid { flex-direction: column; }
  .footer-top::before { width: 50%; }
  .cookie { left: 10px; bottom: 10px; max-width: calc(100% - 20px); }
}
@media (max-width: 480px) {
  .services-grid, .chip-grid, .cards, .cols-2 { grid-template-columns: 1fr; }
}
