/* ==========================================================================
   Clover Proxies - landing page
   Palette and motion take their cues from jackal.sh (1px grid, radial glow,
   grain overlay, Space Grotesk display type) with a clover-green accent.
   ========================================================================== */

:root {
  /* ground */
  --bg:            #050706;
  --bg-elev:       #080c0a;
  --card:          #0b100e;
  --card-hover:    #0e1512;
  --border:        #1a221e;
  --border-bright: #26332c;

  /* ink */
  --fg:            #e8f0ec;
  --fg-dim:        #a6b4ad;
  --fg-muted:      #6f7f78;

  /* clover accent */
  --accent:        #34d17d;
  --accent-bright: #5ce89b;
  --accent-deep:   #1f8a4c;
  --accent-glow:   rgba(52, 209, 125, 0.14);
  --accent-faint:  rgba(52, 209, 125, 0.06);

  /* type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Inter", system-ui, -apple-system, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);   /* jackal.sh easing */
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- ambient background: grid + glow + grain ---------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* 1px square grid, faded out toward the bottom of the viewport */
.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 0),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 0);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 40%, transparent 100%);
}

/* film grain */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: url("noise.svg");
  background-size: 256px 256px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  animation: orbIn 1.4s var(--ease) 0.2s forwards;
}
.orb--1 {
  top: -180px; left: 50%; width: 900px; height: 620px; margin-left: -450px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 72%);
}
.orb--2 {
  top: 620px; left: -220px; width: 640px; height: 640px;
  background: radial-gradient(closest-side, rgba(34, 211, 190, 0.07), transparent 72%);
}
.orb--3 {
  top: 1500px; right: -260px; width: 700px; height: 700px;
  background: radial-gradient(closest-side, var(--accent-faint), transparent 72%);
}

@keyframes orbIn { to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ledPulse {
  0%, 100% { opacity: 0.9;  box-shadow: 0 0 6px currentColor, 0 0 12px currentColor; }
  50%      { opacity: 0.45; box-shadow: 0 0 3px currentColor, 0 0 6px currentColor; }
}

/* ---------- layout ------------------------------------------------------- */

.wrap {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 24px; position: relative; z-index: 1;
}

section { padding: 104px 0; position: relative; }
section + section { border-top: 1px solid var(--border); }

/* ---------- nav ---------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 7, 6, 0.72);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  backdrop-filter: blur(12px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 32px; height: 68px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.02em; color: var(--fg); text-decoration: none; margin-right: auto;
}

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  color: var(--fg-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  padding: 7px 13px; border-radius: 7px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__links a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.04); }

.nav__toggle {
  display: none; background: none; border: 1px solid var(--border-bright);
  color: var(--fg); border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
.nav__toggle svg { width: 18px; height: 18px; display: block; }

/* ---------- buttons ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 0.94rem;
  padding: 12px 22px; border-radius: 9px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--accent); color: #04140b; }
.btn--primary:hover { background: var(--accent-bright); box-shadow: 0 0 32px rgba(52, 209, 125, 0.3); }

.btn--ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--border-bright); color: var(--fg); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--accent-deep); }

.btn--sm { padding: 9px 17px; font-size: 0.87rem; }

/* ---------- hero --------------------------------------------------------- */

.hero { padding: 120px 0 104px; text-align: center; }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-dim); background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-bright); border-radius: 999px; padding: 6px 15px;
}
.led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); color: var(--accent);
  animation: ledPulse 1.8s ease-in-out infinite;
}

h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.5rem, 6.5vw, 4.4rem); line-height: 1.05; letter-spacing: -0.035em;
  margin: 26px 0 0; text-wrap: balance;
}
.hero__accent {
  background-image: linear-gradient(100deg, var(--accent-bright) 10%, var(--accent-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub {
  max-width: 620px; margin: 22px auto 0; color: var(--fg-dim);
  font-size: 1.08rem; text-wrap: pretty;
}
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin-top: 72px; background: var(--border);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.stat { background: var(--bg-elev); padding: 26px 18px; }
.stat__num {
  font-family: var(--display); font-size: 1.9rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--fg); font-variant-numeric: tabular-nums;
}
.stat__label {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--fg-muted); margin-top: 5px;
}

/* ---------- section headings --------------------------------------------- */

.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.028em;
  margin: 0; text-wrap: balance;
}
.section__lead { color: var(--fg-dim); max-width: 620px; margin: 16px 0 0; text-wrap: pretty; }
.section__head { margin-bottom: 52px; }

h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.08rem;
  letter-spacing: -0.015em; margin: 0 0 8px;
}

/* ---------- cards -------------------------------------------------------- */

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 13px; padding: 26px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--border-bright); background: var(--card-hover); transform: translateY(-2px); }
.card p { color: var(--fg-dim); margin: 0; font-size: 0.94rem; }

.card__icon {
  width: 38px; height: 38px; border-radius: 9px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: var(--accent-faint); border: 1px solid rgba(52, 209, 125, 0.18);
  color: var(--accent);
}
.card__icon svg { width: 19px; height: 19px; }

/* ---------- pools -------------------------------------------------------- */

.pool {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 11px; padding: 16px 18px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.pool:hover { border-color: var(--accent-deep); transform: translateY(-2px); }
.pool__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pool__name { font-family: var(--mono); font-size: 0.92rem; color: var(--fg); }
.pool__desc { font-size: 0.82rem; color: var(--fg-muted); margin-left: auto; text-align: right; }

/* ---------- pricing ------------------------------------------------------ */

.price-card {
  max-width: 480px; margin: 0 auto; text-align: center;
  background: var(--card); border: 1px solid var(--border-bright);
  border-radius: 16px; padding: 44px 34px; position: relative; overflow: hidden;
}
.price-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 0%, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.price-card > * { position: relative; }
.price__amount {
  font-family: var(--display); font-size: 3.6rem; font-weight: 700;
  letter-spacing: -0.04em; line-height: 1;
}
.price__unit { font-family: var(--mono); color: var(--fg-muted); font-size: 0.95rem; }
.price__list { list-style: none; padding: 0; margin: 30px 0; text-align: left; display: grid; gap: 12px; }
.price__list li { display: flex; gap: 11px; align-items: flex-start; color: var(--fg-dim); font-size: 0.94rem; }
.price__list svg { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 3px; }

/* ---------- faq / legal -------------------------------------------------- */

details.faq {
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--card); padding: 0 20px; margin-bottom: 10px;
  transition: border-color 0.25s var(--ease);
}
details.faq[open] { border-color: var(--border-bright); }
details.faq summary {
  cursor: pointer; padding: 17px 0; font-weight: 600; font-size: 0.97rem;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; font-family: var(--mono); font-size: 1.25rem; color: var(--accent);
  transition: transform 0.25s var(--ease); flex: none;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { color: var(--fg-dim); margin: 0 0 18px; font-size: 0.93rem; }

.legal { font-size: 0.9rem; }
.legal h3 { color: var(--fg); margin-top: 26px; }
.legal .card > h3:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--fg-dim); }
.legal ul { padding-left: 20px; margin: 10px 0; }
.legal li { margin-bottom: 6px; }
.legal .updated {
  font-family: var(--mono); font-size: 0.75rem; color: var(--fg-muted);
  letter-spacing: 0.05em; margin-top: 22px;
}

/* ---------- footer ------------------------------------------------------- */

.footer { border-top: 1px solid var(--border); padding: 44px 0 56px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; }
.footer__meta { color: var(--fg-muted); font-size: 0.85rem; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a {
  color: var(--fg-muted); text-decoration: none; font-size: 0.85rem;
  transition: color 0.2s var(--ease);
}
.footer__links a:hover { color: var(--accent); }

a.link { color: var(--accent); text-decoration: none; }
a.link:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: var(--mono); font-size: 0.86em; background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px;
}

/* ---------- scroll reveal ------------------------------------------------ */

.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 860px) {
  .hero__logo { width: 76px; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 14px 24px 20px;
    background: rgba(5, 7, 6, 0.97);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__toggle { display: block; }
  .nav__cta { display: none; }
  section { padding: 76px 0; }
  .hero { padding: 84px 0 76px; }
  .pool__desc { display: none; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- word mask reveal (jackal-style slide-up) --------------------- */
/* Each word sits inside its own overflow:hidden box and starts pushed fully
   below it, so it wipes upward into view instead of merely fading.          */

.split__word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.split__inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.85s var(--ease);
  will-change: transform;
}
.is-visible .split__inner { transform: none; }

/* softer variant for body copy: blur + lift */
.blur-in {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease), filter 0.8s var(--ease), transform 0.8s var(--ease);
}
.blur-in.is-visible { opacity: 1; filter: blur(0); transform: none; }

/* ---------- gradient headline text (jackal .text-fade pattern) ----------- */

.hero__accent .split__inner,
.text-accent .split__inner {
  background-image: linear-gradient(100deg, var(--accent-bright) 10%, var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 .split__inner, h2 .split__inner {
  background-image: linear-gradient(100deg, #ffffff 20%, rgba(232, 240, 236, 0.62));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__accent .split__inner { background-image: linear-gradient(100deg, var(--accent-bright) 10%, var(--accent-deep)); }

/* ---------- compact legal at the foot of the page ------------------------ */

.legal-compact { padding-top: 72px; padding-bottom: 72px; }
.legal-compact .section__head { margin-bottom: 26px; }
.legal-compact details {
  border-top: 1px solid var(--border);
  padding: 0;
}
.legal-compact details summary {
  cursor: pointer; padding: 16px 0; list-style: none;
  font-size: 0.92rem; font-weight: 500; color: var(--fg-dim);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: color 0.2s var(--ease-soft);
}
.legal-compact details summary:hover { color: var(--fg); }
.legal-compact details summary::-webkit-details-marker { display: none; }
.legal-compact details summary::after {
  content: "+"; font-family: var(--mono); font-size: 1.1rem; color: var(--fg-muted); flex: none;
  transition: transform 0.25s var(--ease-soft), color 0.2s var(--ease-soft);
}
.legal-compact details[open] summary { color: var(--fg); }
.legal-compact details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.legal-compact details > div { padding: 0 0 22px; max-width: 70ch; }
.legal-compact h4 {
  font-family: var(--display); font-size: 0.92rem; font-weight: 600;
  color: var(--fg); margin: 18px 0 6px;
}
.legal-compact h4:first-child { margin-top: 0; }
.legal-compact p, .legal-compact li { color: var(--fg-muted); font-size: 0.88rem; margin: 0 0 8px; }
.legal-compact ul { padding-left: 18px; margin: 8px 0; }
.legal-compact .updated {
  font-family: var(--mono); font-size: 0.72rem; color: var(--fg-muted);
  letter-spacing: 0.05em; margin-top: 16px;
}

/* ---------- brand logo --------------------------------------------------- */
/* PNG is pre-keyed to a transparent background (luminance -> alpha), so the
   neon and its glow composite straight onto the page ground with no visible
   box. Sized by width; height auto keeps the aspect ratio. */

.hero__logo {
  display: block;
  width: 96px;              /* matches jackal.sh hero logo (96px + float) */
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 42px rgba(52, 209, 125, 0.38));
  animation: float 4s ease-in-out infinite;
}

.brand__mark {
  width: 28px;
  height: auto;
  flex: none;
  filter: drop-shadow(0 0 10px rgba(52, 209, 125, 0.45));
}
