/* ============================================================
   Distintivo - hoja de estilos compartida
   Manufactura & Diseno Textil - Guatemala
   ============================================================ */

@font-face {
  font-family: 'Doxent';
  src: url('../Doxent-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca, no alterar - ver brand-guide-v1.html */
  --ink: #2E2E2E;
  --sage: #5F7A5E;
  --sage-deep: #4C6350;
  --terracotta: #B54A3C;
  --terracotta-deep: #9B3E32;
  --paper: #F7F4EE;
  --cream: #EEE9DF;
  --stone: #D1D0CB;
  --taupe: #A2A092;
  --clay: #8A887E;
  --umber: #6E6353;

  --font-display: 'Doxent', 'Archivo', sans-serif;
  --font-sans: 'Archivo', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 2px;
  --radius-lg: 4px;
  --container: 1240px;
  --nav-height: 72px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
}

p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

/* ---------- Utilidades tipográficas ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--umber);
}

.lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--umber);
  max-width: 52ch;
}

/* ---------- Navegación ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone);
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo img { height: 30px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--umber);
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.nav-cta:hover { background: var(--sage-deep); }
.nav-cta:active { transform: scale(0.98); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
}

/* El menu movil se oculta SIEMPRE por defecto, en cualquier ancho de pantalla.
   Bug real corregido 2026-09-03: esta regla vivia solo dentro del media query
   de abajo, asi que en desktop el navegador usaba su display:block por
   defecto y el menu aparecia duplicado, flotando sobre el hero. */
.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: var(--paper);
  z-index: 49;
  padding: 32px 24px;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .mobile-menu a {
    padding: 16px 4px;
    border-bottom: 1px solid var(--stone);
    font-size: 20px;
    font-weight: 600;
  }
  .mobile-menu .nav-cta {
    display: inline-flex;
    margin-top: 20px;
    justify-content: center;
  }
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--sage-deep); }

.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

.btn-on-dark { background: var(--paper); color: var(--ink); }
.btn-on-dark:hover { background: var(--cream); }

/* ---------- Secciones ---------- */

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-tight { padding: 48px 0; }
}

.section-dark {
  background: var(--ink);
  color: var(--paper);
}

.section-sage {
  background: var(--sage);
  color: var(--paper);
}

.section-cream { background: var(--cream); }

/* ---------- Grid utilities ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Tarjetas de categoría ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

@media (max-width: 960px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .category-grid { grid-template-columns: 1fr; }
}

.category-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--stone);
  display: block;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.category-card:hover img { transform: scale(1.04); }

.category-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46,46,46,0) 40%, rgba(46,46,46,0.78) 100%);
}

.category-card .label {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: var(--paper);
}

.category-card .label .name {
  font-size: 17px;
  font-weight: 700;
}

.category-card .label .sub {
  font-size: 13px;
  color: var(--cream);
  margin-top: 2px;
}

/* ---------- Marcos con paralaje ---------- */
/* La imagen es 30% mas alta que el marco, centrada (-15% arriba y abajo).
   El JS de paralaje mueve la imagen dentro de ese margen: nunca debe superar
   +/-8% de yPercent o se revela espacio vacio en los bordes. */

.parallax-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.parallax-frame img {
  position: absolute;
  top: -15%;
  left: 0;
  width: 100%;
  height: 130%;
  object-fit: cover;
  will-change: transform;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Formulario ---------- */

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field .helper { font-size: 12px; color: var(--clay); }
.field .error { font-size: 12px; color: var(--terracotta-deep); display: none; }
.field.has-error .error { display: block; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--terracotta-deep); }

.field input,
.field select,
.field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--taupe);
  border-radius: var(--radius);
  padding: 13px 14px;
  width: 100%;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--clay); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(95, 122, 94, 0.22);
}

.field textarea { resize: vertical; min-height: 120px; }

.form-status {
  margin-top: 16px;
  font-size: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  display: none;
}
.form-status.success { display: block; background: rgba(95,122,94,0.14); color: var(--sage-deep); }
.form-status.error { display: block; background: rgba(181,74,60,0.12); color: var(--terracotta-deep); }

/* honeypot */
.hp-field { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer-logo img { height: 26px; margin-bottom: 16px; }

.footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--taupe);
  margin-bottom: 14px;
}

.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { font-size: 14px; color: var(--cream); transition: color 0.2s var(--ease); }
.footer a:hover { color: var(--paper); text-decoration: underline; }

.social-link { display: inline-flex; align-items: center; gap: 8px; }
.social-link svg { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(238,233,223,0.14);
  font-size: 13px;
  color: var(--taupe);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
