/* Locksmith Tri-Cities — public styles
   Palette: signal yellow, asphalt, cool paper, river blue for links.
   One family (Archivo variable) used across widths: condensed for display, normal for text. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"), url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --yellow: #f5c400;
  --yellow-deep: #d9a900;
  --asphalt: #23272c;
  --steel: #59616b;
  --paper: #f5f6f3;
  --white: #ffffff;
  --line: #d9dcd5;
  --river: #1b5a85;
  --ok: #1f7a4a;
  --err: #b3261e;
  --radius-s: 4px;
  --radius-m: 10px;
  --wrap: 72rem;
  --narrow: 44rem;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --step-4: clamp(2.6rem, 1.6rem + 5vw, 5.4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--asphalt);
  background: var(--paper);
  font-stretch: 100%;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--river); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--river); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 0.5em; font-weight: 800; }
h1 { font-size: var(--step-3); font-stretch: 75%; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); font-stretch: 85%; }
h3 { font-size: var(--step-1); font-stretch: 100%; font-weight: 700; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, var(--narrow)); }
.section { padding-block: 3rem; }
.lead { font-size: var(--step-1); max-width: 40em; color: var(--asphalt); }
.fineprint { font-size: var(--step--1); color: var(--steel); max-width: 60em; }

.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-lg { width: 2rem; height: 2rem; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--asphalt); color: var(--white); padding: 0.6rem 1rem; z-index: 50; border-radius: var(--radius-s); }
.skip:focus { top: 1rem; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 1rem;
  background: var(--yellow);
  transition: opacity 0.45s ease, visibility 0.45s;
}
.loader-art { width: min(78vw, 420px); height: auto; overflow: visible; }
.loader .wa path {
  fill: none; stroke: var(--asphalt); stroke-width: 0.9; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.loader .key { fill: var(--asphalt); transform-box: fill-box; transform-origin: 0% 50%; }
.loader .key .hole { fill: var(--yellow); }
.loader .key .groove { fill: none; stroke: var(--yellow); stroke-width: 1.8; stroke-linecap: round; }
.loader .tc-dot { fill: var(--asphalt); }
.loader .tc-ring { fill: none; stroke: var(--asphalt); stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: 0; transform-box: fill-box; transform-origin: center; }
.loader-name { font-weight: 800; font-stretch: 70%; font-size: 1.5rem; letter-spacing: 0.01em; }

/* One orchestrated moment: the state outline draws, the key slides in and turns, Tri-Cities pings. */
.js .loader .wa path { stroke-dashoffset: 1; animation: draw 0.9s ease-out forwards; }
.js .loader .key { opacity: 0; animation: keyIn 0.5s 0.55s cubic-bezier(.3,.7,.3,1) forwards, keyTurn 0.36s 1.1s ease-in-out; }
.js .loader .tc-dot { opacity: 0; animation: fadeIn 0.2s 1.35s forwards; }
.js .loader .tc-ring { animation: ping 0.8s 1.4s ease-out; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes keyIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes keyTurn { 50% { transform: scaleY(0.2); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes ping { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(4); } }

.loaded .loader, .no-loader .loader { opacity: 0; visibility: hidden; pointer-events: none; }
.no-loader .loader { display: none; }
/* Without JavaScript the loader removes itself */
html:not(.js) .loader { animation: hideLoader 0.4s ease 1.2s forwards; }
@keyframes hideLoader { to { opacity: 0; visibility: hidden; } }

/* ---------- Skeleton ----------
   On pages after the first (no loader), blocks marked data-skel show grey placeholders
   if the page takes more than 150 ms to finish loading. Fast loads never see them. */
@keyframes skelOn {
  to {
    border-color: transparent; box-shadow: none;
    background:
      linear-gradient(#dfe2dc 0 0) 0 1.4rem / min(18rem, 45%) 1.15rem no-repeat,
      linear-gradient(#e6e8e3 0 0) 0 3.3rem / min(34rem, 75%) 0.8rem no-repeat,
      linear-gradient(#e6e8e3 0 0) 0 4.7rem / min(28rem, 62%) 0.8rem no-repeat,
      linear-gradient(#e6e8e3 0 0) 0 6.1rem / min(14rem, 35%) 0.8rem no-repeat;
  }
}
@keyframes skelRow {
  to {
    border-left-color: transparent;
    background:
      linear-gradient(#dfe2dc 0 0) 0 1.6rem / min(16rem, 40%) 1.15rem no-repeat,
      linear-gradient(#e6e8e3 0 0) 0 3.5rem / min(30rem, 55%) 0.8rem no-repeat,
      linear-gradient(#e6e8e3 0 0) 0 4.9rem / min(24rem, 45%) 0.8rem no-repeat,
      linear-gradient(#dfe2dc 0 0) right 1.4rem / 13rem 3rem no-repeat,
      linear-gradient(#e6e8e3 0 0) right 5rem / 13rem 3rem no-repeat;
  }
}
@keyframes skelKids { to { visibility: hidden; } }
@keyframes skelPulse { 50% { opacity: 0.6; } }
.js.no-loader:not(.loaded) [data-skel] { animation: skelOn 0s 0.15s forwards, skelPulse 1.1s 0.15s ease-in-out infinite; }
.js.no-loader:not(.loaded) .listing[data-skel] { animation-name: skelRow, skelPulse; }
.js.no-loader:not(.loaded) [data-skel] * { animation: skelKids 0s 0.15s forwards; }
@media (prefers-reduced-motion: reduce) { .js.no-loader:not(.loaded) [data-skel] { animation: skelOn 0s 0.15s forwards; } }

/* ---------- Header ---------- */
.site-header { background: var(--asphalt); color: var(--white); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: inherit; text-decoration: none; font-weight: 600; font-stretch: 80%; font-size: 1.2rem; }
.brand b { font-weight: 800; color: var(--yellow); margin-left: 0.15em; }
.brand-mark { width: 1.9rem; height: 1.9rem; fill: var(--yellow); stroke: none; }
.nav-toggle { display: none; align-items: center; gap: 0.4rem; cursor: pointer; padding: 0.5rem 0.7rem; border: 1px solid #ffffff40; border-radius: var(--radius-s); background: transparent; color: var(--white); font: inherit; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; }
.menu a { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--white); text-decoration: none; padding: 0.55rem 0.8rem; border-radius: var(--radius-s); font-size: 0.98rem; }
.menu a:hover { background: #ffffff14; }
.menu a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.menu .lang a { border: 1px solid #ffffff40; margin-left: 0.5rem; }

@media (max-width: 54rem) {
  .header-row { flex-wrap: wrap; }
  .menu { width: 100%; }
  .js .menu { width: auto; }
  .js .nav-toggle { display: inline-flex; }
  .js .menu ul { display: none; }
  .js .menu.open ul { display: flex; position: absolute; left: 0; right: 0; top: 100%; background: var(--asphalt); border-top: 1px solid #ffffff22; padding: 0.5rem 1.25rem 1rem; }
  .menu ul { flex-direction: column; align-items: stretch; padding-bottom: 0.75rem; }
  .menu a { padding: 0.85rem 0.25rem; font-size: 1.05rem; }
  .menu .lang a { margin: 0.5rem 0 0; justify-content: center; }
  .menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--yellow); padding-left: 0.75rem; }
}

/* ---------- Hero: yellow band with a key-cut bottom edge ---------- */
.hero {
  --cut: 64px; /* height of the key-cut edge; fixed so it never reaches the buttons */
  background: var(--yellow);
  padding: clamp(2.5rem, 6vw, 5rem) 0 calc(var(--cut) + clamp(2rem, 4vw, 3rem));
  clip-path: polygon(0 0, 100% 0,
    100% calc(100% - var(--cut)), 93% calc(100% - var(--cut)), 90% calc(100% - var(--cut) * .45),
    84% calc(100% - var(--cut) * .45), 81% calc(100% - var(--cut) * .8), 74% calc(100% - var(--cut) * .8),
    70% calc(100% - var(--cut) * .1), 63% calc(100% - var(--cut) * .1), 60% calc(100% - var(--cut) * .65),
    52% calc(100% - var(--cut) * .65), 49% calc(100% - var(--cut) * .3), 41% calc(100% - var(--cut) * .3),
    38% calc(100% - var(--cut)), 0 calc(100% - var(--cut)));
}
.hero h1 { font-size: var(--step-4); font-stretch: 66%; font-weight: 850; line-height: 0.95; max-width: 11ch; margin-bottom: 0.35em; letter-spacing: -0.015em; }
.hero .lead { max-width: 36em; }
.cities { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-stretch: 80%; font-weight: 700; font-size: var(--step-1); margin: 1.5rem 0; }
.cities span { border-bottom: 3px solid var(--asphalt); padding-bottom: 0.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 40rem) {
  .hero { --cut: 44px; }
  .hero-cta .btn { flex: 1 1 100%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.7rem 1.2rem; border-radius: var(--radius-s);
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; line-height: 1.1;
}
.btn-dark { background: var(--asphalt); color: var(--white); }
.btn-dark:hover { background: #000; }
.btn-outline { border-color: var(--asphalt); color: var(--asphalt); background: transparent; }
.btn-outline:hover { background: #00000010; }
.btn-ghost { border-color: var(--line); color: var(--asphalt); background: var(--white); }
.btn-ghost:hover { border-color: var(--asphalt); }
.btn-call { background: var(--yellow); color: var(--asphalt); border-color: var(--asphalt); font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn-call:hover { background: var(--yellow-deep); }
.row-btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.textlink { font-weight: 700; }

/* ---------- Listings: phone-book rows ---------- */
.listings { border-top: 2px solid var(--asphalt); }
.listing {
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 2rem; align-items: start;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
}
.listing-name { font-size: var(--step-1); font-stretch: 100%; margin-bottom: 0.25rem; }
.listing-where { display: flex; gap: 0.4rem; align-items: flex-start; color: var(--steel); margin-bottom: 0.4rem; }
.listing-where .ico { margin-top: 0.2em; }
.listing-services { max-width: 46em; margin-bottom: 0.6rem; }
.listing-actions { display: flex; flex-direction: column; gap: 0.5rem; min-width: 13rem; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag { font-size: 0.82rem; padding: 0.15rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.tag-spanish { border-color: var(--asphalt); font-weight: 700; }

.listing.is-sponsored { background: linear-gradient(90deg, #f5c40026, transparent 70%); border-left: 4px solid var(--yellow); padding-left: 1rem; }
.badges { display: inline-flex; gap: 0.4rem; margin: 0 0 0.35rem; }
.badge { font-size: 0.8rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: var(--radius-s); }
.badge-feat { background: var(--yellow); color: var(--asphalt); }
.badge-spon { background: var(--asphalt); color: var(--white); }

@media (max-width: 40rem) {
  .listing { grid-template-columns: 1fr; }
  .listing-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .listing-actions .btn { flex: 1 1 auto; }
  .listing-actions .btn-call { flex-basis: 100%; }
}

/* ---------- Tips ---------- */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 2.5rem; margin-top: 1.5rem; }
.tip .ico-lg { color: var(--asphalt); margin-bottom: 0.75rem; }
.tip h3 { font-size: 1.12rem; }
.tip p { color: var(--steel); }

/* ---------- Blog lists ---------- */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 2.25rem 2.5rem; margin-top: 1.25rem; }
.post-item { border-top: 4px solid var(--asphalt); padding-top: 1rem; }
.post-item h3 { font-size: 1.3rem; font-stretch: 90%; }
.post-item h3 a { color: var(--asphalt); text-decoration: none; }
.post-item h3 a:hover { text-decoration: underline; }
.post-meta { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; font-size: var(--step--1); margin-bottom: 0.5rem; }
.post-meta .cat { color: var(--steel); }
.post-foot { font-size: var(--step--1); color: var(--steel); }
.cat-filter { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cat-filter a { display: inline-block; padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--asphalt); background: var(--white); }
.cat-filter a[aria-current="page"] { background: var(--asphalt); color: var(--white); border-color: var(--asphalt); }

/* ---------- Page heads ---------- */
.page-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 2.25rem 0 2rem; }
.crumbs { font-size: var(--step--1); color: var(--steel); margin-bottom: 1rem; }
.crumbs a { color: var(--steel); }

/* ---------- Article ---------- */
.article-head h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); font-stretch: 72%; }
.spon-note { display: flex; gap: 0.5rem; align-items: center; background: var(--paper); border-left: 4px solid var(--yellow); padding: 0.6rem 0.9rem; font-size: var(--step--1); margin-top: 1rem; }
.prose { padding-block: 2.5rem; font-size: 1.1rem; line-height: 1.65; }
.prose h2 { margin-top: 2.2rem; font-size: 1.6rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.5rem 0; padding: 0.4rem 0 0.4rem 1.2rem; border-left: 4px solid var(--yellow); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.98rem; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--asphalt); }
.prose .callout { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--yellow); border-radius: var(--radius-s); padding: 1rem 1.2rem; margin: 1.5rem 0; }
.prose .callout p:last-child { margin-bottom: 0; }
.sponsor-box { background: var(--white); border: 2px solid var(--asphalt); border-radius: var(--radius-m); padding: 1.5rem; box-shadow: 8px 8px 0 var(--yellow); margin-bottom: 3rem; }
.sponsor-name { font-size: var(--step-2); font-weight: 850; font-stretch: 80%; margin-bottom: 0.4rem; }

/* ---------- Bands, owner box ---------- */
.band { background: var(--asphalt); color: var(--white); padding: 3rem 0; }
.band-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.band p { color: #d8dbe0; max-width: 40em; margin: 0; }
.band .btn-dark { background: var(--yellow); color: var(--asphalt); }
.owner-box { border-top: 2px solid var(--asphalt); }

/* ---------- Forms ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (max-width: 52rem) { .contact-grid { grid-template-columns: 1fr; } }
.form-narrow { max-width: var(--narrow); }
.form { display: grid; gap: 0.35rem; }
.form label { font-weight: 700; margin-top: 0.8rem; }
.form .req { font-weight: 400; color: var(--steel); font-size: var(--step--1); }
.form input, .form select, .form textarea {
  font: inherit; width: 100%; padding: 0.75rem 0.85rem; border: 1.5px solid #b9beb4; border-radius: var(--radius-s); background: var(--white); color: var(--asphalt);
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--asphalt); outline: 3px solid #f5c40099; outline-offset: 0; }
.form button { justify-self: start; margin-top: 0.8rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--radius-s); font-weight: 600; }
.notice .ico { margin-top: 0.15em; }
.notice-ok { background: #e3f3e9; color: var(--ok); border: 1px solid #b6dcc4; }
.notice-err { background: #fbe9e7; color: var(--err); border: 1px solid #f0c1bc; }
.emails { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.5rem; }
.emails dl { margin: 0; }
.emails dt { font-size: var(--step--1); color: var(--steel); margin-top: 1rem; }
.emails dt:first-child { margin-top: 0; }
.emails dd { margin: 0.2rem 0 0; }
.emails a { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer { background: #1b1e22; color: #c9cdd3; padding: 3rem 0 2rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem 3rem; }
.site-footer a { color: var(--white); }
.brand-foot { color: var(--white); margin-bottom: 0.75rem; }
.foot-links { list-style: none; padding: 0; margin: 0; columns: 2; }
.foot-links li { margin-bottom: 0.5rem; }
.disclosure, .copy { grid-column: 1 / -1; font-size: var(--step--1); margin: 0; color: #a3a9b1; max-width: 60em; }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .js .loader .wa path { animation: none; stroke-dashoffset: 0; }
  .js .loader .key, .js .loader .tc-dot { animation: none; opacity: 1; }
  .js .loader .tc-ring { animation: none; }
  .loader { transition: none; }
}

/* ---------- Illustrations and photos ---------- */
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 2rem; align-items: center; }
.hero-art { width: 100%; height: auto; }
@media (max-width: 54rem) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 26rem; justify-self: center; order: -1; margin-bottom: -0.5rem; }
}
.post-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-s); margin: 0 0 0.9rem; background: var(--line); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.post-cover:hover img { transform: scale(1.03); }
.post-item { border-top: 0; padding-top: 0; }
.post-item .post-meta { border-top: 4px solid var(--asphalt); padding-top: 0.6rem; min-height: 2.4rem; }
.article-cover { margin-top: 2rem; margin-bottom: 0; }
.article-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-m); }
.prose figure { margin: 2rem 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-m); }
.prose figure img { width: 100%; }
.prose figcaption { font-size: var(--step--1); color: var(--steel); margin-top: 0.5rem; }
.prose figcaption:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .post-cover img { transition: none; } }

/* Loader desactivado. Para volver a activarlo, borra la siguiente línea. */
.loader { display: none !important; }