/* Prototipo 01 · Taller automotriz — Kinetik Web Lab
   Arquetipo 4 (Técnico / Ferrofluido). Paleta fijada por el CEO. */
@font-face { font-family: "Hanken Grotesk"; src: url(fonts/hanken-grotesk-latin.woff2) format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(fonts/geist-mono-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F4F4F1;
  --bg-2: #ECECE8;
  --ink: #111111;
  --ink-2: #525252;
  --line: #DCDCD8;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r-1: 12px;
  --r-2: 16px;
  --gut: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --sec: clamp(88px, 12vw, 168px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.small { font-size: 14px; color: var(--ink-2); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Grilla técnica de 1 px y lienzo */
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: grid; grid-template-columns: repeat(6, 1fr);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gut);
}
.grid-overlay i { border-left: 1px solid var(--line); opacity: .55; transform-origin: top; }
.grid-overlay i:last-child { border-right: 1px solid var(--line); }
#ferro { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease); }
#ferro.on { opacity: 1; }

/* Barra superior */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--gut); background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .tag { color: var(--ink-2); text-transform: uppercase; }
.brand { justify-self: center; display: inline-flex; align-items: center; gap: 10px; height: 22px; white-space: nowrap; text-decoration: none; color: var(--ink); font-size: 13px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500; }
.brand__mark { flex: none; display: block; width: 22px; height: 22px; }
.brand__word { line-height: 1; margin-right: -.28em; /* compensa el tracking final */ }
.sign { justify-self: start; display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--ink-2); font-size: 13px; text-decoration: none; transition: color .2s var(--ease); }
.sign:hover { color: var(--ink); }
.sign__mark { flex: none; display: block; width: 20px; height: 20px; }
.topbar .pill { justify-self: end; }

/* Botones píldora */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1px solid var(--ink);
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.pill--ink { background: var(--ink); color: var(--bg); }
.pill--ink:hover { background: #2A2A2A; }
.pill--line { background: transparent; color: var(--ink); }
.pill--line:hover { background: var(--ink); color: var(--bg); }
.pill--sm { min-height: 36px; padding: 0 16px; font-size: 13px; }
.pill:active { transform: scale(.98); }
.link { font-size: 15px; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

main, .foot { position: relative; z-index: 2; }
section { max-width: var(--max); margin: 0 auto; padding: var(--sec) var(--gut) 0; }

/* Hero */
.hero {
  min-height: 100svh; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  align-content: end; padding-top: 120px; padding-bottom: 56px;
}
.hero__text { grid-column: 1 / span 7; display: grid; gap: 28px; }
.hero__title {
  font-weight: 300; font-size: clamp(38px, 5.2vw, 80px); line-height: .98; letter-spacing: -0.035em;
  text-transform: uppercase;
}
.hero__title .h-line { display: block; }
.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 52ch; }
.hero__cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero__facts {
  grid-column: 1 / -1; margin-top: 72px; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.hero__facts > div { padding: 16px 16px 0 0; display: grid; gap: 4px; }
.hero__facts dd { font-size: 15px; }

/* Encabezados de sección */
.sec-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }
.sec-head h2 { font-weight: 300; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -0.025em; }

/* Planes: tarjetas asimétricas */
.plans { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 24px; align-items: start; }
.plan {
  display: grid; gap: 18px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-2);
  background: var(--bg);
}
.plan:nth-child(1) { grid-column: 1 / span 4; margin-top: 96px; }
.plan--main { grid-column: 5 / span 5; border-color: var(--ink); padding: 36px; }
.plan:nth-child(3) { grid-column: 10 / span 3; margin-top: 48px; }
.plan__code { color: var(--ink-2); text-transform: uppercase; }
.plan h3 { font-weight: 400; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -0.02em; line-height: 1.1; }
.plan--main h3 { font-size: clamp(28px, 2.8vw, 40px); }
.plan__for { color: var(--ink-2); font-size: 15px; }
.plan__list li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.plan__list li:last-child { border-bottom: 1px solid var(--line); }
.plan__price { color: var(--ink-2); }
.plan .pill { justify-self: start; }

/* Orden digital */
.orden__body { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px; align-items: start; }
.steps { grid-column: 1 / span 6; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 28px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n { color: var(--ink-2); padding-top: 6px; }
.step h3 { font-weight: 400; font-size: 22px; letter-spacing: -0.015em; margin-bottom: 8px; }
.step p { color: var(--ink-2); max-width: 46ch; }

.order {
  grid-column: 8 / span 4; position: sticky; top: 96px;
  border: 1px solid var(--line); border-radius: var(--r-2); padding: 22px; background: var(--bg);
  display: grid; gap: 16px;
}
.order__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.order__state { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); transition: all .25s var(--ease); }
.order__state.is-ok { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.order__car { font-size: 15px; }
.order__items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.order__items .mono { color: var(--ink-2); white-space: nowrap; }
.order__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph { aspect-ratio: 4 / 3; border-radius: var(--r-1); background: var(--bg-2); border: 1px solid var(--line); display: flex; align-items: end; padding: 10px; }
.ph .mono { font-size: 11px; color: var(--ink-2); }
.order__btn { width: 100%; }
.order__btn[disabled] { cursor: default; background: transparent; color: var(--ink); }
.order__note { color: var(--ink-2); font-size: 11px; }

/* Confianza */
.conf { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.conf__col { padding: 32px 32px 0 0; display: grid; gap: 14px; align-content: start; }
.conf__col + .conf__col { padding-left: 32px; border-left: 1px solid var(--line); }
.conf__col h3 { font-weight: 400; font-size: 22px; letter-spacing: -0.015em; }
.conf__col p { color: var(--ink-2); }
.conf__col .pill { justify-self: start; margin-top: 8px; }
.hours div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

.foot { max-width: var(--max); margin: var(--sec) auto 0; padding: 28px var(--gut) 40px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.foot .mono { color: var(--ink); }

/* Estado inicial de las entradas (solo con JS y sin reducción de movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .js .topbar, .js .h-line, .js .h-cta, .js .reveal { opacity: 0; }
  .js .grid-overlay i { transform: scaleY(0); }
}

/* Tablet */
@media (max-width: 1023px) {
  .hero__text { grid-column: 1 / span 9; }
  .plan:nth-child(1), .plan--main, .plan:nth-child(3) { margin-top: 0; }
  .plan:nth-child(1) { grid-column: 1 / span 6; }
  .plan--main { grid-column: 7 / span 6; grid-row: span 2; }
  .plan:nth-child(3) { grid-column: 1 / span 6; }
  .steps { grid-column: 1 / -1; }
  .order { grid-column: 3 / span 8; position: static; }
  .conf { grid-template-columns: 1fr 1fr; }
  .conf__col--cta { grid-column: 1 / -1; padding-left: 0 !important; border-left: 0 !important; border-top: 1px solid var(--line); margin-top: 32px; }
}

/* Escríbenos (WhatsApp): fijo, no afecta el layout (CLS 0) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wa { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30; display: grid; justify-items: end; gap: 12px; }
.wa-fab {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 16px; position: relative;
  background: #FFFFFF; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  font: 500 14px/1 var(--sans); box-shadow: 0 6px 24px rgba(17,17,17,.06);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.wa-fab:hover { border-color: var(--ink); }
.wa-fab[aria-expanded="true"] { border-color: var(--ink); }
.wa-ico { flex: none; display: block; }
.wa-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2E8B57; box-shadow: 0 0 0 3px rgba(46,139,87,.14); }
.wa-dot--fab { position: absolute; top: 9px; left: 30px; width: 7px; height: 7px; box-shadow: 0 0 0 2px #FFFFFF; }
.wa-panel {
  width: min(340px, calc(100vw - 32px)); background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-2);
  box-shadow: 0 18px 48px rgba(17,17,17,.10); overflow: hidden;
  transform-origin: bottom right; animation: wa-in .22s var(--ease);
}
.wa-panel[hidden] { display: none; }
@keyframes wa-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wa-panel__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 16px 16px 14px 18px; border-bottom: 1px solid var(--line); }
.wa-panel__title { font-weight: 500; font-size: 15px; line-height: 1.3; }
.wa-panel__sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.wa-close { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: border-color .2s var(--ease); }
.wa-close:hover { border-color: var(--ink); }
.wa-form { display: grid; gap: 12px; padding: 16px 18px 18px; }
.wa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-chip { font: 400 13px/1 var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.wa-chip:hover { border-color: var(--ink); }
.wa-chip[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.wa-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.wa-text { width: 100%; resize: none; font: 400 16px/1.45 var(--sans); color: var(--ink); background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-1); padding: 10px 12px; }
.wa-text:focus { outline: none; border-color: var(--ink); }
.wa-send { width: 100%; gap: 10px; min-height: 46px; }
@media (prefers-reduced-motion: reduce) { .wa-panel { animation: none; } }

/* Móvil */
@media (max-width: 767px) {
  .grid-overlay { grid-template-columns: repeat(3, 1fr); }
  .grid-overlay i:nth-child(n+4) { display: none; }
  .grid-overlay i:nth-child(3) { border-right: 1px solid var(--line); }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar .tag { display: none; }
  .brand { justify-self: start; letter-spacing: .2em; font-size: 12px; }
  .hero { padding-top: 46svh; min-height: auto; }
  .hero__text { grid-column: 1 / -1; gap: 22px; }
  .hero__facts { margin-top: 48px; grid-template-columns: 1fr; }
  .hero__facts > div { padding: 12px 0; border-bottom: 1px solid var(--line); grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan:nth-child(1), .plan--main, .plan:nth-child(3) { grid-column: 1; grid-row: auto; }
  .plan--main { order: -1; padding: 28px; }
  .plan { padding: 24px; }
  .plan .pill, .conf__col .pill { width: 100%; }
  .orden__body { grid-template-columns: 1fr; }
  .steps, .order { grid-column: 1; }
  .conf { grid-template-columns: 1fr; }
  .conf__col, .conf__col + .conf__col { padding: 28px 0 0; border-left: 0; }
  .conf__col + .conf__col { border-top: 1px solid var(--line); margin-top: 28px; }
  .wa-fab { width: 48px; padding: 0; justify-content: center; }
  .wa-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wa-dot--fab { top: 8px; left: auto; right: 9px; }
}
