/* ==========================================================================
   CodeROG Design System — Components
   Every block is prefixed cr-. Modifiers use --, state uses .is-*.
   ========================================================================== */

/* ---------- Logo ---------- */
/* The original logo artwork: the mark is /assets/img/logo-mark.svg (the supplied image), and the wordmark is the supplied
   lettering used as a mask, so it keeps its exact shapes and takes --logo-wordmark (white on dark, dark on light).
   Proportions are the original lockup's: gap 0.115 and wordmark 4.319 of the mark's height. Size it with --logo-h. */
.cr-logo { --logo-h: 32px; display: inline-flex; align-items: center; gap: 0; color: var(--logo-wordmark); }
.cr-logo__mark { width: var(--logo-h); height: var(--logo-h); flex: none; }
.cr-logo__word {
  flex: none; height: var(--logo-h); width: calc(var(--logo-h) * 4.319); margin-left: calc(var(--logo-h) * 0.115);
  background: currentColor; font-size: 0; line-height: 0; overflow: hidden;
  -webkit-mask: url("/assets/img/logo-wordmark.png") center / 100% 100% no-repeat; mask: url("/assets/img/logo-wordmark.png") center / 100% 100% no-repeat;
}
.cr-logo--sm { --logo-h: 24px; }
.cr-logo--lg { --logo-h: 44px; }

/* ---------- Button ---------- */
.cr-btn {
  --btn-h: 40px; --btn-px: var(--s-20);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8);
  height: var(--btn-h); padding-inline: var(--btn-px);
  border-radius: var(--r-pill);
  font-size: var(--text-sm); font-weight: var(--fw-medium); letter-spacing: 0.01em; line-height: 1; white-space: nowrap;
  background: var(--surface-primary); color: var(--text-on-primary);
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), scale var(--dur-fast) var(--ease-out);
  cursor: pointer; user-select: none;
}
.cr-btn:hover { background: var(--surface-primary-hover); }
.cr-btn:active { background: var(--surface-primary-active); scale: 0.98; }
.cr-btn .cr-icon { transition: translate var(--dur) var(--ease-spring); }
.cr-btn:hover .cr-icon--arrow { translate: 3px 0; }

.cr-btn--sm { --btn-h: 32px; --btn-px: var(--s-16); font-size: var(--text-xs); }
.cr-btn--lg { --btn-h: 48px; --btn-px: var(--s-24); font-size: var(--text-base); }
.cr-btn--xl { --btn-h: 56px; --btn-px: var(--s-32); font-size: var(--text-md); }
.cr-btn--block { width: 100%; }
.cr-btn--icon { width: var(--btn-h); padding: 0; }

.cr-btn--secondary { background: var(--surface-frosted); color: var(--text-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.cr-btn--secondary:hover { background: var(--surface-frosted-hover); }
.cr-btn--secondary:active { background: var(--surface-frosted-active); }

.cr-btn--tint { background: var(--surface-tint); color: var(--text-primary); }
.cr-btn--tint:hover { background: var(--surface-tint-hover); }
.cr-btn--tint:active { background: var(--surface-tint-hover); }

.cr-btn--outline { background: transparent; color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--border-strong); }
.cr-btn--outline:hover { background: var(--surface-frosted); box-shadow: inset 0 0 0 1px var(--text-strong); }
.cr-btn--outline:active { background: var(--surface-frosted-hover); }

.cr-btn--ghost { background: transparent; color: var(--text-strong); }
.cr-btn--ghost:hover { background: var(--surface-frosted); }
.cr-btn--ghost:active { background: var(--surface-frosted-hover); }

.cr-btn--inverted { background: var(--surface-inverted); color: var(--text-inverted); }
.cr-btn--inverted:hover, .cr-btn--inverted:active { background: var(--surface-inverted); opacity: 0.88; }

.cr-btn--gradient { background: var(--gradient-brand); box-shadow: var(--shadow-glow); }
.cr-btn--gradient:hover, .cr-btn--gradient:active { background: var(--gradient-brand); filter: brightness(1.1); }

/* sheen sweep on hover */
.cr-btn--shine::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.35) 50%, transparent 70%);
  translate: -120% 0; transition: translate 0.9s var(--ease-smooth);
}
.cr-btn--shine:hover::after { translate: 120% 0; }

.cr-btn[disabled], .cr-btn.is-disabled { background: var(--surface-frosted); color: var(--text-disabled); pointer-events: none; box-shadow: none; }
.cr-btn.is-loading { color: transparent; pointer-events: none; }
.cr-btn.is-loading::before {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.35); border-top-color: #fff; animation: cr-spin 0.7s linear infinite;
}

/* text link with animated underline + arrow */
.cr-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: var(--fw-medium); color: var(--text-strong);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.cr-link:hover { background-size: 0 1px; background-position: 100% 100%; color: var(--text-primary); }
.cr-link--primary { color: var(--text-primary); }
.cr-link--plain { background-size: 0 1px; }
.cr-link--plain:hover { background-size: 100% 1px; background-position: 0 100%; }
.cr-link .cr-icon { width: 1em; height: 1em; transition: translate var(--dur) var(--ease-spring); }
.cr-link:hover .cr-icon { translate: 3px 0; }

/* ---------- Badge / tag / chip ---------- */
.cr-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding-inline: var(--s-12); border-radius: var(--r-pill);
  font-size: var(--text-xs); font-weight: var(--fw-medium); letter-spacing: 0.01em; line-height: 1; white-space: nowrap;
  background: var(--surface-tint); color: var(--text-primary);
}
.cr-badge--neutral { background: var(--surface-frosted); color: var(--text); }
.cr-badge--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border); color: var(--text); }
.cr-badge--success { background: color-mix(in srgb, var(--text-success) 16%, transparent); color: var(--text-success); }
.cr-badge--warning { background: color-mix(in srgb, var(--text-warning) 16%, transparent); color: var(--text-warning); }
.cr-badge--error { background: color-mix(in srgb, var(--text-error) 16%, transparent); color: var(--text-error); }
.cr-badge--solid { background: var(--surface-primary); color: var(--text-on-primary); }
.cr-badge--lg { height: 32px; padding-inline: var(--s-16); font-size: var(--text-sm); }
.cr-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cr-badge__dot--live { animation: cr-pulse 1.6s ease-in-out infinite; }

/* announcement pill (badge + text + arrow) */
.cr-pill-link {
  display: inline-flex; align-items: center; gap: var(--s-8);
  padding: 4px 14px 4px 4px; border-radius: var(--r-pill);
  background: var(--surface-frosted); box-shadow: inset 0 0 0 1px var(--border-subtle);
  font-size: var(--text-sm); color: var(--text); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--dur) var(--ease-out);
}
.cr-pill-link:hover { background: var(--surface-frosted-hover); }
.cr-pill-link .cr-icon { width: 14px; height: 14px; transition: translate var(--dur) var(--ease-spring); }
.cr-pill-link:hover .cr-icon { translate: 3px 0; }

.cr-chip {
  display: inline-flex; align-items: center; gap: var(--s-8);
  height: 40px; padding-inline: var(--s-16); border-radius: var(--r-pill);
  background: var(--surface-frosted); color: var(--text); font-size: var(--text-sm); font-weight: var(--fw-regular);
  box-shadow: inset 0 0 0 1px transparent; cursor: pointer;
  transition: background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.cr-chip:hover { background: var(--surface-frosted-hover); }
.cr-chip.is-active, .cr-chip:has(input:checked) { background: var(--surface-tint); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); }
.cr-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cr-chip:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 3px; }

.cr-kbd { font-family: var(--font-mono); font-size: var(--text-xs); padding: 2px 6px; border-radius: var(--r-md); background: var(--surface-frosted); box-shadow: inset 0 -1px 0 var(--border); color: var(--text); }

/* ---------- Avatar ---------- */
.cr-avatar {
  --av: 40px; width: var(--av); height: var(--av); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; overflow: hidden;
  background: var(--surface-tint); color: var(--text-primary);
  font-size: calc(var(--av) * 0.38); font-weight: var(--fw-medium); letter-spacing: 0.02em;
}
.cr-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cr-avatar--sm { --av: 28px; } .cr-avatar--lg { --av: 56px; }
.cr-avatar-group { display: inline-flex; }
.cr-avatar-group .cr-avatar { box-shadow: 0 0 0 2px var(--bg); background: var(--surface-elevated); }
.cr-avatar-group .cr-avatar + .cr-avatar { margin-left: -10px; }

/* ---------- Form controls ---------- */
.cr-field { display: flex; flex-direction: column; gap: var(--s-8); }
.cr-label { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
.cr-hint { font-size: var(--text-xs); color: var(--text-subdued); }
.cr-field.is-error .cr-hint { color: var(--text-error); }

.cr-input, .cr-textarea, .cr-select {
  width: 100%; height: 48px; padding-inline: var(--s-16);
  border-radius: var(--r-xl); border: 0;
  background: var(--surface-input); color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: var(--text-base);
  transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
  appearance: none; -webkit-appearance: none;
}
.cr-input::placeholder, .cr-textarea::placeholder { color: var(--text-subdued); opacity: 1; }
.cr-input:hover, .cr-textarea:hover, .cr-select:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.cr-input:focus, .cr-textarea:focus, .cr-select:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--border-focus), 0 0 0 4px var(--surface-tint); }
.cr-input:disabled, .cr-textarea:disabled, .cr-select:disabled { opacity: 0.5; cursor: not-allowed; }
.cr-field.is-error .cr-input, .cr-field.is-error .cr-textarea { box-shadow: inset 0 0 0 1.5px var(--text-error); }
.cr-textarea { height: auto; min-height: 128px; padding-block: var(--s-12); resize: vertical; line-height: 1.4; }
.cr-input--pill { border-radius: var(--r-pill); padding-inline: var(--s-20); }
.cr-select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239a9db5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}

/* floating label variant */
.cr-float { position: relative; }
.cr-float .cr-input { padding-top: 18px; height: 56px; }
.cr-float label { position: absolute; left: var(--s-16); top: 18px; color: var(--text-subdued); pointer-events: none; transform-origin: left top; transition: transform var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.cr-float .cr-input:focus + label, .cr-float .cr-input:not(:placeholder-shown) + label { transform: translateY(-10px) scale(0.75); color: var(--text-primary); }

/* input with attached button — the hero capture */
.cr-capture {
  display: flex; align-items: center; gap: var(--s-4);
  height: 52px; padding: 6px; padding-left: var(--s-20); border-radius: var(--r-pill);
  background: var(--surface-frosted); box-shadow: inset 0 0 0 1px var(--border-subtle);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
  width: 100%; max-width: 420px;
}
.cr-capture:focus-within { box-shadow: inset 0 0 0 1.5px var(--border-focus), 0 0 0 4px var(--surface-tint); }
.cr-capture input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--text-strong); font-size: var(--text-base); }
.cr-capture input::placeholder { color: var(--text-subdued); }
.cr-capture .cr-btn { flex: none; }

/* checkbox / radio / switch */
.cr-check { display: inline-flex; align-items: flex-start; gap: var(--s-12); cursor: pointer; font-size: var(--text-sm); line-height: 20px; color: var(--text); }
.cr-check input {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0;
  border-radius: var(--r-md); background: var(--surface-input); box-shadow: inset 0 0 0 1px var(--border-strong);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.cr-check input[type="radio"] { border-radius: 50%; }
.cr-check input::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; rotate: -45deg; translate: 0 -1px; scale: 0; transition: scale var(--dur-fast) var(--ease-spring); }
.cr-check input[type="radio"]::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; rotate: 0deg; translate: 0; }
.cr-check input:checked { background: var(--surface-primary); box-shadow: none; }
.cr-check input:checked::after { scale: 1; }

.cr-switch { display: inline-flex; align-items: center; gap: var(--s-12); cursor: pointer; font-size: var(--text-sm); color: var(--text); }
.cr-switch input {
  appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; margin: 0; border-radius: var(--r-pill);
  background: var(--surface-frosted-active); position: relative; cursor: pointer; transition: background-color var(--dur) var(--ease-out);
}
.cr-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: translate var(--dur) var(--ease-spring); }
.cr-switch input:checked { background: var(--surface-primary); }
.cr-switch input:checked::after { translate: 16px 0; }

/* segmented control (monthly / yearly etc.) */
.cr-segment { position: relative; display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface-frosted); }
.cr-segment button { position: relative; z-index: 1; height: 32px; padding-inline: var(--s-16); border-radius: var(--r-pill); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-subdued); transition: color var(--dur) var(--ease-out); }
.cr-segment button.is-active { color: var(--text-strong); }
.cr-segment__thumb { position: absolute; top: 4px; left: 0; height: 32px; border-radius: var(--r-pill); background: var(--surface-elevated); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-subtle); transition: translate 0.45s var(--ease-spring), width 0.45s var(--ease-spring); }

/* ---------- Navbar ---------- */
.cr-banner {
  display: flex; align-items: center; justify-content: center; gap: var(--s-12);
  min-height: 44px; padding: var(--s-8) var(--grid-margin);
  background: var(--gradient-brand); color: #fff; font-size: var(--text-sm); text-align: center;
}
.cr-banner a { font-weight: var(--fw-medium); text-decoration: underline; text-underline-offset: 3px; }

.cr-nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  height: var(--nav-h);
  transition: background-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), translate 0.5s var(--ease-smooth);
}
.cr-nav--fixed { position: fixed; inset: 0 0 auto 0; }
/* frosted layer lives on a pseudo-element: a backdrop-filter on the nav itself
   would trap the fixed-position mobile menu inside the 72px bar */
.cr-nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--bg-frosted);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 1px 0 var(--border-subtle);
  opacity: 0; transition: opacity 0.4s var(--ease-out);
}
.cr-nav.is-scrolled::before { opacity: 1; }
.cr-nav.is-open { background: var(--bg); }
.cr-nav.is-hidden { translate: 0 -100%; }
.cr-nav__inner { height: 100%; display: flex; align-items: center; gap: var(--s-32); }
.cr-nav__menu { display: none; align-items: center; gap: var(--s-4); flex: 1; }
.cr-nav__actions { display: flex; align-items: center; gap: var(--s-8); margin-left: auto; }
.cr-nav__link {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: var(--s-12);
  border-radius: var(--r-pill); font-size: var(--text-sm); font-weight: var(--fw-regular); color: var(--text-strong);
  transition: background-color var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.cr-nav__link:hover, .cr-nav__item.is-open > .cr-nav__link { background: var(--surface-frosted); }
.cr-nav__link.is-current { color: var(--text-primary); }
.cr-nav__link .cr-icon { width: 14px; height: 14px; transition: rotate var(--dur) var(--ease-out); }
.cr-nav__item { position: relative; }
.cr-nav__item.is-open > .cr-nav__link .cr-icon { rotate: 180deg; }

.cr-nav__dropdown {
  position: absolute; top: calc(100% + 12px); left: -12px; min-width: 300px;
  padding: var(--s-8); border-radius: var(--r-3xl);
  background: var(--surface-elevated); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border-subtle);
  opacity: 0; visibility: hidden; transform: perspective(900px) rotateX(-8deg) scale(0.96); transform-origin: top left;
  transition: opacity 0.25s var(--ease-out), transform 0.35s var(--ease-spring), visibility 0s 0.25s;
}
.cr-nav__dropdown::before { content: ""; position: absolute; inset: -14px 0 auto 0; height: 14px; }
.cr-nav__item.is-open > .cr-nav__dropdown { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.cr-nav__dropdown--mega { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: var(--s-4); min-width: 600px; }
.cr-nav__drop-link { display: flex; gap: var(--s-12); padding: var(--s-12); border-radius: var(--r-2xl); transition: background-color var(--dur) var(--ease-out); }
.cr-nav__drop-link:hover { background: var(--surface-frosted); }
.cr-nav__drop-icon { flex: none; width: 36px; height: 36px; border-radius: var(--r-xl); display: grid; place-items: center; background: var(--surface-tint); color: var(--text-primary); }
.cr-nav__drop-title { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
.cr-nav__drop-desc { font-size: var(--text-xs); color: var(--text-subdued); margin-top: 2px; line-height: 1.4; }

.cr-nav__toggle { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-frosted); color: var(--text-strong); }
.cr-nav__toggle span { grid-area: 1 / 1; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: translate var(--dur) var(--ease-out), rotate var(--dur) var(--ease-out); }
.cr-nav__toggle span:first-child { translate: 0 -3px; } .cr-nav__toggle span:last-child { translate: 0 3px; }
.cr-nav.is-open .cr-nav__toggle span:first-child { translate: 0; rotate: 45deg; }
.cr-nav.is-open .cr-nav__toggle span:last-child { translate: 0; rotate: -45deg; }

.cr-nav__mobile {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: calc(var(--z-nav) - 1);
  background: var(--bg); padding: var(--s-24) var(--grid-margin) var(--s-48); overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s-4);
  opacity: 0; visibility: hidden; translate: 0 -12px;
  transition: opacity var(--dur) var(--ease-out), translate 0.45s var(--ease-smooth), visibility 0s var(--dur);
}
.cr-nav.is-open .cr-nav__mobile { opacity: 1; visibility: visible; translate: none; transition-delay: 0s; }
@media (min-width: 1000px) {
  .cr-nav__menu { display: flex; }
  .cr-nav__toggle, .cr-nav__mobile { display: none; }
}
@media (max-width: 999px) { .cr-nav__actions .cr-btn--ghost, .cr-nav__actions .cr-btn--secondary { display: none; } }
@media (max-width: 479px) {
  .cr-nav__inner { gap: var(--s-12); }
  .cr-nav__actions .cr-btn { --btn-h: 36px; --btn-px: 14px; font-size: var(--text-xs); }
  .cr-nav .cr-logo { --logo-h: 28px; }
}

/* ---------- Hero ---------- */
.cr-hero {
  position: relative; isolation: isolate; overflow: clip;
  min-height: min(100dvh, 960px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--nav-h) + var(--s-64)) var(--s-96);
}
.cr-hero--pull-up { margin-top: calc(var(--nav-h) * -1); }
.cr-hero__content { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-24); max-width: 940px; margin-inline: auto; }
.cr-hero__content--left { align-items: flex-start; text-align: left; margin-inline: 0; }
.cr-hero__lede { max-width: 620px; color: var(--text); opacity: 0.86; }
.cr-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-12); margin-top: var(--s-8); width: 100%; }
.cr-hero__content--left .cr-hero__actions { justify-content: flex-start; }
.cr-hero__note { font-size: var(--text-xs); color: var(--text-subdued); }

/* animated aurora backdrop */
.cr-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cr-aurora::before, .cr-aurora::after, .cr-aurora i {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; animation: cr-aurora 18s ease-in-out infinite;
}
.cr-aurora::before { width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; left: -12%; top: -30%; background: radial-gradient(circle, #4f5bff 0%, transparent 65%); }
.cr-aurora::after { width: 55vw; height: 55vw; max-width: 820px; max-height: 820px; right: -14%; top: 5%; background: radial-gradient(circle, #8b7cff 0%, transparent 65%); animation-duration: 24s; animation-direction: reverse; }
.cr-aurora i { width: 40vw; height: 40vw; max-width: 600px; max-height: 600px; left: 30%; bottom: -35%; background: radial-gradient(circle, #2f6bff 0%, transparent 65%); animation-duration: 21s; opacity: 0.4; }
[data-theme="light"] .cr-aurora::before, [data-theme="light"] .cr-aurora::after, [data-theme="light"] .cr-aurora i { opacity: 0.22; }

/* fine grid + grain overlays */
.cr-gridlines {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px), linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
.cr-fade-bottom::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; z-index: -1; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }

.cr-scroll-cue { position: absolute; left: 50%; bottom: var(--s-32); translate: -50% 0; display: grid; place-items: center; width: 28px; height: 44px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--border-strong); }
.cr-scroll-cue::after { content: ""; width: 3px; height: 8px; border-radius: 3px; background: var(--text-strong); animation: cr-float 1.8s ease-in-out infinite; }

/* ---------- Cards ---------- */
.cr-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--s-16);
  padding: var(--gap-lg); border-radius: var(--r-3xl);
  background: var(--surface); color: var(--text);
  transition: background-color var(--dur) var(--ease-out), translate 0.5s var(--ease-spring), box-shadow var(--dur) var(--ease-out);
}
.cr-card--elevated { background: var(--surface-elevated); box-shadow: var(--shadow-md); }
.cr-card--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.cr-card--frosted { background: var(--surface-frosted); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.cr-card--brand { background: var(--gradient-brand); color: rgb(255 255 255 / 0.86); --text-strong: #fff; --text-subdued: rgb(255 255 255 / 0.7); }
a.cr-card:hover, .cr-card--hover:hover { background: var(--surface-hover); translate: 0 -4px; }
a.cr-card.cr-card--outline:hover { background: var(--surface-frosted); }
.cr-card__icon { width: 48px; height: 48px; border-radius: var(--r-2xl); display: grid; place-items: center; background: var(--surface-tint); color: var(--text-primary); }
.cr-card__icon .cr-icon { width: 24px; height: 24px; }
.cr-card__title { font-size: var(--heading-6); font-weight: var(--fw-medium); color: var(--text-strong); line-height: 1.2; }
.cr-card__text { color: var(--text-subdued); font-size: var(--text-base); line-height: 1.4; }
.cr-card__foot { margin-top: auto; padding-top: var(--s-16); display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); }
.cr-card__media { margin: calc(var(--gap-lg) * -1); margin-bottom: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-hover); }
.cr-card__media img, .cr-card__media video { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease-smooth); }
a.cr-card:hover .cr-card__media img { scale: 1.05; }
.cr-card__arrow { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-frosted); color: var(--text-strong); transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), rotate 0.5s var(--ease-spring); }
a.cr-card:hover .cr-card__arrow { background: var(--surface-primary); color: #fff; rotate: -45deg; }

/* cursor-following spotlight border */
.cr-spotlight::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(135 146 255 / 0.22), transparent 60%);
  opacity: 0; transition: opacity 0.5s var(--ease-out);
}
.cr-spotlight:hover::before { opacity: 1; }

/* bento grid */
.cr-bento { display: grid; gap: var(--grid-gutter); grid-template-columns: 1fr; }
.cr-bento > .cr-card { min-height: 300px; }
@media (min-width: 768px) {
  .cr-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(320px, auto); }
  .cr-bento > * { grid-column: span 2; }
  .cr-bento__w3 { grid-column: span 3; } .cr-bento__w4 { grid-column: span 4; } .cr-bento__w6 { grid-column: span 6; }
  .cr-bento__h2 { grid-row: span 2; }
}

/* industry / image card with overlay copy */
.cr-tile { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-3xl); min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--gap-lg); color: #fff; background: var(--surface); }
.cr-tile--compact { min-height: 280px; }
/* a last tile that spans three columns, for a four-column grid left with one tile in its last row */
@media (min-width: 1024px) { .cr-cols--4 > .cr-tile--rest { grid-column: span 3; } }
.cr-tile__bg { position: absolute; inset: 0; z-index: -2; background: var(--tile-bg, var(--gradient-brand)); transition: scale 1.4s var(--ease-smooth); }
.cr-tile__bg img { width: 100%; height: 100%; object-fit: cover; }
.cr-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgb(11 12 23 / 0.8) 100%); }
.cr-tile:hover .cr-tile__bg { scale: 1.06; }
.cr-tile__title { font-size: var(--heading-5); font-weight: var(--fw-medium); color: #fff; }
.cr-tile__text { color: rgb(255 255 255 / 0.78); margin-top: var(--s-8); max-width: 36ch; }
.cr-tile__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-smooth); }
.cr-tile__more > * { overflow: hidden; }
.cr-tile:hover .cr-tile__more, .cr-tile:focus-within .cr-tile__more { grid-template-rows: 1fr; }

/* ---------- Stats ---------- */
.cr-stat { display: flex; flex-direction: column; gap: var(--s-8); padding-top: var(--s-24); border-top: 1px solid var(--border); }
.cr-stat__value { font-size: var(--display-3); font-weight: var(--fw-medium); line-height: 1; letter-spacing: -0.02em; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.cr-stat__label { font-size: var(--text-md); font-weight: var(--fw-medium); color: var(--text-strong); }
.cr-stat__text { color: var(--text-subdued); font-size: var(--text-sm); }

/* ---------- Marquee (logos, tech stack) ---------- */
.cr-marquee {
  --marquee-gap: var(--s-56); --marquee-speed: 40s;
  overflow: hidden; display: flex;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.cr-marquee__track { display: flex; align-items: center; gap: var(--marquee-gap); flex: none; width: max-content; animation: cr-marquee var(--marquee-speed) linear infinite; }
.cr-marquee--reverse .cr-marquee__track { animation-direction: reverse; }
.cr-marquee:hover .cr-marquee__track { animation-play-state: paused; }
.cr-marquee__item { flex: none; display: inline-flex; align-items: center; gap: var(--s-12); color: var(--text-subdued); font-size: var(--text-lg); font-weight: var(--fw-medium); white-space: nowrap; transition: color var(--dur) var(--ease-out); }
.cr-marquee__item:hover { color: var(--text-strong); }
.cr-marquee__item img { height: 32px; width: auto; opacity: 0.7; filter: grayscale(1); transition: opacity var(--dur), filter var(--dur); }
.cr-marquee__item:hover img { opacity: 1; filter: none; }
/* Client logos: greyscale at rest. data-tone="dark" marks artwork drawn for light backgrounds, "light" for dark ones; the mismatched theme inverts it so it stays legible. */
.cr-marquee__item--logo img { opacity: 0.75; }
.cr-marquee__item img[data-tone="dark"], .cr-marquee__item:hover img[data-tone="dark"] { filter: grayscale(1) invert(1); }
[data-theme="light"] .cr-marquee__item img[data-tone="dark"] { filter: grayscale(1); }
[data-theme="light"] .cr-marquee__item:hover img[data-tone="dark"] { filter: none; }
[data-theme="light"] .cr-marquee__item img[data-tone="light"], [data-theme="light"] .cr-marquee__item:hover img[data-tone="light"] { filter: grayscale(1) invert(1); }

/* ---------- Tabs ---------- */
.cr-tabs__list { display: inline-flex; gap: var(--s-4); padding: 4px; border-radius: var(--r-pill); background: var(--surface-frosted); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cr-tabs__list::-webkit-scrollbar { display: none; }
.cr-tabs__tab { flex: none; height: 36px; padding-inline: var(--s-16); border-radius: var(--r-pill); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-subdued); transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
.cr-tabs__tab:hover { color: var(--text-strong); }
.cr-tabs__tab[aria-selected="true"] { background: var(--surface-elevated); color: var(--text-strong); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-subtle); }
.cr-tabs--underline .cr-tabs__list { background: none; padding: 0; border-radius: 0; gap: var(--s-24); box-shadow: inset 0 -1px 0 var(--border); display: flex; }
.cr-tabs--underline .cr-tabs__tab { border-radius: 0; padding-inline: 0; height: 44px; }
.cr-tabs--underline .cr-tabs__tab[aria-selected="true"] { background: none; box-shadow: inset 0 -2px 0 var(--text-primary); }
.cr-tabs__panel { margin-top: var(--gap-lg); }
.cr-tabs__panel[hidden] { display: none; }
.cr-tabs__panel.is-entering { animation: cr-slide-up 0.5s var(--ease-smooth) both; }

/* feature tabs — vertical list on the left, media on the right, auto-advance */
.cr-ftabs { display: grid; gap: var(--gap-xl); align-items: start; }
@media (min-width: 900px) { .cr-ftabs { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-2xl); } .cr-ftabs--reverse .cr-ftabs__list { order: 2; } }
.cr-ftabs__list { display: flex; flex-direction: column; }
.cr-ftabs__item { position: relative; border-top: 1px solid var(--border); }
.cr-ftabs__item:last-child { border-bottom: 1px solid var(--border); }
.cr-ftabs__item::before { content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px; background: var(--text-strong); scale: 0 1; transform-origin: left; }
.cr-ftabs__item.is-active::before { scale: 1 1; }
.cr-ftabs[data-autoplay] .cr-ftabs__item.is-active::before { animation: cr-progress var(--ftabs-duration, 6s) linear both; }
.cr-ftabs[data-autoplay].is-paused .cr-ftabs__item.is-active::before { animation-play-state: paused; }
.cr-ftabs__trigger { width: 100%; display: flex; align-items: center; gap: var(--s-12); padding-block: var(--s-20); text-align: left; font-size: var(--text-lg); font-weight: var(--fw-medium); color: var(--text-subdued); transition: color var(--dur) var(--ease-out); }
.cr-ftabs__trigger::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; scale: 0; margin-left: -18px; transition: scale var(--dur) var(--ease-spring), margin var(--dur) var(--ease-out); }
.cr-ftabs__item.is-active .cr-ftabs__trigger { color: var(--text-strong); }
.cr-ftabs__item.is-active .cr-ftabs__trigger::before { scale: 1; margin-left: 0; }
.cr-ftabs__trigger:hover { color: var(--text-strong); }
.cr-ftabs__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-smooth); }
.cr-ftabs__body > div { overflow: hidden; }
.cr-ftabs__body p { padding: 0 0 var(--s-24) 18px; color: var(--text-subdued); max-width: 44ch; opacity: 0; transition: opacity 0.4s var(--ease-out); }
.cr-ftabs__item.is-active .cr-ftabs__body { grid-template-rows: 1fr; }
.cr-ftabs__item.is-active .cr-ftabs__body p { opacity: 1; transition-delay: 0.15s; }
.cr-ftabs__stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-3xl); overflow: hidden; background: var(--surface); }
.cr-ftabs__media { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--gap-lg); opacity: 0; visibility: hidden; translate: 0 5px; filter: blur(4px); transition: opacity 0.5s var(--ease-out), translate 0.5s var(--ease-out), filter 0.5s var(--ease-out), visibility 0s 0.5s; }
.cr-ftabs__media.is-active { opacity: 1; visibility: visible; translate: none; filter: none; transition-delay: 0.1s, 0.1s, 0.1s, 0s; }
.cr-ftabs__media img, .cr-ftabs__media video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* ---------- Accordion ---------- */
.cr-accordion { border-top: 1px solid var(--border); }
.cr-accordion__item { border-bottom: 1px solid var(--border); }
.cr-accordion__trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-24); padding-block: var(--s-24); text-align: left; font-size: var(--text-lg); font-weight: var(--fw-medium); color: var(--text-strong); transition: color var(--dur) var(--ease-out); }
.cr-accordion__trigger:hover { color: var(--text-primary); }
.cr-accordion__icon { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-frosted); transition: background-color var(--dur) var(--ease-out), rotate 0.5s var(--ease-spring); }
.cr-accordion__icon::before, .cr-accordion__icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 1.5px; background: currentColor; translate: -50% -50%; border-radius: 2px; transition: rotate 0.5s var(--ease-spring); }
.cr-accordion__icon::after { rotate: 90deg; }
.cr-accordion__item.is-open .cr-accordion__icon { background: var(--surface-tint); rotate: 180deg; }
.cr-accordion__item.is-open .cr-accordion__icon::after { rotate: 0deg; }
.cr-accordion__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s var(--ease-smooth); }
.cr-accordion__panel > div { overflow: hidden; }
.cr-accordion__panel p { padding-bottom: var(--s-24); max-width: 68ch; color: var(--text-subdued); opacity: 0; translate: 0 -6px; transition: opacity 0.4s var(--ease-out), translate 0.4s var(--ease-out); }
.cr-accordion__item.is-open .cr-accordion__panel { grid-template-rows: 1fr; }
.cr-accordion__item.is-open .cr-accordion__panel p { opacity: 1; translate: none; transition-delay: 0.12s; }

/* ---------- Testimonials / carousel ---------- */
.cr-quote { display: flex; flex-direction: column; gap: var(--gap-lg); padding: var(--gap-lg); border-radius: var(--r-3xl); background: var(--surface); height: 100%; }
.cr-quote__text { font-size: var(--heading-6); line-height: 1.3; color: var(--text-strong); font-weight: var(--fw-book); }
.cr-quote--lg .cr-quote__text { font-size: var(--heading-4); line-height: 1.2; }
.cr-quote__by { margin-top: auto; display: flex; align-items: center; gap: var(--s-12); }
.cr-quote__name { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
.cr-quote__role { font-size: var(--text-sm); color: var(--text-subdued); }
.cr-stars { display: inline-flex; gap: 2px; color: var(--amber-400); }
.cr-stars svg { width: 16px; height: 16px; fill: currentColor; }

.cr-carousel { position: relative; }
.cr-carousel__track { display: flex; gap: var(--grid-gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; padding-inline: var(--grid-margin); scroll-padding-inline: var(--grid-margin); margin-inline: calc(var(--grid-margin) * -1); }
.cr-carousel__track::-webkit-scrollbar { display: none; }
.cr-carousel__track > * { flex: 0 0 min(86%, 520px); scroll-snap-align: start; }
.cr-carousel__nav { display: flex; align-items: center; gap: var(--s-8); margin-top: var(--gap-lg); }
.cr-carousel__btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-frosted); color: var(--text-strong); transition: background-color var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), scale var(--dur-fast); }
.cr-carousel__btn:hover { background: var(--surface-frosted-hover); }
.cr-carousel__btn:active { scale: 0.94; }
.cr-carousel__btn[disabled] { opacity: 0.35; pointer-events: none; }
.cr-carousel__dots { display: flex; gap: 6px; margin-left: auto; }
.cr-carousel__dot { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--border-strong); transition: width 0.5s var(--ease-spring), background-color var(--dur); }
.cr-carousel__dot.is-active { width: 24px; background: var(--text-strong); }

/* ---------- Process / steps ---------- */
.cr-steps { display: grid; gap: var(--grid-gutter); counter-reset: step; }
@media (min-width: 900px) { .cr-steps { grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); } }
.cr-step { position: relative; padding-top: var(--s-24); border-top: 1px solid var(--border); counter-increment: step; display: flex; flex-direction: column; gap: var(--s-8); }
.cr-step::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-primary); letter-spacing: 0.04em; margin-bottom: var(--s-16); }
.cr-step::after { content: ""; position: absolute; top: -1px; left: 0; width: 40px; height: 1px; background: var(--text-primary); transition: width 0.8s var(--ease-smooth); }
.cr-step:hover::after { width: 100%; }
.cr-step__title { font-size: var(--text-lg); font-weight: var(--fw-medium); color: var(--text-strong); }
.cr-step__text { color: var(--text-subdued); font-size: var(--text-sm); line-height: 1.45; }

/* ---------- Pricing ---------- */
.cr-price { display: flex; flex-direction: column; gap: var(--s-24); padding: var(--gap-lg); border-radius: var(--r-3xl); background: var(--surface); height: 100%; }
.cr-price--featured { background: var(--surface-elevated); box-shadow: var(--shadow-glow); }
.cr-price__name { font-size: var(--text-lg); font-weight: var(--fw-medium); color: var(--text-strong); display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); }
.cr-price__amount { font-size: var(--display-4); font-weight: var(--fw-medium); line-height: 1; letter-spacing: -0.02em; color: var(--text-strong); }
.cr-price__amount small { font-size: var(--text-sm); font-weight: var(--fw-regular); color: var(--text-subdued); letter-spacing: 0; margin-left: 4px; }
.cr-price__desc { color: var(--text-subdued); font-size: var(--text-sm); }
.cr-list { display: flex; flex-direction: column; gap: var(--s-12); }
.cr-list li { display: flex; gap: var(--s-12); font-size: var(--text-sm); line-height: 1.4; color: var(--text); }
.cr-list li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--surface-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238792ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 9.2 2.4 2.4 4.6-5'/%3E%3C/svg%3E") center / 18px no-repeat; }
.cr-list--muted li.is-off { color: var(--text-disabled); text-decoration: line-through; }

/* ---------- Table ---------- */
.cr-table-wrap { overflow-x: auto; border-radius: var(--r-3xl); box-shadow: inset 0 0 0 1px var(--border); }
.cr-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 560px; }
.cr-table th, .cr-table td { padding: var(--s-16) var(--s-24); text-align: left; border-bottom: 1px solid var(--border-subtle); }
.cr-table thead th { font-weight: var(--fw-medium); color: var(--text-subdued); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; background: var(--surface); }
.cr-table tbody th { font-weight: var(--fw-medium); color: var(--text-strong); }
.cr-table tbody tr { transition: background-color var(--dur-fast) var(--ease-out); }
.cr-table tbody tr:hover { background: var(--surface-frosted); }
.cr-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Blog / insight card ---------- */
.cr-post { display: flex; flex-direction: column; gap: var(--s-16); }
.cr-post__media { aspect-ratio: 16 / 9; border-radius: var(--r-3xl); overflow: hidden; background: var(--surface); }
.cr-post__media img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease-smooth); }
.cr-post:hover .cr-post__media img { scale: 1.05; }
.cr-post__meta { display: flex; align-items: center; gap: var(--s-12); font-size: var(--text-xs); color: var(--text-subdued); }
.cr-post__title { font-size: var(--heading-6); font-weight: var(--fw-medium); color: var(--text-strong); line-height: 1.25; transition: color var(--dur) var(--ease-out); }
.cr-post:hover .cr-post__title { color: var(--text-primary); }

/* ---------- Code window (signature CodeROG element) ---------- */
.cr-code { border-radius: var(--r-3xl); background: var(--n-1000); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgb(175 180 220 / 0.14); overflow: hidden; color: var(--n-200); text-align: left; width: 100%; }
.cr-code__bar { display: flex; align-items: center; gap: 8px; height: 44px; padding-inline: var(--s-16); border-bottom: 1px solid rgb(175 180 220 / 0.1); }
.cr-code__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgb(175 180 220 / 0.25); }
.cr-code__bar span { margin-left: var(--s-8); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--n-400); }
.cr-code pre { margin: 0; padding: var(--s-20) var(--s-24); font-family: var(--font-mono); font-size: 13px; line-height: 1.7; overflow-x: auto; }
.cr-code .tk-k { color: #a99cff; } .cr-code .tk-s { color: #6fd3a0; } .cr-code .tk-f { color: #8fb4ff; } .cr-code .tk-c { color: var(--n-500); } .cr-code .tk-n { color: #ffc46b; }
.cr-caret { display: inline-block; width: 8px; height: 1.1em; vertical-align: text-bottom; background: var(--brand-400); animation: cr-blink 1s steps(1) infinite; }

/* browser / app frame for screenshots */
.cr-frame { border-radius: var(--r-3xl); background: var(--surface-elevated); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border-subtle); overflow: hidden; }
.cr-frame__bar { display: flex; align-items: center; gap: 8px; height: 40px; padding-inline: var(--s-16); border-bottom: 1px solid var(--border-subtle); }
.cr-frame__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.cr-frame img { width: 100%; }

/* ---------- CTA band ---------- */
.cr-cta { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-4xl); padding: var(--gap-3xl) var(--gap-lg); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-24); background: var(--surface); }
.cr-cta--brand { background: var(--gradient-brand); color: rgb(255 255 255 / 0.88); --text-strong: #fff; --text-subdued: rgb(255 255 255 / 0.75); }
.cr-cta--brand::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 80% 0%, rgb(255 255 255 / 0.28), transparent 55%), radial-gradient(ellipse at 10% 100%, rgb(11 12 23 / 0.35), transparent 55%); }
.cr-cta__rings { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cr-cta__rings::before, .cr-cta__rings::after { content: ""; position: absolute; border-radius: 50%; border: 24px solid rgb(255 255 255 / 0.12); width: 900px; height: 900px; right: -420px; top: -300px; }
.cr-cta__rings::after { width: 1300px; height: 1300px; right: -620px; top: -500px; border-width: 12px; }

/* ---------- Footer ---------- */
.cr-footer { padding-block: var(--gap-3xl) var(--s-40); border-top: 1px solid var(--border-subtle); }
.cr-footer__top { display: grid; gap: var(--gap-2xl); }
@media (min-width: 900px) { .cr-footer__top { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.cr-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-xl) var(--grid-gutter); }
@media (min-width: 640px) { .cr-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cr-footer__heading { font-size: var(--text-xs); font-weight: var(--fw-medium); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subdued); margin-bottom: var(--s-16); }
.cr-footer__links { display: flex; flex-direction: column; gap: var(--s-12); }
.cr-footer__links a { font-size: var(--text-sm); color: var(--text); width: fit-content; transition: color var(--dur) var(--ease-out); }
.cr-footer__links a:hover { color: var(--text-primary); }
.cr-footer__bottom { margin-top: var(--gap-2xl); padding-top: var(--s-24); border-top: 1px solid var(--border-subtle); display: flex; flex-wrap: wrap; gap: var(--s-16); justify-content: space-between; align-items: center; font-size: var(--text-xs); color: var(--text-subdued); }
.cr-footer__wordmark { margin-top: var(--gap-2xl); font-size: clamp(4rem, 17vw, 17rem); font-weight: 800; line-height: 0.8; letter-spacing: -0.02em; text-align: center; background: linear-gradient(180deg, var(--border-strong), transparent 85%); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
.cr-social { display: flex; gap: var(--s-8); }
.cr-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-frosted); color: var(--text-strong); transition: background-color var(--dur) var(--ease-out), color var(--dur), translate 0.4s var(--ease-spring); }
.cr-social a:hover { background: var(--surface-primary); color: #fff; translate: 0 -3px; }
.cr-social svg { width: 18px; height: 18px; }

/* ---------- Overlays: modal, toast, tooltip ---------- */
.cr-modal { border: 0; padding: 0; margin: auto; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border-radius: var(--r-3xl); background: var(--surface-elevated); color: var(--text); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border-subtle); overflow: auto; }
.cr-modal::backdrop { background: rgb(11 12 23 / 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: cr-fade-in 0.3s var(--ease-out); }
.cr-modal[open] { animation: cr-pop 0.45s var(--ease-spring); }
.cr-modal__body { padding: var(--gap-lg); display: flex; flex-direction: column; gap: var(--s-16); }
.cr-modal__close { position: absolute; top: var(--s-16); right: var(--s-16); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-frosted); color: var(--text-strong); transition: background-color var(--dur), rotate 0.4s var(--ease-spring); }
.cr-modal__close:hover { background: var(--surface-frosted-hover); rotate: 90deg; }

.cr-toasts { position: fixed; z-index: var(--z-toast); right: var(--s-24); bottom: var(--s-24); display: flex; flex-direction: column; gap: var(--s-8); align-items: flex-end; pointer-events: none; }
.cr-toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s-12); padding: var(--s-12) var(--s-20); border-radius: var(--r-pill); background: var(--n-0); color: var(--n-950); font-size: var(--text-sm); font-weight: var(--fw-medium); box-shadow: var(--shadow-lg); animation: cr-pop 0.45s var(--ease-spring); transition: opacity 0.3s var(--ease-out), translate 0.3s var(--ease-out); }
.cr-toast.is-leaving { opacity: 0; translate: 0 8px; }
.cr-toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); }
.cr-toast--error::before { background: var(--red-600); }

[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 4px; padding: 6px 10px; border-radius: var(--r-lg); background: var(--surface-inverted); color: var(--text-inverted); font-size: var(--text-xs); font-weight: var(--fw-medium); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out), translate var(--dur) var(--ease-spring); z-index: 10; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; translate: -50% 0; }

/* ---------- Misc ---------- */
.cr-divider { display: flex; align-items: center; gap: var(--s-16); color: var(--text-subdued); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; }
.cr-divider::before, .cr-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cr-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-8); font-size: var(--text-sm); color: var(--text-subdued); }
.cr-breadcrumb a:hover { color: var(--text-strong); }
.cr-breadcrumb li + li::before { content: "/"; margin-right: var(--s-8); opacity: 0.5; }
.cr-breadcrumb li:last-child { color: var(--text-strong); }
.cr-pagination { display: inline-flex; align-items: center; gap: var(--s-4); }
.cr-pagination a { min-width: 40px; height: 40px; padding-inline: var(--s-12); border-radius: var(--r-pill); display: grid; place-items: center; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-subdued); transition: background-color var(--dur), color var(--dur); }
.cr-pagination a:hover { background: var(--surface-frosted); color: var(--text-strong); }
.cr-pagination a.is-current { background: var(--surface-primary); color: #fff; }
.cr-progress { height: 4px; border-radius: var(--r-pill); background: var(--surface-frosted); overflow: hidden; }
.cr-progress > i { display: block; height: 100%; width: var(--value, 50%); border-radius: inherit; background: var(--gradient-brand); transition: width 1.2s var(--ease-smooth); }
.cr-skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface-frosted) 25%, var(--surface-frosted-hover) 50%, var(--surface-frosted) 75%) 0 0 / 200% 100%; animation: cr-skeleton 1.6s linear infinite; }
@keyframes cr-skeleton { to { background-position: -200% 0; } }
.cr-alert { display: flex; gap: var(--s-12); padding: var(--s-16) var(--s-20); border-radius: var(--r-2xl); background: var(--surface-tint); color: var(--text); font-size: var(--text-sm); line-height: 1.45; }
.cr-alert .cr-icon { color: var(--text-primary); margin-top: 1px; }
.cr-alert--success { background: color-mix(in srgb, var(--text-success) 13%, transparent); } .cr-alert--success .cr-icon { color: var(--text-success); }
.cr-alert--error { background: color-mix(in srgb, var(--text-error) 13%, transparent); } .cr-alert--error .cr-icon { color: var(--text-error); }
.cr-back-top { position: fixed; right: var(--s-24); bottom: var(--s-24); z-index: 50; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-elevated); color: var(--text-strong); box-shadow: var(--shadow-md), inset 0 0 0 1px var(--border-subtle); opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity var(--dur), translate 0.5s var(--ease-spring), background-color var(--dur); }
.cr-back-top.is-visible { opacity: 1; translate: none; pointer-events: auto; }
.cr-back-top:hover { background: var(--surface-primary); color: #fff; }

/* inline-sized pieces keep their own width inside stretched flex columns */
.cr-badge, .cr-pill-link, .cr-logo, .cr-chip, .cr-segment { width: fit-content; }

/* ==========================================================================
   Mega menu — full-width panel under the navbar, cells split by hairlines.
   Desktop: .cr-nav__item--mega > .cr-mega.   Mobile: .cr-mnav drill-down.
   ========================================================================== */
.cr-nav, .cr-mega { --mega-bg: var(--surface-elevated); --mega-line: var(--border); }
.cr-nav:has(.cr-nav__item--mega.is-open) { background: var(--mega-bg); box-shadow: 0 1px 0 var(--mega-line); }
.cr-nav:has(.cr-nav__item--mega.is-open)::before { opacity: 0; }
/* page dims behind an open menu; clicking the dimmed area closes it */
.cr-nav::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 100vh; z-index: -2; background: rgb(11 12 23 / 0.45); opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease-out); }
.cr-nav:has(.cr-nav__item--mega.is-open)::after { opacity: 1; pointer-events: auto; }
@media (min-width: 1000px) and (max-width: 1239px) { .cr-nav__actions .cr-btn--secondary { display: none; } .cr-nav__inner { gap: var(--s-16); } }
.cr-nav__item--mega { position: static; }
.cr-nav__item--mega > .cr-nav__link { position: relative; }
/* invisible bridge so the pointer can travel from the trigger down to the panel */
.cr-nav__item--mega > .cr-nav__link::after { content: ""; position: absolute; left: -8px; right: -8px; top: 100%; height: 24px; }
.cr-nav__item.is-open > .cr-nav__link { background: var(--surface-frosted-hover); }

.cr-mega {
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--mega-bg); color: var(--text);
  border: 1px solid var(--mega-line); border-top: 0; border-radius: 0 0 var(--r-2xl) var(--r-2xl);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; translate: 0 -8px;
  transition: opacity 0.25s var(--ease-out), translate 0.45s var(--ease-smooth), visibility 0s 0.25s;
}
.cr-nav__item.is-open > .cr-mega { opacity: 1; visibility: visible; translate: none; transition-delay: 0s; }
.cr-mega__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--mega-line); }
.cr-mega__cell { background: var(--mega-bg); padding: var(--s-40) var(--grid-margin); display: flex; flex-direction: column; gap: var(--s-32); min-width: 0; }
.cr-mega__cell--tall { grid-row: span 2; }
.cr-mega__cell--wide { grid-column: span 2; }
.cr-mega__cell > *, .cr-mega__footer > * { opacity: 0; translate: 0 10px; transition: opacity 0.5s var(--ease-out), translate 0.6s var(--ease-smooth); }
.cr-nav__item.is-open .cr-mega__cell > *, .cr-nav__item.is-open .cr-mega__footer > * { opacity: 1; translate: none; transition-delay: 0.08s; }
.cr-nav__item.is-open .cr-mega__cell:nth-child(n+2) > * { transition-delay: 0.13s; }
.cr-nav__item.is-open .cr-mega__cell:nth-child(n+4) > *, .cr-nav__item.is-open .cr-mega__footer > * { transition-delay: 0.18s; }

.cr-mega__lead { display: block; }
.cr-mega__lead-title { display: block; font-size: var(--text-lg); font-weight: var(--fw-medium); line-height: 1.2; color: var(--text-strong); transition: color var(--dur) var(--ease-out); }
.cr-mega__lead-desc { display: block; margin-top: var(--s-4); font-size: var(--text-sm); line-height: 1.4; letter-spacing: 0.01em; color: var(--text-subdued); max-width: 46ch; }
.cr-mega__lead--lg .cr-mega__lead-title { font-size: var(--text-xl); }
.cr-mega__lead--lg .cr-mega__lead-desc { font-size: var(--text-md); line-height: 1.3; margin-top: var(--s-8); }
a.cr-mega__lead:hover .cr-mega__lead-title { color: var(--text-primary); }
.cr-mega__stack { display: flex; flex-direction: column; }
.cr-mega__stack > * { border-top: 1px solid var(--mega-line); padding-block: var(--s-20); }
.cr-mega__leads { display: grid; gap: var(--s-32) var(--grid-margin); }
.cr-mega__leads--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: calc(var(--grid-margin) * 2); }
.cr-mega__group { display: flex; flex-direction: column; gap: var(--s-8); }
.cr-mega__label { font-size: var(--text-xs); font-weight: var(--fw-regular); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subdued); margin-bottom: var(--s-4); }
.cr-mega__link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: var(--text-base); line-height: 1.45; color: var(--text-strong); transition: color var(--dur) var(--ease-out); }
.cr-mega__link:hover { color: var(--text-primary); }
.cr-mega__link .cr-icon { width: 14px; height: 14px; }
/* Expertise mega menu: six cells, two rows of three, tighter spacing */
.cr-mega__grid--3x2 .cr-mega__cell { padding: var(--s-20) var(--grid-margin); gap: var(--s-12); }
.cr-mega__phrase { margin-bottom: calc(var(--s-4) * -1); }
.cr-mega__grid--3x2 .cr-mega__group { gap: var(--s-4); }
.cr-mega__grid--3x2 .cr-mega__link { font-size: var(--text-sm); line-height: 1.4; }
.cr-mega--six .cr-mega__footer { padding-block: var(--s-16); }
.cr-mega__footer { display: flex; align-items: center; gap: var(--s-12); padding: var(--s-32) var(--grid-margin); border-top: 1px solid var(--mega-line); font-size: var(--text-xl); font-weight: var(--fw-medium); color: var(--text-strong); }
.cr-mega__footer-arrow { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-frosted-hover); transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.cr-mega__footer-arrow .cr-icon { transition: translate var(--dur) var(--ease-spring); }
.cr-mega__footer:hover .cr-mega__footer-arrow { background: var(--surface-primary); color: #fff; }
.cr-mega__footer:hover .cr-mega__footer-arrow .cr-icon { translate: 3px 0; }

/* ==========================================================================
   Scroll-scrub video hero — section pins while scroll position drives the
   video. JS sets --p (0 → 1) on .cr-scrub; everything else is derived here.
   ========================================================================== */
.cr-scrub { position: relative; height: var(--scrub-length, 300vh); --p: 0; background: var(--n-1000); }
.cr-scrub__sticky { position: sticky; top: var(--nav-h); height: calc(100dvh - var(--nav-h)); overflow: hidden; isolation: isolate; display: grid; color: #fff;
  /* controls sit on footage, so frosted surfaces need more body than on flat backgrounds */
  --surface-frosted: rgb(255 255 255 / 0.18); --surface-frosted-hover: rgb(255 255 255 / 0.26);
  --border-subtle: rgb(255 255 255 / 0.24); --text-subdued: rgb(255 255 255 / 0.78); --text-strong: #fff;
}
/* use on pages where the navbar floats transparently over the hero */
.cr-scrub--under-nav { margin-top: calc(var(--nav-h) * -1); }
.cr-scrub--under-nav .cr-scrub__sticky { top: 0; height: 100dvh; }
.cr-scrub--under-nav .cr-scrub__content { padding-top: calc(var(--nav-h) + clamp(48px, 10vh, 110px)); }
.cr-scrub__video { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; }
/* soft blurred vignette around the edges, clears as you scroll */
.cr-scrub__frost {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  mask-image: radial-gradient(ellipse 72% 68% at 50% 58%, transparent 55%, #000 100%);
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 58%, transparent 55%, #000 100%);
  opacity: calc(1 - var(--p) * 1.6);
}
.cr-scrub__shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgb(11 12 23 / 0.5) 0%, rgb(11 12 23 / 0.12) 48%, transparent 70%); opacity: calc(1 - var(--p) * 4); }
.cr-scrub__content {
  align-self: start; justify-self: center; width: 100%; max-width: 940px;
  padding: clamp(48px, 12vh, 130px) var(--grid-margin) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-24);
  opacity: calc(1 - var(--p) * 6); translate: 0 calc(var(--p) * -180px); filter: blur(calc(var(--p) * 48px));
}
.cr-scrub__content :is(h1, h2) { color: #fff; }
.cr-scrub.is-past .cr-scrub__content { visibility: hidden; }
.cr-scrub__end {
  position: absolute; inset: auto 0 0 0; padding: var(--s-96) var(--grid-margin) var(--s-48);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-20);
  background: linear-gradient(180deg, transparent, rgb(11 12 23 / 0.85));
  opacity: calc((var(--p) - 0.82) * 8); translate: 0 calc((1 - var(--p)) * 80px); pointer-events: none;
}
.cr-scrub.is-end .cr-scrub__end { pointer-events: auto; }
.cr-scrub__note { position: absolute; left: 50%; bottom: var(--s-16); translate: -50% 0; width: max-content; max-width: calc(100% - 32px); padding: var(--s-8) var(--s-16); border-radius: var(--r-xl); background: rgb(18 19 33 / 0.82); font-size: var(--text-xs); color: var(--n-200); text-align: center; opacity: calc(1 - var(--p) * 6); }

/* static preview (docs) */
.cr-mega--static { position: relative; top: auto; max-height: none; opacity: 1; visibility: visible; translate: none; border: 0; border-radius: 0; box-shadow: none; }
.cr-mega--static .cr-mega__cell > *, .cr-mega--static .cr-mega__footer > * { opacity: 1; translate: none; }
@media (max-width: 899px) {
  .cr-mega__grid, .cr-mega__leads--2 { grid-template-columns: 1fr; }
  .cr-mega__cell--tall, .cr-mega__cell--wide { grid-row: auto; grid-column: auto; }
}

/* ---- mobile: full-screen list that drills into sub-menus ---- */
.cr-nav.is-open { background: var(--mega-bg); }
.cr-nav__mobile { padding: 0; gap: 0; overflow: hidden; background: var(--mega-bg); border-top: 1px solid var(--mega-line); }
.cr-mnav { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.cr-mnav__view {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  translate: 100% 0; opacity: 0; visibility: hidden;
  transition: translate 0.5s var(--ease-smooth), opacity 0.3s var(--ease-out), visibility 0s 0.5s;
}
.cr-mnav__view--root { translate: -30% 0; }
.cr-mnav__view.is-active { translate: none; opacity: 1; visibility: inherit; transition-delay: 0s; }
.cr-mnav__row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-16);
  padding: var(--s-24) var(--grid-margin); border-bottom: 1px solid var(--mega-line);
  font-size: var(--text-xl); font-weight: var(--fw-regular); color: var(--text-strong); text-align: left;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.cr-mnav__row:hover, .cr-mnav__row:active { background: var(--surface-frosted); }
.cr-mnav__row .cr-icon { width: 20px; height: 20px; }
.cr-mnav__row--back { justify-content: flex-start; gap: var(--s-8); font-size: var(--text-base); color: var(--text-subdued); padding-block: var(--s-16); }
.cr-mnav__group { display: flex; flex-direction: column; gap: var(--s-12); padding: var(--s-24) var(--grid-margin); border-bottom: 1px solid var(--mega-line); }
.cr-mnav__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); padding: var(--s-24) var(--grid-margin) calc(var(--s-24) + env(safe-area-inset-bottom)); }
.cr-mnav__actions > :first-child { grid-column: 1 / -1; }
