/* ═══════════════════════════════════════════════════
   CachyHost — style.css  (complete redesign)
═══════════════════════════════════════════════════ */

/* ── TOKENS ───────────────────────────────────────── */
:root {
  /* Colors */
  --green:       #00FF77;
  --green-dim:   #00CC60;
  --green-dark:  #007A3A;
  --bg:          #07090D;
  --bg-card:     rgba(255,255,255,0.033);
  --bg-card-h:   rgba(255,255,255,0.058);
  --border:      rgba(255,255,255,0.07);
  --border-h:    rgba(255,255,255,0.14);
  --text:        #E8EDF5;
  --text-muted:  #5E6878;
  --text-subtle: #8A95A8;
  --discord:     #5865F2;

  /* Typography */
  --font: 'Outfit', system-ui, sans-serif;

  /* Radii */
  --r-sm:  10px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t:    0.22s var(--ease);

  /* Layout */
  --max:  1120px;
  --px:   clamp(24px, 5vw, 64px);
}

/* ── RESET ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── SCROLLBAR ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,255,119,0.2); border-radius: 99px; }

/* ── CANVAS PARTICLES ─────────────────────────────── */
#particleCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  opacity: 0.6;
}

/* ── LOADER ───────────────────────────────────────── */
.loader-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  width: 260px;
}
.loader-logo img { filter: drop-shadow(0 0 16px rgba(0,255,119,0.4)); }
.loader-bar-track {
  width: 100%; height: 2px;
  background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden;
}
.loader-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  border-radius: 99px;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--green);
}
.loader-label { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.06em; }

/* ── PAGE ─────────────────────────────────────────── */
.page {
  position: relative; z-index: 1;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.page.visible { opacity: 1; transform: none; }

/* ── LAYOUT HELPERS ───────────────────────────────── */
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ── BUTTONS ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  font-weight: 700; font-size: 0.875rem;
  transition: var(--t); white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--green);
  color: #07090D;
  border-color: var(--green);
}
.btn-primary:hover {
  background: #33ff99;
  box-shadow: 0 0 0 4px rgba(0,255,119,0.18), 0 8px 32px rgba(0,255,119,0.25);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--border-h);
}
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-discord {
  background: var(--discord);
  color: #fff; border-color: var(--discord);
}
.btn-discord:hover {
  background: #6875f5;
  box-shadow: 0 0 0 4px rgba(88,101,242,0.2), 0 8px 32px rgba(88,101,242,0.3);
  transform: translateY(-1px);
}

/* loading spinner inside btn */
.btn-spinner { display: none; animation: spin 0.8s linear infinite; }
.btn.loading .btn-label { display: none; }
.btn.loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── NAV ──────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(7,9,13,0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto; padding: 0 var(--px);
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; }
.nav-brand img { height: 32px; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-badge {
  display: none;
  padding: 4px 12px;
  background: rgba(0,255,119,0.08);
  border: 1px solid rgba(0,255,119,0.2);
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
  color: var(--green); text-transform: uppercase; letter-spacing: 0.1em;
}
@media (min-width: 640px) { .nav-badge { display: inline-flex; } }

/* ── HERO ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px var(--px) 60px;
  text-align: center;
  overflow: hidden;
}

/* Decorative grid lines */
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,255,119,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,119,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 80%);
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: 780px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}

/* Pulsing dot eyebrow */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: rgba(0,255,119,0.07); border: 1px solid rgba(0,255,119,0.2);
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; color: var(--green);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.dot-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--green);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.hero-heading {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.07;
  letter-spacing: -0.04em; color: #fff;
}

.text-gradient {
  background: linear-gradient(135deg, var(--green) 0%, #00E0C7 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-subtle); line-height: 1.7;
  max-width: 540px;
}
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }

/* ── NOTIFY FORM ──────────────────────────────────── */
.notify-form { width: 100%; max-width: 480px; }

.notify-field {
  display: flex; gap: 8px;
  padding: 6px 6px 6px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color var(--t), box-shadow var(--t);
}
.notify-field:focus-within {
  border-color: rgba(0,255,119,0.4);
  box-shadow: 0 0 0 3px rgba(0,255,119,0.1);
}
.notify-field input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  font-family: var(--font); font-size: 0.9rem; color: var(--text);
}
.notify-field input::placeholder { color: var(--text-muted); }

.form-msg {
  margin-top: 10px; font-size: 0.82rem;
  min-height: 1.2em; text-align: left; padding-left: 4px;
}
.form-msg.success { color: var(--green); }
.form-msg.error   { color: #FF5C5C; }

/* ── STATS BAR ────────────────────────────────────── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  padding: 24px var(--px);
}
.stats-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.stat {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 0 32px; flex: 0 0 auto;
}
.stat-num {
  font-size: 1.5rem; font-weight: 900; color: #fff; line-height: 1;
  letter-spacing: -0.02em;
}
.stat-unit { font-size: 1rem; }
.stat-lbl { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-sep {
  width: 1px; height: 36px;
  background: var(--border); flex-shrink: 0;
}

/* ── SECTION COMMON ───────────────────────────────── */
.section { padding: 80px 0; }

.section-head {
  text-align: center; margin-bottom: 56px;
}
.eyebrow {
  display: inline-block; margin-bottom: 16px;
  padding: 5px 14px;
  background: rgba(0,255,119,0.07); border: 1px solid rgba(0,255,119,0.18);
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -0.03em; color: #fff;
}
.section-sub {
  margin-top: 14px; font-size: 1rem;
  color: var(--text-subtle); line-height: 1.7;
}

/* ── FEATURES ─────────────────────────────────────── */
.features { background: rgba(0,0,0,0.2); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.feature-card:hover {
  background: var(--bg-card-h);
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,255,119,0.1);
  border: 1px solid rgba(0,255,119,0.2);
  color: var(--green); margin-bottom: 18px;
}
.feature-title {
  font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 8px;
}
.feature-desc { font-size: 0.85rem; color: var(--text-subtle); line-height: 1.65; }

/* ── SERVICES ─────────────────────────────────────── */
.services { }

/* Category tabs */
.svc-tabs {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 32px;
}
.svc-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-subtle);
  transition: var(--t);
}
.svc-tab:hover {
  background: var(--bg-card-h); border-color: var(--border-h);
  color: var(--text);
}
.svc-tab.active {
  background: rgba(0,255,119,0.1); border-color: rgba(0,255,119,0.35);
  color: var(--green);
}
.svc-tab svg { flex-shrink: 0; }

/* Panels */
.svc-panel { display: none; }
.svc-panel.active {
  display: block;
  animation: fadeUp 0.3s var(--ease);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══ THE TILE GRID ════════════════════════════════ */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

/* Single tile */
.svc-tile {
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  text-align: center; gap: 13px;
  padding: 26px 16px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: default;
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
  user-select: none;
}
.svc-tile:hover {
  background: var(--bg-card-h);
  border-color: rgba(var(--c), 0.45);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(var(--c), 0.15);
}

/* Icon container */
.svc-ico {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--c), 0.1);
  border: 1px solid rgba(var(--c), 0.22);
  transition: box-shadow var(--t);
  flex-shrink: 0;
}
.svc-tile:hover .svc-ico {
  box-shadow: 0 0 22px rgba(var(--c), 0.35);
}
.svc-ico img,
.svc-ico svg {
  width: 28px; height: 28px;
  display: block; object-fit: contain; flex-shrink: 0;
}

/* Label */
.svc-name {
  font-size: 0.78rem; font-weight: 700;
  color: #fff; line-height: 1.35;
  letter-spacing: 0.01em;
}

/* ── DISCORD CTA ──────────────────────────────────── */
.discord { padding-bottom: 100px; }

.discord-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 28px; padding: 60px var(--px);
  background: rgba(88,101,242,0.07);
  border: 1px solid rgba(88,101,242,0.2);
  border-radius: var(--r-xl);
  max-width: 680px; margin: 0 auto;
}
.discord-glow {
  position: absolute; inset: -80px;
  background: radial-gradient(ellipse at 50% 0%, rgba(88,101,242,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.discord-icon-wrap {
  width: 72px; height: 72px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(88,101,242,0.18);
  border: 1px solid rgba(88,101,242,0.3);
  color: #7289da;
}
.discord-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900; color: #fff; letter-spacing: -0.03em;
}
.discord-desc {
  font-size: 1rem; color: var(--text-subtle);
  line-height: 1.7; max-width: 420px; margin: 0 auto;
}

/* ── FOOTER ───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px var(--px);
  background: rgba(0,0,0,0.2);
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.footer-logo { opacity: 0.6; filter: grayscale(0.5); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }
.footer-tag  { font-size: 0.75rem; color: rgba(255,255,255,0.18); }

/* ── SCROLL REVEAL ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1; transform: none;
}

/* staggered delays for feature cards */
.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.07s; }
.feature-card:nth-child(3) { transition-delay: 0.14s; }
.feature-card:nth-child(4) { transition-delay: 0.21s; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 768px) {
  .stat { padding: 0 18px; }
  .stat-sep { display: none; }
  .stats-inner { gap: 16px; }
  .stat { flex: 0 0 calc(50% - 8px); }

  .svc-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }
  .svc-tile { padding: 20px 12px 18px; }
  .svc-ico { width: 46px; height: 46px; }
  .svc-ico img, .svc-ico svg { width: 24px; height: 24px; }
}

@media (max-width: 480px) {
  .hero-heading { font-size: 2.2rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .svc-name { font-size: 0.72rem; }
}
