/* JC Studio - sistema de diseño "Taller"
   Fondo blanco, arena solo como nota (etiquetas, líneas, fondos suaves), tinta casi negra para texto y botones.
   Geist para todo el texto y Geist Mono para los datos (precios, medidas, números). Radio de 8px.
   Motivo propio: las líneas de capa de la impresión 3D. */

@font-face { font-family: "Geist"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../fonts/geist-vf.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../fonts/geistmono-vf.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --tint: #f7f3ec;
  --sand: #e9dfcd;
  --sand-deep: #cdb995;
  --text: #1c1a17;
  --muted: #615b53;
  --line: #e8e3da;
  --line-strong: #cfc8ba;
  --accent: #8a6f45;
  --accent-ink: #ffffff;
  --accent-soft: #f7f3ec;
  --danger: #a1403a;
  --r: 8px;
  --shadow: 0 1px 2px rgb(28 26 23 / 0.05), 0 14px 30px -18px rgb(28 26 23 / 0.22);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font);
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1200px;
  --gutter: 20px;
  --layers: repeating-linear-gradient(0deg, rgb(138 111 69 / 0.3) 0 1px, transparent 1px 6px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text);
  font-family: var(--font); font-size: 1rem; line-height: 1.6;
  background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--sand); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: var(--r); z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3, .brand { font-family: var(--font-display); }
.mono, .price, .code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.035em; line-height: 1.06; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5vw + 0.5rem, 4.5rem); letter-spacing: -0.04em; line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 2.4vw + 0.9rem, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 50ch; }
.prose { max-width: 62ch; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.accent { color: var(--accent); }
.eyebrow { font-size: 0.8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 24px; height: 7px; background: var(--layers); background-color: var(--sand); }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { position: relative; display: inline-block; line-height: 1; font-weight: 600; letter-spacing: -0.035em; font-size: 1.3rem; text-decoration: none; white-space: nowrap; padding-bottom: 9px; }
.brand-jc { position: relative; }
.brand-jc::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; margin-top: 3px; height: 8px; background: linear-gradient(var(--sand-deep), var(--sand-deep)) 0 0 / 100% 2px no-repeat, linear-gradient(var(--sand-deep), var(--sand-deep)) 0 3px / 76% 2px no-repeat, linear-gradient(var(--sand-deep), var(--sand-deep)) 0 6px / 52% 2px no-repeat; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 0.92rem; color: var(--muted); transition: color 0.2s; position: relative; padding-block: 6px; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--sand-deep); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { padding: 11px 18px; font-size: 0.92rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px; color: var(--text); font: inherit; cursor: pointer; }
.menu-cta { display: none; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--r); border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: 0.95rem; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #3b3732; }
.btn-quiet { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--text); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.link-arrow { text-decoration: none; font-weight: 500; border-bottom: 2px solid var(--sand-deep); padding-bottom: 2px; transition: border-color 0.2s; }
.link-arrow:hover { border-color: var(--text); }

/* Secciones */
.section { padding-block: clamp(56px, 7vw, 96px); }
.section-tight { padding-block: clamp(32px, 4vw, 56px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 48px); }

/* Inicio: hero */
.hero { position: relative; padding-block: clamp(32px, 5vw, 64px) clamp(48px, 7vw, 96px); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1fr; align-items: center; min-height: min(520px, calc(100dvh - 140px)); }
.hero-copy { display: grid; gap: 28px; justify-items: start; max-width: 880px; }
.hero-copy h1 { font-size: clamp(2.75rem, 7vw + 0.25rem, 5.75rem); }
.hero-copy .lede { font-size: clamp(1.1rem, 1vw + 0.9rem, 1.3rem); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.band-specs { margin: 0; display: grid; font-size: 0.88rem; }
.band-specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.band-specs dt { color: var(--muted); }
.band-specs dd { margin: 0; text-align: right; }

/* Franja de garantías */
.assure { border-block: 1px solid var(--line); background: var(--surface); }
.assure ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.assure li { padding: 26px 24px; display: grid; gap: 2px; }
.assure li + li { border-left: 1px solid var(--line); }
.assure strong { font-weight: 500; font-size: 1rem; }
.assure span { color: var(--muted); font-size: 0.92rem; }

/* Hueco de foto de producto hasta que exista la foto de estudio: solo la textura de capas, sin rótulo */
.ph {
  position: relative; display: grid; overflow: hidden;
  background: var(--tint);
  border-radius: calc(var(--r) - 2px); aspect-ratio: 1 / 1;
}
.ph::before { content: ""; position: absolute; inset: 0; background: var(--layers); -webkit-mask: linear-gradient(to top, #000, transparent 75%); mask: linear-gradient(to top, #000, transparent 75%); }
.ph-tall { aspect-ratio: 4 / 5; }
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r) - 2px); aspect-ratio: 1 / 1; background: var(--tint); }

/* Tres caminos: composición asimétrica */
.paths { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.path { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: clamp(26px, 3vw, 40px); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.2s; }
.path:hover { border-color: var(--text); }
.path p { color: var(--muted); max-width: 40ch; margin-top: 8px; }
.path .go { font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.path .go::after { content: "\2192"; transition: transform 0.2s var(--ease); }
.path:hover .go::after { transform: translateX(3px); }
.path-main { grid-row: span 2; min-height: 380px; border-color: var(--line); background: var(--tint); }
.path-main::before { content: ""; position: absolute; inset: 0; background: var(--layers); -webkit-mask: linear-gradient(to top, #000, transparent 70%); mask: linear-gradient(to top, #000, transparent 70%); }
.path-main > * { position: relative; }
.path-main p { color: var(--muted); }

/* Catálogo */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip { padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product { display: grid; gap: 14px; text-decoration: none; align-content: start; padding: 10px 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color 0.2s; }
.product:hover { border-color: var(--text); }
.product h3, .product .meta { padding-inline: 6px; }
.product h3 { font-size: 1rem; font-weight: 500; letter-spacing: -0.015em; }
.product .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--muted); font-size: 0.9rem; }
.price { color: var(--text); font-weight: 500; }
.empty { padding: 56px 0; color: var(--muted); }

/* Galería de la ficha de producto */
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.thumb { padding: 0; border: 1px solid var(--line); background: var(--surface); border-radius: calc(var(--r) - 2px); width: 72px; height: 72px; overflow: hidden; cursor: pointer; }
.thumb[aria-pressed="true"] { border-color: var(--text); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* Destacados: pasarela horizontal con scroll-snap */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px); gap: 20px; overflow-x: auto; scroll-snap-type: x proximity; padding: 6px 4px 22px; margin-inline: -4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.rail > * { scroll-snap-align: start; }

/* Materiales */
.materials { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.material { position: relative; overflow: hidden; padding: clamp(24px, 3vw, 36px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; align-content: space-between; min-height: 200px; }
.material > * { position: relative; z-index: 1; }
.material p { color: var(--muted); max-width: 30ch; }
.material .tag { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); background: var(--tint); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; justify-self: start; }

/* Utilidades (sin estilos en línea, para poder usar una CSP estricta) */
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-20 { margin-top: 20px; }
.page-top { padding-top: clamp(40px, 6vw, 80px); }
.foot-about { margin-top: 12px; max-width: 34ch; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset > legend { padding: 0; margin-bottom: 8px; font-weight: 500; font-size: 0.95rem; }
.min-96 { min-height: 96px; }
.min-180 { min-height: 180px; }
.stack-28 { display: grid; gap: 28px; }
.stack-12 { display: grid; gap: 12px; }
.stack-18 { display: grid; gap: 18px; }
.title-product { font-size: clamp(2rem, 3.4vw + 0.6rem, 3rem); }
.price-lg { font-size: 1.4rem; }

/* Cómo funciona: recorrido */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.steps { counter-reset: step; }
.steps::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-strong); }
.step { padding: 20px 28px 0 0; display: grid; gap: 8px; align-content: start; position: relative; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); background: var(--sand); border-radius: 4px; padding: 2px 8px; justify-self: start; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.97rem; }

/* Banda para empresas */
.band { position: relative; overflow: hidden; background: var(--tint); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.band p { color: var(--muted); margin-top: 14px; max-width: 46ch; }
.band-specs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 18px; }
.band-specs > div:first-child { border-top: 0; }

/* Formularios */
.form-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.form { display: grid; gap: 22px; padding: clamp(22px, 3vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); }
.field { display: grid; gap: 8px; }
.field > label, .field > legend { font-weight: 500; font-size: 0.95rem; }
.help { font-size: 0.85rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid #8c8374; border-radius: var(--r); padding: 13px 14px; min-height: 48px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.textarea { min-height: 140px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 0.85; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field[data-invalid] .input, .field[data-invalid] .select, .field[data-invalid] .textarea { border-color: var(--danger); }
.error { color: var(--danger); font-size: 0.87rem; min-height: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dropzone { display: block; border: 1px dashed #8c8374; border-radius: var(--r); padding: 30px; text-align: center; background: var(--bg); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .help { margin-top: 6px; }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); }
.checkbox input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 18px 20px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--line); display: none; }
.notice.show { display: block; }
.notice p + p { margin-top: 8px; }
.code { font-size: 0.88rem; word-break: break-all; }
.notice.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.side { display: grid; gap: 18px; align-content: start; position: sticky; top: 100px; }
.side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--muted); }
.side li { padding-left: 22px; position: relative; }
.side li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 12px; height: 1px; background: var(--accent); box-shadow: 0 3px 0 var(--accent), 0 -3px 0 var(--accent); opacity: 0.6; }

/* Seguimiento */
.track-form { max-width: 560px; }
.track-result { margin-top: 40px; display: grid; gap: 14px; max-width: 560px; }
.timeline { list-style: none; margin: 18px 0 0; padding: 0 0 0 22px; border-left: 1px solid var(--line-strong); display: grid; gap: 22px; }
.timeline li { position: relative; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); }
.timeline time { color: var(--muted); font-size: 0.88rem; }

/* Envíos */
.ship-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; }
.ship-card { padding: clamp(24px, 3vw, 36px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 8px; }
.ship-card-accent { background: var(--tint); }
.ship-price { font-family: var(--font-mono); font-size: clamp(1.9rem, 3vw + 0.5rem, 2.7rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.shipnote { font-size: 0.92rem; color: var(--muted); padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); }
@media (max-width: 560px) { .ship-grid { grid-template-columns: 1fr; } }

/* Pie */
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--tint); padding-block: 48px 32px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 8px; }
.foot-grid ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--muted); }
.foot-grid a:hover { color: var(--text); }
.foot-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: 0.85rem; }

/* Movimiento: aparición suave al entrar, respetando preferencias */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

/* Adaptación */
@media (max-width: 1040px) {
  .nav-cta { display: none; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .paths { grid-template-columns: 1fr; }
  .path-main { grid-row: auto; min-height: 260px; }
  .grid-products { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .steps::before { display: none; }
  .materials { grid-template-columns: 1fr; }
  .band, .form-wrap, .foot-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .assure ul { grid-template-columns: 1fr; }
  .assure li + li { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 0; font-size: 1.05rem; }
  .nav-links a::after { display: none; }
  .row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid-products { gap: 12px; }
  .product { padding: 8px 8px 14px; }
  .steps { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-actions { width: 100%; }
}
