/* Nation Wide Security Services CC
   Logos are not transparent: the black logo must sit on --black (#000) and
   the white logo on --white (#fff), or a box edge becomes visible. */

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

:root {
  --black: #000;
  --ink: #141414;
  --charcoal: #1e1e1e;
  --charcoal-line: #3a3a3a;
  --gold: #d9ae2f;
  --gold-soft: #f0d27a;
  --gold-text: #755600;   /* gold for text on light backgrounds */
  --paper: #f6f4ee;
  --white: #fff;
  --line: #ddd8ca;
  --body: #3d3d3d;
  --on-dark: #d6d3cb;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --header-h: 76px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font: 400 1.0625rem/1.65 var(--sans);
}

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

h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 600; line-height: 1.14; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -.012em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -.008em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); }
p { margin: 0; }
p + p { margin-top: 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 3px; border-radius: 2px; }
.dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible, .brand-strip :focus-visible { outline-color: var(--gold-soft); }

.wrap { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.paper { background: var(--paper); }

.dark { background: var(--charcoal); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3 { color: var(--white); }
.black { background: var(--black); }

.eyebrow {
  margin-bottom: 1rem;
  color: var(--gold-text);
  font: 600 1rem/1.3 var(--label);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.dark .eyebrow { color: var(--gold); }

.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); line-height: 1.6; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .7rem 1rem; background: var(--gold); color: var(--black); font-weight: 600;
}
.skip-link:focus { top: .5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: .7rem 1.45rem;
  border: 2px solid transparent; border-radius: 3px;
  font: 600 1.0625rem/1.2 var(--sans); text-align: center; text-decoration: none;
}
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--black); }
.btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn-secondary { border-color: var(--gold); color: var(--white); }
.btn-secondary:hover { background: var(--gold); color: var(--black); }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); border-bottom: 1px solid var(--charcoal-line); color: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; color: var(--white); text-decoration: none; }
.brand img { flex: none; width: 50px; height: auto; }
.brand-name { display: block; font: 600 1.2rem/1.1 var(--serif); }
.brand-name small { display: block; margin-top: .15rem; color: var(--gold); font: 600 .92rem/1.1 var(--label); letter-spacing: .07em; text-transform: uppercase; }

.nav-toggle {
  display: none; flex: none; align-items: center; gap: .5rem;
  min-height: 2.75rem; padding: .35rem .8rem;
  background: none; border: 1px solid var(--gold); border-radius: 3px; color: var(--white);
  font: 600 1rem/1 var(--sans); cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 18px; height: 12px; border-block: 2px solid var(--gold); }
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: var(--gold); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { border-color: transparent; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a { display: block; padding: .35rem 0; border-bottom: 2px solid transparent; color: var(--white); font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--gold-soft); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav-contact { display: none; }
.site-nav .btn { min-height: 2.75rem; padding: .45rem 1rem; font-size: 1rem; }

@media (max-width: 62rem) {
  .header-inner { flex-wrap: wrap; }
  .js .nav-toggle { display: inline-flex; }
  .site-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 1rem; padding-bottom: 1.25rem; }
  .js .site-nav { display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .js .site-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { padding: .8rem .1rem; border-bottom: 1px solid var(--charcoal-line); font-size: 1.15rem; }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--charcoal-line); color: var(--gold); }
  .nav-contact { display: block; color: var(--on-dark); }
  .nav-contact a { display: inline-block; padding-block: .3rem; color: var(--white); }
  .site-nav .btn { min-height: 3.1rem; }
}

@media (max-width: 23rem) {
  .brand img { width: 42px; }
  .brand-name { font-size: 1.05rem; }
  .brand-name small { font-size: .8rem; letter-spacing: .05em; }
  .nav-toggle { padding-inline: .6rem; }
}

/* Coast line motif */
/* The lines stay inside the bottom padding: clear of text, and clear of the
   hero logo, whose black image box would otherwise cut them off. */
.coast { --coast-h: clamp(4.5rem, 8vw, 7rem); position: relative; isolation: isolate; overflow: hidden; }
.coast::after {
  content: ""; position: absolute; inset: auto 0 0; z-index: -1; height: var(--coast-h);
  background: url("../img/coast-lines.svg") center bottom / 100% 100% no-repeat;
  opacity: .55;
}
.coast.coast { padding-bottom: calc(var(--coast-h) + 1.75rem); }

/* Home hero */
.hero { padding-top: clamp(2.75rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.hero h1 span { display: block; color: var(--gold); }
.hero .lede { max-width: 38rem; margin-top: 1.4rem; }
.hero-logo { width: 100%; max-width: 420px; justify-self: end; }

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-logo { justify-self: center; max-width: 240px; }
}

/* Inner page hero */
.page-hero { padding-top: clamp(3rem, 7vw, 5.5rem); }
.page-hero .lede { max-width: 42rem; margin-top: 1.25rem; }
.page-hero h1 { max-width: 24ch; }
.phrase { display: inline-block; }

/* Brand line */
.brand-strip { background: var(--gold); color: var(--black); }
.brand-strip ul { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 2rem; padding-block: .95rem; }
.brand-strip li { font: 600 clamp(1.15rem, 2.2vw, 1.5rem)/1.3 var(--serif); }

/* Split layout: heading column and content column */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }

/* Home service rows */
.rows li { padding-block: 1.6rem; border-top: 1px solid var(--line); }
.rows li:first-child { padding-top: 0; border-top: 0; }
.rows li:last-child { padding-bottom: 0; }
.rows h3 { margin-bottom: .45rem; }
.text-link { display: inline-block; margin-top: 1.6rem; color: var(--ink); font-weight: 600; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.text-link:hover { color: var(--gold-text); }

/* Services */
.service { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
.service + .service { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.service h2 { margin-bottom: 1rem; }
@media (max-width: 52rem) { .service { grid-template-columns: 1fr; } }

.agree { padding: 1.5rem 1.6rem 1.6rem; background: var(--paper); border-top: 3px solid var(--gold); }
.agree h3 { margin-bottom: .7rem; font: 600 1rem/1.3 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.agree li { position: relative; padding: .3rem 0 .3rem 1.2rem; }
.agree li::before { content: ""; position: absolute; left: 0; top: .9em; width: .6rem; height: 2px; background: var(--gold-text); }

.narrow > * { max-width: 46rem; }
.narrow h2 { margin-bottom: 1rem; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 2.25rem; counter-reset: step; }
.steps li { padding-top: 1.1rem; border-top: 3px solid var(--gold); counter-increment: step; color: var(--ink); font-weight: 500; }
.steps li::before { content: counter(step); display: block; margin-bottom: .4rem; color: var(--gold-text); font: 600 2.1rem/1 var(--serif); }
@media (max-width: 44rem) { .steps { grid-template-columns: 1fr; } }

/* About */
.about-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-intro img { width: 100%; max-width: 340px; justify-self: center; }
@media (max-width: 52rem) {
  .about-intro { grid-template-columns: 1fr; }
  .about-intro img { max-width: 220px; order: -1; }
}

.three-up { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); }
.three-up h2 { margin-bottom: .9rem; font-size: clamp(1.5rem, 2.4vw, 1.85rem); }
@media (max-width: 52rem) { .three-up { grid-template-columns: 1fr; } }

.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.25rem); margin-top: 2.25rem; }
.principles li { padding-top: 1rem; border-top: 2px solid var(--gold); }
.principles h3 { margin-bottom: .4rem; }
@media (max-width: 62rem) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .principles { grid-template-columns: 1fr; } }

/* Contact section */
.contact { padding-block: var(--section); background: var(--paper); border-top: 4px solid var(--gold); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.contact h2 + p { margin-top: 1rem; }
.contact-note { margin-top: 1rem; font-size: 1rem; }
.contact-methods { display: grid; gap: .85rem; }
.contact-card {
  display: block; padding: 1.1rem 1.35rem; background: var(--white);
  border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 3px;
  color: var(--ink); text-decoration: none;
}
.contact-card:hover { border-color: var(--gold-text); }
.contact-card span { display: block; color: var(--gold-text); font: 600 .95rem/1.3 var(--label); letter-spacing: .11em; text-transform: uppercase; }
.contact-card strong { display: block; margin-top: .1rem; font: 600 clamp(1.15rem, 4.6vw, 1.7rem)/1.3 var(--serif); overflow-wrap: anywhere; }
@media (max-width: 52rem) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--black); color: var(--on-dark); font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 2rem clamp(2rem, 5vw, 4rem); padding-block: 3rem 2.25rem; }
.footer-brand { display: flex; gap: 1rem; align-items: center; }
.footer-brand img { flex: none; width: 76px; }
.footer-name { color: var(--white); font: 600 1.2rem/1.25 var(--serif); }
.footer-line { margin-top: .25rem; color: var(--gold); }
.footer-title { margin-bottom: .5rem; color: var(--gold); font: 600 .95rem/1.3 var(--label); letter-spacing: .11em; text-transform: uppercase; }
.site-footer li a { display: inline-block; padding-block: .22rem; color: var(--white); overflow-wrap: anywhere; }
.site-footer li a:hover { color: var(--gold-soft); }
.footer-base { padding-bottom: 1.1rem; font-size: .95rem; }
.footer-base p { padding-top: 1.1rem; border-top: 1px solid var(--charcoal-line); }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .nav-links a, .contact-card, .text-link { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
}
