/* ============================================================
   TINCHO BRANDKIT — Sistema de Diseño Compartido
   Importar en todas las páginas: <link rel="stylesheet" href="brandkit.css">
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital,wght@0,400;1,400&family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   TOKENS DE COLOR
   ============================================================ */
:root {
  --lago:        #2D4A3E;
  --tierra:      #C96F3D;
  --amanecer:    #EDBC6A;
  --bruma:       #9B9583;
  --papel:       #F7F1E4;
  --papel-prof:  #EEE4CE;
  --tinta:       #1A1712;
  --lago-prof:   #162B23;
  --line:        rgba(21, 32, 28, 0.14);
  --line-strong: rgba(21, 32, 28, 0.32);

  /* Modo claro (por defecto) */
  --bg:          var(--papel);
  --bg-alt:      var(--papel-prof);
  --text:        var(--tinta);
  --text-muted:  var(--bruma);
  --primary:     var(--lago);
  --accent:      var(--amanecer);
  --secondary:   var(--tierra);

  /* Tipografía */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'Geist', -apple-system, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* Espaciado */
  --section-py:   96px;
  --container-px: 48px;
  --gap-sm:       16px;
  --gap-md:       24px;
  --gap-lg:       48px;
  --gap-xl:       80px;

  /* Bordes */
  --radius:  2px;
  --radius-pill: 999px;
}

/* Modo oscuro (libro) */
.dark-mode {
  --bg:         var(--lago-prof);
  --bg-alt:     rgba(255, 255, 255, 0.04);
  --text:       var(--papel);
  --text-muted: rgba(244, 239, 230, 0.55);
  --primary:    var(--amanecer);
  --accent:     var(--tierra);
  --line:       rgba(244, 239, 230, 0.12);
  --line-strong:rgba(244, 239, 230, 0.28);
}

/* ============================================================
   RESET Y BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   CONTENEDOR
   ============================================================ */
.bk-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}

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

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */

/* Display / Headings */
.bk-display,
h1.bk-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--text);
}

.bk-display-italic,
h1.bk-h1-italic {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--text);
}

.bk-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(32px, 5vw, 56px);
  color: var(--text);
}

.bk-h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
}

/* Eyebrow / Mono label */
.bk-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}

.bk-mono-lg {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Body */
.bk-body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}

.bk-body-lg {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}

.bk-body-sm {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Quote / Pull quote */
.bk-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.35;
  color: var(--primary);
}

.dark-mode .bk-quote {
  color: var(--amanecer);
}

/* ============================================================
   BOTONES
   ============================================================ */
.bk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, opacity 200ms ease;
  white-space: nowrap;
}

.bk-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Primario — tinta sobre papel */
.bk-btn-primary {
  background: var(--tinta);
  color: var(--papel);
  border-color: var(--tinta);
}

.bk-btn-primary:hover {
  background: var(--lago);
  border-color: var(--lago);
}

/* Primario lago */
.bk-btn-lago {
  background: var(--lago);
  color: var(--papel);
  border-color: var(--lago);
}

.bk-btn-lago:hover {
  background: var(--tinta);
  border-color: var(--tinta);
}

/* Secundario — outline */
.bk-btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.bk-btn-secondary:hover {
  border-color: var(--text);
}

/* Secundario en modo oscuro */
.dark-mode .bk-btn-secondary {
  color: var(--papel);
  border-color: rgba(244, 239, 230, 0.3);
}

.dark-mode .bk-btn-secondary:hover {
  border-color: var(--papel);
}

/* Amanecer (CTA destacado) */
.bk-btn-amanecer {
  background: var(--amanecer);
  color: var(--tinta);
  border-color: var(--amanecer);
}

.bk-btn-amanecer:hover {
  opacity: 0.88;
}

/* Full width */
.bk-btn-full {
  width: 100%;
  justify-content: center;
}

/* Grande */
.bk-btn-lg {
  font-size: 15px;
  padding: 16px 36px;
}

/* ============================================================
   CARDS
   ============================================================ */
.bk-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--gap-md);
}

.bk-card-white {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--gap-md);
}

.dark-mode .bk-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(244, 239, 230, 0.1);
}

/* ============================================================
   SECCIONES
   ============================================================ */
.bk-section {
  padding: var(--section-py) 0;
  border-top: 1px solid var(--line);
}

.bk-section:first-of-type {
  border-top: none;
}

.bk-section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--gap-lg);
  align-items: baseline;
  margin-bottom: 64px;
}

@media (max-width: 768px) {
  .bk-section {
    padding: 64px 0;
  }
  .bk-section-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
  }
}

/* ============================================================
   LOGO — TINCHOMARK
   ============================================================ */
.bk-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.bk-logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--tinta);
}

.dark-mode .bk-logo-mark {
  color: var(--papel);
}

.bk-logo-wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ============================================================
   NAV
   ============================================================ */
.bk-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px var(--container-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background 200ms ease, border-color 200ms ease;
}

.bk-nav.scrolled {
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dark-mode .bk-nav {
  background: var(--lago-prof);
  border-bottom-color: rgba(244, 239, 230, 0.1);
}

.bk-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.bk-nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 200ms ease;
  cursor: pointer;
}

.bk-nav-links a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .bk-nav {
    padding: 16px 24px;
  }
  .bk-nav-links {
    display: none;
  }
}

/* ============================================================
   MOTIVOS DECORATIVOS
   ============================================================ */

/* Arc motif — esquina decorativa */
.bk-arc-motif {
  position: absolute;
  pointer-events: none;
  color: var(--lago);
  opacity: 0.12;
}

.dark-mode .bk-arc-motif {
  color: var(--amanecer);
  opacity: 0.18;
}

/* Wave motif — divisor */
.bk-wave {
  display: block;
  width: 100%;
  color: var(--line-strong);
  opacity: 0.6;
}

/* ============================================================
   HERO
   ============================================================ */
.bk-hero {
  min-height: 100vh;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================================
   FORMULARIO
   ============================================================ */
.bk-input {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--tinta);
  width: 100%;
  outline: none;
  transition: border-color 200ms ease;
}

.bk-input:focus {
  border-color: var(--lago);
}

.bk-input::placeholder {
  color: var(--bruma);
}

/* ============================================================
   GRIDS
   ============================================================ */
.bk-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-md);
}

.bk-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

@media (max-width: 900px) {
  .bk-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .bk-grid-2,
  .bk-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   DIVISORES
   ============================================================ */
.bk-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.bk-footer {
  background: var(--tinta);
  color: var(--papel);
  padding: 56px var(--container-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.bk-footer .bk-logo-mark {
  color: var(--papel);
}

.bk-footer .bk-logo-wordmark {
  color: var(--papel);
}

.bk-footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.4);
}

.bk-footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.bk-footer-links a {
  font-size: 13px;
  color: rgba(244, 239, 230, 0.55);
  text-decoration: none;
  transition: color 200ms ease;
}

.bk-footer-links a:hover {
  color: var(--papel);
}

.dark-mode .bk-footer {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(244, 239, 230, 0.1);
}

@media (max-width: 768px) {
  .bk-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 24px;
  }
}

/* ============================================================
   UTILIDADES
   ============================================================ */
.bk-text-lago  { color: var(--lago); }
.bk-text-tierra { color: var(--tierra); }
.bk-text-amanecer { color: var(--amanecer); }
.bk-text-bruma { color: var(--bruma); }
.bk-text-muted { color: var(--text-muted); }

.bk-bg-lago    { background: var(--lago); }
.bk-bg-tierra  { background: var(--tierra); }
.bk-bg-papel   { background: var(--papel); }
.bk-bg-tinta   { background: var(--tinta); }

.bk-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reveal on scroll */
.bk-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.bk-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
