/* Ragnar Peacock Ltd – site styles
   Brand colours from the asset pack: Navy #04234E, Teal #0D8795, Orange #E85D1E, Teal on dark #2BB3C0 */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --navy: #04234E;
  --navy-deep: #021733;
  --teal: #0D8795;
  --teal-light: #2BB3C0;
  --orange: #E85D1E;
  --bg: #FFFFFF;
  --surface: #EEF3F8;
  --surface-2: #FFFFFF;
  --ink: #0E2240;
  --muted: #46566C;
  --line: #D3DCE7;
  --link: #04234E;
  --accent-text: #0A6F7A;
  --shadow: 0 1px 2px rgba(4, 35, 78, .08), 0 8px 24px rgba(4, 35, 78, .08);
  --font-body: "Barlow", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--navy);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #071B37;
    --surface: #0B2546;
    --surface-2: #0E2B50;
    --ink: #E6EDF6;
    --muted: #A8B8CD;
    --line: #1F3E68;
    --link: #8FDCE4;
    --accent-text: #2BB3C0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071B37;
  --surface: #0B2546;
  --surface-2: #0E2B50;
  --ink: #E6EDF6;
  --muted: #A8B8CD;
  --line: #1F3E68;
  --link: #8FDCE4;
  --accent-text: #2BB3C0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 5rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--navy);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.005em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.45rem, 2.2vw, 1.75rem); font-weight: 600; }
p { margin: 0 0 1em; max-width: 64ch; }
h2 + p, h2 + .lede { margin-top: .9rem; }
h3 + .clients { margin-top: .6rem; }
.coverage-grid h3 { margin-top: .5rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 58ch; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--orange); color: var(--navy); padding: .6rem 1rem; font-weight: 600; }
.skip:focus { left: 1rem; top: calc(env(safe-area-inset-top, 0px) + .5rem); }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--navy); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 5.25rem; }
.brand { display: block; flex: none; line-height: 0; }
.brand img { height: 4rem; width: auto; }
.nav { margin-left: auto; display: flex; gap: .25rem; align-items: center; }
.nav a { color: #DCE6F2; text-decoration: none; font-weight: 500; padding: .5rem .7rem; border-radius: 4px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav .call { color: var(--navy); background: var(--orange); font-weight: 600; margin-left: .5rem; }
.nav .call:hover { background: #F37035; color: var(--navy); }
@media (max-width: 860px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0 1rem; padding-block: .5rem; }
  .brand img { height: 3.2rem; }
  .nav { order: 3; width: 100%; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) .35rem; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: .4rem .6rem; font-size: .98rem; }
  .nav .call { display: none; }
  .header-call { margin-left: auto; }
}
.header-call { display: none; }
@media (max-width: 860px) {
  .header-call { display: inline-block; color: var(--navy); background: var(--orange); font-weight: 600; text-decoration: none; padding: .45rem .8rem; border-radius: 4px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; padding: .8rem 1.25rem; border-radius: 4px; border: 2px solid transparent; font-size: 1.05rem; line-height: 1.2; }
.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { background: #F37035; }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: clamp(2.5rem, 6vw, 5rem) 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: end; }
.hero-copy { padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.hero h1 { font-size: clamp(2.9rem, 6.4vw, 5.2rem); line-height: .95; margin-bottom: 1.4rem; }
.hero .tagline { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--teal-light); letter-spacing: .04em; margin-bottom: 1rem; }
.hero p.intro { color: #D2DEEC; font-size: 1.2rem; max-width: 40ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.hero-figure { position: relative; margin: 0; align-self: stretch; display: flex; align-items: flex-end; }
.hero-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 6px 6px 0 0; overflow: visible; }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 25% 50%; border-radius: 6px 6px 0 0; }
.hero-caption { position: absolute; right: .75rem; bottom: .6rem; font-size: .8rem; color: rgba(255, 255, 255, .85); background: rgba(4, 35, 78, .65); padding: .15rem .5rem; border-radius: 3px; }

/* Hero pin position: antenna in hero-rooftop.webp with the 4:3 crop above */
.pin-antenna { left: 40.4%; top: 30%; }
.media img.pos-30 { object-position: 30% 50%; }
.media img.pos-85 { object-position: 85% 50%; }

/* Survey tag – the one recurring motif: a pin plus a note, as in our survey models */
.tag-pin { position: absolute; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(232, 93, 30, .35); transform: translate(-50%, -50%); }
.tag-note {
  position: absolute; transform: translate(1.1rem, -50%);
  background: rgba(4, 23, 51, .92); color: #fff; border-left: 4px solid var(--orange);
  padding: .55rem .8rem .6rem; border-radius: 0 4px 4px 0; min-width: 11.5rem; max-width: 14rem;
  font-size: .85rem; line-height: 1.35; box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.tag-note strong { display: block; font-size: .95rem; font-weight: 600; }
.tag-note span { color: #C5D3E4; }
.tag-note .sev { display: flex; gap: 3px; margin-top: .45rem; }
.tag-note .sev i { display: block; height: 4px; flex: 1; background: rgba(255, 255, 255, .22); border-radius: 1px; }
.tag-note .sev i.on { background: var(--teal-light); }
@media (prefers-reduced-motion: no-preference) {
  .hero .tag-pin { animation: pin-in .5s .6s both cubic-bezier(.2, .8, .2, 1.3); }
  .hero .tag-note { animation: note-in .45s 1s both ease-out; }
  @keyframes pin-in { from { transform: translate(-50%, -50%) scale(0); } to { transform: translate(-50%, -50%) scale(1); } }
  @keyframes note-in { from { opacity: 0; transform: translate(.6rem, -50%); } to { opacity: 1; transform: translate(1.1rem, -50%); } }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-figure { margin-inline: calc(var(--gutter) * -1); }
  .hero-frame, .hero-frame img { border-radius: 0; }
  .hero .tag-note { min-width: 9.5rem; font-size: .78rem; }
}

/* Accreditation strip */
.accred-strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.accred-strip .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding-block: 1.25rem; align-items: center; }
.accred-item { display: flex; align-items: center; gap: .8rem; min-height: 4rem; }
.accred-item .label { font-size: .92rem; line-height: 1.3; color: var(--muted); }
.accred-item .label b { display: block; color: var(--ink); font-weight: 600; font-size: 1rem; }
.logo-slot { flex: none; width: 5.5rem; height: 3.6rem; display: grid; place-items: center; background: #fff; border-radius: 4px; padding: .3rem; }
.logo-slot img { max-height: 100%; width: auto; }
@media (max-width: 860px) { .accred-strip .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .accred-strip .wrap { grid-template-columns: 1fr; } }

/* Placeholders – everything marked like this still needs real content before launch */
.ph { outline: 2px dashed var(--orange); outline-offset: 2px; }
.logo-slot.ph { font-size: .68rem; line-height: 1.15; text-align: center; color: #8A3A12; font-weight: 600; }
mark.ph { background: rgba(232, 93, 30, .16); color: inherit; padding: 0 .25em; border-radius: 2px; outline-offset: 1px; }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-alt { background: var(--surface); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem 3rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { margin: 0; color: var(--muted); font-size: 1.15rem; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* Services: Electrical / Fire / Surveys */
.trades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px solid var(--navy); }
:root[data-theme="dark"] .trades { border-top-color: var(--teal-light); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .trades { border-top-color: var(--teal-light); } }
.trade { padding: 1.6rem 1.75rem 1.5rem 0; }
.trade + .trade { padding-left: 1.75rem; border-left: 1px solid var(--line); }
.trade h3 { font-size: clamp(1.9rem, 3vw, 2.4rem); margin-bottom: .25rem; }
.trade .sub { color: var(--accent-text); font-weight: 600; margin-bottom: 1rem; font-size: 1rem; }
.trade ul { list-style: none; margin: 0; padding: 0; }
.trade li { padding: .7rem 0; border-top: 1px solid var(--line); }
.trade li b { display: block; font-weight: 600; }
.trade li span { color: var(--muted); font-size: .98rem; }
@media (max-width: 900px) {
  .trades { grid-template-columns: 1fr; }
  .trade, .trade + .trade { padding: 1.5rem 0; border-left: 0; }
  .trade + .trade { border-top: 1px solid var(--line); }
}

.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.ways h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.ways p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; gap: 1.4rem; } }

/* Sample report */
.report-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.report-grid ul { padding-left: 1.1rem; margin: 0 0 1.5rem; }
.report-grid li { margin-bottom: .45rem; }
@media (max-width: 900px) { .report-grid { grid-template-columns: 1fr; } }
.sheet {
  position: relative; background: #fff; color: #1B2B42; border-radius: 4px; box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 1.75rem); font-size: .9rem; line-height: 1.45; overflow: hidden;
  border: 1px solid #D7DFE9;
}
.sheet::after {
  content: "SAMPLE"; position: absolute; right: -1rem; top: 45%; transform: rotate(-28deg);
  font-family: var(--font-display); font-weight: 700; font-size: 6.5rem; color: rgba(4, 35, 78, .05); pointer-events: none; letter-spacing: .05em;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--navy); padding-bottom: .7rem; margin-bottom: 1rem; }
.sheet-head img { height: 2.2rem; width: auto; }
.sheet-head span { font-size: .78rem; color: #5A6A80; text-align: right; }
.obs { margin-bottom: 1.1rem; }
.obs h4 { font-family: var(--font-body); font-weight: 600; color: var(--navy); font-size: .95rem; margin: 0 0 .45rem; }
.obs-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); border: 1px solid #BFCAD8; }
.obs-body figure { margin: 0; border-right: 1px solid #BFCAD8; }
.obs-body figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.obs-body figcaption { font-size: .74rem; text-align: center; padding: .3rem .4rem; color: #3A4A60; }
.obs-body dl { margin: 0; padding: .55rem .7rem; font-size: .8rem; }
.obs-body dt { font-weight: 600; display: inline; }
.obs-body dd { display: inline; margin: 0; }
.obs-body dd::after { content: ""; display: block; margin-bottom: .35rem; }
.prio { display: block; padding: .15rem .35rem; margin: 0 -.35rem .35rem; }
.prio-high { background: #FBE0D3; }
.prio-low { background: #E2F0E6; }
@media (max-width: 520px) { .obs-body { grid-template-columns: 1fr; } .obs-body figure { border-right: 0; border-bottom: 1px solid #BFCAD8; } }

/* Projects */
.projects { display: grid; gap: clamp(3rem, 6vw, 4.5rem); }
.project { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.project-copy h3 { margin-bottom: .6rem; }
.project-copy .meta { color: var(--accent-text); font-weight: 600; font-size: .98rem; margin-bottom: .8rem; }
.project-copy p { color: var(--muted); }
.media { display: grid; gap: .75rem; }
.media.two { grid-template-columns: 1fr 1fr; }
.media.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.media figure { margin: 0; }
.media img { width: 100%; border-radius: 4px; background: #000; }
.media.two img { aspect-ratio: 4 / 3; object-fit: cover; }
.media.three img { aspect-ratio: 3 / 4; object-fit: cover; }
.media figcaption { font-size: .85rem; color: var(--muted); padding-top: .35rem; }
.media .wide { grid-column: 1 / -1; }
.media .wide img { aspect-ratio: auto; }
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .media.two { grid-template-columns: 1fr; }
  .media.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .media.three figcaption { font-size: .78rem; }
}
.note-small { font-size: .92rem; color: var(--muted); }

/* Coverage */
.coverage-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.uk-map { width: 100%; max-width: 420px; height: auto; margin-inline: auto; display: block; }
.uk-map .land { fill: var(--navy); }
.uk-map .land-other { fill: var(--line); }
.uk-map .site { fill: var(--orange); stroke: #fff; stroke-width: 2.5; }
.uk-map .base circle { fill: none; stroke: var(--teal-light); stroke-width: 3; }
.uk-map .base .base-dot { fill: var(--teal-light); stroke: none; }
:root[data-theme="dark"] .uk-map .land { fill: #1B4D86; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .uk-map .land { fill: #1B4D86; } }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; padding: 0; margin: 1.25rem 0 2rem; font-size: .95rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .5rem; }
.legend i { width: .9rem; height: .9rem; border-radius: 50%; display: inline-block; }
.legend .k-site { background: var(--orange); }
.legend .k-base { border: 3px solid var(--teal-light); }
.clients { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.clients li { border: 1px solid var(--line); background: var(--surface-2); padding: .45rem .85rem; border-radius: 4px; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
@media (max-width: 860px) { .coverage-grid { grid-template-columns: 1fr; } }

/* Accreditations */
.accred-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.accred-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem; display: flex; flex-direction: column; gap: .9rem; }
.accred-card .logo-slot { width: 100%; height: 5rem; }
.accred-card h3 { font-size: 1.35rem; }
.accred-card p { margin: 0; color: var(--muted); font-size: .98rem; }
.caa-id { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--ink); background: var(--surface); border-radius: 4px; height: 5rem; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.caa-id small { display: block; margin-bottom: .35rem; font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--muted); }
.accred-grid:has(> :only-child) { grid-template-columns: minmax(0, 24rem); }
@media (max-width: 960px) { .accred-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .accred-grid { grid-template-columns: 1fr; } }

/* Contact */
.contact { background: var(--navy); color: #fff; }
.contact h2 { margin-bottom: 1rem; }
.contact p { color: #D2DEEC; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.contact-list li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.contact-list .k { color: var(--teal-light); font-weight: 600; }
.contact-list a { color: #fff; font-size: 1.2rem; font-weight: 500; }
.contact-list address { font-style: normal; }
.contact .actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .contact-list li { grid-template-columns: 1fr; gap: .2rem; } }

/* Footer */
.site-footer { background: var(--navy-deep); color: #AFC0D6; font-size: .92rem; padding-block: 2rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: flex-start; }
.site-footer p { margin: 0 0 .3rem; max-width: none; }
.site-footer a { color: #fff; }
.footer-shield { height: 2.6rem; width: auto; margin-bottom: .6rem; }

/* Privacy notice */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: .75rem; }
.legal h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 2.25rem 0 .6rem; }
.legal h3 { font-size: 1.3rem; margin: 1.4rem 0 .4rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: .96rem; margin: .5rem 0 1rem; }
.legal th, .legal td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: .6rem .5rem .6rem 0; }
.legal th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.updated { color: var(--muted); }
