/* =============================================================
   TRACKORIGIN — Reusable components: nav, buttons, cards, forms, alerts
   ============================================================= */
/* ============ NAV ============ */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  background: rgba(7, 17, 45, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 10000;
  height: 88px;
  transition: height 0.22s cubic-bezier(.3,.7,.2,1), padding 0.22s cubic-bezier(.3,.7,.2,1), background-color 0.22s ease, box-shadow 0.22s ease;
  border-bottom: 1px solid transparent;
}

/* The 1px hairline gets a soft blue glow when you've scrolled so the bar
   separates from content without a hard line. */
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(58, 108, 217, 0.55) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.nav[data-state="scrolled"] {
  height: 68px;
  background: rgba(7, 17, 45, 0.88);
  box-shadow: 0 8px 32px -16px rgba(0, 0, 0, 0.55);
}

.nav[data-state="scrolled"]::after {
  opacity: 1;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  /* Match the nav's own height so the flexbox vertical centering uses the
     same baseline as everything else in the bar. line-height: 0 strips the
     inline image's baseline gap. */
  height: 100%;
  line-height: 0;
}

.nav__brand-logo {
  display: block;
  width: auto;
  height: 48px;
  max-height: 48px;
  object-fit: contain;
}

/* Logo stays a constant 48px — it no longer shrinks on scroll. */

.nav__desktop-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.nav__link {
  position: relative;
  font-size: 13.5px;
  color: var(--cream-muted);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1px;
  background: var(--blue-bright);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s cubic-bezier(.3,.7,.2,1), opacity 0.18s ease;
  opacity: 0;
}

.nav__link:hover {
  color: var(--cream);
  background: rgba(245, 239, 224, 0.04);
}

.nav__link:hover::after {
  transform: scaleX(1);
  opacity: 0.55;
}

.nav__link.is-active {
  color: var(--cream);
}

.nav__link.is-active::after {
  transform: scaleX(1);
  opacity: 1;
  box-shadow: 0 0 8px rgba(58, 108, 217, 0.6);
}

.nav__link--profile {
  color: var(--blue-bright);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* Visual separator between marketing nav and account nav */
.nav__sep {
  width: 1px;
  height: 22px;
  background: rgba(245, 239, 224, 0.14);
  margin: 0 8px;
}

/* Primary CTA — filled blue, shine sweep on hover, premium feel */
.nav__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  margin-left: 8px;
  background: var(--blue, #2D55B8);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 4px;
  overflow: hidden;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid rgba(58, 108, 217, 0.6);
}

.nav__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
  /* Sit BELOW the inline label + arrow. Absolutely-positioned children
     otherwise paint above static-flow inline content, which made the shine
     sweep wipe the "Verify Now" text during the 0.6s hover transition. */
  z-index: 0;
}

/* Force the label and arrow to sit ABOVE the shine sweep. Without this, the
   ::before overlay would erase the text mid-hover. Targets direct children
   so any future inline contents (e.g. an icon) are covered automatically. */
.nav__cta > * {
  position: relative;
  z-index: 1;
}

.nav__cta:hover {
  background: var(--blue-bright, #3a6cd9);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -10px rgba(58, 108, 217, 0.7);
}

.nav__cta:hover::before {
  transform: translateX(110%);
}

.nav__cta-arrow {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.nav__cta:hover .nav__cta-arrow { transform: translateX(3px); }

.nav__toggle {
  display: none;
  width: 42px;
  height: 38px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.nav__toggle:hover {
  border-color: var(--blue-bright);
  background: var(--ink-soft);
}
.nav__toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream);
  border-radius: 999px;
}
.nav__menu,
.nav__scrim {
  display: none;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--blue);
  color: var(--cream);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--blue-bright);
  color: var(--cream);
}
.btn:disabled {
  background: var(--ink-line);
  color: var(--cream-dim);
  cursor: not-allowed;
}
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.btn--large {
  padding: 18px 36px;
  font-size: 17px;
}
.btn--small {
  padding: 8px 16px;
  font-size: 14px;
}
.btn--full {
  width: 100%;
}
.btn--ghost {
  background: transparent;
  border: 1px solid var(--ink-line);
  color: var(--cream);
}
.btn--ghost:hover {
  background: var(--ink-soft);
  border-color: var(--blue-bright);
  color: var(--cream);
}
.btn--danger {
  background: var(--red);
}
.btn--danger:hover {
  background: #c44a4a;
}
.btn--success {
  background: var(--green);
}
.btn--success:hover {
  background: #3fa070;
}
/* ============ CARDS ============ */
.card {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.card:last-child {
  margin-bottom: 0;
}
.card--flat {
  background: var(--ink);
}
/* ============ FORMS ============ */
.field {
  margin-bottom: 20px;
}
.field:last-child {
  margin-bottom: 0;
}
label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--cream-muted);
  font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  font-family: inherit;
  font-size: 15px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--ink-line);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  width: 100%;
  transition: border 0.15s, box-shadow 0.15s;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
input::placeholder,
textarea::placeholder {
  color: var(--cream-dim);
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin: 0 8px 0 0;
  accent-color: var(--blue-bright);
  cursor: pointer;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath stroke='%23C8C2B4' stroke-width='1.5' fill='none' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}
.field-help {
  font-size: 13px;
  color: var(--cream-dim);
  margin-top: 6px;
}
.field-error {
  font-size: 13px;
  color: #ffb3b3;
  margin-top: 6px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  color: var(--cream);
  font-weight: 400;
}
.checkbox-label span {
  padding-top: 1px;
}
/* ============ ALERTS ============ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.alert--error {
  background: var(--red-soft);
  border: 1px solid var(--red);
  color: #ffb3b3;
}
.alert--warn {
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  color: #ffd89a;
}
.alert--info {
  background: var(--blue-soft);
  border: 1px solid var(--blue-bright);
  color: #b5c9f0;
}
.alert--ok {
  background: var(--green-soft);
  border: 1px solid var(--green);
  color: #a5dcbc;
}
.alert__icon {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 16px;
}
/* ============ BADGES / PILLS ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cream-muted);
}
.pill--active {
  background: var(--green-soft);
  border-color: var(--green);
  color: #a5dcbc;
}
.pill--warn {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: #ffd89a;
}
.pill--error {
  background: var(--red-soft);
  border-color: var(--red);
  color: #ffb3b3;
}
.pill--info {
  background: var(--blue-soft);
  border-color: var(--blue-bright);
  color: #b5c9f0;
}
/* ============ HERO ============ */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 40px;
}
.hero__copy h1 {
  margin-bottom: 16px;
}
.hero__sub {
  font-size: 19px;
  color: var(--cream-muted);
  max-width: 540px;
  margin-bottom: 32px;
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__seal-image {
  display: block;
  width: 100%;
  max-width: 410px;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}
/* ============ MOBILE NAV / OFFCANVAS MENU ============ */
@media (max-width: 720px) {
  .nav {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    height: 70px;
    padding: 10px 14px;
  }
  .nav__toggle {
    display: inline-flex;
    grid-column: 1;
    justify-self: start;
  }
  .nav__brand {
    grid-column: 2;
    justify-self: center;
    justify-content: center;
    width: 185px;
    max-width: 185px;
    height: 44px;
  }
  .nav__brand-logo {
    max-height: 44px;
  }
  .nav__desktop-actions {
    display: none;
  }
  .nav__scrim {
    display: block;
    position: fixed;
    inset: 70px 0 0 0;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 9998;
  }
  .nav__menu {
    display: flex;
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: min(82vw, 320px);
    padding: 18px 14px;
    background-color: #0A1428;
    background: var(--ink);
    border-right: 1px solid var(--ink-line);
    box-shadow: 22px 0 42px rgba(0, 0, 0, 0.45);
    flex-direction: column;
    gap: 8px;
    transform: translateX(-104%);
    transition: transform 0.24s ease;
    z-index: 9999;
    isolation: isolate;
  }
  .nav.nav--open .nav__menu {
    transform: translateX(0);
  }
  .nav.nav--open .nav__scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav__menu-link,
  .nav__menu-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    margin: 0;
    border-radius: var(--radius-sm);
    border: 0;
    background: transparent;
    color: var(--cream);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }
  .nav__menu-link:hover,
  .nav__menu-btn:hover {
    background: var(--ink-soft);
    color: var(--cream);
  }
  .nav__menu-btn {
    margin-top: 8px;
    border: 1px solid var(--ink-line);
  }
  .nav__menu-btn[href="/signup"],
  .nav__menu-btn[href="/upload"] {
    justify-content: center;
    background: var(--blue);
    border-color: var(--blue);
  }
  .nav__menu-btn[href="/signup"]:hover,
  .nav__menu-btn[href="/upload"]:hover {
    background: var(--blue-bright);
    border-color: var(--blue-bright);
  }
  .btn--small {
    padding: 7px 12px;
    font-size: 13px;
  }
  /* Mobile section heading inside the slide-out menu (e.g. "Profile") */
  .nav__menu-section {
    margin-top: 16px;
    padding: 0 14px 4px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cream-dim);
    border-bottom: 1px solid var(--ink-line);
  }
  .nav__menu-link--danger {
    margin-top: 6px;
    color: #ffb3b3 !important;
  }
}

/* ─── Desktop profile dropdown ──────────────────────────────────────────
   Avatar/handle button with caret. Click toggles the menu. Click-outside
   and ESC are wired in utils.js. Menu renders as an absolutely-positioned
   panel under the button — pointer-events ignore the menu while hidden
   so the nav doesn't get a phantom click target. */
.nav__profile {
  position: relative;
  margin-left: 4px;
}
.nav__profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: rgba(245, 239, 224, 0.04);
  color: var(--cream);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.nav__profile-btn:hover {
  background: rgba(245, 239, 224, 0.08);
  border-color: rgba(58, 108, 217, 0.5);
}
.nav__profile-btn[aria-expanded="true"] {
  background: rgba(58, 108, 217, 0.12);
  border-color: rgba(58, 108, 217, 0.6);
}
.nav__profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
}
.nav__profile-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.nav__profile-caret {
  font-size: 10px;
  color: var(--cream-dim);
  transition: transform 0.18s ease;
}
.nav__profile-btn[aria-expanded="true"] .nav__profile-caret {
  transform: rotate(180deg);
}
.nav__profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  background: #07112d;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav__profile-menu[hidden] { display: none; }
.nav__profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.nav__profile-item:hover {
  background: rgba(58, 108, 217, 0.12);
  color: var(--cream);
}
.nav__profile-item-label {
  flex: 1 1 auto;
}
.nav__profile-item-detail {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cream-dim);
}
.nav__profile-item--danger {
  color: #ffb3b3;
}
.nav__profile-item--danger:hover {
  background: rgba(255, 90, 90, 0.12);
  color: #ffb3b3;
}
.nav__profile-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--ink-line);
}
@media (max-width: 900px) {
  /* Hide the desktop dropdown on small screens — the mobile slide-out
     menu already inlines the same items. */
  .nav__profile { display: none; }
}
/* ============ RESPONSIVE HERO ============ */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero__visual {
    order: -1;
  }
  .hero__seal-image {
    max-width: 280px;
  }
}

.nav__cta:hover,
.nav__cta:focus-visible {
  background: var(--cream, #F5EFE6);
  color: var(--blue, #2D55B8);
  border-color: var(--cream, #F5EFE6);
  box-shadow: 0 10px 28px rgba(45, 85, 184, 0.28);
  transform: translateY(-1px);
}

.nav__cta:hover .nav__cta-arrow,
.nav__cta:focus-visible .nav__cta-arrow {
  color: var(--blue, #2D55B8);
}

/* ============ SMALL SCREENS ============ */
@media (max-width: 520px) {
  .btn {
    padding: 12px 20px;
  }
  .card {
    padding: 20px;
  }
  .hero__seal-image {
    max-width: 230px;
  }
}
@media (max-width: 420px) {
  .nav__brand {
    width: 170px;
    max-width: 170px;
  }
  .nav__brand-logo {
    max-height: 42px;
  }
}
/* ============ BODY LOCK ============ */
body.nav-lock {
  overflow: hidden;
}
/* ============================================================
   SEQUENCER — bulletproof against any other CSS
   ============================================================ */
.sequencer {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 6px;
  align-items: center;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 16px;
}
.sequencer__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-muted);
  padding-right: 6px;
  white-space: nowrap;
}
.sequencer__row {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 3px;
}
/* Base cell — explicit reset of every property that components.css might touch */
button.sequencer__cell {
  all: unset;                          /* nuke inherited button styles */
  display: block;
  aspect-ratio: 1;
  background: #0A1428;                 /* ink, hard-coded so nothing overrides */
  border: 1px solid #1F2D44;           /* ink-line */
  border-radius: 3px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.08s, border-color 0.08s, box-shadow 0.08s;
  min-width: 0;
}
/* Hover (only when NOT on, so on-cells never go grey on hover) */
button.sequencer__cell:hover:not(.is-on) {
  background: #2A3A56;                 /* ink-lighter */
  border-color: #2D55B8;               /* blue-bright */
}
/* ON state — uses attribute selector for double-strength specificity */
button.sequencer__cell.is-on,
button.sequencer__cell[aria-pressed="true"],
button.sequencer__cell.is-on:hover,
button.sequencer__cell[aria-pressed="true"]:hover {
  background: #2D55B8 !important;      /* blue-bright */
  border-color: #2D55B8 !important;
}
button.sequencer__cell.is-downbeat:not(.is-on) {
  border-color: #8A8676;               /* cream-dim */
}
button.sequencer__cell.is-playing {
  box-shadow: 0 0 0 2px #F5F1E8;       /* cream */
  z-index: 1;
}
/* Controls below the grid */
.sequencer__controls {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.sequencer__bpm {
  font-size: 12px;
  color: var(--cream-muted);
  margin-left: auto;
}


  html body .nav {
    z-index: 2147483647 !important;
    background: var(--ink) !important;
    background-color: #0A1428 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }