/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
  --pink:     #ff6eb4;
  --pink-lt:  #ffb3d9;
  --pink-dk:  #e0448c;
  --purple:   #b06eff;
  --purple-lt:#d4b0ff;
  --blue:     #6ec6ff;
  --teal:     #5df5d8;
  --yellow:   #ffe066;

  --bg:       #fdf5fc;
  --bg2:      #fff8fe;
  --surface:  #ffffff;
  --border:   #f0d6f0;
  --text:     #2b1a2e;
  --text2:    #7a5c82;
  --text3:    #b094b8;

  --grad-hero: linear-gradient(135deg, #fff0fb 0%, #f0e8ff 50%, #e8f8ff 100%);
  --grad-feat: linear-gradient(160deg, #1a0d2e 0%, #2d1a3e 40%, #0d1a2e 100%);
  --grad-pink: linear-gradient(135deg, var(--pink), var(--purple));
  --grad-btn:  linear-gradient(135deg, #ff6eb4, #b06eff);

  --shadow-card: 0 4px 24px rgba(176,110,255,0.10), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-hover: 0 12px 40px rgba(176,110,255,0.18), 0 2px 8px rgba(0,0,0,0.06);

  --radius: 16px;
  --radius-sm: 10px;
  --font-body: 'Sora', sans-serif;
  --font-display: 'Nunito', sans-serif;

  --nav-h: 68px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

/* ============================================
   Particles
   ============================================ */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  animation: floatParticle linear infinite;
  user-select: none;
}

@keyframes floatParticle {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  50%  { transform: translateY(-30px) rotate(180deg) scale(1.1); }
  100% { transform: translateY(0) rotate(360deg) scale(1); }
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(253,245,252,0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(253,245,252,0.92);
  border-color: var(--border);
  box-shadow: 0 2px 20px rgba(176,110,255,0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  flex-shrink: 0;
}
.logo-icon { font-size: 1.5rem; }
.logo-text strong { color: var(--pink); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--text2);
  font-size: .9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--pink);
  background: rgba(255,110,180,0.08);
}

.nav-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
  color: var(--text);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  background: var(--grad-btn);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,110,180,0.35);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text2);
  padding: 10px 20px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,110,180,0.4);
  color: var(--pink);
  padding: 12px 28px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-outline:hover {
  background: rgba(255,110,180,0.06);
  border-color: var(--pink);
}

.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ============================================
   Hero
   ============================================ */

/* ── Sinking deco symbols ── */
.hero-decos {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.deco-free {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  transform-origin: center center;
  /* transition intentionally omitted — physics drives every frame */
  line-height: 1;
}
.hero {
  min-height: 100vh;
  background: var(--grad-hero);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 80px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176,110,255,0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 520px; flex-shrink: 0; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,110,180,0.1);
  border: 1px solid rgba(255,110,180,0.25);
  color: var(--pink-dk);
  font-size: .8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  animation: fadeInUp .6s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 18px;
  animation: fadeInUp .6s .1s ease both;
}

.gradient-text {
  background: var(--grad-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text2);
  font-size: 1rem;
  margin-bottom: 32px;
  animation: fadeInUp .6s .2s ease both;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fadeInUp .6s .3s ease both;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  animation: fadeInUp .6s .4s ease both;
}

.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  background: var(--grad-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: .75rem; color: var(--text3); font-weight: 600; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Mascot */
.hero-mascot {
  position: absolute;
  right: -20px;
  top: 0;
  bottom: 0;
  width: 52%;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight .8s .2s ease both;
  pointer-events: none;
}

.mascot-glow {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,110,180,0.18) 0%, rgba(176,110,255,0.10) 50%, transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
}

.mascot-img {
  width: 100%;
  height: 90%;
  object-fit: contain;
  transition: transform .15s ease;
  filter: drop-shadow(0 24px 80px rgba(176,110,255,0.28));
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.mascot-fallback {
  font-size: 5rem;
  line-height: 1.4;
  text-align: center;
  animation: floatParticle 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: .8; }
  50%       { transform: scale(1.08); opacity: 1; }
}

/* ============================================
   Products Section
   ============================================ */
.products {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text2);
  font-size: 1rem;
}

.section-header.light h2 { color: #fff; }
.section-header.light p  { color: rgba(255,255,255,0.6); }

/* CPU Tabs */
.cpu-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.cpu-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 100px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--transition);
}

.cpu-tab:hover { border-color: var(--pink-lt); color: var(--pink); }

.cpu-tab.active {
  background: var(--grad-btn);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,110,180,0.3);
}

/* Region Tabs */
.region-tabs {
  display: flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  gap: 4px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.region-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .875rem;
  color: var(--text2);
  cursor: pointer;
  transition: color var(--transition);
  position: relative;
  z-index: 1;
}

.region-tab.active { color: var(--text); }

.region-tab.active::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,110,180,0.12), rgba(176,110,255,0.10));
  border: 1.5px solid rgba(255,110,180,0.2);
  z-index: -1;
  animation: tabReveal .3s ease;
}

@keyframes tabReveal {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Plans Table */
.plans-wrapper {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.plan-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr 1fr 1.2fr 1.4fr 1fr;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(255,110,180,0.04), rgba(176,110,255,0.04));
  border-bottom: 1.5px solid var(--border);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.plans-container {
  transition: opacity .22s ease, transform .22s ease;
}

.plans-container.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.plans-container.fade-in {
  animation: slideIn .35s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.plan-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr 1fr 1.2fr 1.4fr 1fr;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  animation: rowReveal .4s calc(var(--i) * 0.06s) ease both;
}

@keyframes rowReveal {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.plan-row:last-child { border-bottom: none; }

.plan-row:hover:not(.sold-out) {
  background: linear-gradient(90deg, rgba(255,110,180,0.04), rgba(176,110,255,0.03));
}

.plan-row.sold-out { opacity: 0.5; }

.plan-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .9rem;
  color: var(--text);
}

/* Badges */
.badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.hot-badge {
  background: rgba(255,110,100,0.12);
  color: #e04040;
  border: 1px solid rgba(255,110,100,0.25);
}

.low-badge {
  background: rgba(255,180,50,0.12);
  color: #b07000;
  border: 1px solid rgba(255,180,50,0.3);
}

.sold-out-badge {
  background: rgba(120,120,140,0.08);
  color: #888;
  border: 1px solid rgba(120,120,140,0.18);
}

/* Spec cells */
.plan-cpu, .plan-mem, .plan-storage, .plan-net {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .875rem;
  color: var(--text2);
  font-weight: 600;
}

.spec-icon { font-size: .8rem; }

.plan-traffic {
  font-size: .8rem;
  color: var(--text3);
  font-family: 'Courier New', monospace;
}

.plan-price { display: flex; flex-direction: column; }

.price-main {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.price-sub {
  font-size: .72rem;
  color: var(--text3);
}

.sold-text {
  font-size: .85rem;
  font-weight: 600;
  color: #aaa;
}

.btn-deploy {
  padding: 9px 18px;
  border-radius: 100px;
  border: none;
  background: var(--grad-btn);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-deploy:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,110,180,0.35);
}

.btn-deploy.disabled {
  background: linear-gradient(135deg, #ddd, #ccc);
  cursor: not-allowed;
  color: #aaa;
}

/* ============================================
   Features
   ============================================ */
.features {
  background: var(--grad-feat);
  padding: 100px 24px;
  position: relative;
  overflow: hidden;
}

.features::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,110,180,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(176,110,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  position: relative;
  z-index: 1;
}

.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(28px);
}

.feature-card.revealed {
  animation: revealCard .6s calc(var(--delay)) ease both;
}

@keyframes revealCard {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.feature-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,110,180,0.25);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: .9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
}

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, #ff6eb4 0%, #b06eff 60%, #6ec6ff 100%);
  padding: 70px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
}

.cta-text p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  margin-bottom: 32px;
}

.cta-banner .btn-primary {
  background: white;
  color: var(--pink-dk);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.cta-banner .btn-primary:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.cta-deco {
  margin-top: 28px;
  font-size: 1.4rem;
  letter-spacing: 4px;
  opacity: .5;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: #120a1e;
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer .logo { color: #fff; }
.footer .logo .logo-text { color: rgba(255,255,255,0.8); }

.footer-copy {
  color: rgba(255,255,255,0.35);
  font-size: .8rem;
  margin-left: auto;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--pink-lt); }

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: calc(var(--nav-h) + 32px) 28px 60px;
    text-align: center;
    gap: 0;
  }

  .hero { padding-bottom: 60px; min-height: auto; }
  .hero-mascot {
    position: relative;
    right: auto; top: auto; bottom: auto;
    width: 100%;
    height: 320px;
    order: -1;
    margin-bottom: 16px;
    pointer-events: none;
  }
  .mascot-img { width: auto; height: 100%; max-width: none; }

  .hero-ctas   { justify-content: center; }
  .hero-stats  { justify-content: center; }

  .plan-header,
  .plan-row {
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr 0.8fr 1fr 1.1fr 1fr;
    font-size: .78rem;
    padding: 12px 14px;
    gap: 4px;
  }

  .plan-label  { font-size: .8rem; }
  .price-main  { font-size: .88rem; }
}

@media (max-width: 680px) {
  .nav-links   { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--surface); padding: 16px 24px; border-bottom: 1px solid var(--border); gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; border-radius: 8px; }
  .nav-actions { display: none; }
  .hamburger   { display: block; }

  .plan-header { display: none; }
  .plan-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 16px;
  }

  .plan-name   { width: 100%; }
  .plan-action { width: 100%; margin-top: 4px; }
  .btn-deploy  { width: 100%; justify-content: center; }

  .plan-cpu, .plan-mem, .plan-storage, .plan-net {
    flex: 1;
    min-width: 100px;
  }

  .cpu-tabs { flex-direction: column; align-items: center; }
  .hero { padding-top: calc(var(--nav-h) + 20px); }
}
