/*
Theme Name: Legendary Locksmith
Theme URI: https://legendarylocksmithvancouver.com
Author: Legendary Locksmith
Description: A one-page landing theme for Legendary Locksmith, a Vancouver locksmith (automotive, residential, commercial). Light hero, gold/black brand accent, editable via Appearance > Customize > Legendary Locksmith Settings.
Version: 1.0.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: legendary-locksmith
*/

:root {
  --gold: #FFC701;
  --gold-deep: #E0A800;
  --ink: #16130f;
  --paper: #faf7f1;
  --line: rgba(22, 19, 15, 0.12);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; scroll-behavior: smooth; }

body {
  font-family: 'Work Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, .disp {
  font-family: 'Bebas Neue', 'Oswald', ui-sans-serif, sans-serif;
  letter-spacing: 0.01em;
}

/* Bebas Neue ships in a single (regular) weight. Headings default to bold, which
   makes browsers fake a bold by smearing the glyphs — iPhone Safari does it
   heavily. Pin the display headings to the real weight so the letters stay crisp. */
h1, h2, .disp { font-weight: 400; }
.disp, h1, h2 { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

.eyebrow {
  font-family: 'Oswald', ui-sans-serif, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--gold); }
::selection { background: var(--gold); color: var(--ink); }

input, textarea, select {
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn { cursor: pointer; border: none; }
.btn-gold:hover { background: var(--gold-deep) !important; }
.btn-outline:hover { background: rgba(22, 19, 15, 0.06) !important; }
.btn-dark:hover { background: #000 !important; }

.svc-card { transition: transform 120ms ease, border-color 120ms ease; }
.svc-card:hover { transform: translateY(-4px); border-color: var(--gold); }

.gbp-card { transition: border-color 120ms ease; }
.gbp-card:hover { border-color: var(--gold); }

.nav-link:hover { color: var(--gold) !important; }

.form-success {
  background: #eef7ea;
  border: 2px solid #6fa859;
  color: #2f4a26;
  padding: 16px 20px;
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: 18px;
}

.form-error {
  background: #fbe9e9;
  border: 2px solid #a63244;
  color: #5c1a24;
  padding: 16px 20px;
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: 18px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr !important; }
  .hero-art { display: none !important; }
  .nav-links { display: none !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .quote-grid { grid-template-columns: 1fr !important; }
  h1.headline { font-size: 54px !important; }
  .band-text { font-size: 14px !important; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr !important; }
  h1.headline { font-size: 40px !important; }
  .section-pad { padding-left: 20px !important; padding-right: 20px !important; }
  .hero-ctas { flex-direction: column !important; }
  .hero-ctas a { width: 100%; justify-content: center; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .gallery-grid > div:first-child { grid-column: span 2 !important; grid-row: span 1 !important; aspect-ratio: 16/9 !important; }
}

/* Mobile overflow fix (Oct 2026): CSS Grid/Flex items default to
   min-width:auto, which refuses to shrink below their content's
   min-content size — on a narrow phone that pushed the quote-form
   columns (and anything else using these grids) past the viewport
   edge, creating a horizontal scroll with blank space. Allowing them
   to shrink fixes it without changing desktop/tablet layout at all. */
.hero-grid > *,
.quote-grid > *,
.grid-3 > *,
.grid-4 > *,
.gallery-grid > *,
.form-row-2col > * {
  min-width: 0;
}

#quote input,
#quote select,
#quote textarea {
  width: 100%;
}

@media (max-width: 480px) {
  .form-row-2col {
    grid-template-columns: 1fr !important;
  }
}

/* Gallery lightbox (Oct 2026) */
.gallery-item {
  position: relative;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.gallery-item:hover,
.gallery-item:focus-visible {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(22, 19, 15, 0.25);
  outline: none;
  z-index: 1;
}
.gallery-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.legendary-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 8, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.legendary-lightbox[hidden] { display: none; }
.legendary-lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.legendary-lightbox-close,
.legendary-lightbox-prev,
.legendary-lightbox-next {
  position: absolute;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.legendary-lightbox-close:hover,
.legendary-lightbox-prev:hover,
.legendary-lightbox-next:hover {
  background: var(--gold-deep);
}
.legendary-lightbox-close { top: 20px; right: 20px; font-size: 28px; }
.legendary-lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.legendary-lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.legendary-lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--paper);
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 70px;
}
@media (max-width: 560px) {
  .legendary-lightbox-prev,
  .legendary-lightbox-next {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
  .legendary-lightbox-close {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
    font-size: 22px;
  }
}

/* ------------------------------------------------------------------
   Hero redesign (Oct 2026)
   Desktop keeps the left-aligned hero; at tablet/phone widths the hero
   becomes a centered, thumb-friendly stack: big one-line headline,
   two-line gold highlight, full-width rounded CTAs and a 3-up trust
   row with round gold icon badges.
------------------------------------------------------------------- */
.hero-eyebrow-line--right { display: none; }
.hero-trust-icon { display: inline-flex; flex-shrink: 0; }

/* Highlighted lines sit a step below line 1 and carry their own
   line-height so the gold bars stack tightly. */
.hero-line2 {
  display: block;
  font-size: 0.7em;
  line-height: 1.3;
  margin-top: 10px;
}

@media (max-width: 860px) {
  /* Header: bigger logo + more tappable phone button */
  .site-header-inner { padding: 12px 16px !important; gap: 12px !important; }
  .site-logo img { height: 54px !important; width: auto !important; }
  .site-logo > div { height: 54px !important; }
  .header-call {
    padding: 13px 16px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
  }
  .header-call svg { width: 18px; height: 18px; }

  /* Hero container */
  .hero-grid {
    padding-top: 36px !important;
    padding-bottom: 40px !important;
    text-align: center;
  }

  .hero-eyebrow {
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
    font-size: 14px !important;
  }
  .hero-eyebrow-line {
    display: block !important;
    flex: 1 1 0;
    width: auto !important;
    max-width: 90px;
    height: 2px;
    background: var(--gold);
  }

  h1.headline.hero-title {
    max-width: none !important;
    margin: 0 auto 18px !important;
    font-size: min(11.5vw, 78px) !important;
    line-height: 1 !important;
    text-align: center;
    white-space: nowrap;
  }
  .hero-line2 { font-size: 0.6em; line-height: 1.55; margin-top: 14px; white-space: normal; }
  .hero-highlight { padding: 3px 12px !important; }

  .hero-sub {
    max-width: 36em !important;
    margin: 0 auto 26px !important;
    font-size: 16.5px !important;
    line-height: 1.55 !important;
  }

  /* CTAs: full-width, rounded, 58px tall tap targets */
  .hero-ctas {
    flex-direction: column !important;
    gap: 12px !important;
    margin: 0 auto 30px !important;
    max-width: 520px;
  }
  .hero-ctas a {
    width: 100%;
    justify-content: center;
    min-height: 58px;
    font-size: 19px !important;
    padding: 16px 24px !important;
    border-radius: 10px !important;
  }
  .hero-call { box-shadow: 0 6px 16px rgba(255, 199, 1, 0.38); }

  /* Trust row: 3 columns, round gold icon badges, hairline dividers */
  .hero-trust {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 !important;
    max-width: 520px;
    margin: 0 auto;
  }
  .hero-trust-item {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 10px !important;
    padding: 2px 8px;
    text-align: center;
    font-size: 14px !important;
    line-height: 1.3;
    font-weight: 500;
    color: rgba(22, 19, 15, 0.85) !important;
  }
  .hero-trust-item + .hero-trust-item { border-left: 1px solid rgba(22, 19, 15, 0.14); }
  .hero-trust-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gold);
    align-items: center;
    justify-content: center;
  }
  .hero-trust-icon svg {
    width: 27px !important;
    height: 27px !important;
    stroke: var(--ink) !important;
    fill: var(--ink);
  }
  .hero-trust-icon svg path:nth-child(2) { stroke: var(--gold) !important; fill: none; }
  .hero-trust-label { text-wrap: balance; }
}

/* Clickable service-area city chips (Oct 2026) */
#quote { scroll-margin-top: 90px; }
.city-chip {
  display: inline-block;
  border: 2px solid var(--line);
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.city-chip:hover,
.city-chip:focus-visible {
  color: var(--ink);
  border-color: var(--gold);
  background: rgba(255, 199, 1, 0.16);
  transform: translateY(-1px);
  outline: none;
}
.city-chip.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
@keyframes legendary-flash {
  0%   { box-shadow: 0 0 0 0 rgba(255, 199, 1, 0.9); border-color: var(--gold); }
  100% { box-shadow: 0 0 0 10px rgba(255, 199, 1, 0); border-color: var(--gold); }
}
#quote select.flash { animation: legendary-flash 900ms ease-out 1; }

/* Gallery: 15 photos tile evenly with a 2x2 lead tile on a 6-column desktop grid
   (the 3-col tablet and 2-col phone layouts already divide evenly). */
@media (min-width: 861px) {
  .gallery-grid { grid-template-columns: repeat(6, 1fr) !important; }
}
