:root {
  color-scheme: dark;
  --bg0: #060a14;
  --bg1: #0b1220;
  --bg2: #0b2b5e;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.07);
  --card2: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  --radiusLg: 26px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Liberation Sans",
    sans-serif;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 15% 10%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(1100px 900px at 90% 20%, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(900px 700px at 70% 95%, rgba(20, 184, 166, 0.10), transparent 55%),
    linear-gradient(135deg, #050916 0%, #071431 45%, #050916 100%);
  overflow-x: hidden;
}

a {
  color: rgba(165, 243, 252, 0.92);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(165, 243, 252, 0.55);
}

:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.85);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  transform: translateY(-200%);
  transition: transform 150ms ease;
  z-index: 999;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 1000;
}

.topbar__login {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 6px;
  color: rgba(165, 243, 252, 0.92);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.topbar__login:hover {
  text-decoration: underline;
  text-decoration-color: rgba(165, 243, 252, 0.55);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* -------------------------------------------------------------------------- */
/* Sticky footer (keep copyright bar at bottom)                               */
/* -------------------------------------------------------------------------- */
#main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.footer {
  margin-top: auto;
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */
.hero {
  /* Tighter top/bottom so content sits higher above the bottom band */
  padding: clamp(8px, 2vw, 20px) 0;
  /* Nudge content down slightly for better top/bottom balance */
  margin-top: clamp(22px, 2.2vw, 42px);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(18px, 3vw, 42px);
  align-items: center;
}

.hero__logo {
  width: clamp(120px, 18vw, 190px);
  height: clamp(120px, 18vw, 190px);
  margin: 0 auto;
}

.hero__right h1 {
  margin: 4px 0 8px;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.1;
  /* Prevent descenders (e.g., 'y') from being visually clipped with background-clip text */
  padding-bottom: 0.12em;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(209, 250, 229, 0.92));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  margin: 0;
  font-size: clamp(16px, 2vw, 18px);
  color: var(--muted);
  max-width: 60ch;
}

.hero__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.hero__note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: rgba(165, 243, 252, 0.92);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.btn-primary {
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(34, 211, 238, 0.92), rgba(20, 184, 166, 0.92));
  box-shadow:
    0 24px 70px rgba(14, 165, 233, 0.18),
    0 18px 44px rgba(0, 0, 0, 0.32);
}

.btn-primary:hover {
  border-color: rgba(165, 243, 252, 0.40);
  box-shadow:
    0 30px 84px rgba(14, 165, 233, 0.22),
    0 18px 44px rgba(0, 0, 0, 0.34);
}

/* -------------------------------------------------------------------------- */
/* Pills                                                                      */
/* -------------------------------------------------------------------------- */
.pillRow {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.80);
  font-weight: 650;
  font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* Sections + cards                                                           */
/* -------------------------------------------------------------------------- */
.section {
  padding: clamp(14px, 3vw, 40px) 0;
}

#features {
  scroll-margin-top: 18px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.01em;
}

.section__lead {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 72ch;
}

.featureGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card), var(--card2));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.feature {
  padding: 18px 18px 16px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
.footer {
  padding: 28px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}

.footer__inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  text-align: center;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */
@media (max-width: 920px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(1120px, calc(100% - 26px));
  }

  .featureGrid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- */
/* FFS Coin Logo - Hover electric sweep (hover only)                          */
/* -------------------------------------------------------------------------- */
.logo-shine-container {
  position: relative;
  display: inline-block;
  border-radius: 9999px;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1 / 1;
}

.logo-shine-container .logo-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translateZ(0);
  transition: filter 220ms ease;
}

.logo-shine-container::before {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;

  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.00) 0%,
    rgba(255, 255, 255, 0.00) 42%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(34, 211, 238, 0.90) 52%,
    rgba(255, 255, 255, 0.00) 60%,
    rgba(255, 255, 255, 0.00) 100%
  );

  filter:
    blur(0.8px)
    drop-shadow(0 0 18px rgba(34, 211, 238, 0.55))
    drop-shadow(0 0 28px rgba(59, 130, 246, 0.22));

  transform: translateX(-140%) rotate(10deg);
  transition: opacity 180ms ease;
  will-change: transform, opacity;
}

.logo-shine-container:hover .logo-image {
  filter: brightness(1.18);
}

.logo-shine-container:hover::before {
  opacity: 1;
  animation: ffs-electric-sweep 1.8s linear infinite;
}

@keyframes ffs-electric-sweep {
  from {
    transform: translateX(-140%) rotate(10deg);
  }
  to {
    transform: translateX(140%) rotate(10deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-shine-container::before {
    animation: none !important;
    opacity: 0 !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Gate modal (front-door login)                                              */
/* -------------------------------------------------------------------------- */

.btn.btn-secondary {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.btn.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.modal__dialog {
  position: relative;
  width: min(560px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(11, 18, 32, 0.92);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.10);
}

.modal__title {
  margin: 6px 0 0;
  font-size: 22px;
}

.modal__subtitle {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 10px 0 10px;
}

.tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.tab.is-active {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.35);
}

.gateStatus {
  display: none;
  margin: 10px 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.gateStatus[data-kind="ok"] {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.10);
}

.gateStatus[data-kind="error"] {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.10);
}

.tabPanel {
  display: none;
}

.tabPanel.is-active {
  display: block;
}

.gateForm {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.field__label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.gateForm input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
}

.gateForm input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.gateForm .btn {
  height: 46px;
}

.modal__hint {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.60);
  font-size: 12.5px;
}