/* ==========================================================
   OMNIX// — components.css
   Shared chrome: nav, mobile menu, footer, buttons, forms,
   ledger tables, breadcrumb/page header, demoted cursor.
   Loaded by EVERY page (after base.css).
   ========================================================== */

/* ========== NAV ========== */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  height: var(--nav-h);
  padding-inline: var(--pad-x);
  color: var(--paper);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  border-bottom: 1px solid transparent;
}
/* legibility scrim over the hero canvas (no mix-blend-mode) */
.site-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11,11,12,0.85) 0%, rgba(11,11,12,0) 100%);
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease);
}
.site-nav.scrolled {
  background: rgba(11,11,12,0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.site-nav.scrolled::before { opacity: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--paper);
}
.brand .dot {
  width: 8px; height: 8px;
  background: var(--spot);
  border-radius: 50%;
  animation: pulse 1.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) { .brand .dot { animation: none; } }

.nav-links { display: flex; align-items: center; gap: var(--s-6); }
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--paper);
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--spot);
  transition: width var(--dur-fast) var(--ease);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--spot); }

.cta-pill {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--paper);
  border: 1px solid var(--line-2);
  padding: 9px 18px;
  border-radius: 999px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.cta-pill:hover { background: var(--spot); color: var(--spot-ink); border-color: var(--spot); }

/* Hamburger */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0;
  color: var(--paper);
  cursor: pointer;
  position: relative;
  z-index: calc(var(--z-nav) + 2);
}
.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease), opacity 0.15s var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 32px) var(--pad-x) 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a.mm-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--serif);
  font-variation-settings: 'opsz' 144, 'wght' 400;
  font-size: clamp(34px, 11vw, 52px);
  line-height: 1.1;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  transition: color var(--dur-fast) var(--ease);
}
.mobile-menu a.mm-link:hover { color: var(--spot); }
.mobile-menu a.mm-link .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--mist); }
.mm-cta {
  margin-top: auto;
  text-align: center;
  background: var(--spot);
  color: var(--spot-ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 18px 24px;
  border-radius: 999px;
}
.mm-meta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 20px 30px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn .arrow {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn span { position: relative; z-index: 1; }

/* Primary — spot fills up on hover */
.btn-spot { background: var(--paper); color: var(--ink); }
.btn-spot::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background: var(--spot);
  transform: translateY(100%);
  transition: transform var(--dur) var(--ease);
}
.btn-spot:hover::before { transform: translateY(0); }
.btn-spot:hover { color: var(--spot-ink); }
.btn-spot .arrow { background: var(--ink); color: var(--paper); }
.btn-spot:hover .arrow { transform: rotate(-45deg); background: var(--spot-ink); color: var(--spot); }

/* Ghost */
.btn-ghost { color: var(--paper); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--spot); color: var(--spot); }
.btn-ghost .arrow { border: 1px solid currentColor; }
.btn-ghost:hover .arrow { transform: rotate(-45deg); }

@media (max-width: 640px) {
  .btn { padding: 16px 22px; font-size: 11px; gap: 10px; }
}

/* ========== PAGE HEADER (subpages) ========== */
.page-header {
  padding: calc(var(--nav-h) + clamp(48px, 9vw, 110px)) var(--pad-x) clamp(40px, 7vw, 80px);
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--mist);
  margin-bottom: var(--s-6);
}
.breadcrumb a:hover { color: var(--spot); }
.breadcrumb .sep { color: var(--faint); }
.page-title { font-size: var(--fs-h1); margin: 0; }
.page-header .lede { margin-top: var(--s-6); max-width: 60ch; }

/* ========== FORMS ========== */
.field { position: relative; }
.field > label,
.field > .label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--spot);
  font-weight: 700;
  margin-bottom: 12px;
}
.req { color: var(--spot); }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--paper);
  font-family: var(--serif);
  font-variation-settings: 'opsz' 28, 'wght' 400;
  font-size: clamp(20px, 2.4vw, 26px);
  padding: 6px 2px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.field textarea {
  font-family: var(--grotesk);
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  min-height: 110px;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--spot);
  box-shadow: 0 1px 0 0 var(--spot);
}
.field select {
  appearance: none;
  cursor: pointer;
  padding-right: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%2321E6D4' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
.field select option { background: var(--ink); color: var(--paper); }

/* Fieldset / checkbox groups */
fieldset { border: 0; min-width: 0; }
fieldset > legend {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--spot);
  font-weight: 700;
  margin-bottom: 14px;
  padding: 0;
}
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--bone);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.checks label:hover { border-color: var(--spot); color: var(--paper); }
.checks label:focus-within { border-color: var(--spot); }
.checks input[type="checkbox"] {
  appearance: none;
  width: 15px; height: 15px;
  flex: 0 0 auto;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
}
.checks input[type="checkbox"]:checked { background: var(--spot); border-color: var(--spot); }
.checks input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid var(--spot-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checks input[type="checkbox"]:focus-visible { outline: 2px solid var(--spot); outline-offset: 2px; }

/* ========== FOOTER ========== */
.site-footer {
  border-top: 1px solid var(--line-2);
  padding: clamp(48px, 8vw, 80px) var(--pad-x) 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.foot-brand { font-family: var(--mono); }
.foot-brand .mark {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 144, 'wght' 900;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.foot-brand .mark em { font-style: italic; font-variation-settings: 'opsz' 72, 'wght' 400; color: var(--spot); }
.foot-brand p {
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
  max-width: 42ch;
}
.foot-col h2 {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--mist);
  font-weight: 500;
  margin-bottom: 16px;
}
.foot-col a {
  display: block;
  font-size: 13px;
  color: var(--bone);
  padding: 5px 0;
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.foot-col a:hover { color: var(--spot); transform: translateX(4px); }
.foot-bottom {
  grid-column: 1 / -1;
  margin-top: var(--s-7);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

@media (max-width: 1100px) {
  .site-footer { grid-template-columns: 1fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-footer { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-bottom { flex-direction: column; gap: 8px; }
}

/* ========== DEMOTED CURSOR RING (desktop, interactive targets only) ========== */
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border: 1.5px solid var(--spot);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s var(--ease), transform 0.3s var(--ease);
}
.cursor-ring.active { opacity: 1; transform: scale(1); }
@media (hover: none), (pointer: coarse) {
  .cursor-ring { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-ring { display: none !important; }
}

/* ========== MOBILE NAV SWITCH ========== */
@media (max-width: 900px) {
  .nav-links, .site-nav > .cta-pill { display: none; }
  .hamburger { display: block; }
}
