/* Bitácora Vyron — lectura larga sobre la línea visual de landing_v3.
   Tokens alineados a static/landing (Sora / Space Grotesk / JetBrains Mono). */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 700;
  font-display: optional;
  src: url(/static/landing/fonts/jetbrains-mono.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 800;
  font-display: optional;
  src: url(/static/landing/fonts/sora.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url(/static/landing/fonts/space-grotesk.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --void: #050505;
  --white: #fff;
  --silver: #bfbfbf;
  --dim: #96969b;
  --border: #303034;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  /* Metal + ember only — sin plume morado IA (regla casa) */
  --metal: linear-gradient(135deg, #ffffff 0%, #c8c8ce 48%, #8a8a90 100%);
  --ember: #e8a070;
  --ember-dim: rgba(232, 160, 112, 0.18);
  --prose-width: 40rem;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  scrollbar-width: thin;
  scrollbar-color: #3a3a42 transparent;
}

body.bitacora-body {
  background: var(--void);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid white;
  outline-offset: 5px;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 50;
  background: white;
  color: black;
  padding: 12px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 180px 180px;
}

/* Nav (misma línea que landing_v3, simplificada) */
.v-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 4vw;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #ffffff12;
}
.v-brand {
  justify-self: start;
}
.v-brand img {
  width: 30px;
  height: auto;
}
.v-nav-links {
  display: flex;
  gap: 6px;
  justify-self: center;
  flex-wrap: wrap;
}
.v-nav-links a {
  text-decoration: none;
  font-size: 0.78rem;
  color: var(--dim);
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 30px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.v-nav-links a:hover {
  color: white;
}
.v-nav-links a[aria-current="page"] {
  color: white;
  border-color: #54545a;
  background: #ffffff0c;
}
.v-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}
.v-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 30px;
  border: 1px solid #54545a;
  font: 500 0.7rem var(--font-mono);
  color: white;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.v-btn:hover {
  background: #232326;
}
.v-btn-primary {
  background: white;
  color: #050505;
  border-color: white;
}
.v-btn-primary:hover {
  background: #dcdcdc;
  color: #050505;
}

/* Layout */
.bit-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}
.bit-main--post {
  max-width: 720px;
}

.eyebrow {
  font: 500 0.64rem var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1.7;
}
.eyebrow--plume {
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.bit-hero {
  margin-bottom: clamp(40px, 7vh, 64px);
  max-width: 42rem;
  padding-bottom: clamp(28px, 4vh, 40px);
  border-bottom: 1px solid #ffffff10;
}
.bit-hero h1 {
  font: 800 clamp(2.6rem, 6.5vw, 4rem) / 0.98 var(--font-display);
  letter-spacing: -0.05em;
  margin: 14px 0 18px;
  text-wrap: balance;
}
.bit-hero p {
  color: var(--silver);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 38ch;
}

/* Cards listado */
.bit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  list-style: none;
}
.bit-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #0a0a0c;
  text-decoration: none;
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
  height: 100%;
}
.bit-card:hover {
  border-color: #6a6a72;
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
}
.bit-card-cover {
  aspect-ratio: 16 / 9;
  background: #121216;
  overflow: hidden;
  border-bottom: 1px solid #ffffff0c;
}
.bit-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.bit-card:hover .bit-card-cover img {
  transform: scale(1.03);
}
.bit-card-cover--empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(232, 160, 112, 0.08), transparent 50%),
    #121216;
}
.bit-card-cover--empty span {
  font: 500 0.62rem var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.bit-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.bit-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font: 500 0.62rem var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.bit-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #54545a;
  color: var(--silver);
  letter-spacing: 0.08em;
}
.bit-tag--avance {
  border-color: #ffffff40;
  color: #e8e8ec;
}
.bit-tag--investigacion {
  border-color: rgba(232, 160, 112, 0.45);
  color: var(--ember);
}
.bit-tag--lanzamiento {
  border-color: #ffffff55;
  color: #fff;
  background: #ffffff0a;
}
.bit-card h2 {
  font: 700 1.28rem / 1.22 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.bit-card p {
  color: var(--silver);
  font-size: 0.96rem;
  line-height: 1.55;
  flex: 1;
}
.bit-card-foot {
  margin-top: 10px;
  font: 500 0.62rem var(--font-mono);
  color: var(--dim);
  letter-spacing: 0.04em;
}
@media (prefers-reduced-motion: reduce) {
  .bit-card,
  .bit-card-cover img {
    transition: none;
  }
  .bit-card:hover {
    transform: none;
  }
  .bit-card:hover .bit-card-cover img {
    transform: none;
  }
}

.bit-empty {
  border: 1px dashed #3a3a42;
  border-radius: 18px;
  padding: 48px 28px;
  text-align: center;
  color: var(--silver);
  line-height: 1.55;
}
.bit-empty strong {
  display: block;
  color: white;
  font: 600 1.15rem var(--font-display);
  margin-bottom: 10px;
}

/* Draft banner */
.bit-draft-banner {
  margin: 0 0 28px;
  padding: 14px 18px;
  border: 1px solid rgba(232, 160, 112, 0.4);
  border-radius: 14px;
  background: var(--ember-dim);
  color: #f0d0b8;
  font-size: 0.9rem;
  line-height: 1.45;
}
.bit-draft-banner strong {
  color: #ffe0cc;
  font-weight: 600;
}

/* Post header */
.bit-post-header {
  margin-bottom: 32px;
  padding-bottom: 8px;
}
.bit-post-header h1 {
  font: 800 clamp(1.95rem, 5vw, 3.1rem) / 1.08 var(--font-display);
  letter-spacing: -0.045em;
  margin: 14px 0 18px;
  text-wrap: balance;
}
.bit-post-header .lead {
  color: var(--silver);
  font-size: 1.14rem;
  line-height: 1.6;
  max-width: 40ch;
}
.bit-cover {
  margin: 0 0 40px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #121216;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.bit-cover picture {
  display: block;
}
.bit-cover img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  display: block;
}

/* Prose editorial — ritmo de lectura */
.bit-prose {
  font-size: 1.08rem;
  line-height: 1.75;
  color: #e8e8ec;
  max-width: var(--prose-width);
}
.bit-prose > * + * {
  margin-top: 1.2em;
}
.bit-prose p {
  max-width: 62ch;
}
.bit-prose h2 {
  font: 700 clamp(1.3rem, 2.5vw, 1.65rem) / 1.22 var(--font-display);
  letter-spacing: -0.03em;
  color: white;
  margin-top: 2.15em;
  padding-top: 0.35em;
}
.bit-prose h3 {
  font: 650 1.12rem / 1.3 var(--font-display);
  letter-spacing: -0.02em;
  color: white;
  margin-top: 1.6em;
}
.bit-prose h4 {
  font: 600 1rem / 1.35 var(--font-display);
  color: #f0f0f2;
  margin-top: 1.4em;
}
.bit-prose a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: #6a6a72;
}
.bit-prose a:hover {
  text-decoration-color: white;
}
.bit-prose strong {
  color: white;
  font-weight: 600;
}
.bit-prose em {
  font-style: italic;
  color: #dcdce2;
}
.bit-prose ul,
.bit-prose ol {
  padding-left: 1.25em;
}
.bit-prose li + li {
  margin-top: 0.4em;
}
.bit-prose blockquote {
  border-left: 2px solid #5a5a62;
  padding: 4px 0 4px 1em;
  color: var(--silver);
  font-style: italic;
}
.bit-prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3a3a42, transparent);
  margin: 2.2em 0;
}
.bit-prose code {
  font: 500 0.86em / 1.4 var(--font-mono);
  background: #16161a;
  border: 1px solid #2e2e34;
  border-radius: 6px;
  padding: 0.12em 0.4em;
  color: #f2f2f4;
}
.bit-prose pre {
  background: #0c0c10;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bit-prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #e4e4ea;
}
.bit-prose picture {
  display: block;
  margin: 0.6em 0 1em;
}
.bit-prose img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 0.6em 0 1em;
  display: block;
}
.bit-prose picture img {
  margin: 0;
}
.bit-prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}
.bit-prose th,
.bit-prose td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.bit-prose th {
  background: #121216;
  color: white;
  font-weight: 600;
}

/* Share */
.bit-share {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #ffffff12;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.bit-share span {
  font: 500 0.62rem var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-right: 4px;
}
.bit-share a {
  text-decoration: none;
  font-size: 0.78rem;
  color: var(--silver);
  padding: 8px 14px;
  border: 1px solid #54545a;
  border-radius: 999px;
  transition: background 0.18s, color 0.18s;
}
.bit-share a:hover {
  background: #232326;
  color: white;
}

.bit-back {
  display: inline-flex;
  margin-bottom: 28px;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--dim);
  gap: 6px;
  align-items: center;
}
.bit-back:hover {
  color: white;
}

footer.bit-footer {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px 28px;
  font-size: 0.72rem;
  color: var(--dim);
  border-top: 1px solid #ffffff10;
}
footer.bit-footer a {
  text-decoration: none;
}
footer.bit-footer a:hover {
  color: white;
}

@media (max-width: 700px) {
  .v-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
    grid-template-columns: unset;
  }
  .v-brand {
    justify-self: unset;
  }
  .v-nav-links {
    order: 3;
    width: 100%;
    justify-self: unset;
    justify-content: flex-start;
  }
  .v-nav-actions {
    margin-left: auto;
    justify-self: unset;
  }
  .v-nav-actions .login {
    display: none;
  }
  .bit-main {
    padding: 32px 18px 64px;
  }
  .bit-hero h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }
  .bit-prose {
    font-size: 1.02rem;
    line-height: 1.7;
  }
  footer.bit-footer {
    padding: 18px 18px 24px;
    font-size: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bit-card {
    transition: none;
  }
  .bit-card:hover {
    transform: none;
  }
}
