/* Haiken — sistema visual compartido entre páginas internas.
   Coincide con los tokens y componentes de haiken-final-*.html. */

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --haiken-blue-900: #0A1628;
  --haiken-blue-800: #0E1E36;
  --haiken-blue-700: #163058;
  --haiken-blue-500: #2563A3;
  --haiken-blue-300: #6FA3D9;
  --haiken-blue-100: #E8F0F8;
  --haiken-blue-50:  #F4F8FB;
  --bone-white: #F7F4ED;
  --paper: #FFFFFF;
  --ink: #0A0E14;
  --graphite: #2A2D33;
  --gray-700: #2F3741;
  --gray-600: #57606A;
  --gray-500: #6E7781;
  --gray-400: #8B95A1;
  --gray-300: #B0B7BF;
  --gray-200: #D6DDE4;
  --gray-100: #EEF1F5;
  --moss-700: #3D5A30;
  --moss-500: #5C7A4A;
  --moss-300: #8FAE6E;
  --moss-100: rgba(143, 174, 110, 0.15);
  --rule: rgba(10, 22, 40, 0.10);
  --rule-strong: rgba(10, 22, 40, 0.16);
  --wellpaw-magenta: #9B1F8F;
  --wellpaw-magenta-soft: #C84BB8;
  --wellpaw-berenjena: #3D0A40;
  --wellpaw-cream: #F7F0E8;

  /* Fluid type scale — viewport-driven con piso/tope.
     Curva: min en 320px, max en 1400px. Usa clamp() para que escale
     suavemente sin un breakpoint duro. */
  --fs-xs:   clamp(11px, 0.7vw + 9px, 13px);    /* eyebrow, mono tags */
  --fs-sm:   clamp(13px, 0.4vw + 11.5px, 14.5px); /* meta, captions */
  --fs-base: clamp(14.5px, 0.5vw + 13px, 16.5px); /* body */
  --fs-md:   clamp(16px, 0.6vw + 14px, 18px);     /* lede, intro */
  --fs-lg:   clamp(20px, 1.2vw + 16px, 26px);     /* card / pub titles */
  --fs-xl:   clamp(24px, 2vw + 18px, 32px);       /* product titles */
  --fs-2xl:  clamp(28px, 2.5vw + 18px, 44px);     /* section titles */
  --fs-3xl:  clamp(36px, 3.5vw + 18px, 60px);     /* page hero title */
  --fs-4xl:  clamp(40px, 4.5vw + 16px, 72px);     /* home hero (futuro) */

  /* Espaciado fluido — útil para padding de secciones */
  --space-section-y: clamp(48px, 4vw + 24px, 88px);
  --space-section-x: clamp(20px, 2vw + 8px, 40px);
}

html, body {
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* Skip link — first focusable element on every page (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--haiken-blue-900);
  color: var(--bone-white);
  font-family: 'Space Grotesk', 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; outline: 2px solid var(--moss-300); outline-offset: 2px; }

/* === topbar === */
.topbar { background: var(--haiken-blue-900); color: var(--bone-white); padding: 8px 0; }
.topbar-inner { max-width: 1400px; margin: 0 auto; padding: 0 32px; display: flex; justify-content: space-between; align-items: center; }
.topbar-left { display: flex; gap: 24px; color: rgba(247,244,237,0.7); font-family: 'Space Grotesk', 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.04em; }
.topbar-left span::before { content: '●'; color: var(--moss-300); margin-right: 6px; font-size: 8px; }
.topbar-right { display: flex; gap: 18px; align-items: center; font-size: 12px; }
.topbar-right a { color: rgba(247,244,237,0.7); transition: color 0.2s; }
.topbar-right a:hover { color: var(--bone-white); }

/* === header / nav === */
.header { background: var(--paper); border-bottom: 1px solid var(--rule-strong); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 22px 32px; display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; height: 38px; width: auto; }
.nav { display: flex; gap: 28px; flex: 1; justify-content: center; }
.nav a { font-size: 14px; font-weight: 500; color: var(--graphite); padding: 6px 0; border-bottom: 2px solid transparent; transition: all 0.2s; }
.nav a:hover, .nav a.active { color: var(--haiken-blue-500); border-bottom-color: var(--haiken-blue-500); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; font-size: 13px; font-weight: 600; border-radius: 6px; transition: all 0.2s; cursor: pointer; border: 1px solid transparent; }
.btn.outline { border-color: var(--rule-strong); color: var(--ink); background: var(--paper); }
.btn.outline:hover { border-color: var(--haiken-blue-500); color: var(--haiken-blue-500); }
.btn.solid { background: var(--haiken-blue-500); color: white; border-color: var(--haiken-blue-500); }
.btn.solid:hover { background: var(--haiken-blue-700); border-color: var(--haiken-blue-700); }
.btn.ghost { color: var(--haiken-blue-500); border-color: transparent; padding: 10px 0; }

/* === page-hero (versión más compacta del hero del home) === */
.page-hero {
  padding: clamp(40px, 4vw + 24px, 72px) var(--space-section-x) clamp(32px, 3vw + 20px, 56px);
  background: linear-gradient(180deg, var(--paper) 0%, var(--haiken-blue-50) 100%);
  border-bottom: 1px solid var(--haiken-blue-100);
}
.page-hero-inner { max-width: 1400px; margin: 0 auto; }
.page-hero-eyebrow {
  font-family: 'Space Grotesk', 'JetBrains Mono', monospace;
  font-size: var(--fs-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--haiken-blue-500);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-hero-eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--moss-500); }
.page-hero-title {
  font-family: 'Source Serif 4', serif;
  font-weight: 400;
  font-size: var(--fs-3xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--haiken-blue-900);
  margin-bottom: 20px;
  max-width: 880px;
}
.page-hero-title em { font-style: italic; color: var(--moss-500); }
.page-hero-lede {
  font-family: 'Source Serif 4', serif;
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--graphite);
  max-width: 640px;
  font-weight: 300;
}

/* === sección genérica === */
.section { padding: var(--space-section-y) var(--space-section-x); }
.section-inner { max-width: 1400px; margin: 0 auto; }
.section-bg-light { background: var(--bone-white); }
.section-bg-blue { background: var(--haiken-blue-900); color: var(--bone-white); }
.section-header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 48px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); gap: 32px; flex-wrap: wrap; }
.section-bg-blue .section-header { border-bottom-color: rgba(245,241,232,0.15); }
.section-eyebrow { font-family: 'Space Grotesk', 'JetBrains Mono', monospace; font-size: var(--fs-xs); letter-spacing: 0.24em; text-transform: uppercase; color: var(--haiken-blue-500); margin-bottom: 12px; }
.section-bg-blue .section-eyebrow { color: var(--haiken-blue-300); }
.section-title { font-family: 'Source Serif 4', serif; font-weight: 400; font-size: var(--fs-2xl); line-height: 1.1; letter-spacing: -0.02em; color: var(--haiken-blue-900); }
.section-bg-blue .section-title { color: var(--bone-white); }
.section-title em { font-style: italic; color: var(--moss-500); }
.section-bg-blue .section-title em { color: var(--moss-300); }
.section-link { font-size: 13px; font-weight: 600; color: var(--haiken-blue-500); display: inline-flex; align-items: center; gap: 8px; transition: gap 0.2s; flex-shrink: 0; }
.section-bg-blue .section-link { color: var(--moss-300); }
.section-link:hover { gap: 12px; }
.section-prose { font-family: 'Source Serif 4', serif; font-size: var(--fs-md); line-height: 1.65; color: var(--graphite); max-width: 720px; font-weight: 300; }
.section-prose p { margin-bottom: 18px; }

/* === footer === */
.footer { background: var(--haiken-blue-900); color: var(--bone-white); padding: 48px 32px 24px; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 32px; border-bottom: 1px solid rgba(245,241,232,0.1); margin-bottom: 24px; }
.footer-brand { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 24px; color: var(--bone-white); margin-bottom: 12px; }
.footer-brand em { font-style: italic; color: var(--moss-300); font-weight: 400; }
.footer-tagline { font-size: 13px; color: rgba(247,244,237,0.6); line-height: 1.6; max-width: 320px; }
.footer-col-title { font-family: 'Space Grotesk', 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--moss-300); margin-bottom: 14px; font-weight: 500; }
.footer-col h5 { font-family: 'Space Grotesk', 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--moss-300); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: rgba(247,244,237,0.7); padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--bone-white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-family: 'Space Grotesk', 'JetBrains Mono', monospace; font-size: 11px; color: rgba(247,244,237,0.5); }
.footer-cert { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-cert span { padding: 4px 10px; border: 1px solid rgba(247,244,237,0.18); border-radius: 4px; }

/* === responsive === */
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav, .topbar-left { display: none; }
  .topbar { display: none; }
  .header-inner { padding: 16px 20px; }
  .page-hero { padding: 40px 20px 32px; }
  .section { padding: 48px 20px; }
  .footer { padding: 32px 20px 16px; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
}
