:root {
  --ink: #050705;
  --lime: #8dc63f;
  --lime-rgb: 141, 198, 63;
  --line: rgba(255, 255, 255, 0.08);
}

html {
  scroll-padding-top: 6rem;
}

body {
  background: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(var(--lime-rgb), 0.35);
  color: #fff;
}

/* ---------- Navigation ---------- */
#navbar {
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

#navbar.scrolled {
  background: rgba(5, 7, 5, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
}

.nav-link {
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #fff;
}

/* ---------- Badge (pill above headings) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.85rem 0.25rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

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

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light:hover {
  box-shadow: 0 10px 30px -10px rgba(255, 255, 255, 0.45);
}

.btn-lime {
  background: var(--lime);
  color: var(--ink);
}

.btn-lime:hover {
  box-shadow: 0 10px 30px -8px rgba(var(--lime-rgb), 0.6);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.6rem;
}

/* ---------- Hero ---------- */
.hero-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}

/* Glowing horizon arc, inspired by the reference design */
/* The wrapper reaches --lift above the arc so the upward glow is never clipped
   by the mask's box; only the arc's lower flanks fade out. */
.horizon-wrap {
  --lift: 320px;
  position: relative;
  margin-top: calc(1rem - var(--lift));
  height: calc(var(--lift) + 16rem);
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 calc(var(--lift) + 6rem), transparent calc(100% - 1rem));
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--lift) + 6rem), transparent calc(100% - 1rem));
}

@media (min-width: 768px) {
  .horizon-wrap {
    margin-top: calc(1.5rem - var(--lift));
    height: calc(var(--lift) + 20rem);
  }
}

.horizon {
  position: absolute;
  left: 50%;
  top: calc(var(--lift) + 90px);
  width: min(1100px, 160vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--ink);
  box-shadow:
    0 -2px 0 0 rgba(var(--lime-rgb), 0.9),
    0 -30px 80px 0 rgba(var(--lime-rgb), 0.45),
    0 -80px 160px 20px rgba(var(--lime-rgb), 0.18),
    inset 0 40px 80px -30px rgba(var(--lime-rgb), 0.55);
}

.horizon-glow {
  position: absolute;
  left: 50%;
  top: calc(var(--lift) - 40px);
  width: min(900px, 130vw);
  height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(var(--lime-rgb), 0.35), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.text-gradient {
  background: linear-gradient(100deg, #b4dd7a 0%, #8dc63f 45%, #559135 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  transition:
    border-color 0.3s ease,
    transform 0.3s ease;
}

.card:hover {
  border-color: rgba(var(--lime-rgb), 0.3);
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: linear-gradient(140deg, #8dc63f, #38772f);
  color: var(--ink);
  box-shadow: 0 0 24px -4px rgba(var(--lime-rgb), 0.6);
}

.visual {
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(var(--lime-rgb), 0.22), transparent 60%),
    #070a08;
  overflow: hidden;
}

.tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.tag-on {
  color: #fff;
  border-color: rgba(var(--lime-rgb), 0.45);
  background: rgba(var(--lime-rgb), 0.1);
}

/* Legacy wrappers on legal pages render as the new card */
.gradient-border {
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

.gradient-border-inner {
  border-radius: 1.25rem;
}

/* ---------- Tech logos ---------- */
.tech-logo img {
  filter: grayscale(1) contrast(0) brightness(1.45);
  opacity: 0.7;
  transition:
    filter 0.3s ease,
    opacity 0.3s ease;
}

.tech-logo:hover img {
  filter: none;
  opacity: 1;
}

/* ---------- FAQ ---------- */
.faq summary {
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq .chev {
  transition: transform 0.25s ease;
}

.faq[open] .chev {
  transform: rotate(180deg);
}

.faq[open] {
  border-color: rgba(var(--lime-rgb), 0.3);
}

/* ---------- CTA ---------- */
.cta {
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.25), transparent 45%),
    linear-gradient(120deg, #8dc63f 0%, #559135 45%, #004225 100%);
}

.cta-grid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to left, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
}

/* ---------- Footer wordmark ---------- */
.wordmark {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.04em;
  font-size: clamp(4.5rem, 21vw, 18rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.04) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

.wordmark span {
  background: linear-gradient(180deg, rgba(var(--lime-rgb), 0.9) 0%, rgba(var(--lime-rgb), 0.05) 85%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---------- Scroll reveal ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease-out,
    transform 0.7s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .card {
    transition: none;
  }
}
