/* Base */
html { color-scheme: light; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Concepto: una llave real como protagonista. El código de corte de la llave (3-6-2-5-1-4) marca el ritmo de la página;
   dos servicios en paralelo (hogar / automotriz) y un solo teléfono.
   Colores de taller de cerrajería: grafito, acero y latón. */
:root {
  --bg: #F1EFEB;
  --surface: #FAF9F6;
  --fg: #1B1E21;
  --muted: #565B60;
  --line: #D7D3CB;
  --accent: #8A6014;        /* latón oscuro: botones y detalles con texto */
  --accent-fg: #FFFFFF;
  --brass: #B5842A;         /* latón: la cabeza de la llave y los adornos */
  --steel: #B4BABE;
  --panel: #1B1E21;
  --panel-fg: #EEEBE6;
  --panel-muted: #A9A6A0;
  --font-display: 'Archivo', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121416;
    --surface: #1A1D20;
    --fg: #ECEAE6;
    --muted: #A5A39E;
    --line: #2D3135;
    --accent: #D4A24C;
    --accent-fg: #1B1E21;
    --brass: #D4A24C;
    --steel: #5E666C;
    --panel: #1A1D20;
    --panel-fg: #ECEAE6;
    --panel-muted: #A5A39E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121416;
  --surface: #1A1D20;
  --fg: #ECEAE6;
  --muted: #A5A39E;
  --line: #2D3135;
  --accent: #D4A24C;
  --accent-fg: #1B1E21;
  --brass: #D4A24C;
  --steel: #5E666C;
  --panel: #1A1D20;
  --panel-fg: #ECEAE6;
  --panel-muted: #A5A39E;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 14px; }
.skip:focus { left: 8px; }

/* Cabecera fija */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.top-bar.scrolled { border-bottom-color: var(--line); }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}
.mark {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 850;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
}
.mark span { color: var(--brass); }
.nav { display: none; gap: 28px; margin-left: auto; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.nav a:hover { color: var(--accent); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  font: 600 1rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-tel { padding: 0 16px; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.02em; }
.btn-tel svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (max-width: 420px) { .btn-tel span { display: none; } .btn-tel { padding: 0 14px; } .btn-tel::after { content: "Llamar"; font-family: var(--font-body); font-weight: 600; } }
@media (min-width: 900px) { .nav { display: flex; } }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-block: 40px 56px;
  align-items: center;
}
.hero > * { min-width: 0; }
.hero h1 {
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 800;
  font-size: clamp(2.5rem, 7.2vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 22px; max-width: 34em; color: var(--muted); font-size: 1.1rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.key { width: 100%; max-width: 760px; height: auto; display: block; }
.key text { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); letter-spacing: 0.1em; }
.key .cut-label { font-size: 15px; fill: var(--fg); font-weight: 500; }
.key .guides { stroke: var(--line); }
.key .k-brass { fill: var(--brass); stroke: var(--fg); }
.key .k-hole { fill: var(--bg); stroke: var(--fg); }
.key .k-steel { fill: var(--steel); stroke: var(--fg); }
.key .k-ring { stroke: var(--fg); stroke-opacity: 0.35; }
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 56px; padding-block: 64px 80px; }
}

/* Situaciones: cada una abre WhatsApp con el mensaje ya escrito */
.situations {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.sit-list {
  list-style: none;
  margin: 0;
  padding-block: 18px;
  padding-inline: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 4px 28px;
}
.sit-list li { min-width: 0; }
.sit-list a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding-block: 6px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}
.sit-list a::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--brass);
  transform: translateY(-1px);
}
.sit-list a::after { content: "→"; color: var(--muted); margin-left: auto; transition: transform .15s ease; }
.sit-list a:hover { color: var(--accent); }
.sit-list a:hover::after { transform: translateX(3px); color: var(--accent); }

/* Servicios */
.section { padding-block: 72px; }
.eyebrow { color: var(--accent); margin-bottom: 14px; }
.section h2 {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 18em;
}
.sub { margin-top: 12px; color: var(--muted); }
.services {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.service { min-width: 0; }
.service h3 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.9rem;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--fg);
}
.service h3 .mono { color: var(--muted); font-weight: 500; font-family: var(--font-mono); font-stretch: 100%; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
.rows b { font-weight: 650; }
.rows span { color: var(--muted); font-size: 0.98rem; }
@media (min-width: 560px) {
  .rows li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; }
}
@media (min-width: 960px) {
  .services { grid-template-columns: 1fr 1fr; gap: 64px; }
  .rows li { grid-template-columns: 1fr; gap: 2px; }
}

/* Trabajos: el mismo trabajo contado en tres fotos */
#trabajos { padding-top: 0; }
.works {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.works li { min-width: 0; }
.works figure { margin: 0; }
.works img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 2px solid var(--fg);
  border-radius: 4px;
  background: var(--surface);
}
.works figcaption { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }
.works figcaption .mono { display: block; color: var(--accent); margin-bottom: 2px; }

/* Proceso */
.process { background: var(--surface); border-block: 1px solid var(--line); }
.steps {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 32px 28px;
}
.steps li { border-top: 3px solid var(--fg); padding-top: 16px; min-width: 0; }
.steps .n { color: var(--accent); font-weight: 500; }
.steps h3 { font-family: var(--font-display); font-stretch: 105%; font-weight: 750; font-size: 1.25rem; margin: 8px 0; }
.steps p { color: var(--muted); font-size: 0.98rem; }

/* Zona de trabajo */
.zona { display: grid; grid-template-columns: 1fr; gap: 36px; }
.zona-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 28px;
  align-content: start;
}
.zona-list li {
  min-width: 0;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
}
.zona-list li:first-child b::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--brass);
  transform: translateY(-1px);
}
.zona-list b { font-family: var(--font-display); font-stretch: 105%; font-weight: 750; font-size: 1.2rem; }
.zona-list span { color: var(--muted); font-size: 0.98rem; }
@media (min-width: 960px) {
  .zona { grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: start; }
}

/* Contacto */
.contact { background: var(--panel); color: var(--panel-fg); }
.contact .section { display: grid; grid-template-columns: 1fr; gap: 36px; }
.contact .eyebrow { color: var(--brass); }
.contact h2 { max-width: 14em; }
.phone-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.phone {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.7rem, 6vw, 2.8rem);
  letter-spacing: 0.02em;
  color: var(--panel-fg);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.phone:hover { color: var(--brass); }
.contact .btn { background: var(--brass); color: #1B1E21; border-color: var(--brass); }
.contact .btn.ghost { background: transparent; color: var(--panel-fg); border-color: var(--panel-fg); }
.tell { color: var(--panel-muted); max-width: 32em; margin-top: 18px; }
.tell-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.tell-list li { padding-left: 20px; position: relative; color: var(--panel-fg); }
.tell-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: var(--brass); }
@media (min-width: 960px) {
  .contact .section { grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
}

.mail-row { margin-top: 22px; }
.email {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 3.6vw, 1.2rem);
  color: var(--panel-fg);
  text-decoration: none;
  overflow-wrap: anywhere;
  min-width: 0;
}
.email:hover { color: var(--brass); }

/* Pie */
.foot { padding-block: 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; color: var(--muted); font-size: 0.95rem; }
.foot .mark { font-size: 1.1rem; }

/* Barra rápida en el móvil */
.quickbar { display: none; }
@media (max-width: 700px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .quickbar {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 10px;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    padding: 10px max(16px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--panel);
    border-top: 1px solid var(--line);
    transform: translateY(110%);
    transition: transform .2s ease;
  }
  .quickbar.on { transform: none; }
  .quickbar .btn { background: var(--brass); color: #1B1E21; border-color: var(--brass); }
  .quickbar .btn.ghost { background: transparent; color: var(--panel-fg); border-color: var(--panel-fg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .quickbar, .sit-list a::after { transition: none; }
  .btn:hover { transform: none; }
}
