/* ==========================================================================
   Midtown Locksmith NYC — design tokens
   ========================================================================== */
:root {
  --navy-950: #071f36;
  --navy-800: #0c3a63;
  --navy-700: #124a7a;
  --teal-500: #12a68f;
  --teal-600: #0c8f7a;
  --teal-300: #6fd9c7;
  --teal-text: #08695a; /* AA-compliant (6.1:1) teal for text on --paper */
  --paper: #f4f6f6;
  --paper-dim: #e7ecec;
  --ink: #0d1b22;
  --ink-soft: #3c4c53;
  --brass: #c98f4a;
  --white: #ffffff;

  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;

  --wrap: 1180px;
  --radius: 14px;
  --shadow-md: 0 12px 32px -12px rgba(7, 31, 54, 0.35);
  --shadow-sm: 0 4px 14px -6px rgba(7, 31, 54, 0.25);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0 0 0.5em; line-height: 1.12; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 20px;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--teal-300);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal-500);
  color: var(--navy-950);
  padding: 12px 20px;
  z-index: 200;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
  min-height: 44px;
}
.btn-primary {
  background: var(--teal-500);
  color: var(--navy-950);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--teal-300); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { flex-shrink: 0; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1.15;
  display: flex;
  flex-direction: column;
}
.brand-word-sub {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.01em;
  font-size: 0.7rem;
  color: var(--teal-300);
  text-transform: none;
}

.site-nav ul {
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--teal-300); border-color: var(--teal-500); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-500);
  color: var(--navy-950);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  transition: background-color 0.15s ease;
}
.call-btn:hover { background: var(--teal-300); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin-inline: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-950);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .site-nav.is-open { max-height: 320px; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
  }
  .site-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .call-btn span { display: none; }
  .call-btn { padding: 10px 12px; }
  .nav-toggle { display: flex; }
}

/* JS-disabled fallback: nav is a normal static block, never hidden */
.no-js .site-nav {
  position: static;
  max-height: none;
  overflow: visible;
}
.no-js .nav-toggle { display: none; }

/* ==========================================================================
   Status tag + pulse
   ========================================================================== */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-300);
  background: rgba(18, 166, 143, 0.12);
  border: 1px solid rgba(18, 166, 143, 0.35);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 0 rgba(18, 166, 143, 0.7);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(18, 166, 143, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(18, 166, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 166, 143, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 31, 54, 0.88) 0%, rgba(7, 31, 54, 0.82) 45%, rgba(7, 31, 54, 0.94) 100%);
}
.hero-watermark {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 280px;
  height: 280px;
  color: rgba(255, 255, 255, 0.05);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 96px 76px;
  max-width: 760px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 0.4em;
}
.hero-sub {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 58ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

/* ==========================================================================
   Trust strip
   ========================================================================== */
.trust-strip {
  background: var(--navy-800);
  color: var(--white);
  padding-block: 30px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 2px;
}
.trust-item span {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
}
@media (max-width: 860px) {
  .trust-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Key-cut divider (signature element)
   ========================================================================== */
.key-divider {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--paper);
}
.key-divider-line {
  display: block;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal-500), var(--brass));
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.key-divider.is-visible .key-divider-line,
.no-js .key-divider-line,
.reveal-fallback .key-divider-line {
  width: 100%;
}
.key-bullet {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--teal-500);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  margin-top: 4px;
}
.key-bullet::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 5px;
  width: 2px;
  height: 8px;
  background: var(--teal-500);
}
.detail-dark .key-bullet,
.trust-item .key-bullet { border-color: var(--teal-300); }
.detail-dark .key-bullet::after,
.trust-item .key-bullet::after { background: var(--teal-300); }

/* ==========================================================================
   Section scaffolding
   ========================================================================== */
section { padding-block: 72px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 10px;
}
.detail-dark .eyebrow,
.availability .eyebrow { color: var(--teal-300); }

h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--navy-800); }
.detail-dark h2 { color: var(--white); }
.section-lead {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.no-js .reveal { opacity: 1; transform: none; }
/* Safety net: if JS hasn't marked anything visible yet (e.g. a crawler or
   screenshot tool that doesn't scroll/wait), don't leave content hidden
   forever — force it visible shortly after load via the .reveal-fallback
   class toggled in main.js. */
.reveal-fallback .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Services cards
   ========================================================================== */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-card img { height: 190px; object-fit: cover; width: 100%; }
.service-card-body { padding: 22px 22px 24px; }
.service-card-body h3 {
  font-size: 1.15rem;
  color: var(--navy-800);
  margin-bottom: 0.4em;
}
.service-card-body p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-text);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}
.learn-more:hover { color: var(--teal-600); }

@media (max-width: 900px) {
  .service-cards { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Detail sections
   ========================================================================== */
.detail-light { background: var(--paper); }
.detail-dark { background: var(--navy-950); color: rgba(255, 255, 255, 0.88); }
.detail-dark p { color: rgba(255, 255, 255, 0.78); }

.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.detail-grid-reverse .detail-media { order: -1; }
.detail-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.detail-list { margin: 20px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.detail-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.98rem; }
.detail-list.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .detail-grid-reverse .detail-media { order: 0; }
  .detail-media img { height: 240px; }
  .detail-list.two-col { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Why us
   ========================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 40px;
  align-items: center;
  margin-top: 20px;
}
.key-fob-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: var(--white);
}
@media (max-width: 860px) {
  .why-grid { grid-template-columns: 1fr; }
  .key-fob-visual img { height: 220px; }
}

/* ==========================================================================
   Availability
   ========================================================================== */
.availability { background: var(--navy-800); color: var(--white); }
.availability-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.availability-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 28px;
}
.availability-emergency { background: rgba(18, 166, 143, 0.12); border-color: rgba(18, 166, 143, 0.4); }
.availability-card h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 0.5em; }
.availability-card p { color: rgba(255, 255, 255, 0.82); margin-bottom: 0; }
.hours-line { font-size: 1.05rem; margin-bottom: 8px !important; }
.hours-line strong { font-family: var(--font-display); color: var(--teal-300); }
.hours-note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.65); }

@media (max-width: 760px) {
  .availability-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.contact-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--paper-dim);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.contact-card strong { display: block; font-size: 1rem; margin-bottom: 6px; color: var(--navy-800); }
.contact-phone {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--teal-text);
  font-size: 1.05rem;
}
@media (max-width: 760px) {
  .contact-cards { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.75);
  padding-block: 48px 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 48px;
}
.brand-footer { margin-bottom: 0; }
.footer-info p { margin-bottom: 6px; font-size: 0.92rem; }
.footer-info a { color: var(--teal-300); text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }
.footer-credit {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
}
