/* ============================================================
   CERIS — Main Stylesheet
   /assets/css/style.css
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&family=Orbitron:wght@400;500;700;900&family=Inter:wght@300;400;500&display=swap');

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --c:        #00e5c0;      /* primary teal accent */
  --c2:       #0ea5e9;      /* secondary blue accent */
  --c3:       #7c3aed;      /* purple accent */
  --dark:     #020810;      /* page background */
  --dark2:    #050f1a;      /* section alternate bg */
  --dark3:    #071525;      /* deeper bg */
  --glass:    rgba(0,229,192,0.06);
  --glass2:   rgba(14,165,233,0.08);
  --border:   rgba(0,229,192,0.18);
  --border2:  rgba(14,165,233,0.15);
  --text:     #e2f4ff;
  --muted:    rgba(180,220,255,0.55);
  --font-display: 'Orbitron', monospace;
  --font-body:    'Rajdhani', sans-serif;
  --font-copy:    'Inter', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
}

/* ── Custom cursor ─────────────────────────────────────────── */
#cursor {
  position: fixed; width: 12px; height: 12px;
  background: var(--c); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s, background .2s;
  mix-blend-mode: screen;
}
#cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1px solid rgba(0,229,192,0.4); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: transform .15s ease-out, width .3s, height .3s;
}
body:hover #cursor { opacity: 1; }

/* ── Canvas background ─────────────────────────────────────── */
#bg-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ── Noise overlay ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1; opacity: 0.35;
}

/* ── Grid background ───────────────────────────────────────── */
.section-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,229,192,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,192,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,0.5) 20%, rgba(0,0,0,0.5) 80%, transparent);
}

/* ── Scanline ──────────────────────────────────────────────── */
.scanline {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,229,192,0.015) 2px, rgba(0,229,192,0.015) 4px
  );
}

/* ── HUD corner brackets ───────────────────────────────────── */
.hud-corner { position: absolute; width: 20px; height: 20px; }
.hud-corner.tl { top: 16px;    left: 16px;  border-top: 1px solid var(--c); border-left:  1px solid var(--c); }
.hud-corner.tr { top: 16px;    right: 16px; border-top: 1px solid var(--c); border-right: 1px solid var(--c); }
.hud-corner.bl { bottom: 16px; left: 16px;  border-bottom: 1px solid var(--c); border-left:  1px solid var(--c); }
.hud-corner.br { bottom: 16px; right: 16px; border-bottom: 1px solid var(--c); border-right: 1px solid var(--c); }

/* ── NAV ───────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  background: linear-gradient(180deg, rgba(2,8,16,0.92) 0%, transparent 100%);
  backdrop-filter: blur(2px);
}
.nav-logo { height: 36px; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: color .2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--c);
  transform: scaleX(0); transition: transform .3s;
}
.nav-links a:hover { color: var(--c); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  padding: 10px 24px; border: 1px solid var(--c);
  color: var(--c); background: rgba(0,229,192,0.06);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--c); color: var(--dark); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--c), var(--c2));
  color: var(--dark); font-family: var(--font-body);
  font-size: 14px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none;
  border: none; cursor: none;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: opacity .2s, transform .2s;
  position: relative; overflow: hidden; display: inline-block;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%); transition: transform .4s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-primary:hover::after { transform: translateX(100%); }

.btn-ghost {
  padding: 14px 32px; border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body);
  font-size: 14px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none;
  background: var(--glass); display: inline-block;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: border-color .2s, color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--c); color: var(--c); background: rgba(0,229,192,0.1); }

/* ── Section base ──────────────────────────────────────────── */
section { position: relative; z-index: 2; padding: 100px 48px; }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-label {
  display: inline-block;
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--c);
  margin-bottom: 16px;
}
.section-label::before { content: '// '; }

.section-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -0.01em; margin-bottom: 16px;
}
.section-sub {
  font-family: var(--font-copy);
  font-size: 16px; line-height: 1.7;
  color: var(--muted); max-width: 560px;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 48px 80px; z-index: 2; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
  max-width: 1200px; margin: 0 auto; width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; margin-bottom: 24px;
  border: 1px solid var(--border); background: var(--glass);
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--c);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--c); animation: pulse 2s ease-in-out infinite;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -0.02em; margin-bottom: 24px;
}
.hero h1 .line-accent {
  background: linear-gradient(90deg, var(--c), var(--c2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-family: var(--font-copy); font-size: 16px; line-height: 1.7;
  color: var(--muted); max-width: 440px; margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero visual */
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-mascot-wrap {
  position: relative; width: 420px; height: 420px;
  display: flex; align-items: center; justify-content: center;
}
.hero-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid; animation: spin linear infinite;
}
.ring1 { width: 360px; height: 360px; border-color: rgba(0,229,192,0.15); animation-duration: 20s; }
.ring2 { width: 300px; height: 300px; border-color: rgba(14,165,233,0.12); animation-duration: 15s; animation-direction: reverse; }
.ring3 { width: 240px; height: 240px; border-color: rgba(124,58,237,0.10); animation-duration: 25s; }
.ring1::before {
  content: ''; position: absolute; top: -3px; left: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c); transform: translateX(-50%);
  box-shadow: 0 0 12px var(--c), 0 0 24px var(--c);
}
.ring2::before {
  content: ''; position: absolute; bottom: -3px; left: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--c2); transform: translateX(-50%);
  box-shadow: 0 0 10px var(--c2);
}
.hero-mascot {
  position: relative; z-index: 2;
  width: 300px; height: 300px; object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(0,229,192,0.3)) drop-shadow(0 0 80px rgba(14,165,233,0.15));
  animation: float 6s ease-in-out infinite;
}
.hero-orb {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,192,0.12) 0%, rgba(14,165,233,0.06) 50%, transparent 70%);
  filter: blur(30px); z-index: 1;
  animation: breathe 4s ease-in-out infinite;
}
.stat-chip {
  position: absolute;
  padding: 10px 16px;
  background: rgba(5,15,26,0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-family: var(--font-body);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  animation: float 6s ease-in-out infinite;
}
.stat-chip:nth-child(1) { top: 10%; right: -20px; animation-delay: -2s; }
.stat-chip:nth-child(2) { bottom: 20%; left: -30px; animation-delay: -4s; }
.stat-chip:nth-child(3) { top: 60%; right: -10px; animation-delay: -1s; }
.stat-val  { font-size: 20px; font-weight: 700; color: var(--c); display: block; }
.stat-lbl  { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

/* ── Marquee ───────────────────────────────────────────────── */
.marquee-section {
  position: relative; z-index: 2;
  border-top: 1px solid rgba(0,229,192,0.08);
  border-bottom: 1px solid rgba(0,229,192,0.08);
  background: rgba(0,229,192,0.03);
  overflow: hidden; padding: 14px 0;
}
.marquee-track {
  display: flex; gap: 60px; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.marquee-track span.accent { color: var(--c); }

/* ── Module cards ──────────────────────────────────────────── */
.modules-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: 60px;
}
.module-card {
  padding: 28px 24px;
  background: var(--glass); border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  transition: transform .3s, border-color .3s, background .3s;
  position: relative; overflow: hidden;
}
.module-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,229,192,0.08), transparent);
  opacity: 0; transition: opacity .3s;
}
.module-card:hover { transform: translateY(-6px); border-color: rgba(0,229,192,0.4); background: rgba(0,229,192,0.1); }
.module-card:hover::before { opacity: 1; }
.module-icon {
  width: 40px; height: 40px; margin-bottom: 16px;
  background: rgba(0,229,192,0.1); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
.module-card h3 {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 10px; color: var(--c);
}
.module-card p { font-family: var(--font-copy); font-size: 13px; line-height: 1.6; color: var(--muted); }
.module-num { position: absolute; top: 16px; right: 20px; font-family: var(--font-display); font-size: 11px; color: rgba(0,229,192,0.2); }

/* ── Feature rows ──────────────────────────────────────────── */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center; margin-top: 80px;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-mascot-wrap { position: relative; display: flex; justify-content: center; }
.feature-mascot-wrap::before {
  content: ''; position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,192,0.1) 0%, transparent 70%);
  filter: blur(20px);
}
.feature-mascot {
  width: 280px; height: 280px; object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(0,229,192,0.2)) drop-shadow(0 0 60px rgba(14,165,233,0.1));
  animation: float 7s ease-in-out infinite;
  position: relative; z-index: 1;
}
.feature-text h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 700; margin-bottom: 16px; }
.feature-text p { font-family: var(--font-copy); font-size: 15px; line-height: 1.8; color: var(--muted); margin-bottom: 24px; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.feature-list li { display: flex; align-items: center; gap: 10px; font-family: var(--font-copy); font-size: 14px; color: var(--muted); }
.feature-list li::before { content: ''; flex-shrink: 0; width: 20px; height: 1px; background: var(--c); }

/* ── Pricing ───────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 60px; }
.price-card {
  padding: 36px 28px;
  background: rgba(5,15,26,0.8); border: 1px solid var(--border2);
  backdrop-filter: blur(16px); position: relative; overflow: hidden;
  clip-path: polygon(14px 0%, 100% 0%, calc(100% - 14px) 100%, 0% 100%);
  transition: transform .3s, border-color .3s;
}
.price-card.featured { border-color: var(--c); background: rgba(0,229,192,0.05); }
.price-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  background: var(--c); color: var(--dark);
  font-family: var(--font-body); font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; padding: 4px 20px;
}
.price-card:hover { transform: translateY(-8px); }
.price-tier { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c); margin-bottom: 20px; }
.price-amount { font-family: var(--font-display); font-size: 42px; font-weight: 900; line-height: 1; margin-bottom: 4px; }
.price-amount sup { font-size: 18px; vertical-align: top; margin-top: 8px; margin-right: 2px; }
.price-period { font-family: var(--font-copy); font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.price-divider { height: 1px; background: var(--border); margin-bottom: 24px; }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.price-features li { display: flex; gap: 10px; font-family: var(--font-copy); font-size: 13px; color: var(--muted); }
.price-features li::before { content: '›'; color: var(--c); font-size: 16px; line-height: 1.2; flex-shrink: 0; }

/* ── Demo / CTA ────────────────────────────────────────────── */
#demo { background: linear-gradient(180deg, var(--dark) 0%, var(--dark3) 50%, var(--dark) 100%); text-align: center; }
.demo-inner { max-width: 700px; margin: 0 auto; }
.demo-mascot { width: 200px; height: 200px; object-fit: contain; filter: drop-shadow(0 0 30px rgba(0,229,192,0.3)); animation: float 5s ease-in-out infinite; margin: 0 auto 32px; display: block; }
.demo-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  position: relative; z-index: 2;
  background: var(--dark2);
  border-top: 1px solid rgba(0,229,192,0.08);
  padding: 60px 48px 32px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; margin-bottom: 48px; }
.footer-brand img { height: 32px; margin-bottom: 16px; }
.footer-brand p { font-family: var(--font-copy); font-size: 13px; color: var(--muted); line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--c); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-family: var(--font-copy); font-size: 13px; color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-col ul a:hover { color: var(--c); }
.footer-bottom { border-top: 1px solid rgba(0,229,192,0.06); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-family: var(--font-copy); font-size: 12px; color: var(--muted); }
.footer-tagline { font-family: var(--font-display); font-size: 11px; color: rgba(0,229,192,0.3); letter-spacing: 0.2em; text-transform: uppercase; }

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes pulse    { 0%,100% { opacity:1; transform:scale(1); }  50% { opacity:.4; transform:scale(.7); } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes float    { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-18px); } }
@keyframes breathe  { 0%,100% { transform:scale(1);   opacity:.6; } 50% { transform:scale(1.2); opacity:1; } }
@keyframes marquee  { to { transform: translateX(-50%); } }
@keyframes glitch1  {
  0%,90%,100% { clip-path:none; transform:none; }
  91% { clip-path:inset(30% 0 50% 0); transform:translate(-3px,0); }
  93% { clip-path:inset(60% 0 20% 0); transform:translate( 3px,0); }
  95% { clip-path:inset(10% 0 70% 0); transform:translate(-2px,0); }
}
.glitch { animation: glitch1 8s steps(1) infinite; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .hero { padding: 100px 24px 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-mascot-wrap { width: 280px; height: 280px; }
  .hero-mascot { width: 220px; height: 220px; }
  .ring1 { width: 260px; height: 260px; }
  .ring2 { width: 210px; height: 210px; }
  .ring3 { width: 170px; height: 170px; }
  section { padding: 60px 24px; }
  .modules-grid { grid-template-columns: 1fr 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 40px; }
  .feature-row.reverse { direction: ltr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stat-chip { display: none; }
}

@media (max-width: 560px) {
  .modules-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}
