/* ============================================================
   components.css — reusable UI: nav, buttons, cards, pills,
   ticks, chips, metrics, badges, table, notice, scroll UI
   ============================================================ */

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  z-index: 100;
  background: rgba(255, 255, 255, .05);
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(76, 201, 240, .6);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset-block-start: 2px;
  inset-inline: 0;
  z-index: 90;
  transition: background var(--mid), border-color var(--mid), backdrop-filter var(--mid);
  border-block-end: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(7, 11, 24, .82);
  backdrop-filter: blur(18px) saturate(140%);
  border-block-end-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.brand { display: flex; align-items: center; gap: .65rem; }
.brand__mark {
  width: 38px; height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  animation: spinOrbit 26s linear infinite;
}
.brand__mark svg { width: 24px; height: 24px; }
@keyframes spinOrbit { to { transform: rotate(360deg); } }

.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}
.brand__text small { font-size: .7rem; color: var(--muted); letter-spacing: .04em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-inline-start: auto;
}
.nav__links a {
  position: relative;
  padding: .45rem .7rem;
  font-size: .87rem;
  color: var(--text-2);
  border-radius: 8px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  inset-block-end: .16rem;
  inset-inline-start: 50%;
  translate: 50% 0;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transition: width var(--fast);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after,
.nav__links a.is-active::after { width: calc(100% - 1.4rem); }
.nav__links a.is-active { color: #fff; }

.nav__cta { margin-inline-start: .5rem; flex: none; }

.nav__toggle {
  display: none;
  margin-inline-start: auto;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  place-items: center;
  gap: 4px;
}
.nav__toggle span {
  display: block;
  width: 17px; height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--fast), opacity var(--fast);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  --btn-py: .85rem;
  --btn-px: 1.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: var(--btn-py) var(--btn-px);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .98rem;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast), background var(--fast);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  color: #05070F;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 14px 34px -14px rgba(76, 201, 240, .6);
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #7B61FF, #4CC9F0);
  opacity: 0;
  transition: opacity var(--mid);
}
.btn--primary:hover::after { opacity: 1; }
.btn--primary:hover { box-shadow: 0 20px 44px -14px rgba(123, 97, 255, .7); }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--cyan); }

.btn--sm  { --btn-py: .55rem; --btn-px: 1.05rem; font-size: .85rem; }
.btn--lg  { --btn-py: 1.05rem; --btn-px: 2.1rem; font-size: 1.04rem; }
.btn--block { display: flex; width: 100%; }

.btn__arrow {
  width: 18px; height: 18px;
  transition: transform var(--fast);
}
.btn:hover .btn__arrow { transform: translateY(3px); }

/* ---------- card base ---------- */
.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.35rem, 1rem + 1.2vw, 2.1rem);
  box-shadow: var(--shadow);
  transition: transform var(--mid), border-color var(--mid), box-shadow var(--mid);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent);
  opacity: .7;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-lg);
}

/* ---------- eyebrow / pills ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-block-end: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--grad);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .86rem;
  color: var(--text-2);
  backdrop-filter: blur(6px);
}
.pill--accent {
  color: #EAF7FF;
  border-color: rgba(76, 201, 240, .42);
  background: var(--grad-soft);
  font-weight: 600;
}

/* ---------- numbers ---------- */
.num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.2rem);
  line-height: 1;
  background: linear-gradient(170deg, #FFFFFF 12%, #A9B6D8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.02em;
}
.num--xl { font-size: clamp(3rem, 2rem + 5vw, 5.4rem); }
.num__unit {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  color: var(--text-2);
}

/* ---------- ticks list ---------- */
.ticks { display: grid; gap: .8rem; }
.ticks li {
  position: relative;
  padding-inline-start: 1.9rem;
  color: var(--text-2);
  font-size: .96rem;
  line-height: 1.8;
}
.ticks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: .52em;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--grad-soft);
  border: 1px solid rgba(76, 201, 240, .4);
}
.ticks li::after {
  content: "";
  position: absolute;
  inset-inline-start: 5.4px;
  inset-block-start: calc(.52em + 5.4px);
  width: 7px; height: 4px;
  border-inline-start: 1.7px solid var(--cyan);
  border-block-end: 1.7px solid var(--cyan);
  transform: rotate(-45deg);
}
.ticks--sm li { font-size: .9rem; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li {
  padding: .38rem .8rem;
  border-radius: 8px;
  font-size: .82rem;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.chips li:hover { color: #fff; border-color: rgba(76, 201, 240, .5); background: var(--surface-2); }
.chips--quiet li { background: transparent; }

/* ---------- metric row ---------- */
.metrics {
  display: flex;
  align-items: stretch;
  gap: .4rem;
  margin: 1.5rem 0;
  padding: 1.1rem .6rem;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, .26);
  border: 1px solid var(--line);
}
.metric {
  flex: 1;
  display: grid;
  gap: .35rem;
  justify-items: center;
  text-align: center;
  padding: .35rem .2rem;
  border-radius: var(--r-sm);
  transition: background var(--fast);
}
.metric:hover { background: rgba(255, 255, 255, .04); }
.metric__num { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); }
.metric__label { font-size: .78rem; color: var(--muted); line-height: 1.4; }

.metric--hero .metric__num {
  background: linear-gradient(170deg, var(--gold) 10%, #B98F2E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metric--hero .metric__label { color: var(--gold); font-weight: 600; }

.metric__op {
  align-self: center;
  flex: none;
  color: rgba(255, 255, 255, .22);
}
.metric__op svg { width: 20px; height: 20px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .7rem;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge--yes { color: #6FE3B6; background: rgba(111, 227, 182, .1); border: 1px solid rgba(111, 227, 182, .26); }
.badge--no  { color: #FFB27A; background: rgba(255, 178, 122, .1); border: 1px solid rgba(255, 178, 122, .3); }

/* ---------- notice ---------- */
.notice {
  display: flex;
  gap: 1.1rem;
  margin-block-start: 2.2rem;
  padding: clamp(1.25rem, 1rem + 1vw, 1.9rem);
  border-radius: var(--r-lg);
  border: 1px solid rgba(232, 200, 106, .3);
  background:
    linear-gradient(135deg, rgba(232, 200, 106, .1), rgba(232, 200, 106, .02));
  box-shadow: var(--shadow);
}
.notice__ico {
  flex: none;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--gold);
  background: rgba(232, 200, 106, .12);
  border: 1px solid rgba(232, 200, 106, .3);
}
.notice__ico svg { width: 22px; height: 22px; }
.notice h3 { font-size: var(--fs-h3); margin-block-end: .5rem; color: #FBF1D6; }
.notice p { color: var(--text-2); font-size: .96rem; }
.notice strong { color: var(--gold); font-weight: 700; }
.notice__stress {
  margin-block-start: .85rem;
  padding: .7rem 1rem;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .3);
  border: 1px dashed rgba(232, 200, 106, .34);
  color: #FBF1D6 !important;
  font-weight: 600;
  font-size: .92rem !important;
}

/* ---------- table ---------- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: .94rem;
}
.table thead th {
  padding: 1.05rem 1.3rem;
  font-family: var(--font-display);
  font-size: .84rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0, 0, 0, .3);
  border-block-end: 1px solid var(--line);
  text-align: start;
}
.table tbody th {
  font-weight: 600;
  color: var(--text);
  text-align: start;
  width: 42%;
}
.table tbody th, .table tbody td {
  padding: .95rem 1.3rem;
  border-block-end: 1px solid rgba(255, 255, 255, .05);
  color: var(--text-2);
  vertical-align: middle;
}
.table tbody tr:last-child th,
.table tbody tr:last-child td { border-block-end: 0; }
.table tbody tr { transition: background var(--fast); }
.table tbody tr:hover { background: rgba(255, 255, 255, .035); }
.table__hi { background: rgba(76, 201, 240, .06); }
.table__hi th { color: #fff; }
.table__hi strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 800;
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed;
  inset-block-end: 1.5rem;
  inset-inline-start: 1.5rem;
  z-index: 80;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--text);
  background: rgba(10, 15, 31, .86);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--mid), transform var(--mid), visibility var(--mid), border-color var(--fast);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--cyan); transform: translateY(-3px); }
.to-top svg { width: 19px; height: 19px; }

/* ---------- responsive: nav ---------- */
@media (max-width: 980px) {
  .nav__cta { display: none; }
  .nav__toggle { display: grid; }
  .nav__links {
    position: absolute;
    inset-block-start: calc(100% + 8px);
    inset-inline: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    margin: 0;
    padding: .6rem;
    border-radius: var(--r-md);
    background: rgba(9, 13, 28, .97);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.98);
    transform-origin: top;
    transition: opacity var(--mid), transform var(--mid), visibility var(--mid);
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: .8rem 1rem; font-size: .95rem; border-radius: 10px; }
  .nav__links a:hover { background: var(--surface-2); }
  .nav__links a::after { display: none; }
  .nav__links a.is-active { background: var(--grad-soft); }
}

@media (max-width: 560px) {
  .to-top { inset-block-end: 1rem; inset-inline-start: 1rem; width: 42px; height: 42px; }
  .metrics { flex-wrap: wrap; gap: .3rem; }
  .metric { flex: 1 1 28%; }
  .metric__op svg { width: 16px; height: 16px; }
  .table tbody th { width: 46%; }
  .table thead th, .table tbody th, .table tbody td { padding: .8rem .85rem; }
  .notice { flex-direction: column; gap: .9rem; }
}
