/* Bitácora website — layout and components.
   Colours come from tokens.css (generated from tokens/tokens.json). Do not add hex values here. */

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/AtkinsonHyperlegibleNext-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/AtkinsonHyperlegibleNext-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/AtkinsonHyperlegibleNext-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/AtkinsonHyperlegibleNext-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("../fonts/AtkinsonHyperlegibleMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("../fonts/AtkinsonHyperlegibleMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/Literata-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --font-ui: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --font-display: "Literata", Georgia, serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --container: 1200px;
  --r-chip: 5px; --r-control: 8px; --r-tab: 9px; --r-card: 10px; --r-panel: 12px; --r-pill: 999px;
}
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font-ui); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:hover { opacity: .85; }
h1, h2, h3, p, ul, pre { margin: 0; }
code, kbd, pre { font-family: var(--font-mono); }
kbd { font-size: .82em; padding: 0 5px; border: 1px solid var(--line-2); border-radius: var(--r-chip); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: 24px; }
.section { border-top: 1px solid var(--line); }
.section > .container { padding-block: 96px; }
.section--side { background: var(--side); }
.section--panel { background: var(--panel); }

.overline { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.overline--ai { display: inline-flex; align-items: center; gap: 8px; color: var(--ai); }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.h2 { font-size: 40px; line-height: 1.15; }
.lead { font-size: 18px; color: var(--text-2); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.split { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.split > * { flex: 1 1 400px; min-width: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--r-control); text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--ghost { border-color: var(--line-2); color: var(--text); font-weight: 500; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.icon-btn { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r-control); background: transparent; color: var(--text-2); cursor: pointer; }
[data-theme="dark"] .icon-moon, [data-theme="light"] .icon-sun { display: none; }

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__word { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.01em; }
.brand__ribbon { fill: var(--accent); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .container { height: 64px; display: flex; align-items: center; gap: 24px; }
.site-nav { display: flex; gap: 24px; margin-left: 16px; font-size: 14.5px; color: var(--text-2); }
.site-nav a { text-decoration: none; }
.site-header__spacer { flex: 1; }

/* Hero */
.hero { padding-block: 88px 56px; display: flex; flex-direction: column; gap: 28px; }
.hero__meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.hero__title { max-width: 900px; font-size: clamp(40px, 6vw, 72px); line-height: 1.08; letter-spacing: -.02em; }
.hero__lead { max-width: 680px; font-size: 20px; line-height: 1.6; color: var(--text-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* App preview (static illustration of the app UI) */
.preview { padding-bottom: 96px; }
.app { border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; background: var(--bg); }
.app__bar { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--side); border-bottom: 1px solid var(--line); overflow: hidden; color: var(--muted); }
.app__tabs { display: flex; align-self: stretch; align-items: flex-end; gap: 2px; flex: 1 1 auto; min-width: 0; }
.app__tab { height: 38px; display: flex; align-items: center; padding: 0 14px; font-size: 13.5px; white-space: nowrap; }
.app__tab--active { background: var(--bg); border-radius: var(--r-tab) var(--r-tab) 0 0; color: var(--text); font-weight: 600; }
.app__search { flex: 0 1 260px; min-width: 120px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--bg); font-size: 13.5px; }
.app__search span { flex: 1; white-space: nowrap; overflow: hidden; }
.app__search kbd { font-size: 11.5px; padding: 1px 6px; color: var(--text-2); }
.app__body { display: flex; flex-wrap: wrap; min-height: 560px; }
.app__side { flex: 0 0 220px; padding: 14px 12px; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; font-size: 14px; }
.app__nav { display: flex; flex-direction: column; gap: 2px; }
.app__nav-item { display: flex; align-items: center; height: 34px; padding: 0 10px; color: var(--text-2); border-radius: var(--r-control); }
.app__nav-item--active { background: var(--hover); color: var(--text); font-weight: 600; }
.app__nav-item .badge { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--warn); }
.app__fav { padding: 4px 10px; color: var(--text-2); }
.app__status { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.app__main { flex: 999 1 420px; min-width: 0; padding: 36px 40px 40px; display: flex; flex-direction: column; gap: 16px; }
.journal__day { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.pill-today { padding: 1px 8px; border-radius: var(--r-pill); background: var(--accent-bg); color: var(--accent); font-weight: 600; font-size: 12px; }
.journal__title { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1.2; letter-spacing: -.01em; }
.blocks { display: flex; flex-direction: column; gap: 6px; }
.block { display: flex; gap: 8px; align-items: flex-start; }
.block__bullet { flex: none; width: 18px; height: 26px; display: flex; align-items: center; justify-content: center; }
.block__bullet::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bullet); }
.block__content { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.block--editing { padding: 2px 8px 2px 0; border-radius: var(--r-control); background: var(--edit-bg); }
.children { margin-left: 8px; padding-left: 18px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.children .block__bullet::before { width: 5px; height: 5px; }
.marker { font-family: var(--font-mono); font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: var(--r-chip); }
.marker--todo { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); }
.marker--doing { background: var(--accent-bg); color: var(--accent); }
.marker--done { color: var(--muted); text-decoration: line-through; }
.date-chip { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.ghost { color: var(--ai); }
.ghost-kbd { font-size: 11.5px; border-color: var(--ai-line); color: var(--ai); }
.app__panel { flex: 1 1 300px; max-width: 100%; padding: 16px; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; line-height: 1.6; }
.panel-tabs { display: flex; gap: 4px; font-size: 13.5px; }
.panel-tabs span { padding: 4px 12px; border-radius: var(--r-control); color: var(--muted); }
.panel-tabs .is-active { background: var(--hover); color: var(--text); font-weight: 600; }
.bubble-user { align-self: flex-end; max-width: 85%; padding: 8px 12px; border-radius: var(--r-card); background: var(--hover); }
.tool-call { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-control); font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.proposal { border: 1px solid var(--ai-line); border-radius: var(--r-card); background: var(--ai-bg); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.proposal__head { font-family: var(--font-mono); font-size: 12px; color: var(--ai); }
.proposal__diff { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); }
.proposal__actions { display: flex; gap: 8px; font-size: 13.5px; }
.proposal__apply { padding: 4px 12px; border-radius: var(--r-control); background: var(--ai); color: var(--on-ai); font-weight: 600; }
.proposal__deny { padding: 4px 12px; border-radius: var(--r-control); border: 1px solid var(--line-2); }

/* Name origin */
.origin { display: flex; flex-wrap: wrap; gap: 40px 64px; padding-block: 72px; }
.origin h2 { flex: 1 1 320px; font-size: 36px; line-height: 1.2; }
.origin__body { flex: 2 1 480px; display: flex; flex-direction: column; gap: 16px; font-size: 18px; color: var(--text-2); }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 48px; }
.feature { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.feature svg { color: var(--accent); }
.feature h3 { font-size: 19px; line-height: 1.4; font-weight: 600; }
.feature p { color: var(--text-2); }
.feature code { font-size: 14px; }

/* Compatibility list */
.compat-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.compat-list li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.compat-list .mono { flex: 0 0 170px; font-size: 14px; color: var(--text); }
.compat-list .mono.accent { color: var(--accent); }

/* AI */
.ai-head { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; }
.ai-head > .stack { flex: 2 1 480px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 48px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; gap: 8px; }
.card h3 { font-size: 18px; font-weight: 600; }
.card p { color: var(--text-2); font-size: 15px; }
.privacy { display: flex; flex-wrap: wrap; gap: 24px 48px; margin-top: 48px; padding: 28px 32px; border-radius: var(--r-panel); background: var(--side); border: 1px solid var(--line); }
.privacy h3 { flex: 1 1 220px; font-size: 24px; line-height: 1.3; }
.privacy ul { flex: 3 1 520px; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 32px; color: var(--text-2); font-size: 15px; }
.privacy li { display: flex; gap: 10px; }
.privacy li::before { content: ""; flex: none; margin-top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Code */
.code { padding: 24px; overflow-x: auto; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--raised); font-size: 14px; line-height: 1.8; color: var(--text-2); }
.code .c { color: var(--muted); }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-block: 40px; }
.download { display: flex; flex-direction: column; gap: 6px; padding: 24px; border: 1px solid var(--line-2); border-radius: var(--r-panel); text-decoration: none; }
.download strong { font-size: 19px; }
.download .mono { font-size: 13px; color: var(--muted); }
.download .go { margin-top: 10px; color: var(--accent); font-weight: 600; }
.text-links a { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--side); }
.site-footer .container { padding-block: 56px 40px; display: flex; flex-direction: column; gap: 40px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.footer-about { display: flex; flex-direction: column; gap: 12px; max-width: 360px; font-size: 15px; color: var(--text-2); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 40px; font-size: 15px; }
.footer-nav div { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { text-decoration: none; color: var(--text-2); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.footer-bottom strong, .footer-bottom a { color: var(--text); font-weight: 600; }
.footer-bottom .mono { font-size: 13px; color: var(--muted); }

@media (max-width: 760px) {
  .site-nav, .app__side { display: none; }
  .h2 { font-size: 32px; }
  .app__main { padding: 24px 20px; }
  .compat-list li { flex-direction: column; gap: 2px; }
  .compat-list .mono { flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
