/* ==========================================================================
   Duluth Security Needs — design tokens
   Palette drawn from the subject: Lake Superior at dusk (navy), North Shore
   gabbro (basalt ink), and the amber status LED on professional security
   hardware. Navy = institutional trust; amber = vigilance, and it's literal.
   ========================================================================== */
:root {
  --ink:      #141b23;   /* gabbro basalt */
  --superior: #0e2a3f;   /* Lake Superior navy */
  --superior-deep: #0a1f30;
  --steel:    #46586a;
  --mist:     #c8d3dc;
  --paper:    #f4f7f9;   /* cold off-white — Duluth in November, not cream */
  --white:    #ffffff;
  --amber:    #ffb020;   /* status-LED amber */
  --amber-ink:#8a5a00;
  --rec:      #e5484d;   /* REC dot — used ONLY in the OSD motif */

  --display: "Archivo", system-ui, sans-serif;
  --body:    "Public Sans", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1080px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--amber); color: var(--ink);
  padding: .5rem 1rem; z-index: 100; font-weight: 600;
}
.skip:focus { left: 0; }

a { color: var(--superior); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--amber-ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- OSD signature motif ---------------------------------------- */
.osd {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .14em;
  color: var(--amber);
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .75rem;
}
.osd-quiet { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; color: var(--steel); }
.rec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rec); display: inline-block;
  animation: blink 2.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: .25; } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

/* ---------- masthead ---------------------------------------------------- */
.masthead { background: var(--superior-deep); color: var(--white); }
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1rem; padding-bottom: 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--white); }
.brand-mark {
  width: 44px; height: auto; display: block;
  filter: drop-shadow(0 1px 6px rgba(46, 196, 232, .25));
}
.brand-name { font-family: var(--display); font-weight: 800; font-stretch: 110%; font-size: 1.15rem; display: block; line-height: 1.1; }
.brand-sub { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; color: var(--mist); text-transform: uppercase; }

.masthead-call { text-align: right; text-decoration: none; color: var(--white); }
.call-label { display: block; font-size: .72rem; color: var(--mist); }
.call-number { font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--amber); }

/* ---------- nav --------------------------------------------------------- */
.nav { background: var(--superior); border-top: 1px solid #23445e; }
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;   /* desktop: every item visible, wraps to a second row */
}
.nav a {
  display: block; padding: .65rem .8rem;
  color: var(--mist); text-decoration: none;
  font-size: .875rem; font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--white); }
.nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--amber); }

/* ---------- status bar (signature) -------------------------------------- */
.statusbar {
  background: var(--ink);
  border-top: 1px solid #23445e;
  border-bottom: 2px solid var(--amber);
}
.statusbar-inner {
  display: flex; gap: 1.75rem; align-items: center;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  color: var(--mist); padding-top: .4rem; padding-bottom: .4rem;
  overflow: hidden; white-space: nowrap;
}
.rec { color: var(--amber); display: inline-flex; align-items: center; gap: .45rem; }
.statusbar-right { margin-left: auto; }

/* ---------- hero / page head -------------------------------------------- */
.hero {
  background:
    linear-gradient(160deg, var(--superior-deep) 0%, var(--superior) 62%, #123650 100%);
  color: var(--white);
  padding: 4.5rem 0 4rem;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 900; font-stretch: 115%;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.05; letter-spacing: -.01em;
  margin: 0 0 1.25rem;
}
.hero h1 em { font-style: normal; color: var(--amber); }
.hero-sub { max-width: 44rem; font-size: 1.15rem; color: var(--mist); margin: 0 0 2rem; }

.pagehead { background: var(--superior); color: var(--white); padding: 2.75rem 0 2.25rem; }
.pagehead h1 {
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.12; margin: 0;
}

/* ---------- content ------------------------------------------------------ */
.content { padding: 2.75rem 1.25rem 4rem; max-width: 820px; }
.content h2 {
  font-family: var(--display); font-weight: 800; font-stretch: 110%;
  font-size: 1.55rem; line-height: 1.2; margin: 2.5rem 0 .75rem;
  color: var(--superior);
}
.content h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin: 2rem 0 .5rem; }
.content p, .content li { max-width: 68ch; }
.content ul, .content ol { padding-left: 1.35rem; }
.content li { margin: .4rem 0; }
.content li::marker { color: var(--amber-ink); }
.content hr { border: none; border-top: 1px solid var(--mist); margin: 2.5rem 0; }
.content blockquote {
  margin: 1.5rem 0; padding: .25rem 1.25rem;
  border-left: 3px solid var(--amber);
  background: var(--white); color: var(--steel);
}
.content figure { margin: 2rem 0; }
.content img { max-width: 100%; height: auto; border-radius: var(--radius); }
.content figcaption { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--steel); margin-top: .5rem; }
.content code { font-family: var(--mono); font-size: .9em; background: #e6ecf1; padding: .1em .35em; border-radius: 3px; }

/* ---------- components --------------------------------------------------- */
.btn {
  display: inline-block; padding: .8rem 1.5rem;
  border-radius: var(--radius); font-weight: 700; text-decoration: none;
  font-family: var(--display); font-stretch: 105%;
  border: 2px solid transparent;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: #ffc24d; color: var(--ink); }
.btn-ghost { border-color: var(--mist); color: inherit; }
.hero .btn-ghost { color: var(--white); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.cta-actions { display: flex; gap: .85rem; flex-wrap: wrap; }

.cta-panel {
  background: var(--superior); color: var(--white);
  border-radius: var(--radius); padding: 1.75rem;
  margin: 2.5rem 0; border-top: 3px solid var(--amber);
}
.cta-panel .cta-lead { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin: 0 0 1rem; }
.cta-panel .cta-fine { font-size: .82rem; color: var(--mist); margin: 1rem 0 0; }
.cta-panel a.tel, .cta-panel a { color: var(--white); }
.cta-panel .btn-primary { color: var(--ink); }

.trust-strip {
  display: flex; flex-wrap: wrap; gap: .5rem 1.75rem;
  font-size: .85rem; font-weight: 600; color: var(--steel);
  border-block: 1px solid var(--mist);
  padding: .85rem 0; margin: 2rem 0;
}
.trust-strip span::before { content: "▸ "; color: var(--amber-ink); }

.nap-block {
  background: var(--white); border: 1px solid var(--mist);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.tel { font-weight: 700; white-space: nowrap; }

.svc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem; margin: 2rem 0;
}
.svc {
  background: var(--white); border: 1px solid var(--mist);
  border-radius: var(--radius); padding: 1.25rem;
  display: block; text-decoration: none; color: var(--ink);
  border-top: 3px solid var(--superior);
  transition: border-top-color .15s ease, transform .15s ease;
}
.svc:hover { border-top-color: var(--amber); transform: translateY(-2px); color: var(--ink); }
.svc h3 { margin: 0 0 .4rem; font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--superior); }
.svc p { margin: 0; font-size: .9rem; color: var(--steel); }

.notice { border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.notice-ok  { background: #e7f5ec; border: 1px solid #9fd4b3; }
.notice-err { background: #fdeaea; border: 1px solid #f0b1b4; }

/* contact form */
.form-grid { display: grid; gap: 1rem; max-width: 34rem; margin: 1.5rem 0; }
.form-grid label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .3rem; }
.form-grid input, .form-grid textarea {
  width: 100%; padding: .7rem .85rem; font: inherit;
  border: 1px solid var(--mist); border-radius: var(--radius); background: var(--white);
}
.form-grid input:focus, .form-grid textarea:focus { border-color: var(--superior); }
.hp { position: absolute; left: -9999px; }

/* ---------- footer -------------------------------------------------------- */
.footer { background: var(--ink); color: var(--mist); margin-top: 2rem; border-top: 3px solid var(--amber); }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1.3fr;
  gap: 2rem; padding-top: 2.75rem; padding-bottom: 2.75rem;
  font-size: .9rem;
}
.footer a { color: var(--white); }
.footer .tel { color: var(--amber); }
.footer-brand { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--white); }
.footer-nav { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer-nav li { margin: .3rem 0; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--amber); }
.footer-note { align-self: end; }

.bbb-seal img { max-width: 100%; height: auto; }
.bbb-seal-light { margin: 1.5rem 0; }

/* ---------- sticky mobile call bar ---------------------------------------- */
.mobile-call {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--amber); color: var(--ink);
  text-align: center; padding: .9rem 1rem;
  font-family: var(--display); font-weight: 800; text-decoration: none;
  box-shadow: 0 -4px 16px rgba(0,0,0,.25);
}

@media (max-width: 720px) {
  /* masthead typography steps down so nothing wraps */
  .masthead-inner { gap: .5rem; }
  .brand { gap: .55rem; }
  .brand-mark { width: 36px; }
  .brand-name { font-size: .98rem; white-space: nowrap; }
  .brand-sub { font-size: .52rem; letter-spacing: .11em; white-space: nowrap; }
  .call-number { font-size: 1.02rem; white-space: nowrap; }

  /* mobile: single scrollable row (thumbs swipe naturally) with a fade hint */
  .nav { position: relative; }
  .nav ul {
    flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav ul::-webkit-scrollbar { display: none; }
  .nav::after {
    content: "\276F";                     /* ❯ scroll affordance */
    position: absolute; top: 0; right: 0; bottom: 0; width: 3.75rem;
    display: flex; align-items: center; justify-content: flex-end;
    padding-right: .5rem;
    color: var(--amber); font-size: 1rem; font-weight: 700;
    background: linear-gradient(to right, transparent 0%, var(--superior) 70%);
    pointer-events: none;
    animation: nudge 1.6s ease-in-out infinite;
    transition: opacity .25s ease;
  }
  .nav.nav-end::after { opacity: 0; animation: none; }
  .masthead-call .call-label { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .mobile-call { display: block; }
  body { padding-bottom: 3.4rem; }   /* room for the call bar */
  .statusbar-inner span:nth-child(3) { display: none; }
}
