/* ============================================================
   MERIDIAN — components.css
   Written once; both worlds render it via semantic tokens.
   One card. Two buttons. One motif. One frame.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--tx-hi);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--tx-hi); }
p { color: var(--tx-mut); }
::selection { background: var(--signal); color: var(--navy-950); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--signal); color: var(--navy-950); padding: 12px 20px;
  font: 600 15px var(--font-text); border-radius: 0 0 var(--r-el) 0;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

section[data-theme] { background: var(--bg); }
.sect-major { padding-block: var(--sect-major); }
.sect-minor { padding-block: var(--sect-minor); }

/* ---- Type ---- */
.t-display { font-size: var(--t-display); line-height: 1.03; letter-spacing: -0.022em; text-wrap: balance; }
.t-h2 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -0.018em; max-width: 16em; text-wrap: balance; }
.t-h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: -0.01em; }
.t-lede { font-size: var(--t-lede); line-height: 1.55; color: var(--tx-mut); }
.t-small { font-size: var(--t-small); line-height: 1.55; }
h2 .mut { color: var(--tx-mut); }
.prose { max-width: 620px; }
.prose p + p { margin-top: 1em; }

/* ---- Signal motif ---- */
.sig {
  width: 6px; height: 6px; border-radius: var(--r-dot);
  background: var(--signal); position: relative; flex: none; display: inline-block;
}
.sig--live::after {
  content: ""; position: absolute; inset: -6px; border-radius: var(--r-dot);
  border: 1px solid var(--signal-35);
  animation: ping 2.8s cubic-bezier(.22, 1, .36, 1) infinite;
}
@keyframes ping {
  0% { transform: scale(.4); opacity: 1; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}

/* ---- Eyebrow ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--tx-mut); margin-bottom: 20px;
}
.index {
  font: 500 13px/1 var(--font-mono); letter-spacing: .06em; color: var(--tx-mut);
  text-transform: uppercase;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px; border-radius: var(--r-el);
  font: 600 15px var(--font-text); cursor: pointer; border: 1px solid transparent;
  transition: background .18s ease-out, border-color .18s ease-out;
  white-space: nowrap;
}
.btn-primary { background: var(--signal); color: var(--navy-950); }
.btn-primary:hover { background: var(--signal-deep); }
.btn-ghost {
  background: transparent; color: var(--tx-hi);
  border-color: color-mix(in srgb, var(--tx-hi) 52%, transparent);
}
.btn-ghost:hover { border-color: color-mix(in srgb, var(--tx-hi) 72%, transparent); }
.btn--nav { height: 40px; padding: 0 18px; }
.btn--nav-ghost { height: 40px; padding: 0 16px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 15px var(--font-text); color: var(--tx-hi);
}
.link-arrow::before {
  content: ""; width: 0; height: 6px; border-radius: var(--r-dot);
  background: var(--signal); transition: width .18s ease-out;
}
.link-arrow:hover::before { width: 6px; }
.link-arrow::after { content: "→"; }

/* ---- The one card ---- */
.card {
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 32px;
  transition: border-color .18s ease-out;
}
a.card:hover, .card--hover:hover { border-color: rgba(97, 189, 107, .45); }

/* ---- Ledger Frame — the one screenshot/video treatment ---- */
.frame {
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 8px; position: relative;
}
.frame--lift { box-shadow: var(--shadow-lift); }
.frame-bar {
  height: 36px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: var(--r-el) var(--r-el) 0 0;
  font: 500 13px var(--font-text); color: var(--tx-mut);
}
.frame-body { border-radius: 0 0 var(--r-el) var(--r-el); overflow: hidden; position: relative; }
.frame-body img { width: 100%; }
[data-theme="dark"] .frame-body > img { filter: brightness(.97) saturate(.98); }

/* annotation chips — max 2 per frame, guardrail language inside the product */
.chip-note {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper-0); color: var(--ink-hi);
  border-radius: var(--r-el); padding: 8px 14px;
  font: 500 13px var(--font-text);
  box-shadow: 0 1px 3px rgba(17, 40, 63, .08);
  border: 1px solid var(--line-light);
}

/* click-to-load video inside a frame */
.video-shell { position: relative; cursor: pointer; }
.video-shell .play {
  position: absolute; inset: 0; margin: auto;
  width: 56px; height: 56px; border-radius: var(--r-dot);
  background: var(--signal); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease-out;
}
.video-shell .play:hover { background: var(--signal-deep); }
.video-shell .play::after {
  content: ""; margin-left: 4px;
  border-left: 16px solid var(--navy-950);
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
}
.video-shell iframe, .embed-shell iframe {
  width: 100%; aspect-ratio: 16 / 9; border: 0; display: block;
}
.embed-shell { position: relative; }
.embed-shell iframe { aspect-ratio: auto; position: absolute; inset: 0; width: 100%; height: 100%; background: var(--paper-0); }

/* ---- FAQ ---- */
.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 4px; cursor: pointer; list-style: none;
  font: 600 17px var(--font-text); color: var(--tx-hi);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 1.5px solid var(--tx-mut); border-bottom: 1.5px solid var(--tx-mut);
  transform: rotate(45deg); transition: transform .18s ease-out; margin-right: 6px;
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq details p { font-size: 16px; padding: 0 4px 24px; max-width: 600px; }
.faq details p a { color: var(--tx-hi); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Reveal ---- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .5s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .sig--live::after { animation: none; opacity: 0; }
  .faq summary::after, .btn, .link-arrow::before, .card { transition: none; }
  .sticky-cta, .site-header, .nav-toggle span { transition: none; }
}
