/* --------- Design Tokens --------- */
:root{
  --ink:#020202;
  --deep:#0D2818;
  --pine:#04471C;
  --sprout:#0D2818; /* old:058C42 */
  --leaf:#16DB65;
  --text:#E8F5EE;
  --muted:#A7C8B3;
  --panel:12px;
  --radius:18px;
  --radius-lg:28px;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --shadow-soft:0 6px 18px rgba(0,0,0,.22);
  --speed:320ms;
}
/* Hide native OS cursor everywhere on the site */
html, body, * {
  cursor: none !important;
}
/* --------- Reset / Base --------- */
*,*::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;
  color:var(--text);

  /* Horizontal gradient: green edges → black center */
  background: linear-gradient(
    to right,
    var(--sprout) 0%,
    var(--ink) 45%,
    var(--ink) 55%,
    var(--sprout) 100%
  );
  line-height:1.6;

  /* use custom cursor */
  cursor: none;
}
a, button, [role="button"]{ cursor: none }
img{max-width:100%; display:block}
button{font:inherit}
a{color:inherit; text-decoration:none}

/* Smoothness + Reduced Motion */
:root{scroll-behavior:smooth}
@media (prefers-reduced-motion: reduce){
  :root{scroll-behavior:auto}
  .float, .fade-in, .reveal{animation:none}
}

/* --------- Layout --------- */
.container{width:min(1200px, 92vw); margin-inline:auto}

/* --------- Top Nav --------- */
.nav{
  position:sticky; top:0; z-index:50;
  backdrop-filter:saturate(1.2) blur(10px);
  background:linear-gradient(180deg, rgba(2,2,2,.85), rgba(2,2,2,.65));
  border-bottom:1px solid rgba(22,219,101,.08);
}
.nav-inner{display:flex; align-items:center; justify-content:space-between; gap:24px; padding:14px 0}
.brand{
  display:flex; align-items:center; gap:12px; letter-spacing:.4px; font-weight:800; font-size:1.25rem;
}
.logo {
  width: 36px;
  height: 36px;
  object-fit: contain;   /* keep aspect ratio */
  display: block;
}

/* Desktop menu */
.menu{display:flex; gap:10px; align-items:center}
.menu a{
  padding:10px 14px; border-radius:12px; color:var(--muted);
  transition:color var(--speed) ease, background var(--speed) ease, transform var(--speed) ease;
}
.menu a:hover{ color:#fff; background:rgba(5,140,66,.16); }

.cta{
  display:inline-flex; align-items:center; gap:10px; border:1px solid rgba(22,219,101,.35);
  padding:10px 14px; border-radius:14px; background:linear-gradient(180deg, rgba(22,219,101,.18), rgba(22,219,101,.08));
  box-shadow: var(--shadow-soft);
  transition: transform var(--speed) ease, box-shadow var(--speed) ease, background var(--speed) ease;
}
.cta:hover{ transform: translateY(-2px); box-shadow: var(--shadow); background:linear-gradient(180deg, rgba(22,219,101,.28), rgba(22,219,101,.12)); }

/* Mobile menu (checkbox hack) */
#nav-toggle{display:none}
.hamburger{display:none; width:42px; height:42px; gap:6px; flex-direction:column; justify-content:center; align-items:center; border-radius:12px; background:rgba(4,71,28,.3); border:1px solid rgba(22,219,101,.15)}
.bar{width:22px; height:2px; background:#dffbe9; border-radius:2px}
@media (max-width: 820px){
  .hamburger{display:flex}
  .menu{display:none; position:absolute; inset:58px 0 auto 0; background:rgba(2,2,2,.96); padding:16px; border-bottom:1px solid rgba(22,219,101,.12)}
  #nav-toggle:checked ~ .menu{display:grid; grid-template-columns:1fr; gap:4px}
  .menu a{padding:12px}
}

/* --------- Hero --------- */
.hero{
  position:relative;
  overflow:visible; /* allow glow to extend outside */
  padding: clamp(80px, 12vh, 140px) 0 80px;
}
.grid{
  display:grid; gap:36px;
  grid-template-columns: 1.1fr .9fr;
  align-items:center;
}
@media (max-width: 980px){ .grid{grid-template-columns:1fr} }

.headline{
  font-weight:900; line-height:1.08;
  font-size: clamp(2rem, 3.8vw + 1rem, 4rem);
  letter-spacing: -0.5px;
}
.sub{
  color:var(--muted);
  margin-top:14px; max-width: 58ch;
}
.hero-cta{ display:flex; gap:12px; margin-top:24px; flex-wrap:wrap }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 18px; border-radius:14px; font-weight:700; letter-spacing:.3px; cursor:pointer;
  transition: transform var(--speed) ease, box-shadow var(--speed) ease, background var(--speed) ease, border-color var(--speed) ease;
  border:1px solid transparent; box-shadow: var(--shadow-soft);
}
.btn-primary{
  background: linear-gradient(180deg, var(--leaf), #15c45b);
  color:#04170b;
}
.btn-primary:hover{ transform:translateY(-2px); box-shadow:var(--shadow) }
.btn-secondary{
  border-color: rgba(22,219,101,.35);
  background: linear-gradient(180deg, rgba(5,140,66,.18), rgba(4,71,28,.24));
  color:#eafff2;
}
.btn-secondary:hover{ transform:translateY(-2px); box-shadow:var(--shadow) }

/* Decorative floating “leaf” blobs */
.blob{
  position: fixed;        /* float behind the whole page */
  z-index: -1;            /* behind content */
  pointer-events: none;   /* ignore mouse */
  filter: blur(38px);
  opacity:.16;
  animation: float 12s ease-in-out infinite;
}
.blob.one{
  width:560px; height:560px;
  left:-160px; top:-140px;
  background: radial-gradient(circle at 30% 30%, var(--leaf), transparent 62%);
}
.blob.two{
  width:520px; height:520px;
  right:-160px; bottom:-160px;
  background: radial-gradient(circle at 60% 60%, var(--sprout), transparent 62%);
  animation-delay:-3s;
}
@keyframes float{
  0%,100%{ transform: translateY(0) }
  50%{ transform: translateY(-16px) }
}

/* --------- Stat pill --------- */
.pills{ display:flex; gap:10px; flex-wrap:wrap; margin-top:20px }
.pill{
  padding:8px 12px; border-radius:999px; font-size:.9rem; color:#d7fce7;
  background: linear-gradient(180deg, rgba(22,219,101,.14), rgba(22,219,101,.06));
  border:1px solid rgba(22,219,101,.20);
}

/* --------- Servers --------- */
.section{ padding: 70px 0 }
.section h2{
  font-size: clamp(1.4rem, 1.6vw + 1rem, 2.2rem);
  letter-spacing:.2px; margin:0 0 10px 0;
}
.section p.lead{ color:var(--muted); margin:0 0 28px 0 }

.cards{
  display:grid; gap:16px;
  grid-template-columns: repeat(12, 1fr);
}
.card{
  grid-column: span 4;
  background: linear-gradient(180deg, rgba(4,71,28,.7), rgba(2,2,2,.7));
  border:1px solid rgba(22,219,101,.16);
  border-radius: var(--radius);
  padding:18px; box-shadow:var(--shadow-soft);
  transition: transform var(--speed) ease, box-shadow var(--speed) ease, border-color var(--speed) ease;
  position:relative; overflow:hidden;
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(22,219,101,.28) }
.card h3{ margin:8px 0 6px; font-size:1.1rem }
.meta{ color:var(--muted); font-size:.92rem }
.chip{
  position:absolute; top:14px; right:14px; font-size:.8rem; padding:6px 10px; border-radius:999px;
  background: rgba(22,219,101,.16); border:1px solid rgba(22,219,101,.26); color:#dcffe8;
}
.status-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:8px; background: #18f070; box-shadow:0 0 10px #18f070a0 }

@media (max-width: 980px){ .card{ grid-column: span 6 } }
@media (max-width: 640px){ .card{ grid-column: span 12 } }

/* --------- Donate banner --------- */
.banner{
  margin-top:10px;
  background:
    linear-gradient(180deg, rgba(22,219,101,.16), rgba(22,219,101,.06)),
    linear-gradient(180deg, var(--pine), transparent 35%);
  border:1px solid rgba(22,219,101,.18);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 4vw, 28px);
  display:flex; align-items:center; gap:16px; justify-content:space-between; flex-wrap:wrap;
  box-shadow: var(--shadow-soft);
}
.banner p{ margin:0; color:#e7fff1 }
.banner .btn{ box-shadow:none }
/* Discord banner tweaks */
.banner--discord{ align-items: center; }

/* Icon-only Discord button: icon inherits color */
.btn-icon{
  padding: 0;
  width: 64px; height: 64px;
  display: inline-grid; place-items: center;
  border-radius: 14px;
  color: var(--ink);           /* <— makes the SVG black */
}
.btn-icon .discord-mark{ width:48px; height:48px; display:block }

/* --------- Footer --------- */
footer{ border-top:1px solid rgba(22,219,101,.1); padding:40px 0; color:var(--muted) }
.foot{
  display:flex; gap:18px; justify-content:space-between; align-items:center; flex-wrap:wrap
}
.badges{ display:flex; gap:10px; flex-wrap:wrap }

/* --------- Utility Animations --------- */
.fade-in{ animation: fade .7s ease 1 both }
.reveal{ animation: fade .7s ease 1 both } /* used by cards */
@keyframes fade{
  from{ opacity:0; transform: translateY(6px) }
  to{ opacity:1; transform:none }
}

/* --------- Custom Cursor --------- */
#cursor{
  position: fixed;
  top:0; left:0;
  width:18px; height:18px;
  border-radius:50%;
  background: rgba(255,255,255,.55);
  border:2px solid transparent;
  pointer-events:none;
  transform: translate(-50%,-50%);
  transition: width .15s ease, height .15s ease, border .15s ease,
              background .15s ease, box-shadow .3s ease, opacity .2s ease;
  z-index: 20001;
}

/* Hover over any clickable: enlarge + hollow ring */
#cursor.is-hover{
  width:28px; height:28px;
  background: transparent;
  border:2px solid rgba(255,255,255,.55);
}

/* Donate button: morph to a plain black heart */
#cursor.is-donate{
  width:42px; height:42px;
  background: #000;
  border:none;
  clip-path: polygon(
    50% 78%, 34% 66%, 20% 54%, 12% 42%, 10% 30%,
    14% 20%, 24% 12%, 36% 10%, 50% 16%,
    64% 10%, 76% 12%, 86% 20%, 90% 30%,
    88% 42%, 80% 54%, 66% 66%
  );
}

/* ===================== Donate Modal ===================== */
/* --- Modal sizing & centering --- */
.modal{
  position: fixed; inset: 0;
  display: none;
  z-index: 12000; /* below the custom cursor */
}
.modal[aria-hidden="false"]{ display:block }

.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px) saturate(1.1);
  z-index: 0; /* base */
}

/* Hearts layer between backdrop and dialog */
.modal__layer{
  position:absolute; inset:0;
  z-index: 1;                 /* above backdrop, below dialog */
  pointer-events: none;       /* don’t block clicks */
  overflow: hidden;
  contain: paint;             /* isolate painting for cheaper repaints */
}

/* Hearts in the layer (SVG <img>) */
.modal__layer .heart{
  position: absolute;
  left: 0; top: 0;
  width: 14px; height: 14px;
  display: block;
  will-change: transform, opacity; /* compositor-friendly */
  /* no clip-path, no CSS filters -> faster */
}

/* Smaller dialog, centered – not fullscreen */
.modal__dialog{
  position:absolute;
  left:50%; top:50%;
  transform: translate(-50%,-50%);
  width:min(520px, 92vw);
  max-height: 420px;
  background: linear-gradient(180deg, rgba(4,71,28,.88), rgba(2,2,2,.92));
  border:1px solid rgba(22,219,101,.22);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 14px 16px 16px;
  overflow: hidden;
  z-index: 2; /* above backdrop + hearts */
}

@keyframes modalIn{
  from{ opacity:0; transform: translateY(18px) scale(.98) }
  to{   opacity:1; transform: translateY(0)   scale(1) }
}

.modal__close{
  position:absolute; top:10px; right:12px;
  width:36px; height:36px; border-radius:12px;
  border:1px solid rgba(22,219,101,.25);
  background: rgba(5,140,66,.14);
  color:#eafff2; font-size:20px; line-height:34px; text-align:center;
}
.modal__close:hover{ background: rgba(5,140,66,.24) }
/* Header just holds the title now */
.modal__header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 4px 2px 8px 2px;
  border-bottom:1px solid rgba(22,219,101,.16);
}
.modal__header h3{ margin:0; font-size:1.15rem }

/* Slider (plan toggle) centered inside content */
.modal__content{ padding: 12px 2px 6px }

.plan-toggle{
  margin: 0 auto 10px;             /* center above buttons */
  display:flex; align-items:center; gap:8px;
  justify-content:center;
  user-select:none; color:#dffbe9;
}
.plan-toggle .toggle{ position:relative; width:74px; height:34px; border-radius:999px;
  border:1px solid rgba(22,219,101,.28);
  background: linear-gradient(180deg, rgba(5,140,66,.24), rgba(4,71,28,.26));
  box-shadow: inset 0 2px 6px rgba(0,0,0,.3);
}
.plan-toggle .toggle .toggle-bg{
  position:absolute; inset:3px; border-radius:999px;
  background: radial-gradient(120% 100% at 20% 30%, rgba(255,255,255,.12), transparent 60%);
}
.plan-toggle .toggle .knob{
  position:absolute; top:3px; left:3px; width:28px; height:28px; border-radius:50%;
  background: linear-gradient(180deg, #eafff2, #c8f7df);
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  transform: translateX(40px); /* Monthly default (right) */
  transition: transform .22s ease;
}
.plan-toggle .toggle.once .knob{ transform: translateX(0) } /* Once (left) */
/* Amount buttons */
.amounts{
  margin-top:8px;
  display:grid; grid-template-columns: repeat(4, 1fr); gap:10px;
}
.amt{
  padding:14px 10px; border-radius:14px; text-align:center; font-weight:800;
  border:1px solid rgba(22,219,101,.28);
  color:#eafff2;
  background: linear-gradient(180deg, rgba(22,219,101,.14), rgba(22,219,101,.06));
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.amt .suffix{ opacity:.85; font-weight:600; margin-left:3px; font-size:.95em; color:#bff3d3 }
.amt:hover{ transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(22,219,101,.4) }
/* Disabled state for Custom when Monthly is selected */
.amt.is-disabled{
  opacity: .45;
  filter: grayscale(1);
  pointer-events: none;
}
.amt.active{
  background: linear-gradient(180deg, var(--leaf), #15c45b);
  color:#05180c; border-color: rgba(22,219,101,.6);
}
/* Action row */
.action-row{
  display:flex;
  justify-content:center; /* center the button */
  margin-top:16px;
}
.action-row .btn{ box-shadow:none }

/* keep page from scrolling under the modal */
body.modal-open { overflow:hidden }

/* ===== Rules modal tweaks ===== */
.modal--rules .modal__dialog{
  width: min(680px, 92vw);
  max-height: 70vh;
  overflow: hidden;
}
.modal--rules .modal__content{
  max-height: calc(70vh - 110px); /* header + padding */
  overflow: auto;
  padding-right: 10px; /* small scroll gutter */
}
.rules{
  margin: 8px 0 0 22px;
  padding: 0;
  line-height: 1.55;
}
.rules li{ margin: 6px 0 }

/* ===== Form row ===== */
.field-row{
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.field-row label{
  font-size: .95rem;
  color: var(--muted);
}
.field-row input[type="text"]{
  background: rgba(5,140,66,.12);
  border: 1px solid rgba(22,219,101,.22);
  color: #eafff2;
  padding: 10px 12px;
  border-radius: 12px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field-row input[type="text"]:focus{
  border-color: rgba(22,219,101,.4);
  box-shadow: 0 0 0 3px rgba(22,219,101,.18);
}
/* ===== Breathing glow for the "Donate via PayPal" button ===== */
#donateBtn{
  position: relative;
  isolation: isolate;               /* keep the glow behind text */
  --glow: rgba(138,237,178,.55);     /* leaf green glow */
  --ring: rgba(22,219,101,.22);     /* soft outer ring */
  animation: btn-breathe 2.8s ease-in-out infinite;
}

/* soft halo behind the button */
#donateBtn::before{
  content:"";
  position:absolute;
  inset:-10px;                      /* slightly larger than the button */
  border-radius: inherit;
  background: radial-gradient(60% 60% at 50% 50%, var(--glow), transparent 70%);
  filter: blur(12px);
  opacity:.6;
  z-index:-1;                       /* keep behind the button */
  animation: btn-halo 2.8s ease-in-out infinite;
}

/* breathing scale + ring pulses */
@keyframes btn-breathe{
  0%, 100%{
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 0 var(--ring),
      0 8px 22px rgba(0,0,0,.35);
  }
  50%{
    transform: translateY(0) scale(1.035);
    box-shadow:
      0 0 0 10px rgba(22,219,101,0),
      0 12px 28px rgba(0,0,0,.5);
  }
}

@keyframes btn-halo{
  0%, 100%{ opacity:.55; transform: scale(1) }
  50%    { opacity:.9;  transform: scale(1.06) }
}

/* Keep hover behavior feeling snappy */
#donateBtn:hover{
  transform: translateY(-2px) scale(1.04);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce){
  #donateBtn, #donateBtn::before{ animation: none }
}
