/* ═══════════════════════════════════════════════════════════════════
   A1 Locksmith Services — Navy Field
   Tokens and shared primitives. Source of truth; do not override elsewhere.

   Rule for the whole build: style by CLASS, never by descendant element.
   `.cell span` at (0,1,1) outranks `.flag` at (0,1,0) and silently repaints
   things it was never meant to reach. Four bugs in one sketch session came
   from that, and nine of thirteen on A1 Super. Classes only.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* colour */
  --navy: #2f416f; /* structure: headings, nav, bands  */
  --navy-deep: #1e2b4d; /* footer, emergency surfaces       */
  --navy-ink: #16203b; /* utility bar                      */
  --navy-soft: #eaeef7; /* tinted chips on white            */
  --navy-lift: #374c82; /* hover on a navy surface          */
  --red: #ed1b24; /* CALLING ONLY. never decorative   */
  --red-dk: #c8141c;
  --green: #38d07e; /* "open now" dot only              */

  --paper: #ffffff;
  --mist: #f4f6fa; /* cool page ground                 */
  --line: #dce2ed;
  --ink: #1a1f2e;
  --ink-2: #4c5670;
  --ink-3: #79839b;
  --on-navy: #aebad8; /* body text on a navy surface      */
  --on-navy-2: #8092c4; /* muted text on a navy surface     */

  /* type — Barlow for text, Barlow Condensed for display. Same family, different voice. */
  --font: Barlow, system-ui, -apple-system, sans-serif;
  --font-display: "Barlow Condensed", Barlow, system-ui, sans-serif;

  /* grain: one inline SVG turbulence, reused everywhere a navy surface needs texture */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");

  /* geometry — squarer than A1 Super; buttons are not pills */
  --r: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --max: 1336px;
  --gutter: 28px;
  --header-h: 80px;

  /* layered, not one flat blur — this is what stops cards reading as 2015 boxes */
  --shadow-1:
    0 1px 2px rgba(30, 43, 77, 0.05), 0 8px 24px rgba(30, 43, 77, 0.06);
  --shadow-2:
    0 2px 6px rgba(30, 43, 77, 0.06), 0 18px 44px rgba(30, 43, 77, 0.12);
  --shadow-3:
    0 4px 12px rgba(30, 43, 77, 0.08), 0 30px 70px rgba(30, 43, 77, 0.16);
  --lift: 0 3px 8px rgba(30, 43, 77, 0.07), 0 22px 48px rgba(30, 43, 77, 0.14);

  /* fluid type — scales with the viewport instead of stepping at breakpoints */
  /* 54 is the measured two-line ceiling for the homepage headline in its column */
  --t-hero: clamp(34px, 1.6rem + 2.2vw, 54px);
  --t-page: clamp(29px, 1.5rem + 1.9vw, 50px);
  --t-section: clamp(27px, 1.4rem + 1.5vw, 42px);
  --t-card: clamp(18px, 1rem + 0.4vw, 21px);
  --t-lead: clamp(16.5px, 1rem + 0.35vw, 19px);

  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
}

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

/* `overflow-x:hidden` computes to `overflow: hidden auto`, which makes the body a
   scroll container and silently kills position:sticky on every descendant.
   `clip` clips without creating one. */
html,
body {
  overflow-x: clip;
  max-width: 100%;
  margin: 0;
}
html.als-menu-open {
  overflow: hidden;
}

body {
  font: 17px/1.6 var(--font);
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}
h3,
h4 {
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── layout ────────────────────────────────────────────────────── */
.als-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (max-width: 768px) {
  .als-wrap {
    padding: 0 20px;
  }
}
.als-section {
  padding: clamp(52px, 6vw, 104px) 0;
}
.als-section--mist {
  background: var(--mist);
}
.als-section--navy {
  background: var(--navy);
}
.als-center {
  text-align: center;
}

.als-head {
  max-width: 820px;
  margin-bottom: clamp(28px, 3.4vw, 52px);
}
.als-head--center {
  margin-inline: auto;
  text-align: center;
}
.als-head__t {
  font-size: var(--t-section);
}
/* a short red rule under the section title — the one recurring accent that is not a button */
.als-head__t::after {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
  margin-top: 18px;
}
.als-head--center .als-head__t::after {
  margin-inline: auto;
}
.als-head__l {
  font-size: var(--t-lead);
  color: var(--ink-2);
  margin: 18px 0 0;
  max-width: 64ch;
}
.als-head--onnavy .als-head__t {
  color: #fff;
}
.als-head--onnavy .als-head__l {
  color: var(--on-navy);
}

/* ── eyebrow ───────────────────────────────────────────────────── */
.als-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: var(--r);
}
.als-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
}
.als-dot--live {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(56, 208, 126, 0.2);
}

/* ── buttons ───────────────────────────────────────────────────── */
.als-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 28px;
  border-radius: var(--r-md);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  min-height: 52px;
  cursor: pointer;
  border: 0;
  transition: all ease 0.3s;
}
.als-btn:hover {
  transform: translateY(-2px);
}
.als-btn:active {
  transform: translateY(0);
}
.als-btn--call {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(237, 27, 36, 0.32);
}
.als-btn--call:hover {
  background: var(--red-dk);
  box-shadow: 0 12px 26px rgba(237, 27, 36, 0.38);
}
.als-btn--ghost {
  background: #fff;
  color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--navy);
}
.als-btn--ghost:hover {
  background: var(--navy);
  color: #fff;
}
.als-btn--onnavy {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.als-btn--onnavy:hover {
  color: var(--red-dk);
}

.als-btn--sm {
  padding: 13px 18px;
  font-size: 15px;
}

/* ── arrow used on links and cards ─────────────────────────────── */
.als-arrow {
  display: inline-block;
  width: 16px;
  height: 9px;
  background: currentColor;
  flex: none;
  clip-path: polygon(0 40%, 60% 40%, 60% 0, 100% 50%, 60% 100%, 60% 60%, 0 60%);
}
.als-more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--red-dk);
}
.als-more .als-arrow {
  transition: transform 0.22s var(--ease);
}
.als-more--onnavy {
  color: #fff;
}

/* ── red tick, used in every trust list ────────────────────────── */
.als-tick {
  display: inline-block;
  width: 18px;
  height: 13px;
  background: var(--red);
  flex: none;
  clip-path: polygon(0 46%, 11% 34%, 40% 64%, 89% 5%, 100% 17%, 40% 90%);
}

/* ── chips ─────────────────────────────────────────────────────── */
.als-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.18s var(--ease),
    color 0.18s var(--ease),
    transform 0.18s var(--ease);
  min-width: 120px;
  justify-content: center;
}
.als-chip:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

/* ── flag (24/7 marker) ────────────────────────────────────────── */
.als-flag {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 4px;
  line-height: 1;
}

@media (max-width: 1080px) {
  .als-head__l {
    max-width: 100%;
  }
}
@media (max-width: 980px) {
  .als-head__t {
    font-size: 32px;
  }
  .als-section {
    padding: 56px 0;
  }
}
@media (max-width: 640px) {
  /* chips are a primary way into the town pages on a phone */
  .als-chip {
    min-height: 44px;
  }
  .als-section {
    padding: 44px 0;
  }
  .als-btn {
    padding: 16px 18px;
    font-size: 16px;
  }
}

/* ── scroll reveal ─────────────────────────────────────────────── */
/* Scoped to .als-js, which the inline snippet in <head> sets. Without JavaScript the
   class is never added, so nothing is ever hidden — content must never depend on a script. */
.als-js .als-rise {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
.als-js .als-rise.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .als-js .als-rise {
    opacity: 1;
    transform: none;
  }
}

/* ── surface treatments ───────────────────────────────────────── */
/* grain de-flattens a solid navy field; it is decorative, so it never takes pointer events */
.als-grain {
  position: relative;
  isolation: isolate;
}
.als-section.als-section--hww {
  border-top: 1px solid #707c9a;
}
.als-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.05;
  mix-blend-mode: overlay;
}
.als-grain > * {
  position: relative;
  z-index: 1;
}

/* cross-document soft fade between pages — ignored where unsupported */
@view-transition {
  navigation: auto;
}

/* ── arrow that exits right while a twin enters from the left ────── */
.als-swap {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 9px;
  overflow: hidden;
  flex: none;
}
.als-swap::before,
.als-swap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(0 40%, 60% 40%, 60% 0, 100% 50%, 60% 100%, 60% 60%, 0 60%);
  transition: transform 0.32s var(--ease);
}
.als-swap::after {
  transform: translateX(-130%);
}
a:hover .als-swap::before {
  transform: translateX(130%);
}
a:hover .als-swap::after {
  transform: translateX(0);
}

/* ── hero headline: per-line mask reveal, hand-split (no JS splitter) ──── */
.als-line {
  display: block;
  overflow: clip;
}
.als-line__i {
  display: inline-block;
  translate: 0 110%;
  transition: translate 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.als-js .is-in .als-line__i,
.als-js .als-hero__t .als-line__i {
  translate: 0 0;
}
.als-hero__t .als-line:nth-child(2) .als-line__i {
  transition-delay: 0.09s;
}
@media (prefers-reduced-motion: reduce) {
  .als-line__i {
    translate: 0 0;
    transition: none;
  }
}
