/* ============================================================================
   Cadence — marketing site
   Original design system. The palette deliberately echoes the product's own
   tokens (ink chrome, brass accent) so the site and the app read as one thing.
   ========================================================================= */

:root {
  --ink:        #14161C;
  --ink-2:      #1E212B;
  --ink-3:      #2B2F3B;
  --paper:      #FCFBF9;
  --paper-2:    #F3F1EC;
  --paper-3:    #EAE7DF;
  --line:       #E2DED5;
  --line-2:     #D3CEC2;
  --body:       #3D3F46;
  --muted:      #74736E;
  --faint:      #9A988F;
  --accent:     #B9840D;
  --accent-lit: #E8C84A;
  --accent-wash:#FBF2D9;
  --teal:       #1E5F58;
  --teal-wash:  #E4EFED;

  --ok:     #2D7D46;
  --ok-bg:  #EAF5EE;
  --warn:   #A85C00;
  --warn-bg:#FDF2E3;
  --dang:   #B7392B;
  --dang-bg:#FBEBE9;
  --info:   #1A6FAA;
  --info-bg:#E9F3FA;

  --r-sm: 5px;
  --r-md: 9px;
  --r-lg: 14px;
  --r-xl: 22px;

  --sh-sm: 0 1px 2px rgba(20,22,28,.06);
  --sh-md: 0 6px 22px -8px rgba(20,22,28,.16);
  --sh-lg: 0 28px 70px -30px rgba(20,22,28,.42);

  --wrap: 1140px;
  --gut: 26px;

  --display: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.13;
  margin: 0;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 40;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
strong { font-weight: 600; color: var(--ink); }
::selection { background: var(--accent-wash); color: var(--ink); }

/* --- layout primitives ---------------------------------------------------- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.wrap-narrow { max-width: 780px; }

section { position: relative; }

.band { padding: 104px 0; }
.band-tight { padding: 74px 0; }
.band-ink { background: var(--ink); color: #B9BAC0; }
.band-ink h1, .band-ink h2, .band-ink h3, .band-ink h4 { color: #fff; }
.band-paper2 { background: var(--paper-2); }
.rule-top { border-top: 1px solid var(--line); }

/* --- type ----------------------------------------------------------------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px; font-family: var(--sans);
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: var(--line-2); }
.band-ink .eyebrow { color: var(--accent-lit); }
.band-ink .eyebrow::before { background: rgba(232,200,74,.45); }

h1.hero-h { font-size: clamp(2.6rem, 6.1vw, 4.25rem); letter-spacing: -0.028em; }
h2.sec-h  { font-size: clamp(1.95rem, 3.9vw, 2.85rem); letter-spacing: -0.022em; }
h3.sub-h  { font-size: clamp(1.2rem, 2.1vw, 1.45rem); }

.lede { font-size: clamp(1.05rem, 1.7vw, 1.2rem); line-height: 1.62; color: var(--muted); }
.band-ink .lede { color: #9C9DA6; }

.measure { max-width: 60ch; }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 550; line-height: 1;
  padding: 15px 24px; border-radius: var(--r-md); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), background .18s, border-color .18s, box-shadow .18s, color .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--sh-md); }
.btn-primary:hover { background: var(--ink-3); box-shadow: 0 10px 28px -10px rgba(20,22,28,.5); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(20,22,28,.03); }
.btn-accent { background: var(--accent-lit); color: var(--ink); }
.btn-accent:hover { background: #F0D566; }
.band-ink .btn-ghost { color: #fff; border-color: rgba(255,255,255,.26); }
.band-ink .btn-ghost:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }
.btn-sm { padding: 11px 17px; font-size: 14px; }
.arrow { transition: transform .22s cubic-bezier(.2,.7,.3,1); }
.btn:hover .arrow { transform: translateX(3px); }

/* --- header --------------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(252,251,249,.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.site-head.is-stuck { border-bottom-color: var(--line); }
.head-in { display: flex; align-items: center; gap: 30px; height: 70px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.logo svg { width: 25px; height: 25px; flex: none; }

.head-nav { display: flex; gap: 2px; margin-left: auto; }
.head-nav a {
  text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: var(--r-sm); transition: color .18s, background .18s;
}
.head-nav a:hover { color: var(--ink); background: rgba(20,22,28,.045); }
.head-cta { display: flex; gap: 10px; align-items: center; }

.burger { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--r-sm); width: 40px; height: 38px; cursor: pointer; align-items: center; justify-content: center; margin-left: auto; }
.burger i { display: block; width: 17px; height: 1.5px; background: var(--ink); position: relative; }
.burger i::before, .burger i::after { content: ""; position: absolute; left: 0; width: 17px; height: 1.5px; background: var(--ink); }
.burger i::before { top: -5.5px; } .burger i::after { top: 5.5px; }

/* --- hero ----------------------------------------------------------------- */

.hero { padding: 74px 0 0; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 360px;
  background: linear-gradient(180deg, rgba(243,241,236,0), var(--paper-2));
  z-index: 0; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; color: var(--body);
  background: #fff; border: 1px solid var(--line);
  padding: 7px 15px 7px 10px; border-radius: 99px; margin-bottom: 26px;
  box-shadow: var(--sh-sm);
}
.hero-tag b { font-weight: 600; color: var(--ink); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); flex: none; }

.hero-h em { font-style: normal; color: var(--accent); font-variation-settings: "WONK" 1; }
.hero-lede { margin-top: 24px; max-width: 62ch; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--faint); }
.hero-stage { margin-top: 60px; padding-bottom: 100px; }

/* --- generic -------------------------------------------------------------- */

.card-plain { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--sh-sm); }
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.sec-head { max-width: 700px; margin-bottom: 56px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }
.sec-head p { margin-top: 18px; }

/* --- alternating feature block -------------------------------------------- */

.feat { display: grid; grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr); gap: 66px; align-items: center; }
.feat + .feat { margin-top: 118px; }
.feat.flip .feat-copy { order: 2; }
.feat.flip .feat-visual { order: 1; }
.feat-copy h2 { margin-bottom: 20px; }
.feat-visual { min-width: 0; }

.feat-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 13px; }
.feat-list li { display: grid; grid-template-columns: 19px 1fr; gap: 12px; font-size: 15.5px; line-height: 1.55; }
.feat-list li::before {
  content: ""; width: 19px; height: 19px; border-radius: 50%; margin-top: 3px;
  background: var(--accent-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.4l2.9 2.9 6.1-6.6' fill='none' stroke='%23B9840D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/15px no-repeat;
}
.band-ink .feat-list li::before { background-color: rgba(232,200,74,.15); }

/* ============================================================================
   Product UI recreations
   Rebuilt from the portal's own tokens: Inter, #111 sidebar, #F5F5F5 page,
   #E8C84A accent, 8px radii, and the real navigation labels.
   ========================================================================= */

.ui {
  --ui-side: #111111;
  --ui-accent: #E8C84A;
  --ui-accent-ink: #111111;
  font-family: var(--sans);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 178px minmax(0,1fr);
  color: #111;
  font-size: 12px;
  line-height: 1.45;
  transition: box-shadow .4s;
}
.ui-solo { grid-template-columns: minmax(0,1fr); }

.ui-chrome { display: flex; align-items: center; gap: 6px; padding: 9px 13px; background: #F7F6F3; border-bottom: 1px solid var(--line); grid-column: 1 / -1; }
.ui-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #DAD6CD; display: block; }
.ui-chrome .ui-url { margin-left: 10px; font-size: 10.5px; color: var(--faint); font-family: var(--mono); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sidebar */
.ui-side {
  background: var(--ui-side); color: #fff; padding: 15px 11px;
  display: flex; flex-direction: column; gap: 3px; min-height: 100%;
  transition: background .5s ease;
}
.ui-brand { display: flex; align-items: center; gap: 8px; padding: 2px 6px 15px; }
.ui-mark {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  background: var(--ui-accent); color: var(--ui-accent-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 11px;
  font-family: var(--display); transition: background .5s ease;
}
.ui-brand b { font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-brand span { display: block; font-size: 9px; color: rgba(255,255,255,.44); font-weight: 400; letter-spacing: .02em; }

.ui-nav { display: flex; flex-direction: column; gap: 1px; }
.ui-nav a, .ui-nav span {
  display: flex; align-items: center; gap: 8px;
  padding: 6.5px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 450;
  color: rgba(255,255,255,.62); text-decoration: none; cursor: default;
  transition: background .2s, color .2s;
}
.ui-nav .on { background: rgba(255,255,255,.1); color: #fff; font-weight: 550; }
.ui-nav .on::before { content: ""; position: absolute; }
.ui-ic { width: 13px; height: 13px; flex: none; opacity: .75; }
.ui-nav .on .ui-ic { opacity: 1; color: var(--ui-accent); }
.ui-badge { margin-left: auto; background: var(--ui-accent); color: #111; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 99px; line-height: 1.5; }
.ui-navgroup { font-size: 8.5px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); padding: 13px 8px 5px; font-weight: 600; }

/* main */
.ui-main { background: #F5F5F5; padding: 16px 18px 20px; min-width: 0; }
.ui-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ui-top h4 { font-family: var(--sans); font-size: 15px; font-weight: 650; letter-spacing: -.015em; color: #111; }
.ui-top p { font-size: 11px; color: #777; margin: 2px 0 0; }
.ui-top-act { margin-left: auto; display: flex; gap: 6px; flex: none; }

.ui-btn { font-size: 10.5px; font-weight: 550; padding: 6px 11px; border-radius: 6px; background: #111; color: #fff; border: 1px solid #111; white-space: nowrap; }
.ui-btn.alt { background: #fff; color: #333; border-color: #E0E0E0; }
.ui-btn.acc { background: var(--ui-accent); color: var(--ui-accent-ink); border-color: transparent; transition: background .5s ease; }

.ui-card { background: #fff; border: 1px solid #E8E6E1; border-radius: 8px; padding: 13px 14px; }
.ui-card + .ui-card { margin-top: 10px; }
.ui-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.ui-card-h b { font-size: 11.5px; font-weight: 650; letter-spacing: -.005em; }
.ui-card-h .ui-more { margin-left: auto; font-size: 10px; color: #999; }

.ui-grid { display: grid; gap: 10px; }
.ui-g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.ui-g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.ui-g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.ui-stat { background: #fff; border: 1px solid #E8E6E1; border-radius: 8px; padding: 11px 12px; }
.ui-stat .lb { font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: #8A8A8A; font-weight: 600; }
.ui-stat .vl { font-size: 20px; font-weight: 640; letter-spacing: -.03em; color: #111; margin-top: 3px; font-variant-numeric: tabular-nums; }
.ui-stat .dl { font-size: 9.5px; color: #2D7D46; font-weight: 550; margin-top: 1px; }

/* rows */
.ui-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #F0EEE9; }
.ui-row:first-child { border-top: 0; }
.ui-time { font-family: var(--mono); font-size: 10px; color: #666; width: 52px; flex: none; font-variant-numeric: tabular-nums; }
.ui-av { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 9px; font-weight: 650; color: #fff; background: #5B6472; letter-spacing: -.02em; }
.ui-who { min-width: 0; flex: 1; }
.ui-who b { display: block; font-size: 11.5px; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-who span { display: block; font-size: 10px; color: #808080; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-amt { font-family: var(--mono); font-size: 11px; font-weight: 600; color: #111; font-variant-numeric: tabular-nums; flex: none; }

.pill { font-size: 9.5px; font-weight: 600; padding: 2.5px 8px; border-radius: 99px; white-space: nowrap; flex: none; letter-spacing: .01em; }
.pill-ok   { background: var(--ok-bg);   color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-dang { background: var(--dang-bg); color: var(--dang); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-mute { background: #F0EEE9; color: #76736C; }

/* segmented control */
.seg { display: inline-flex; background: #EDEBE6; border-radius: 7px; padding: 2.5px; gap: 2px; }
.seg button {
  font-family: var(--sans); font-size: 10.5px; font-weight: 600; color: #6E6B65;
  background: none; border: 0; padding: 5.5px 11px; border-radius: 5px; cursor: pointer;
  transition: background .22s, color .22s, box-shadow .22s; white-space: nowrap;
}
.seg button[aria-pressed="true"], .seg button.on { background: #fff; color: #111; box-shadow: var(--sh-sm); }

/* field */
.ui-field { display: flex; flex-direction: column; gap: 4px; }
.ui-field label { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #8A8A8A; }
.ui-input {
  border: 1px solid #E0DDD7; border-radius: 6px; background: #fff;
  padding: 7px 9px; font-size: 11.5px; color: #111; font-weight: 500;
  display: flex; align-items: center; gap: 6px; min-height: 30px;
}
.ui-input .pre { color: #9A988F; }
.ui-input.focus { border-color: #111; box-shadow: 0 0 0 3px rgba(232,200,74,.32); }

/* ============================================================================
   Animation
   ========================================================================= */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; }

/* rows dealing in one at a time once the panel is on screen */
.js .stagger > * { opacity: 0; transform: translateY(9px); }
.play .stagger > * { animation: dealIn .55s cubic-bezier(.2,.7,.3,1) forwards; }
.play .stagger > *:nth-child(1) { animation-delay: .10s; }
.play .stagger > *:nth-child(2) { animation-delay: .20s; }
.play .stagger > *:nth-child(3) { animation-delay: .30s; }
.play .stagger > *:nth-child(4) { animation-delay: .40s; }
.play .stagger > *:nth-child(5) { animation-delay: .50s; }
.play .stagger > *:nth-child(6) { animation-delay: .60s; }
.play .stagger > *:nth-child(7) { animation-delay: .70s; }
@keyframes dealIn { to { opacity: 1; transform: none; } }

@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes slideUpIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* progress bar that fills once, when in view */
.barline { height: 4px; border-radius: 99px; background: #EBE8E2; overflow: hidden; }
.barline i { display: block; height: 100%; width: var(--to, 70%); border-radius: 99px; background: var(--ui-accent, #E8C84A); }
.js .barline i { width: 0; }
.play .barline i { animation: fillBar 1.5s .25s cubic-bezier(.3,.8,.35,1) forwards; }
@keyframes fillBar { to { width: var(--to, 70%); } }

/* shimmer used on the "processing" state */
.shim { position: relative; overflow: hidden; }
.shim::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
}
.play .shim::after { animation: sweep 1.5s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .stagger > * { opacity: 1; transform: none; }
  .play .stagger > * { animation: none; }
  .js .barline i, .play .barline i { animation: none; width: var(--to, 70%); }
  .play .shim::after { animation: none; display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
