/* ==========================================================================
   DGTL × ClipVault — shared design-token and component layer
   One stylesheet for the marketing pages (dgtl.mov) and the browser demo
   (demo.dgtl.mov). Tokens are the DGTL brand kit verbatim; the marketing and
   app scales differ only in density.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Manrope, self-hosted. These pages make no third-party request at all — a
   site whose whole argument is "nothing leaves your machine" should not be
   telling a font CDN who reads it.

   One variable file per subset covers every weight the design uses (200–800),
   so this costs two requests, not ten. URLs are relative to this stylesheet,
   so they resolve on dgtl.mov, on demo.dgtl.mov and under any subpath.

   Manrope by Mikhail Sharanda / Michael Rafailyk, SIL Open Font License 1.1 —
   see assets/fonts/LICENSE.md.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* surfaces */
  --bg: #000000;
  --surface-1: #0a0a0a;
  --surface-2: #111111;
  --surface-card: rgba(0, 0, 0, 0.45);
  /* text */
  --text: #f0f0f0;
  --text-muted: #d0d0d0;
  --text-dim: #8a8a8a;
  --text-ghost: #5a5a56;
  --gold-tan: #b3a06a;
  --placeholder: #6a6a6a;
  /* accent */
  --gold: #f0cf50;
  --gold-tint: rgba(240, 207, 80, 0.08);
  --gold-ring: rgba(240, 207, 80, 0.15);
  /* borders */
  --border: #2a2a2a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.4);
  /* functional */
  --success: #7bc47f;
  --success-tint: rgba(123, 196, 127, 0.1);
  --warning: #e8a33d;
  --warning-tint: rgba(232, 163, 61, 0.1);
  --error: #e5484d;
  --error-tint: rgba(229, 72, 77, 0.1);
  --info: #6e9fdb;
  --info-tint: rgba(110, 159, 219, 0.1);
  /* geometry */
  --r-control: 7px;
  --r-card: 16px;
  --r-pill: 9999px;
  --col: 1120px;
  /* effects */
  --shadow-card: 0 6px 6px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.15);
  --glass-bg: rgba(0, 0, 0, 0.45);
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { background: var(--bg); scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
/* the nav is fixed at 73px — anchor targets must clear it */
:target, [id] { scroll-margin-top: 96px; }
::placeholder { color: var(--placeholder); }
::selection { background: var(--gold); color: #000; }

/* The universal focus treatment — gold, always visible, never removed. */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--r-control);
}
.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-ring);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--r-control);
  transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===================== primitives ======================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  border-radius: var(--r-control);
  padding: 15px 24px;
  min-height: 48px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s, background 0.15s, color 0.15s,
    border-color 0.15s;
}
.btn-primary { background: var(--gold); color: #000; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: #fff;
}
.btn-secondary:hover { border-color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-muted); font-weight: 500; }
.btn-ghost:hover { color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 14px; min-height: 40px; }
.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.card-solid { background: var(--surface-1); }
.card-hover { transition: border-color 0.2s, transform 0.2s; }
.card-hover:hover { border-color: #3a3a3a; transform: translateY(-2px); }
.card-callout { border-left: 3px solid var(--gold); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  background: var(--gold-tint);
  color: var(--gold);
  white-space: nowrap;
}
.pill-quiet {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.badge-success { background: var(--success-tint); color: var(--success); }
.badge-warning { background: var(--warning-tint); color: var(--warning); }
.badge-error { background: var(--error-tint); color: var(--error); }
.badge-info { background: var(--info-tint); color: var(--info); }

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.input,
.select,
.textarea {
  width: 100%;
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 14px;
}
input[type="checkbox"],
input[type="radio"] { accent-color: var(--gold); }

code, kbd, .mono {
  font-family: var(--mono);
  font-size: 0.92em;
}
.code-inline {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--text-muted);
}
pre.code {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}
pre.code .c { color: var(--text-dim); }

/* ===================== type helpers ===================================== */

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-tan);
  font-weight: 700;
}
.h-display {
  font-size: clamp(38px, 6vw, 70px);
  font-weight: 700;
  letter-spacing: -1.4px;
  line-height: 1.06;
  color: #fff;
}
.h-section {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.15;
  color: #fff;
}
.h-card { font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -0.2px; }
.gold { color: var(--gold); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.lead { font-size: 18px; line-height: 1.65; color: var(--text-muted); }
.metric { font-weight: 800; font-variant-numeric: tabular-nums; }
a { color: var(--gold); }
a:hover { color: #f6dd85; }

/* ===================== layout =========================================== */

.wrap { width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; }
.section { padding: 104px 0; position: relative; }
.section-tight { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 14px; display: block; }
.section-head p { margin-top: 18px; }
.rule { height: 1px; background: var(--border); border: 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* atmosphere: vignettes + spark watermark, felt not seen */
.atmos { position: relative; isolation: isolate; overflow: hidden; }
.atmos::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(240, 207, 80, 0.07), transparent 60%),
    radial-gradient(700px 500px at 90% 10%, rgba(255, 255, 255, 0.035), transparent 60%);
  pointer-events: none;
}
.spark-mark {
  position: absolute;
  z-index: -1;
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}

/* ===================== marketing nav ==================================== */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 73px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px) saturate(1.8);
  -webkit-backdrop-filter: blur(8px) saturate(1.8);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand img { height: 24px; width: auto; }
.nav-brand .divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}
.nav-brand .product {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: 8px; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  color: #fff;
  cursor: pointer;
  margin-left: auto;
}
.mobile-menu {
  position: fixed;
  inset: 73px 0 0 0;
  z-index: 99;
  background: #000;
  padding: 24px;
  display: none;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.mobile-menu[data-open="true"] { display: flex; }
.mobile-menu a.m-link {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
}
.mobile-menu a.m-link:hover { color: var(--gold); }
.mobile-menu .m-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.mobile-menu .btn { width: 100%; }

/* ===================== marketing footer ================================= */

.footer { border-top: 1px solid var(--border); padding: 80px 0 40px; background: #000; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px 24px;
}
.footer h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer ul { list-style: none; }
.footer li { line-height: 2.1; }
.footer li a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}
.footer li a:hover { color: #fff; }
.footer-brand img { height: 26px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: var(--text-dim); max-width: 260px; }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

/* ===================== marketing blocks ================================= */

.hero { padding: 168px 0 96px; text-align: center; }
.hero .eyebrow { display: block; margin-bottom: 22px; }
.hero p.lead { max-width: 660px; margin: 26px auto 0; }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 38px;
}
.trust-line { margin-top: 20px; font-size: 13px; color: var(--text-dim); }

/* product-shot frame: a browser/app chrome around real UI compositions */
.frame {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: var(--shadow-card);
}
.frame-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.frame-dots { display: flex; gap: 6px; }
.frame-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a2a2a;
  display: block;
}
.frame-title {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.frame-badges { margin-left: auto; display: flex; gap: 8px; }

.feature-card .icon-chip {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--gold-tint);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

.step-num {
  font-size: 52px;
  font-weight: 800;
  color: var(--text-ghost);
  line-height: 1;
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.pipeline-node {
  flex: 1 1 190px;
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  background: var(--surface-1);
  padding: 16px 18px;
}
.pipeline-node .k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 700;
}
.pipeline-node .v { font-size: 15px; font-weight: 700; color: #fff; margin-top: 6px; }
.pipeline-node .d { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.pipeline-node.is-accent { border-color: rgba(240, 207, 80, 0.35); }
.pipeline-node.is-accent .v { color: var(--gold); }
.pipeline-arrow {
  align-self: center;
  color: var(--text-dim);
  font-size: 18px;
  flex: 0 0 auto;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 4px;
  margin-bottom: -1px;
  cursor: pointer;
  min-height: 44px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: #fff; border-bottom-color: var(--gold); }
.tabpanel[hidden] { display: none; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  padding: 22px 2px;
  cursor: pointer;
  min-height: 48px;
}
.faq-q .ind { color: var(--gold); font-size: 22px; font-weight: 400; line-height: 1; }
.faq-a { padding: 0 2px 24px; max-width: 760px; }
.faq-a p { font-size: 15px; color: var(--text-muted); line-height: 1.7; }
.faq-a p + p { margin-top: 12px; }
.faq-a[hidden] { display: none; }

.check-list { list-style: none; display: grid; gap: 14px; }
.check-list li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}
.check-list li svg { flex: 0 0 auto; margin-top: 3px; color: var(--gold); }

.numbered { list-style: none; counter-reset: n; display: grid; gap: 18px; }
.numbered li { counter-increment: n; display: flex; gap: 16px; }
.numbered li::before {
  content: counter(n);
  flex: 0 0 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.numbered li strong { color: #fff; display: block; margin-bottom: 4px; font-size: 15px; }
.numbered li p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 700;
  padding: 12px 16px;
  background: var(--surface-2);
}
.spec-table td {
  padding: 13px 16px;
  border-top: 1px solid #1c1c1c;
  color: var(--text);
  vertical-align: top;
}
.spec-table td:first-child { color: var(--text-dim); width: 42%; }
.spec-table .num { font-variant-numeric: tabular-nums; }
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.scroll-x { overflow-x: auto; }

.status-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.status-note::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.notice {
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-control);
  background: var(--surface-1);
  padding: 18px 20px;
}
.notice h4 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.notice p { font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.notice.is-info { border-left-color: var(--info); }
.notice.is-warning { border-left-color: var(--warning); }

/* scroll-reveal (guarded by prefers-reduced-motion below) */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ===================== responsive ======================================= */

@media (max-width: 940px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .nav-links,
  .nav-actions { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 72px 0; }
  .hero { padding: 128px 0 72px; }
}
@media (max-width: 680px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-row .btn { width: 100%; }
  .pipeline-arrow { display: none; }
  .spark-mark { max-width: 72vw; height: auto; }
  .frame-badges { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
