* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--butter-1); color: var(--ink-0); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

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

.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink-0);
  color: var(--paper-0);
  border-radius: var(--radius-input);
  text-decoration: none;
  transition: top var(--dur-fast);
}
.skip:focus { top: 16px; }

.wrap {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.disc {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--ink-0);
  background: radial-gradient(circle at center, var(--paper-0) 0 2px, var(--green-1) 2.5px 6.5px, var(--ink-0) 7px 100%);
}
.disc-sm { width: 18px; height: 18px; background: radial-gradient(circle at center, var(--paper-0) 0 1.5px, var(--green-1) 2px 5px, var(--ink-0) 5.5px 100%); }

.logo {
  display: inline-flex;
  padding-block: 10px;
  align-items: center;
  gap: 9px;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}
.logo-word {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: var(--weight-bold);
  letter-spacing: -0.035em;
  line-height: 1;
}
.logo-sub {
  padding-left: 9px;
  border-left: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border: var(--border-width-strong) solid transparent;
  border-radius: var(--radius-input);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translate(-1px, -2px);
  box-shadow: var(--shadow-offset-sm);
}
.btn-primary:active { transform: translate(0, 0); box-shadow: none; }
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:hover { background: var(--surface-sunken); }
.btn-large { min-height: 52px; padding: 14px 22px; font-size: 1rem; }
.nav-cta { min-height: 44px; padding: 8px 14px; font-size: 0.8125rem; }

.section { padding: var(--section-y) 0; border-bottom: 1px solid var(--border-subtle); }

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.section-label::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--border-strong);
  flex: none;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
h2 {
  font-family: var(--font-display);
  font-size: var(--type-h2);
  font-weight: var(--weight-semibold);
  line-height: 1.03;
  letter-spacing: var(--tracking-heading);
  max-width: 15ch;
}
.section-lead {
  color: var(--text-secondary);
  font-size: var(--type-lead);
  line-height: 1.45;
  max-width: 48ch;
}

.mark {
  display: inline-block;
  padding: 0 0.08em 0.02em;
  background: var(--butter-1);
  color: var(--ink-0);
  border-radius: 3px;
  transform: rotate(-1.4deg);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.sticker {
  display: inline-block;
  padding: 9px 16px;
  background: var(--butter-1);
  color: var(--ink-0);
  border: var(--border-width-strong) solid var(--ink-0);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  transform: rotate(-2.5deg);
  box-shadow: var(--shadow-offset-sm);
}
.sticker-paper { background: var(--paper-0); }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: var(--paper-0);
  border-bottom: 1px solid var(--border-subtle);
}
.nav.is-scrolled { box-shadow: 0 16px 34px -30px rgba(23, 35, 29, 0.45); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 32px);
  margin-left: auto;
}
.nav-links a {
  position: relative;
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-mobile { display: none; position: relative; margin-left: auto; }
.nav-mobile summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 74px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  background: var(--surface-raised);
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
  cursor: pointer;
  list-style: none;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary::after { content: "+"; font-family: var(--font-mono); margin-left: 8px; color: var(--accent); }
.nav-mobile[open] summary::after { content: "−"; }
.nav-mobile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(320px, calc(100vw - var(--gutter) * 2));
  padding: 14px;
  display: grid;
  gap: 2px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-panel);
}
.nav-mobile-panel > a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-mobile-panel > a:not(.btn):hover { background: var(--surface-sunken); color: var(--text-primary); }
.nav-mobile-panel .btn { margin-top: 10px; }

.hero { padding: clamp(52px, 7vw, 92px) 0 clamp(56px, 8vw, 104px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
  gap: clamp(36px, 5.5vw, 76px);
  align-items: center;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: var(--type-display);
  font-weight: var(--weight-bold);
  line-height: 0.94;
  letter-spacing: var(--tracking-display);
  max-width: 12.5ch;
  margin-bottom: 24px;
}
.hero-lead {
  max-width: 42ch;
  color: var(--text-secondary);
  font-size: var(--type-lead);
  line-height: 1.45;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.hero-micro {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  letter-spacing: 0.035em;
  color: var(--text-muted);
}
.hero-micro span { padding: 0 4px; color: var(--border-strong); }
.hero-sticker { margin-top: 28px; }

.demo {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--border-subtle);
}
.demo-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.demo-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  font-size: 0.625rem;
  color: var(--text-muted);
}
.demo-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s infinite;
}
.demo-caja {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
}
.demo-scenarios {
  display: flex;
  gap: 6px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border-subtle);
}
.scenario {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.scenario:hover { border-color: var(--border-strong); color: var(--text-primary); }
.scenario.is-active {
  background: var(--ink-0);
  border-color: var(--ink-0);
  color: var(--paper-0);
}
.demo-log {
  height: 422px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px;
  background: var(--paper-0);
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}
.msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 92%;
  animation: msg-in var(--dur-base) var(--ease-out) both;
}
.msg-user { align-self: flex-end; align-items: flex-end; }
.msg-sys { align-self: flex-start; }
.msg .who {
  font-family: var(--font-mono);
  font-size: 0.59375rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 4px;
}
.bubble {
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 0.84375rem;
  line-height: 1.45;
}
.msg-user .bubble {
  background: var(--ink-0);
  color: var(--paper-0);
  border-bottom-right-radius: 4px;
}
.msg-sys .bubble {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}
.msg-card { width: 100%; max-width: 100%; }
.confirm-card {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}
.confirm-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px dashed var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.confirm-item { min-width: 0; }
.confirm-item b {
  display: block;
  font-size: 0.78125rem;
  font-weight: var(--weight-semibold);
  line-height: 1.3;
}
.confirm-item small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.6875rem;
}
.confirm-qty {
  flex: none;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
}
.confirm-qty small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.625rem;
}
.confirm-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: var(--weight-medium);
}
.confirm-foot { padding: 10px 12px; }
.confirm-btn {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 0.78125rem;
  font-weight: var(--weight-semibold);
  transition: background var(--dur-fast);
}
.confirm-btn:hover { background: var(--accent-hover); }
.confirm-success {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
}
.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
}
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
.demo-composer {
  display: flex;
  gap: 8px;
  padding: 11px 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-raised);
}
.demo-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  background: var(--paper-0);
  font-size: 0.78125rem;
}
.demo-input::placeholder { color: var(--text-muted); }
.demo-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.demo-send {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-input);
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 1.05rem;
  transition: background var(--dur-fast);
}
.demo-send:hover { background: var(--accent-hover); }
.demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px 10px;
  font-family: var(--font-mono);
  font-size: 0.59375rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.demo-foot span span { padding: 0 2px; color: var(--border-strong); }
.demo-reset {
  border: 0;
  background: none;
  padding: 4px;
  min-height: 28px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.demo-noscript { padding: 12px 16px; font-size: 0.8125rem; color: var(--text-muted); }

.ticker {
  overflow: hidden;
  background: var(--paper-2);
  border-bottom: 1px solid var(--border-subtle);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker var(--marquee-duration) linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; align-items: center; flex: none; }
.ticker-group span {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 22px;
  font-family: var(--font-mono);
  font-size: 0.65625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
.ticker-group b { font-weight: 400; color: var(--accent); }

