.logo-claro, html:not(.dark) .logo-oscuro { display: none; }
html:not(.dark) .logo-claro { display: block; }

/* Composición compartida y contraste de cada modo. */
.hero { padding-top: 0; }
.hero-lead {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  min-height: clamp(460px, 44vw, 610px);
  gap: 10px;
  padding-block: 50px;
}
.hero-copy { position: relative; z-index: 1; text-align: left; }
.hero-copy .eyebrow { justify-content: flex-start; font-size: 10px; }
.hero h1 {
  max-width: none;
  margin-inline: 0;
  font: 400 clamp(43px, 5.2vw, 78px)/.97 var(--serif);
  letter-spacing: -.05em;
  text-wrap: initial;
}
.hero-intro { margin-inline: 0; max-width: 45ch; }
.hero-actions { justify-content: flex-start; margin-top: 27px; }
.button { border-radius: 10px; }
.button-outline { transition: none; }
h1 em { font-weight: inherit; }
.opening-art { position: relative; margin-inline: -45px -22px; }
.opening-art img { width: 100%; }
@media (max-width: 880px) {
  .hero-lead { padding-block: 49px 30px; }
  .opening-art { margin-inline: -24px -15px; }
}
@media (max-width: 680px) {
  .hero-lead { grid-template-columns: 1fr; min-height: auto; padding-block: 44px 16px; gap: 0; }
  .opening-art { width: min(100%, 480px); margin: 2px auto 0; }
  .hero h1 { font-size: clamp(40px, 10vw, 68px); }
}

html.dark {
  color-scheme: dark;
  --ink: var(--brand-white);
  --ink-soft: #b1b2ba;
  --muted: #292a30;
  --surface: #0e0e11;
  --white: #131316;
  --pale: #bdbec7;
  --line: #34343b;
  --black: var(--brand-black);
  --accent-ink: #ffb773;
  --nav-accent: var(--accent-ink);
  --norm-link: var(--accent-ink);
}
html.dark body { background: var(--black); }
html.dark .opening,
html.dark .demo { background: var(--black); color: var(--ink); }
html.dark main > .opening {
  background:
    radial-gradient(ellipse at 76% 19%, #242326 0%, transparent 39%),
    radial-gradient(ellipse at 79% 37%, #101522 0%, transparent 50%),
    var(--black);
}
html.dark h1 em { color: #dedbdd; }
html.dark .button-outline { background: #ffffff09; box-shadow: inset 0 0 0 1px #ffffff35; }
html.dark .button-outline:hover { background: #ffffff18; }
html.dark .showcase { box-shadow: 0 12px 34px #0006; }
html.dark .sample-label { color: var(--pale); }
html.dark .window-mark { background: #302218; color: var(--yellow); }
html.dark .scenes-nav button { background: var(--white); color: var(--pale); }
html.dark .scenes-nav button .icon { color: #a9a7b4; }
html.dark .scenes-nav button:hover { background: #1a1a1f; }
html.dark .scenes-nav button[aria-selected="true"] { background: #202024; color: var(--ink); }
html.dark .scenes-nav button[aria-selected="true"] .icon { color: var(--accent-ink); }
html.dark .scene-copy .eyebrow { color: #b0aeb8; }
html.dark .scene-data { background-color: #0d0d10; background-image: radial-gradient(#71717b61 .7px, transparent .7px); }
html.dark .record { background: #18181c; border-color: var(--line); box-shadow: 0 5px 16px #0007; }
html.dark :is(.record-head, .timeline time, .timeline-time, .record-fields dt) { color: var(--pale); }
html.dark .status { background: #232837; color: #c8d4f0; }
html.dark .status-warning { background: #302218; color: #ffbf87; }
html.dark .status-good { background: #172c23; color: #a6dfc1; }
html.dark .hero-foot { color: var(--pale); border-bottom: 1px solid var(--muted); }
html.dark :is(.scene-copy a, .ticket a) { color: var(--accent-ink); }
html.dark :is(.section .eyebrow, .flow-meta) { color: var(--pale); }
html.dark .section .eyebrow span { background: #291e15; border-color: #523c2b; color: #ffc894; }
html.dark .flow li { background: var(--white); border-top-color: #69696f; }
html.dark .flow li:nth-child(2) { border-top-color: var(--orange); }
html.dark .flow li:nth-child(3) { border-top-color: var(--yellow); }
html.dark .flow li::after { background: var(--black); color: var(--accent-ink); }
html.dark :is(.ticket, .evidence article) { background: var(--white); }
html.dark .resolution { background: #26262b; color: var(--ink); }
html.dark .ticket-head span { background: #302218; color: var(--accent-ink); }
html.dark .demo { border-top: 1px solid var(--line); }
html.dark .footer { border-top: 1px solid var(--line); }
html.dark .skip:focus { background: var(--white); color: var(--ink); }
html.dark .showcase :focus-visible { outline-color: var(--accent-ink); }


.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid #46464e;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.theme-toggle:hover { background: #ffffff15; }
html:not(.dark) { --nav-accent: #914a16; }
html:not(.dark) :is(.opening, .demo) { background: var(--brand-white); color: var(--ink); }
html:not(.dark) .scene-copy a:hover { color: #914a16; }
html:not(.dark) .theme-toggle { border-color: #aab8c9; }
html:not(.dark) .theme-toggle:hover { background: #eef3fa; }
html:not(.dark) main > .opening {
  background:
    radial-gradient(ellipse at 78% 20%, #edf1f7, transparent 52%),
    linear-gradient(180deg, var(--brand-white) 52%, #f4f7fb);
}
html:not(.dark) :is(.hero-copy .eyebrow, .demo .eyebrow, .hero-intro, .demo p:not(.eyebrow)) { color: var(--ink-soft); }
html:not(.dark) h1 em { color: var(--brand-blue); }
html:not(.dark) .opening-art img { content: url("assets/continuidad-claro.svg"); }
html:not(.dark) .button-outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #b6c3d3; }
html:not(.dark) .button-outline:hover { background: #f1f5fa; }
html:not(.dark) .showcase { box-shadow: 0 12px 34px #132e5217; }
html:not(.dark) .hero-foot { color: var(--ink-soft); border-bottom: 1px solid var(--line); }
html:not(.dark) .demo { border-top: 1px solid var(--line); background: #f4f7fb; }
html:not(.dark) .demo h2 em { color: #944400; }
html:not(.dark) .quiet { color: #184f81; }
html:not(.dark) :is(.opening, .demo) :focus-visible { outline-color: #1265a6; }

@media (max-width: 980px) {
  .theme-toggle { min-width: 36px; }
  .theme-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
