/* MatterBerth site. Tokens are the film system (navy + gold), shared with
   legal.dangerouscentaur.com and the film template. */
:root {
  color-scheme: dark;
  --ink:        #0a1220;
  --ink-deep:   #070c16;
  --panel:      #0f1a2c;
  --card:       #16243b;
  --card2:      #1c2d49;
  --tile:       #22344f;
  --line:       #2a3d5a;
  --line-soft:  #22324d;
  --cream:      #fbf6ea;
  --body:       #dbe3ef;
  --muted:      #a9bad2;
  --faint:      #93a5c1;
  --gold:       #e0ae52;
  --gold-ink:   #1b1405;
  --gold-hover: #ebbd66;
  --gold-tint:  rgba(224,174,82,.13);
  --gold-line:  rgba(224,174,82,.62);
  --blue:       #6aa3f0;
  --sent:       #2b62c9;
  --ok:         #62d0a0;
  --ok-tint:    rgba(86,199,150,.13);
  --ok-line:    rgba(86,199,150,.5);
  --road:       #a9c8f3;
  --r-l: 22px; --r: 16px; --r-s: 12px;
  --font:         "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --shadow: 0 24px 60px rgba(0,0,0,.42);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 760px at 50% -6%, #1b2a44 0%, rgba(27,42,68,0) 70%),
    var(--ink);
  background-repeat: no-repeat;
  color: var(--body);
  font-family: var(--font);
  font-size: clamp(1rem, .95rem + .25vw, 1.1rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
ul, ol.track, ol.steps { margin: 0; padding: 0; list-style: none; }
section[id], [id].part { scroll-margin-top: 5rem; }
h1, h2 { margin: 0; color: var(--cream); font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; font-optical-sizing: auto; }
h3 { margin: 0; color: var(--cream); font-weight: 700; line-height: 1.3; font-size: 1.08rem; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); }
::selection { background: rgba(224,174,82,.35); color: var(--cream); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 99; background: var(--gold); color: var(--gold-ink); padding: .6rem 1rem; border-radius: 10px; font-weight: 700; }
.skip:focus { left: 1rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 5vw, 3rem); }
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.alt { background: linear-gradient(180deg, rgba(16,27,45,.92), rgba(15,26,44,.72)); border-block: 1px solid var(--line-soft); }
.lede { color: var(--muted); font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem); line-height: 1.65; max-width: var(--measure); }
.sec-head { display: grid; gap: 1rem; max-width: 46rem; margin-bottom: 2.5rem; }
.sec-head p { color: var(--muted); max-width: var(--measure); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 50px; padding: .9rem 1.4rem; border-radius: 14px; border: 1px solid transparent;
  background: var(--gold); color: var(--gold-ink);
  font: 700 1rem/1.15 var(--font); text-decoration: none; cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--gold-hover); }
.btn.ghost { background: var(--card); color: var(--cream); border-color: var(--line); }
.btn.ghost:hover { background: var(--card2); border-color: var(--gold-line); }
.text-link { color: var(--gold); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text-link:hover { text-decoration-thickness: 2px; }

.badge {
  display: inline-flex; align-items: center; flex-shrink: 0;
  padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap;
}
.badge.live { background: var(--ok-tint); color: var(--ok); border-color: var(--ok-line); }
.badge.road { background: rgba(106,163,240,.10); color: var(--road); border-color: rgba(106,163,240,.38); }
.badge.req  { background: var(--gold); color: var(--gold-ink); border-radius: 8px; font-weight: 800; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40; min-height: 4.25rem; display: flex; align-items: center;
  background: rgba(10,18,32,.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: .6rem; }
.mark { text-decoration: none; color: var(--cream); font-weight: 800; font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); letter-spacing: -.015em; padding: .3rem 0; white-space: nowrap; }
.mark em { font-style: normal; color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: .5rem; }
.nav .btn { min-height: 44px; padding: .55rem .95rem; font-size: .92rem; }
.nav .signin { display: none; }
@media (min-width: 40rem) { .nav .signin { display: inline-flex; } }
.lang-toggle { display: flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
.lang-btn {
  min-width: 40px; min-height: 38px; padding: .3rem .5rem; border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--muted); font: 700 .8rem/1 var(--font); letter-spacing: .04em; cursor: pointer;
}
.lang-btn:hover { color: var(--cream); background: var(--card); }
.lang-btn[aria-pressed="true"] { background: var(--gold-tint); color: var(--gold); border-color: var(--gold-line); }
@media (max-width: 24.5rem) {
  .nav .wrap { gap: .35rem; }
  .mark { font-size: 1.05rem; }
  .lang-btn { min-width: 36px; padding-inline: .35rem; }
  .nav .btn { padding: .5rem .7rem; font-size: .86rem; }
}

/* Hero */
.hero { padding-block: clamp(2.25rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; gap: 2.25rem; grid-template-columns: minmax(0, 1fr); }
.hero-text { display: grid; gap: 1.3rem; align-content: center; }
.hero h1 { font-size: clamp(2.6rem, 1.3rem + 5.4vw, 4.9rem); line-height: 1.02; letter-spacing: -.025em; max-width: 13ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .4rem; }
.hero-cta .btn { flex: 1 1 10rem; max-width: 15rem; }
.hero-signin { font-size: .95rem; color: var(--muted); }
.film { margin: 0; justify-self: center; width: min(100%, 21rem); }
.film-frame { border-radius: var(--r-l); overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: var(--shadow); }
.film-frame video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.film figcaption { display: grid; gap: .35rem; margin-top: .9rem; }
.film-title { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--cream); }
.film-meta { font-size: .9rem; color: var(--muted); }
.disclose { font-size: .82rem; line-height: 1.5; color: var(--faint); }
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 20rem; column-gap: clamp(2.5rem, 6vw, 6rem); }
  .film { width: 100%; }
}

/* Changes on request: the showcase */
.changes-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
.changes-copy { display: grid; gap: 1.1rem; }
.changes-copy p { color: var(--muted); max-width: var(--measure); }
.changes-copy .lead { color: var(--body); font-size: 1.1rem; }
@media (min-width: 60rem) { .changes-grid { grid-template-columns: 1fr 1.05fr; gap: 4rem; } }

.demo { margin: 0; }
.ws {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow); overflow: hidden;
}
.ws-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.1rem .4rem; }
.ws-matter { font-weight: 700; color: var(--cream); font-size: .98rem; }
.ws-who { font-size: .8rem; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem 1.1rem .9rem; border-bottom: 1px solid var(--line-soft); }
.tab { flex-shrink: 0; padding: .45rem .75rem; border-radius: 10px; font-size: .84rem; font-weight: 600; color: var(--muted); background: var(--panel); border: 1px solid var(--line-soft); white-space: nowrap; }
.tab.on { color: var(--cream); background: var(--tile); border-color: var(--line); }
.tab.new { color: var(--gold); background: var(--gold-tint); border-color: var(--gold-line); }
.ws-body { display: grid; gap: .8rem; padding: 1.1rem; }
.bubble { justify-self: end; max-width: 88%; background: var(--sent); color: #fff; padding: .75rem .95rem; border-radius: 16px 16px 4px 16px; font-size: .95rem; line-height: 1.45; }
.bubble-who { justify-self: end; font-size: .76rem; color: var(--faint); margin-top: -.35rem; }
.track { display: grid; gap: 0; margin-top: .35rem; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); }
.track li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .7rem; padding: .75rem .9rem; border-bottom: 1px solid var(--line-soft); align-items: start; }
.track li:last-child { border-bottom: 0; }
.track .dot { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; background: var(--tile); color: var(--cream); }
.track li.done .dot { background: var(--gold); color: var(--gold-ink); }
.track b { display: block; color: var(--cream); font-size: .92rem; }
.track span { font-size: .85rem; color: var(--muted); line-height: 1.45; }
.demo figcaption { font-size: .82rem; color: var(--faint); margin-top: .7rem; }

/* The one orchestrated moment: the requested tab arrives. */
.js .demo .tab.new { opacity: 0; transform: translateX(-10px); }
.js .demo .track li.built { opacity: .35; }
.js .demo.play .tab.new { opacity: 1; transform: none; transition: opacity .5s ease 1.1s, transform .5s ease 1.1s; }
.js .demo.play .track li.built { opacity: 1; transition: opacity .4s ease .7s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .demo .tab.new, .js .demo .track li.built { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn { transition: none; }
}

/* How it works: a real sequence, so it is numbered */
.steps { display: grid; gap: 0; counter-reset: s; border-top: 1px solid var(--line-soft); }
.steps li { display: grid; grid-template-columns: 2.6rem 1fr; gap: .25rem 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line-soft); counter-increment: s; }
.steps li::before { content: counter(s); grid-row: span 2; font-family: var(--font-display); font-style: italic; font-size: 2rem; line-height: 1; color: var(--gold); }
.steps p { color: var(--muted); max-width: var(--measure); }
@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 0 2rem; border-top: 0; }
  .steps li { grid-template-columns: 1fr; border-bottom: 0; border-top: 3px solid var(--line); padding-top: 1.4rem; }
  .steps li::before { grid-row: auto; margin-bottom: .6rem; }
}

/* Feature groups */
.groups { display: grid; gap: 2.25rem 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .groups { grid-template-columns: 1fr 1fr; } }
.group h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; margin-bottom: .6rem; }
.flist li { display: flex; justify-content: space-between; align-items: baseline; gap: .9rem; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); }
.flist li:last-child { border-bottom: 0; }
.flist .t { color: var(--body); font-size: .97rem; line-height: 1.5; min-width: 0; }
.flist .t small { display: block; color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.roadmap { margin-top: 3rem; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-l); padding: 1.4rem 1.3rem; }
.roadmap h3 { margin-bottom: .2rem; }
.roadmap > p { color: var(--muted); font-size: .93rem; margin-bottom: .5rem; }
@media (min-width: 52rem) { .roadmap { padding: 1.8rem 2rem; } .roadmap ul { columns: 2; column-gap: 3rem; } .roadmap li { break-inside: avoid; } }

/* Security */
.sec-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .sec-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.owner { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--r); padding: 1.5rem 1.5rem; display: grid; gap: .8rem; align-self: start; }
.owner h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; }
.owner p { color: var(--muted); font-size: .97rem; }

/* Pricing + access */
.price { display: grid; gap: 1.25rem; max-width: 46rem; }
.price p { color: var(--muted); max-width: var(--measure); }
.price .terms { display: grid; gap: .6rem; margin-top: .5rem; }
.price .terms li { padding-left: 1.2rem; position: relative; color: var(--body); }
.price .terms li::before { content: ""; position: absolute; left: 0; top: .7em; width: .5rem; height: 2px; background: var(--gold); }
.access { display: grid; gap: 1.2rem; }
.access .row { display: flex; flex-wrap: wrap; gap: .65rem; }
.access .row .btn { flex: 1 1 12rem; max-width: 18rem; }
.access .mail { color: var(--muted); }
.access .mail a { color: var(--gold); font-weight: 700; overflow-wrap: anywhere; }
.hablamos { font-family: var(--font-display); font-style: italic; color: var(--muted); }

/* Footer */
footer { border-top: 1px solid var(--line-soft); padding: 2.25rem 0 2.75rem; background: var(--ink-deep); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; font-size: .9rem; color: var(--faint); }
footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
footer a { color: var(--muted); text-decoration: none; padding: .35rem 0; display: inline-block; }
footer a:hover { color: var(--gold); text-decoration: underline; }
.credit a { color: var(--muted); }

/* Briefing (analysis) */
.brief { max-width: 50rem; }
.brief h1 { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.6rem); line-height: 1.05; }
.brief h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.3rem); margin: 0 0 1rem; }
.brief h3 { margin: 2rem 0 .7rem; font-size: 1.12rem; }
.brief p, .brief li { color: var(--body); }
.brief p + p { margin-top: .8rem; }
.brief .meta { color: var(--muted); margin-top: .8rem; }
.brief .part { padding-top: 3.25rem; margin-top: 3.25rem; border-top: 1px solid var(--line-soft); }
.brief ul.dash { display: grid; gap: .55rem; }
.brief ul.dash li { padding-left: 1.2rem; position: relative; }
.brief ul.dash li::before { content: ""; position: absolute; left: 0; top: .72em; width: .5rem; height: 2px; background: var(--gold); }
.brief ol { margin: 0; padding-left: 1.4rem; display: grid; gap: .6rem; }
.brief ol li::marker { color: var(--gold); font-weight: 700; }
.keys { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1.5rem 0 .5rem; }
@media (min-width: 48rem) { .keys { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.key { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; }
.key b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; color: var(--cream); line-height: 1.15; }
.key span { display: block; font-size: .88rem; line-height: 1.4; color: var(--muted); }
.tbl { overflow-x: auto; margin: 1rem 0 .5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.tbl table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: .93rem; }
.tbl caption { text-align: left; padding: .85rem 1rem .2rem; color: var(--muted); font-size: .85rem; }
.tbl th, .tbl td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl thead th { color: var(--cream); font-weight: 700; background: var(--panel); }
.tbl tbody th { color: var(--cream); font-weight: 600; }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.callout { margin: 1.5rem 0; padding: 1.1rem 1.3rem; background: var(--gold-tint); border: 1px solid var(--gold-line); border-radius: var(--r); color: var(--cream); }
.callout p { color: var(--cream); }
.quote { font-family: var(--font-display); font-style: italic; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); line-height: 1.4; color: var(--cream); border-left: 3px solid var(--gold); padding-left: 1.1rem; margin: 1.25rem 0; }
.sources { font-size: .9rem; }
.sources li { overflow-wrap: anywhere; }
.sources a { color: var(--muted); }
.sources a:hover { color: var(--gold); }
