/* KRATON · sitio one-page */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0100-02AF; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --grafito: #1C1D1F; --grafito-2: #26272A; --cobre: #B5562B; --cobre-claro: #E7A27F;
  --hueso: #F3F1EC; --hueso-txt: #EEEAE2; --piedra: #8A8780; --arena: #E4DFD5;
  --muted-dark: #B8B4AB; --muted-light: #5E5C57; --body: #2E2E2E;
  --wrap: 1200px; --pad: clamp(16px, 4vw, 40px);
  --display: "Archivo", system-ui, sans-serif; --mono: "Plex Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--hueso); color: var(--body); font-family: var(--display); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--cobre); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cobre-claro); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; font-stretch: 125%; text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; margin: 0; color: var(--grafito); }
h2 { font-size: clamp(30px, 4.2vw, 48px); }
h3 { font-size: 19px; font-stretch: 112%; }
.label, .kicker { font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--cobre); margin: 0 0 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; font-family: var(--display); font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-cobre { background: var(--cobre); color: #fff; }
.btn-cobre:hover { background: #9E4A24; }
.btn-ghost { border-color: rgba(238,234,226,.5); color: var(--hueso-txt); }
.btn-ghost:hover { border-color: var(--hueso-txt); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(28,29,31,.94); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(238,234,226,.08); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) { color: var(--hueso-txt); text-decoration: none; font-size: 15px; }
.nav a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--hueso-txt); margin: 5px 0; }

/* Hero */
.hero { position: relative; background: var(--grafito); color: var(--hueso-txt); overflow: hidden; padding: clamp(96px, 14vw, 180px) 0 clamp(120px, 14vw, 190px); }
.hero-tex { position: absolute; inset: 0; background: url("../img/textura-curvas.svg") center / cover no-repeat; }
.hero-inner { position: relative; }
.hero h1 { color: var(--hueso-txt); font-size: clamp(44px, 8.4vw, 108px); line-height: .98; }
.hero .lead { max-width: 560px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted-dark); margin: 28px 0 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.strata { display: flex; flex-direction: column; gap: 5px; position: absolute; left: 0; right: 0; bottom: 0; }
.strata i { display: block; }
.strata i:nth-child(1) { height: 4px; width: 50%; background: #3A3B3E; }
.strata i:nth-child(2) { height: 8px; width: 68%; background: #55565A; }
.strata i:nth-child(3) { height: 14px; width: 86%; background: var(--piedra); }
.strata i:nth-child(4) { height: 26px; background: var(--cobre); }

/* Sections */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.intro { font-size: 19px; color: var(--muted-light); margin: 18px 0 0; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { background: #fff; padding: 28px 26px 30px; border-top: 4px solid var(--grafito); box-shadow: inset 0 0 0 1px #E4E0D7; }
.card-cobre { border-top-color: var(--cobre); }
.card .num { font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--cobre); letter-spacing: .12em; }
.card h3 { margin: 12px 0 18px; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { font-size: 15.5px; line-height: 1.45; padding: 9px 0; border-top: 1px solid #ECE8E0; }

.metodo { background: var(--grafito); color: var(--muted-dark); }
.metodo h2, .metodo h3 { color: var(--hueso-txt); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { padding: 28px 28px 8px 0; border-top: 1px solid rgba(238,234,226,.18); }
.steps .mono { color: var(--cobre-claro); font-size: 14px; }
.steps h3 { margin: 14px 0 10px; }
.steps p { margin: 0; font-size: 16px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.nosotros h2 { margin-bottom: 22px; }
.placeholder { background: #FFF6D6; color: #5A4A10; padding: 10px 14px; font-size: 15px; }
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.values li { padding: 22px 0; border-top: 2px solid var(--grafito); }
.values li:nth-child(4) { border-top-color: var(--cobre); }
.values p { margin: 8px 0 0; font-size: 15.5px; color: var(--muted-light); }

.contacto { background: var(--arena); }
.contact-data { margin: 32px 0 0; display: grid; gap: 16px; }
.contact-data div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; border-top: 1px solid #CFC9BD; padding-top: 14px; }
.contact-data dt { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); }
.contact-data dd { margin: 0; font-weight: 600; color: var(--grafito); }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; background: #fff; padding: clamp(22px, 3vw, 36px); }
.field { display: flex; flex-direction: column; gap: 6px; }
.full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--grafito); background: var(--hueso); border: 1.5px solid #D6D1C6; padding: 12px 14px; min-height: 48px; border-radius: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--grafito); outline: none; }
.field [aria-invalid="true"] { border-color: #B3261E; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.status { margin: 0; font-size: 15px; }
.status.ok { color: #2E6B45; } .status.err { color: #B3261E; }

/* Footer */
.site-footer { position: relative; background: var(--grafito); color: var(--muted-dark); padding: 56px 0 96px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row img { width: 130px; height: auto; }
.footer-row p { margin: 0; font-size: 14px; }
.footer-row .mono { letter-spacing: .14em; text-transform: uppercase; font-size: 12.5px; }
.footer-row a { color: var(--hueso-txt); }

/* Responsive */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--grafito); padding: 8px var(--pad) 20px; border-bottom: 1px solid rgba(238,234,226,.1); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(238,234,226,.08); }
  .nav .btn { margin-top: 14px; }
  .cards, .steps, .two-col, .values, .form { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding-right: 0; }
  .contact-data div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ───────── Interacción y movimiento ───────── */
:root { --ease: cubic-bezier(.2,.7,.1,1); }

/* Header compacto al hacer scroll + subrayado animado */
.site-header { transition: background .3s, box-shadow .3s; }
.header-row { transition: height .3s var(--ease); }
.site-header.scrolled { background: rgba(22,23,25,.97); box-shadow: 0 1px 0 rgba(181,86,43,.45); }
.site-header.scrolled .header-row { height: 60px; }
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--cobre); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); transform-origin: left; }

/* Botones: relleno de estratos + flecha */
.btn { position: relative; overflow: hidden; isolation: isolate; gap: 10px; }
.btn .arr { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-ghost:hover .arr { transform: translateY(3px); }
.btn .fill { position: absolute; inset: 0; z-index: -1; display: flex; flex-direction: column; pointer-events: none; }
.btn .fill b { flex: 1; background: var(--grafito); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.btn .fill b:nth-child(1) { flex: .8; transition-delay: 0s; }
.btn .fill b:nth-child(2) { flex: 1; transition-delay: .06s; }
.btn .fill b:nth-child(3) { flex: 1.3; transition-delay: .12s; }
.btn-cobre:hover { background: var(--cobre); }
.btn-cobre:hover .fill b { transform: scaleX(1); }
.hero .btn-cobre .fill b, .metodo .btn-cobre .fill b, .site-header .btn-cobre .fill b { background: #0F1011; }
.contacto .btn-cobre .fill b { background: var(--grafito); }
.btn-ghost::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hueso-txt); transform: translateY(101%); transition: transform .4s var(--ease); }
.btn-ghost:hover { color: var(--grafito); border-color: var(--hueso-txt); }
.btn-ghost:hover::before { transform: translateY(0); }
.btn:active { transform: translateY(1px); }

/* Hero: curvas que se dibujan, pulso cobre, escaneo y retícula */
.hero-tex { background: none; transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.06); transition: transform .9s var(--ease); }
.hero-tex svg { width: 100%; height: 100%; display: block; }
.hero-tex .cl, .hero-tex .cu { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + .2s); }
.hero-tex .cu { animation-delay: 1.2s; animation-duration: 3s; }
.hero-tex .cu-pulse { stroke-dasharray: 70 930; stroke-dashoffset: 1000; opacity: 0; animation: pulse 7s linear 3.4s infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0% { stroke-dashoffset: 1000; opacity: 0; } 8% { opacity: .9; } 70% { opacity: .9; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.scan { position: absolute; top: 0; bottom: 0; width: 120px; left: 38%; background: linear-gradient(90deg, rgba(231,162,127,0), rgba(231,162,127,.04) 70%, rgba(231,162,127,.22) 99%, rgba(231,162,127,0)); animation: scan 9s ease-in-out 2.5s infinite; pointer-events: none; opacity: 0; }
@keyframes scan { 0% { transform: translateX(0); opacity: 0; } 8% { opacity: 1; } 55% { opacity: 1; } 62%, 100% { transform: translateX(65vw); opacity: 0; } }
.reticle { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 1; }
.hero:hover .reticle.live { opacity: 1; }
.reticle .rx, .reticle .ry { position: absolute; background: rgba(231,162,127,.55); }
.reticle .rx { width: 44px; height: 1px; left: -22px; top: 0; }
.reticle .ry { width: 1px; height: 44px; left: 0; top: -22px; }
.reticle .ring { position: absolute; width: 26px; height: 26px; left: -13px; top: -13px; border: 1px solid rgba(231,162,127,.7); border-radius: 50%; }
.reticle .coords { position: absolute; left: 20px; top: 14px; white-space: nowrap; font-size: 11px; letter-spacing: .08em; color: var(--cobre-claro); }
.hero .strata i { transform: scaleX(0); transform-origin: left; animation: grow 1.1s var(--ease) forwards; }
.hero .strata i:nth-child(1) { animation-delay: .9s; } .hero .strata i:nth-child(2) { animation-delay: 1s; }
.hero .strata i:nth-child(3) { animation-delay: 1.1s; } .hero .strata i:nth-child(4) { animation-delay: 1.2s; }
@keyframes grow { to { transform: scaleX(1); } }

/* Titular por líneas */
.split .line { display: block; overflow: hidden; padding-bottom: .04em; }
.split .line > span { display: block; transform: translateY(105%); animation: rise 1s var(--ease) forwards; }
.split .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { to { transform: translateY(0); } }

/* Aparición al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .stagger > * { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .stagger.in > * { opacity: 1; transform: none; }
.hero .reveal { transition-delay: .45s; }
.hero .actions.reveal { transition-delay: .6s; }

/* Cinta de servicios */
.marquee { background: var(--cobre); color: #fff; overflow: hidden; border-top: 1px solid #9E4A24; }
.marquee .track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { font-family: var(--display); font-weight: 800; font-stretch: 118%; text-transform: uppercase; font-size: 15px; letter-spacing: .06em; padding: 16px 0; white-space: nowrap; display: flex; align-items: center; }
.marquee span::after { content: ""; width: 8px; height: 8px; margin: 0 26px; background: var(--grafito); transform: rotate(45deg); }
.marquee:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Tarjetas de servicio */
.card { position: relative; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.card::before { content: ""; position: absolute; left: 0; top: -4px; height: 4px; width: 100%; background: var(--cobre); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.card::after { content: ""; position: absolute; left: 0; right: 0; height: 60px; top: -70px; background: linear-gradient(180deg, rgba(181,86,43,0), rgba(181,86,43,.10) 85%, rgba(181,86,43,.5)); pointer-events: none; }
.card:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px #E4E0D7, 0 22px 40px -22px rgba(28,29,31,.35); }
.card:hover::before { transform: scaleX(1); }
.card:hover::after { animation: cardscan 1.3s var(--ease); }
@keyframes cardscan { from { top: -70px; } to { top: 100%; } }
.card li { transition: padding-left .3s var(--ease), color .3s; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: 50%; width: 0; height: 2px; background: var(--cobre); transition: width .3s var(--ease); }
.card li:hover { padding-left: 16px; color: var(--grafito); }
.card li:hover::before { width: 9px; }
.card .num { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 1.5px solid var(--cobre); transition: background .3s, color .3s; }
.card:hover .num { background: var(--cobre); color: #fff; }

/* Método: barra de avance */
.steps { position: relative; }
.steps::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: calc(var(--progress, 0) * 100%); background: var(--cobre); transition: width .2s linear; z-index: 1; }
.steps li { position: relative; transition: border-color .4s; }
.steps li::before { content: ""; position: absolute; left: 0; top: -6px; width: 11px; height: 11px; background: var(--grafito); border: 2px solid rgba(238,234,226,.35); transform: rotate(45deg); transition: background .4s, border-color .4s; z-index: 2; }
.steps li.on::before { background: var(--cobre); border-color: var(--cobre); }
.steps li .mono { transition: color .4s; }
.steps li.on .mono { color: #fff; }

/* Valores */
.values li { transition: border-color .35s, transform .35s var(--ease); }
.values li:hover { border-top-color: var(--cobre); transform: translateX(6px); }

/* Formulario */
.field input, .field select, .field textarea { transition: border-color .25s, box-shadow .25s, background .25s; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; box-shadow: inset 0 -3px 0 var(--cobre); }
.btn[disabled] { opacity: .7; cursor: progress; }

@media (hover: none) { .reticle { display: none; } .card:hover { transform: none; } }
@media (max-width: 760px) { .nav a:not(.btn)::after { display: none; } .scan { width: 90px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .scan, .reticle, .hero-tex .cu-pulse { display: none; }
  .marquee .track { animation: none; }
}
.hero-tex.fallback { background: url("../img/textura-curvas.svg") center / cover no-repeat; }
.hero:has(.btn:hover) .reticle, .hero:has(a:focus-visible) .reticle { opacity: 0; }
.hero-inner { z-index: 2; }
