/* ═══════════════════════════════════════════════════
   KSMC Host — Cloud VPS Linux  |  style.css
   ═══════════════════════════════════════════════════ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* surfaces */
  --bg-body:      #0a0a0b;
  --bg-surface:   #111113;
  --bg-card:      rgba(17, 17, 19, .65);
  --bg-card-hover:rgba(22, 22, 26, .8);
  --border-card:  rgba(255,255,255,.06);
  --border-hover: rgba(0,102,255,.35);

  /* palette */
  --accent:       #0066ff;
  --accent-light: #3388ff;
  --accent-glow:  rgba(0,102,255,.18);
  --green:        #22c55e;
  --green-dim:    rgba(34,197,94,.15);

  /* text */
  --text-primary:   #f0f0f2;
  --text-secondary: #8a8a9a;
  --text-muted:     #55555f;

  /* type */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* spacing */
  --container: 1180px;
  --radius:    14px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Ambient background glows ── */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  opacity: .35;
  z-index: 0;
}
.ambient-glow--1 {
  width: 600px; height: 600px;
  top: -180px; left: -120px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}
.ambient-glow--2 {
  width: 500px; height: 500px;
  bottom: 10%; right: -100px;
  background: radial-gradient(circle, rgba(34,197,94,.08), transparent 70%);
}
.grid-overlay {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 100;
  background: rgba(10,10,11,.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-card);
  transition: background .3s, box-shadow .3s, padding .3s;
  padding: 18px 0;
}
.site-header.is-scrolled {
  background: rgba(10,10,11,.88);
  box-shadow: 0 2px 32px rgba(0,0,0,.4);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem;
  letter-spacing: .5px;
  color: var(--text-primary);
  transition: opacity .2s;
}
.logo:hover { opacity: .85; }
.logo-icon { color: var(--accent); display: flex; }
.logo-accent { color: var(--accent); }

/* Nav */
.main-nav {
  display: flex; align-items: center; gap: 6px;
}
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .2s, background .2s;
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,.04);
}
.nav-link--active {
  color: var(--accent-light);
  background: var(--accent-glow);
}
.nav-link--cta {
  color: var(--text-primary);
  background: var(--accent);
  font-weight: 600;
  margin-left: 6px;
}
.nav-link--cta:hover {
  background: var(--accent-light);
  color: #fff;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; padding: 6px;
}
.mobile-menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  z-index: 1;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 999px;
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.5); }
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 22px;
}
.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #5ebbff 50%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  max-width: 620px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-actions {
  display: flex; gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 32px;
  font-size: .925rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all .25s ease;
  position: relative;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow), 0 4px 12px rgba(0,0,0,.3);
}
.btn--primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(0,102,255,.3), 0 8px 20px rgba(0,0,0,.35);
}
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}
.btn--ghost:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.03);
}

/* ── Terminal ── */
.terminal-preview {
  max-width: 680px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0,0,0,.55);
  border: 1px solid var(--border-card);
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 80px var(--accent-glow);
  backdrop-filter: blur(6px);
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border-card);
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot--red   { background: #ff5f57; }
.terminal-dot--yellow{ background: #ffbd2e; }
.terminal-dot--green { background: #28c840; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: 8px;
}
.terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.8;
  min-height: 80px;
}
.t-prompt { color: var(--green); margin-right: 8px; }
.t-cmd    { color: var(--text-primary); }
.t-cursor {
  color: var(--accent);
  animation: blink-cursor .85s step-end infinite;
}
@keyframes blink-cursor {
  50% { opacity: 0; }
}
.terminal-output {
  color: var(--text-secondary);
  display: block;
  margin-top: 4px;
  transition: opacity .3s;
}

/* ═══════════════════════════════════════════════════
   FEATURES STRIP
   ═══════════════════════════════════════════════════ */
.features-strip {
  position: relative;
  z-index: 1;
  padding: 40px 0;
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
  background: rgba(17,17,19,.4);
}
.features-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px 48px;
}
.feature-item {
  display: flex; align-items: center; gap: 10px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.feature-icon {
  font-size: 1.15rem;
}

/* ═══════════════════════════════════════════════════
   PLANS SECTION
   ═══════════════════════════════════════════════════ */
.plans-section {
  position: relative;
  z-index: 1;
  padding: 96px 0 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.8px;
  margin-bottom: 12px;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Card */
.plan-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 36px 28px 32px;
  display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s, box-shadow .35s, background .35s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.plan-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 20px 48px rgba(0,0,0,.4), 0 0 40px var(--accent-glow);
}

/* Popular variant */
.plan-card--popular {
  border-color: rgba(0,102,255,.3);
  background: rgba(0,102,255,.04);
  box-shadow: 0 0 48px rgba(0,102,255,.08);
}
.plan-card--popular:hover {
  border-color: rgba(0,102,255,.5);
  box-shadow: 0 20px 48px rgba(0,0,0,.45), 0 0 60px rgba(0,102,255,.15);
}

.popular-badge {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 20px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.plan-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-card);
}
.plan-name {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.price-currency {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  align-self: flex-start;
  margin-top: 6px;
}
.price-value {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
}
.price-cents {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.price-period {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Specs */
.plan-specs {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.plan-specs li {
  display: flex; align-items: center; gap: 12px;
  font-size: .88rem;
  color: var(--text-secondary);
}
.plan-specs li strong {
  color: var(--text-primary);
  font-weight: 600;
}
.spec-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--accent);
  opacity: .7;
}

/* CTA button */
.plan-cta-wrap { margin-top: auto; }

.btn--plan {
  width: 100%;
  padding: 14px 0;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  transition: all .3s;
}
.btn--plan:disabled {
  cursor: not-allowed;
  opacity: .7;
}
.btn--plan:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--popular {
  background: rgba(0,102,255,.12);
  color: var(--accent-light);
  border-color: rgba(0,102,255,.25);
}

.btn-badge {
  position: absolute;
  top: -1px; right: -1px;
  padding: 3px 10px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #ff3366);
  border-radius: 0 var(--radius-sm) 0 var(--radius-sm);
}

/* Plans note */
.plans-note {
  text-align: center;
  margin-top: 40px;
  font-size: .82rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-card);
  font-size: .82rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger plan cards */
.plans-grid .plan-card:nth-child(1) { transition-delay: .05s; }
.plans-grid .plan-card:nth-child(2) { transition-delay: .12s; }
.plans-grid .plan-card:nth-child(3) { transition-delay: .19s; }
.plans-grid .plan-card:nth-child(4) { transition-delay: .26s; }

/* Stagger features */
.features-grid .feature-item:nth-child(1) { transition-delay: .05s; }
.features-grid .feature-item:nth-child(2) { transition-delay: .1s; }
.features-grid .feature-item:nth-child(3) { transition-delay: .15s; }
.features-grid .feature-item:nth-child(4) { transition-delay: .2s; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .main-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100dvh;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: rgba(10,10,11,.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s;
    z-index: 90;
  }
  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link {
    font-size: 1.1rem;
    padding: 14px 24px;
    text-align: center;
  }

  .hero { padding: 130px 0 56px; }
  .hero-title { letter-spacing: -1px; }

  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .features-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding-left: 8px;
  }
}

@media (max-width: 480px) {
  .hero { padding: 120px 0 40px; }
  .hero-subtitle { font-size: .98rem; }
  .terminal-preview { margin: 0 -8px; border-radius: var(--radius-sm); }
  .terminal-body { padding: 14px 16px; font-size: .74rem; }
}
