/* ==========================================================================
   Bits N Pixels — Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-py: 0.8rem;
  --btn-px: 1.6rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: var(--btn-py) var(--btn-px);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn__icon {
  display: inline-flex;
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* Primary — the brand gradient pill */
.btn--primary {
  background-image: var(--brand-gradient-r);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
  color: #fff;
  box-shadow: 0 16px 40px rgba(255, 125, 22, 0.4);
}

/* Secondary — outlined */
.btn--secondary {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.btn--secondary:hover {
  border-color: var(--brand-orange);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Ghost — quiet action */
.btn--ghost {
  color: var(--text);
  border-color: transparent;
}

.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}

.btn--danger:hover { color: #fff; filter: brightness(1.08); }

.btn--sm { --btn-py: 0.5rem; --btn-px: 1.1rem; font-size: var(--fs-xs); }
.btn--lg { --btn-py: 1.05rem; --btn-px: 2.2rem; font-size: var(--fs-base); }
.btn--block { display: flex; width: 100%; }

/* Text link with animated arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--accent);
}

.link-arrow svg { transition: transform var(--t-base) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Eyebrow / section heading
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-gradient-r);
}

.eyebrow--center { justify-content: center; }

.section-head {
  max-width: 46rem;
  margin-bottom: var(--sp-8);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 { margin-bottom: var(--sp-4); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}

.card--hover:hover {
  transform: translateY(-6px);
  border-color: var(--brand-orange);
  box-shadow: var(--shadow-md);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--brand-orange);
  margin-bottom: var(--sp-2);
  flex: none;
}

.card__icon svg { width: 1.6rem; height: 1.6rem; }

.card--hover:hover .card__icon {
  background-image: var(--brand-gradient-r);
  color: #fff;
}

.card__title {
  font-size: var(--fs-lg);
  margin: 0;
}

.card__title a { color: var(--text); }
.card--hover:hover .card__title a { color: var(--accent); }

.card__text {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0;
}

.card__footer { margin-top: auto; padding-top: var(--sp-4); }

/* Numbered process card */
.card__number {
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 1;
  background: var(--brand-gradient-r);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.9;
}

/* Media card (blog / portfolio) */
.card--media { padding: 0; overflow: hidden; }

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}

.card--media:hover .card__media img { transform: scale(1.06); }

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  flex: 1;
}

/* --------------------------------------------------------------------------
   Placeholder artwork when no cover image is uploaded.

   Generated entirely in CSS: a brand-tinted mesh, a faint circuit-like grid
   echoing the logo mark, a sector icon and the label in full. Designed to look
   deliberate rather than like a missing asset.
   -------------------------------------------------------------------------- */

.media-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  overflow: hidden;
  background:
    radial-gradient(90% 90% at 78% 12%, rgba(255, 125, 22, 0.28) 0%, transparent 58%),
    radial-gradient(80% 80% at 12% 88%, rgba(247, 50, 50, 0.20) 0%, transparent 60%),
    var(--surface-2);
}

/* Faint grid, masked so it fades out toward the edges. */
.media-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
}

/* Soft brand orb behind the icon. */
.media-placeholder::after {
  content: "";
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand-gradient);
  opacity: 0.16;
  filter: blur(26px);
}

.media-placeholder__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--brand-orange);
}

.media-placeholder__icon svg { width: 1.7rem; height: 1.7rem; }

.media-placeholder__label {
  position: relative;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Badges & pills
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge--accent  { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge--success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge--warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge--danger  { background: var(--danger-soft);  color: var(--danger);  border-color: transparent; }
.badge--info    { background: var(--info-soft);    color: var(--info);    border-color: transparent; }

/* Chip used for tech stack / tags */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}

a.chip:hover,
.chip--active {
  border-color: var(--brand-orange);
  color: var(--accent);
  background: var(--accent-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}

.site-header.is-stuck { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

/* Brand lockup */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
  color: var(--text);
  font-weight: 800;
}

.brand:hover { color: var(--text); }

.brand__mark {
  width: 2.35rem;
  height: 2.35rem;
  flex: none;
  border-radius: var(--r-md);
  background-image: var(--brand-gradient-r);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: var(--shadow-accent);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.brand__sub {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  text-transform: uppercase;
}

/* Primary menu */
.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__item { position: relative; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.nav__link:hover,
.nav__item.is-open > .nav__link { color: var(--accent); }

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

.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background-image: var(--brand-gradient-r);
}

.nav__caret {
  width: 0.7rem;
  height: 0.7rem;
  transition: transform var(--t-base) var(--ease);
}

.nav__item.is-open .nav__caret { transform: rotate(180deg); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}

/* Dropdown / mega menu */
.dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  translate: -50% 0;
  z-index: var(--z-menu);
  min-width: 15rem;
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              visibility var(--t-base);
}

.nav__item.is-open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dropdown--mega {
  min-width: min(60rem, calc(100vw - 3rem));
  padding: var(--sp-5);
}

.dropdown__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.25rem var(--sp-4);
}

.dropdown__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dropdown__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.dropdown__link:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.dropdown__link svg { width: 1.1rem; height: 1.1rem; flex: none; opacity: 0.85; }

.dropdown__heading {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: var(--sp-2) 0.7rem;
}

.dropdown__footer {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* Theme toggle */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all var(--t-base) var(--ease);
}

.theme-toggle:hover {
  border-color: var(--brand-orange);
  color: var(--accent);
  transform: rotate(-18deg);
}

.theme-toggle svg { width: 1.15rem; height: 1.15rem; }

/* Only one of the two icons is shown, based on the active theme. */
[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Mobile menu button */
.nav__toggle {
  display: none;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav__toggle svg { width: 1.3rem; height: 1.3rem; }
.nav__toggle .icon-close { display: none; }
.nav__toggle.is-open .icon-open { display: none; }
.nav__toggle.is-open .icon-close { display: block; }

/* --------------------------------------------------------------------------
   Mobile navigation
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .nav__toggle { display: grid; }

  .nav__menu {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: var(--z-menu);
    display: block;
    overflow-y: auto;
    padding: var(--sp-5) var(--gutter) var(--sp-10);
    background: var(--bg);
    border-top: 1px solid var(--border);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--t-base) var(--ease), visibility var(--t-base);
  }

  .nav__menu.is-open { transform: none; visibility: visible; }

  .nav__item { border-bottom: 1px solid var(--hairline); }

  .nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem 0.25rem;
    font-size: var(--fs-md);
    border-radius: 0;
  }

  .nav__link.is-active::after { display: none; }

  /* Submenus collapse inline instead of floating */
  .dropdown {
    position: static;
    translate: none;
    transform: none;
    min-width: 0;
    padding: 0 0 var(--sp-4) 0.5rem;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    display: none;
  }

  .nav__item.is-open > .dropdown { display: block; }

  .dropdown--mega { min-width: 0; padding: 0 0 var(--sp-4) 0.5rem; }
  .dropdown__grid,
  .dropdown__grid--3 { grid-template-columns: 1fr; }
  .dropdown__footer { display: none; }

  .nav__actions .btn--primary { display: none; }
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--sp-4);
}

.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field--full { grid-column: 1 / -1; }

.label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

.label__req { color: var(--danger); margin-left: 0.15rem; }

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}

.input::placeholder,
.textarea::placeholder { color: var(--text-subtle); }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid { border-color: var(--danger); }

.textarea { resize: vertical; min-height: 8rem; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1.05rem;
  padding-right: 2.6rem;
}

.field__error {
  font-size: var(--fs-xs);
  color: var(--danger);
  font-weight: 500;
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

/* Phone field with fixed country code */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group__addon {
  display: grid;
  place-items: center;
  padding-inline: 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: var(--r-md) 0 0 var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.input-group .input { border-radius: 0 var(--r-md) var(--r-md) 0; }

/* Checkbox / radio */
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.check input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.22rem;
  flex: none;
  accent-color: var(--brand-orange);
  cursor: pointer;
}

/* Honeypot — kept out of the layout and away from assistive tech */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: 500;
}

.alert svg { width: 1.2rem; height: 1.2rem; flex: none; margin-top: 0.1rem; }

.alert--success { background: var(--success-soft); color: var(--success); border-color: currentColor; }
.alert--danger  { background: var(--danger-soft);  color: var(--danger);  border-color: currentColor; }
.alert--warning { background: var(--warning-soft); color: var(--warning); border-color: currentColor; }
.alert--info    { background: var(--info-soft);    color: var(--info);    border-color: currentColor; }

.alert__list { margin: 0.35rem 0 0; padding-left: 1.1rem; }

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--text-subtle);
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs li { display: flex; align-items: center; gap: 0.5rem; }
.breadcrumbs li + li::before { content: "/"; color: var(--text-subtle); opacity: 0.6; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--accent); font-weight: 600; }

/* --------------------------------------------------------------------------
   Accordion (FAQ)
   -------------------------------------------------------------------------- */

.accordion { border-top: 1px solid var(--border); }

.accordion__item { border-bottom: 1px solid var(--border); }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-5) 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  transition: color var(--t-fast) var(--ease);
}

.accordion__trigger:hover { color: var(--accent); }

.accordion__icon {
  position: relative;
  width: 1.4rem;
  height: 1.4rem;
  flex: none;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  transition: all var(--t-base) var(--ease);
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0.32rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  translate: 0 -50%;
  transition: transform var(--t-base) var(--ease);
}

.accordion__icon::after { rotate: 90deg; }

.accordion__trigger[aria-expanded="true"] .accordion__icon {
  background-image: var(--brand-gradient-r);
  border-color: transparent;
  color: #fff;
}

.accordion__trigger[aria-expanded="true"] .accordion__icon::after { transform: scaleX(0); }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-base) var(--ease);
}

.accordion__panel[data-open="true"] { grid-template-rows: 1fr; }

.accordion__panel > div { overflow: hidden; }

.accordion__panel p {
  padding-bottom: var(--sp-5);
  font-size: var(--fs-sm);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: var(--sp-5);
}

.stat { text-align: center; }

.stat__value {
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--brand-gradient-r);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat__label {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 40rem;
}

.table th,
.table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table th {
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  background: var(--surface-2);
  white-space: nowrap;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-hover); }

.table__actions { display: flex; gap: 0.4rem; justify-content: flex-end; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: var(--sp-8) 0 0;
}

.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding-inline: 0.6rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
}

.pagination a:hover {
  border-color: var(--brand-orange);
  color: var(--accent);
}

.pagination .active span,
.pagination [aria-current="page"] {
  background-image: var(--brand-gradient-r);
  border-color: transparent;
  color: #fff;
}

.pagination .disabled span { opacity: 0.45; }

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.empty {
  text-align: center;
  padding: var(--sp-10) var(--sp-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto var(--sp-4);
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--brand-orange);
}

.empty__icon svg { width: 1.6rem; height: 1.6rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-10);
  margin-top: var(--sp-6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--sp-8) var(--sp-6);
  padding-bottom: var(--sp-8);
}

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
}

.footer__about { max-width: 24rem; }
.footer__about p { font-size: var(--fs-sm); margin-top: var(--sp-4); }

.footer__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__links a {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.footer__links a:hover { color: var(--accent); padding-left: 0.2rem; }

.footer__contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.footer__contact li {
  display: flex;
  gap: 0.7rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.footer__contact svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  margin-top: 0.28rem;
  color: var(--brand-orange);
}

.socials { display: flex; gap: 0.5rem; margin-top: var(--sp-5); }

.socials a {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--t-base) var(--ease);
}

.socials a:hover {
  background-image: var(--brand-gradient-r);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
}

.socials svg { width: 1.05rem; height: 1.05rem; }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__legal a { color: var(--text-subtle); }
.footer__legal a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: var(--r-pill);
  background-image: var(--brand-gradient-r);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--t-base) var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 1.15rem; height: 1.15rem; }

/* --------------------------------------------------------------------------
   Cookie banner
   -------------------------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: var(--z-modal);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  max-width: 62rem;
  margin-inline: auto;
  animation: cookie-in var(--t-slow) var(--ease-out);
}

@keyframes cookie-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.cookie-banner[hidden] { display: none; }

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0.35rem 0 0;
  font-size: var(--fs-sm);
  max-width: 46rem;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--sp-3);
  flex: none;
}

@media (max-width: 640px) {
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1; }
}

/* --------------------------------------------------------------------------
   Brand logo
   --------------------------------------------------------------------------
   Both variants ship in the markup and CSS reveals the right one, so there is
   no flash of the wrong logo on load and no JavaScript dependency.
   -------------------------------------------------------------------------- */

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex: none;
  line-height: 0;
}

.brand-logo img { display: block; max-width: 100%; }

[data-theme="dark"]  .brand-logo__light { display: none; }
[data-theme="light"] .brand-logo__dark  { display: none; }

/* Shrink the lockup on narrow viewports so it never crowds the nav. */
@media (max-width: 520px) {
  .brand-logo img { height: 2rem !important; }
}
