/* ============================================================
   Kraftek — hoja de estilos
   Paleta de marca: azul marino + naranja + crema (del logo)
   ============================================================ */

:root {
  /* Marca */
  --navy: #0d3b54;
  --navy-deep: #0a2c3f;
  --navy-700: #12455f;
  --orange: #f08e1e;
  --orange-dark: #d97a0c;
  --cream: #efece3;
  --cream-light: #f6f4ec;
  --paper: #ffffff;

  /* Texto */
  --text: #142730;
  --muted: #5b6a72;
  --muted-light: #aebcc2;

  /* Sistema */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(13, 59, 84, .06);
  --shadow: 0 14px 40px rgba(13, 59, 84, .10);
  --shadow-lg: 0 28px 60px rgba(13, 59, 84, .16);
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* ------------------------- Reset ------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--navy);
  font-weight: 700;
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* ------------------------- Botones ------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s;
  white-space: nowrap;
}
.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--orange); color: #3a2300; box-shadow: 0 8px 20px rgba(240, 142, 30, .35); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(240, 142, 30, .45); }

.btn-ghost { background: transparent; color: var(--navy); border-color: rgba(13, 59, 84, .22); }
.btn-ghost:hover { border-color: var(--navy); transform: translateY(-2px); }

/* ------------------------- Header ------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 244, 236, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, background .3s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-color: rgba(13, 59, 84, .08); background: rgba(246, 244, 236, .95); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: .6rem; }
.brand-mark { height: 34px; width: auto; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--navy); letter-spacing: -.03em; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links > a:not(.btn) { font-weight: 500; color: var(--navy); font-size: .98rem; position: relative; padding: .25rem 0; }
.nav-links > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--orange); transition: width .25s var(--ease);
}
.nav-links > a:not(.btn):hover::after { width: 100%; }
.nav-cta { color: #3a2300; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ------------------------- Hero ------------------------- */
.hero { position: relative; background: var(--cream); padding-top: 64px; padding-bottom: 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(240, 142, 30, .14), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(13, 59, 84, .07), transparent 55%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--navy); background: rgba(255, 255, 255, .7); border: 1px solid rgba(13, 59, 84, .12);
  padding: .45rem .9rem; border-radius: 999px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(240, 142, 30, .25); }

.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; margin-top: 1.2rem; }
.hero h1 .hl { color: var(--orange); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 36ch; margin-top: 1.25rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.hero-stats { display: flex; gap: 2.4rem; margin-top: 2.6rem; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.hero-stats span { font-size: .88rem; color: var(--muted); }

/* Caja 3D del hero */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 360px; }
.box-3d {
  position: relative; width: 220px; height: 220px;
  transform-style: preserve-3d; transform: rotateX(-22deg) rotateY(-32deg);
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: rotateX(-22deg) rotateY(-32deg) translateY(0); } 50% { transform: rotateX(-22deg) rotateY(-32deg) translateY(-14px); } }
.box-face { position: absolute; inset: 0; border: 3px solid var(--navy); }
.box-top {
  background: repeating-linear-gradient(90deg, #e7c79b, #e7c79b 6px, #dcb986 6px, #dcb986 12px);
  transform: rotateX(90deg) translateZ(110px);
}
.box-left {
  background: linear-gradient(160deg, #d3a86f, #c0915a);
  transform: rotateY(-90deg) translateZ(110px);
}
.box-right { background: linear-gradient(160deg, #e3bd86, #d3a86f); transform: translateZ(110px); }
.box-right::after {
  content: "KRAFTEK"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; letter-spacing: .12em; color: var(--navy); font-size: 1.1rem;
}

.hero-badge {
  position: absolute; background: var(--paper); color: var(--navy); font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  padding: .55rem .9rem; border-radius: 999px; box-shadow: var(--shadow); border: 1px solid rgba(13, 59, 84, .06);
}
.badge-eco { top: 8%; right: 2%; animation: floaty 5s ease-in-out infinite; }
.badge-print { bottom: 10%; left: 0; animation: floaty 7s ease-in-out infinite .5s; }

/* Divisor corrugado */
.corrugated-divider {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 22px;
  background: repeating-linear-gradient(90deg, var(--cream-light) 0, var(--cream-light) 10px, var(--cream) 10px, var(--cream) 20px);
  -webkit-mask: radial-gradient(circle 11px at 10px 0, transparent 98%, #000) repeat-x; mask: radial-gradient(circle 11px at 10px 0, transparent 98%, #000) repeat-x;
  -webkit-mask-size: 20px 22px; mask-size: 20px 22px;
}

/* ------------------------- Secciones ------------------------- */
.section { padding: 96px 0; }
.section-soft { background: var(--cream); }
.section-dark { background: var(--navy); color: var(--cream-light); }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.kicker {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: var(--orange-dark);
}
.kicker-light { color: var(--orange); }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-top: .6rem; }
.section-sub { color: var(--muted); margin-top: .9rem; font-size: 1.05rem; }
.section-dark .section-sub { color: rgba(246, 244, 236, .75); }

/* ------------------------- Valor (nosotros) ------------------------- */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.value-card {
  background: var(--paper); border-radius: var(--radius); padding: 2rem 1.6rem;
  border: 1px solid rgba(13, 59, 84, .07); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.value-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(240, 142, 30, .12); color: var(--orange-dark); margin-bottom: 1.1rem;
}
.value-icon svg { width: 28px; height: 28px; }
.value-card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.value-card p { color: var(--muted); font-size: .96rem; }

/* ------------------------- Proceso ------------------------- */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; counter-reset: step; }
.process-step {
  position: relative; padding: 1.8rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(246, 244, 236, .12);
  transition: transform .3s var(--ease), background .3s, border-color .3s;
}
.process-step:hover { transform: translateY(-5px); background: rgba(255, 255, 255, .07); border-color: rgba(240, 142, 30, .4); }
.step-num {
  font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.6px var(--orange); display: block; margin-bottom: .9rem;
}
.step-body h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.step-body p { color: rgba(246, 244, 236, .72); font-size: .95rem; }

/* ------------------------- Productos ------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  position: relative; overflow: hidden; background: var(--paper); border-radius: var(--radius); padding: 2rem;
  border: 1px solid rgba(13, 59, 84, .07); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.product-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-card:hover::before { transform: scaleX(1); }
.product-icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy); color: var(--cream-light); margin-bottom: 1.2rem;
}
.product-icon svg { width: 28px; height: 28px; }
.product-card h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.product-card p { color: var(--muted); font-size: .96rem; }

/* ------------------------- Capacidades ------------------------- */
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.cap-copy .section-sub { margin-bottom: 1.6rem; }
.cap-list { display: grid; gap: 1rem; }
.cap-list li { display: flex; align-items: flex-start; gap: .75rem; font-weight: 500; color: var(--text); }
.cap-list svg { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 2px; color: var(--orange-dark); background: rgba(240, 142, 30, .14); border-radius: 50%; padding: 3px; }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.metric-card {
  background: var(--paper); border-radius: var(--radius); padding: 1.8rem 1.5rem; text-align: center;
  border: 1px solid rgba(13, 59, 84, .07); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease);
}
.metric-card:nth-child(odd) { transform: translateY(14px); }
.metric-card:hover { transform: translateY(-4px); }
.metric-card strong { display: block; font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; color: var(--orange-dark); }
.metric-card span { color: var(--muted); font-size: .92rem; }

/* ------------------------- Galería ------------------------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; gap: 18px; }
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden; display: flex; align-items: flex-end;
  padding: 1.1rem; color: #fff; box-shadow: var(--shadow-sm); cursor: pointer;
}
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 44, 63, .75), transparent 55%); transition: opacity .3s; }
.gallery-item figcaption { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.gallery-item:hover { transform: scale(.99); }
.g-1, .g-4 { grid-row: span 2; }
/* Placeholders con patrón de cartón — EDITAR: sustituir por fotos */
.g-1 { background: linear-gradient(135deg, #c8a06a, #a9784a); }
.g-2 { background: linear-gradient(135deg, #0d3b54, #12455f); }
.g-3 { background: linear-gradient(135deg, #f08e1e, #d97a0c); }
.g-4 { background: linear-gradient(135deg, #12455f, #0a2c3f); }
.g-5 { background: linear-gradient(135deg, #d3a86f, #b98a52); }
.g-6 { background: linear-gradient(135deg, #e0a955, #c8893a); }

/* ------------------------- Contacto ------------------------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-list { display: grid; gap: 1.1rem; margin-top: 2rem; }
.contact-list li { display: flex; gap: .85rem; align-items: flex-start; color: rgba(246, 244, 236, .9); }
.contact-list a:hover { color: var(--orange); }
.ci-ico { font-size: 1.15rem; line-height: 1.5; }

.contact-form {
  background: var(--paper); border-radius: var(--radius); padding: 2.2rem; box-shadow: var(--shadow-lg);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--navy); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: .98rem; color: var(--text);
  padding: .8rem .9rem; border: 1.6px solid #e2ddd0; border-radius: var(--radius-sm); background: var(--cream-light);
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 142, 30, .18); background: #fff;
}
.field.invalid input, .field.invalid textarea { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214, 69, 69, .14); }
.error-msg { color: #d64545; font-size: .8rem; margin-top: .35rem; min-height: 1em; }
.form-success {
  margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius-sm);
  background: rgba(63, 125, 78, .12); color: #2f6b3f; font-weight: 600; font-size: .95rem; text-align: center;
}
.form-error {
  margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius-sm);
  background: rgba(192, 57, 43, .12); color: #b83227; font-weight: 600; font-size: .95rem; text-align: center;
}

/* ------------------------- Footer ------------------------- */
.site-footer { background: var(--navy-deep); color: rgba(246, 244, 236, .8); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.brand-footer .brand-word { color: #fff; }
.footer-brand p { margin-top: 1rem; max-width: 32ch; font-size: .95rem; color: rgba(246, 244, 236, .65); }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col a, .footer-col span { display: block; color: rgba(246, 244, 236, .72); font-size: .95rem; margin-bottom: .6rem; transition: color .2s; }
.footer-col a:hover { color: var(--orange); }
.social { display: flex; gap: .7rem; }
.social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; margin: 0;
  background: rgba(246, 244, 236, .08); color: var(--cream-light); transition: background .25s, transform .25s, color .25s;
}
.social a svg { width: 18px; height: 18px; }
.social a:hover { background: var(--orange); color: #3a2300; transform: translateY(-3px); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 22px 0; border-top: 1px solid rgba(246, 244, 236, .1); font-size: .85rem; color: rgba(246, 244, 236, .55);
}

/* ------------------------- Animación reveal ------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .box-3d, .hero-badge { animation: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------- Responsive ------------------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; min-height: 280px; }
  .lead { max-width: none; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 72px; right: 0; left: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream-light); padding: 1rem 24px 1.5rem; box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .35s var(--ease); border-top: 1px solid rgba(13,59,84,.08);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links > a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid rgba(13, 59, 84, .07); }
  .nav-cta { margin-top: .8rem; text-align: center; }
  .nav-toggle { display: flex; }

  .section { padding: 72px 0; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .g-1, .g-4 { grid-row: span 1; }
}

@media (max-width: 520px) {
  .value-grid, .process, .product-grid, .metrics, .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .metric-card:nth-child(odd) { transform: none; }
  .hero-stats { gap: 1.6rem; }
  .gallery { grid-template-columns: 1fr; }
}
