/* ============================================================
   VETEX · Sistema de diseño compartido
   Editorial + Industrial · Paleta Tierras
   ============================================================ */

:root {
  /* === MARCA OFICIAL VETEX === */
  /* Primarios */
  --blue-deep: #061A38;     /* Azul profundo, marca */
  --blue: #0F4F92;          /* Azul logo */
  --blue-accent: #1E5BA8;   /* Azul accent secundario */
  --bone: #FAF7F2;          /* Fondo principal — domina 60% */
  --sand: #E8DFD3;          /* Fondo secundario cálido */
  --gold: #C9A961;          /* Acento único, reservado */
  --clay: #B8845F;          /* Secundario cálido */

  /* Tinta y papel */
  --ink: #061A38;           /* Tinta = blue deep */
  --ink-2: #0F2845;
  --ink-3: #4A5A72;         /* Texto secundario azulado */
  --paper: #FAF7F2;         /* Bone */
  --paper-2: #E8DFD3;       /* Sand */
  --paper-3: #D8CFC0;
  --line: rgba(6,26,56,0.14);
  --line-2: rgba(6,26,56,0.07);

  /* Estados (alineados a la paleta) */
  --success: #2D6E4E;
  --warn: #C9A961;
  --danger: #A85B3E;

  /* Tipografía */
  --font-serif: 'Fraunces', 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Radios (del manual: 1mm / 1.5mm / 2mm) */
  --r-1: 3px;
  --r-2: 5px;
  --r-3: 8px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.64, 0, 0.78, 0);
  --t-fast: 180ms;
  --t-med: 320ms;
  --t-slow: 620ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  cursor: none; /* Custom cursor */
}

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--paper);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 120ms var(--ease);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(244,239,232,0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 280ms var(--ease), height 280ms var(--ease), border-color 280ms var(--ease), background 280ms var(--ease);
}
.cursor-ring.hover {
  width: 64px; height: 64px;
  background: rgba(15,79,146,0.14);
  border-color: var(--blue);
}
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* Tipografía helpers */
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; }
.mono { font-family: var(--font-mono); font-weight: 400; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-3);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}

.h-display { font-size: clamp(64px, 11vw, 180px); line-height: 0.92; letter-spacing: -0.035em; }
.h-xl { font-size: clamp(48px, 6.5vw, 96px); line-height: 0.95; }
.h-lg { font-size: clamp(36px, 4.5vw, 64px); line-height: 1; }
.h-md { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.05; }

/* Italic accent on serif */
.serif em, .italic { font-style: italic; font-family: var(--font-serif); }

/* Layout containers */
.container { max-width: 1480px; margin: 0 auto; padding: 0 48px; }
.container-wide { max-width: 1720px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 768px) {
  .container, .container-wide { padding: 0 20px; }
}

/* =================== NAV =================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244,239,232,0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-2);
  transition: all var(--t-med) var(--ease);
}
.nav.on-dark {
  background: rgba(6,26,56,0.55);
  color: var(--paper);
  border-bottom-color: rgba(244,239,232,0.08);
}
.nav.on-dark .logo, .nav.on-dark .nav-links a, .nav.on-dark .nav-right button { color: var(--paper); }
.nav.on-dark .nav-right button:hover { color: var(--gold); }

.logo {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--blue-deep);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.logo::before {
  content: "";
  width: 28px;
  height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 60'><path d='M6 32 C 14 22, 24 18, 36 22 C 46 26, 56 36, 70 30 C 73 29, 76 27, 78 24 L 75 22 C 64 28, 54 22, 44 18 C 30 12, 16 16, 4 28 Z' fill='%230F4F92'/><circle cx='3' cy='30' r='1.5' fill='%230F4F92'/><circle cx='77' cy='25' r='1.2' fill='%230F4F92'/><path d='M8 38 C 18 34, 28 35, 40 38' stroke='%230F4F92' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  flex-shrink: 0;
  transition: transform var(--t-med) var(--ease);
}
.logo:hover::before { transform: rotate(-2deg) scale(1.05); }
.nav.on-dark .logo { color: var(--paper); }
.nav.on-dark .logo::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 60'><path d='M6 32 C 14 22, 24 18, 36 22 C 46 26, 56 36, 70 30 C 73 29, 76 27, 78 24 L 75 22 C 64 28, 54 22, 44 18 C 30 12, 16 16, 4 28 Z' fill='%23FAF7F2'/><circle cx='3' cy='30' r='1.5' fill='%23FAF7F2'/><circle cx='77' cy='25' r='1.2' fill='%23FAF7F2'/><path d='M8 38 C 18 34, 28 35, 40 38' stroke='%23FAF7F2' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>");
}
.logo sup { font-size: 9px; color: var(--gold); margin-left: 1px; align-self: flex-start; margin-top: 4px; }
.footer .logo::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 60'><path d='M6 32 C 14 22, 24 18, 36 22 C 46 26, 56 36, 70 30 C 73 29, 76 27, 78 24 L 75 22 C 64 28, 54 22, 44 18 C 30 12, 16 16, 4 28 Z' fill='%23C9A961'/><circle cx='3' cy='30' r='1.5' fill='%23C9A961'/><circle cx='77' cy='25' r='1.2' fill='%23C9A961'/><path d='M8 38 C 18 34, 28 35, 40 38' stroke='%23C9A961' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>");
  width: 36px;
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color var(--t-fast);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-med) var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active { color: var(--blue); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-right button, .nav-right a {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: none;
  padding: 6px 0;
  text-decoration: none;
  transition: color var(--t-fast);
}
.nav-right button:hover { color: var(--blue); }
.cart-count {
  display: inline-block;
  margin-left: 6px;
  background: var(--blue);
  color: var(--paper);
  border-radius: 50%;
  width: 18px; height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
}

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: color var(--t-med) var(--ease);
  border-radius: 0;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateY(100%);
  transition: transform var(--t-med) var(--ease);
  z-index: 0;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--ink); }
.btn > * { position: relative; z-index: 1; }

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

.btn-clay {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--paper);
}
.btn-clay::before { background: var(--blue-deep); }
.btn-clay:hover { color: var(--paper); }

/* Botón azul (CTA principal con autoridad) */
.btn-blue { background: var(--blue); color: var(--paper); border-color: var(--blue); }
.btn-blue::before { background: var(--blue-deep); }
.btn-blue:hover { color: var(--paper); }

.btn .arrow {
  display: inline-block;
  transition: transform var(--t-med) var(--ease);
}
.btn:hover .arrow { transform: translateX(6px); }

/* Link arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: all var(--t-med) var(--ease);
}
.link-arrow:hover { color: var(--blue); border-color: var(--blue); gap: 14px; }

/* =================== CHIPS / BADGES =================== */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.chip-clay { background: var(--clay); color: var(--paper); border-color: var(--clay); }
.chip-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* =================== FOOTER =================== */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 120px 0 40px;
  margin-top: 160px;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 100px;
  border-bottom: 1px solid rgba(244,239,232,0.12);
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,239,232,0.55);
  font-weight: 400;
  margin-bottom: 24px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer a {
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--t-fast);
}
.footer a:hover { color: var(--gold); }
.footer-hero {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  padding: 100px 0;
  text-align: left;
  color: var(--paper);
}
.footer-hero em { color: var(--gold); font-style: italic; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,239,232,0.55);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* =================== PLACEHOLDERS =================== */
.ph { /* placeholder image container */
  position: relative;
  background: var(--paper-2);
  overflow: hidden;
}
.ph-label {
  position: absolute;
  top: 16px; left: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: rgba(244,239,232,0.85);
  padding: 5px 9px;
  z-index: 2;
}
.ph-corner {
  position: absolute;
  bottom: 16px; right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  z-index: 2;
}

/* Stripe texture for placeholders */
.ph-stripes {
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0, transparent 8px,
      rgba(6,26,56,0.035) 8px, rgba(6,26,56,0.035) 9px
    );
}

/* =================== REVEAL (scroll-triggered) =================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

.reveal-split {
  overflow: hidden;
  display: inline-block;
}
.reveal-split > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 900ms var(--ease);
}
.reveal-split.in > span { transform: translateY(0); }

/* Loading marquee */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.marquee-track {
  display: inline-flex;
  gap: 60px;
  animation: marquee 40s linear infinite;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.marquee-track span::before {
  content: "◆";
  margin-right: 60px;
  color: var(--gold);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =================== SCROLL BAR =================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* Selection */
::selection { background: var(--blue); color: var(--paper); }

/* Form elements */
input, select, textarea, button {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
}
input[type="text"], input[type="email"], input[type="number"], input[type="search"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--r-1);
  outline: none;
  transition: border-color var(--t-fast);
  cursor: none;
}
input:focus { border-color: var(--ink); }

/* Utility */
.sr { position: absolute; left: -9999px; }
