/* ═══════════════════════════════════════════════════════
   HOME PAGE — CIPHERX
   Color palette:
     Primary:   #1d4ed8 (deep blue) / #2563eb / #3b82f6
     Neutrals:  #ffffff, #f8fafc, #071a33, #06122b
     Accent:    #38bdf8 (sky)
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Reset & base ── */
.hm-body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #071a33;
  background: #ffffff;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.hm-body *,
.hm-body *::before,
.hm-body *::after {
  box-sizing: border-box;
}

.hm-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── NAVBAR ── */
.hm-nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.hm-nav-wrap.hm-nav-scrolled {
  background: rgba(6, 18, 43, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.hm-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 2rem;
}

/* Logo */
.hm-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #ffffff;
  flex-shrink: 0;
}

.hm-logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.hm-logo-icon svg {
  width: 32px;
  height: 32px;
}

.hm-logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
}

/* Nav links */
.hm-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hm-nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.hm-nav-link:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

/* Nav action buttons */
.hm-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Mobile hamburger */
.hm-nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hm-nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── BUTTONS ── */
.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  border-radius: 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.hm-btn:hover { transform: translateY(-1px); }
.hm-btn:active { transform: translateY(0); }

/* Outlined (on dark hero bg) */
.hm-btn-outline {
  border-color: rgba(255,255,255,0.6);
  color: #ffffff;
  background: transparent;
}

.hm-btn-outline:hover {
  border-color: #ffffff;
  background: rgba(255,255,255,0.1);
}

/* Solid (hero buttons) */
.hm-btn-solid {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.35);
  color: #ffffff;
}

.hm-btn-solid:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.6);
}

/* Ghost (on dark hero) */
.hm-btn-outline-white {
  border-color: #ffffff;
  color: #ffffff;
  background: transparent;
}

.hm-btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
}

.hm-btn-ghost-white {
  border-color: transparent;
  color: rgba(255,255,255,0.85);
  background: transparent;
  font-weight: 600;
}

.hm-btn-ghost-white:hover {
  color: #ffffff;
}

/* Full-width */
.hm-btn-full { width: 100%; }

/* Discord */
.hm-btn-discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #ffffff;
  font-size: 0.9rem;
  padding: 0.65rem 1.75rem;
}

.hm-btn-discord:hover {
  background: #4752c4;
  border-color: #4752c4;
}

/* ── HERO ── */
.hm-hero {
  position: relative;
  background: linear-gradient(135deg, #06122b 0%, #1d4ed8 50%, #3b82f6 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hm-hero-inner {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-top: 7rem;
  padding-bottom: 5rem;
}

.hm-hero-text {
  flex: 1;
  min-width: 0;
  z-index: 1;
}

.hm-hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin: 0 0 1rem;
}

.hm-hero-headline {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.hm-hero-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  margin: 0 0 2rem;
  max-width: 520px;
}

.hm-hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hm-hero-visual {
  position: relative;
  flex: 0 0 460px;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hm-orb-canvas {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  opacity: 0.98;
  box-shadow: 0 0 80px rgba(56, 189, 248, 0.45), 0 0 160px rgba(14, 165, 233, 0.25);
  background: radial-gradient(circle at 35% 30%, rgba(125, 211, 252, 0.18) 0%, rgba(56, 189, 248, 0.12) 32%, rgba(37, 99, 235, 0.10) 58%, rgba(10, 35, 80, 0.22) 78%, rgba(6, 18, 43, 0.16) 100%);
  transform-style: preserve-3d;
}

/* Extra blue atmosphere behind the orb */
.hm-hero-visual::before {
  content: '';
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(circle 220px at 45% 40%, rgba(125, 211, 252, 0.18), transparent 70%),
    radial-gradient(circle 260px at 65% 65%, rgba(56, 189, 248, 0.14), transparent 70%),
    radial-gradient(circle 320px at 35% 75%, rgba(37, 99, 235, 0.10), transparent 72%);
  filter: blur(12px);
  opacity: 0.95;
  z-index: 1;
  pointer-events: none;
}

.hm-orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  animation: hm-ring-pulse 4s ease-in-out infinite;
}

.hm-orb-ring-1 {
  width: 420px;
  height: 420px;
  animation-delay: 0s;
}

.hm-orb-ring-2 {
  width: 460px;
  height: 460px;
  animation-delay: 1s;
  border-color: rgba(255,255,255,0.08);
}

@keyframes hm-ring-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* Wave divider */
.hm-hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
  pointer-events: none;
}

.hm-hero-wave svg {
  display: block;
  width: 100%;
  height: 80px;
}

/* ── WHAT WE DO ── */
.hm-section {
  padding: 6rem 0;
}

.hm-what {
  background: #ffffff;
  padding-top: 5rem;
}

.hm-what-inner {
  display: flex;
  align-items: center;
  gap: 5rem;
}

.hm-what-text {
  flex: 1;
  min-width: 0;
}

.hm-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(29, 78, 216, 0.1);
  border-radius: 12px;
  color: #2563eb;
  margin-bottom: 1.1rem;
}

.hm-section-icon svg {
  width: 26px;
  height: 26px;
}

.hm-section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 900;
  color: #071a33;
  margin: 0 0 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hm-section-body {
  font-size: 0.97rem;
  line-height: 1.75;
  color: #4a3a5c;
  max-width: 520px;
}

/* Code windows */
.hm-what-code {
  flex: 0 0 540px;
  position: relative;
  height: 380px;
}

.hm-code-window {
  background: #f9f8ff;
  border: 1px solid #e5e0f0;
  border-radius: 12px;
  overflow: hidden;
  position: absolute;
  box-shadow: 0 8px 32px rgba(29, 78, 216, 0.1);
}

.hm-code-window:first-child {
  left: 0;
  top: 0;
  width: 370px;
  z-index: 2;
}

.hm-code-window-bg {
  right: 0;
  top: 30px;
  width: 200px;
  background: #071a33;
  border-color: #0b2a52;
}

.hm-code-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: #f0ecfa;
  border-bottom: 1px solid #e5e0f0;
}

.hm-code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hm-dot-red    { background: #ff5f57; }
.hm-dot-yellow { background: #febc2e; }
.hm-dot-green  { background: #28c840; }

.hm-code-lang {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: #7aa3d6;
  margin-left: auto;
}

.hm-code-body {
  padding: 1rem;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  color: #2d1060;
  overflow: auto;
  white-space: pre;
  background: transparent;
  border: none;
}

.hm-code-dark {
  color: #a7c2e6;
}

/* Syntax colors */
.hm-k  { color: #3b82f6; font-weight: 600; }
.hm-n  { color: #e67e22; }
.hm-f  { color: #2980b9; }

/* What We Do wave below */
.hm-what::after {
  content: '';
  display: block;
  position: relative;
}

/* ── FEATURES ── */
.hm-features {
  background: linear-gradient(160deg, #06122b 0%, #1d4ed8 60%, #3b82f6 100%);
  position: relative;
  overflow: hidden;
}

/* Blue atmosphere overlay inside features section */
.hm-blue-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle 520px at 20% 30%, rgba(125, 211, 252, 0.14), transparent 70%),
    radial-gradient(circle 640px at 80% 45%, rgba(56, 189, 248, 0.10), transparent 72%),
    radial-gradient(circle 700px at 55% 80%, rgba(37, 99, 235, 0.10), transparent 74%),
    conic-gradient(from 210deg at 50% 50%, rgba(56, 189, 248, 0.05), rgba(37, 99, 235, 0.05), rgba(125, 211, 252, 0.05));
  filter: blur(18px);
  opacity: 0.85;
  pointer-events: none;
}

.hm-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.hm-section-sub {
  font-size: 1rem;
  color: #64748b;
  margin-top: 0.75rem;
}

.hm-title-white {
  color: #ffffff;
}

.hm-text-white-dim {
  color: rgba(255,255,255,0.65);
}

.hm-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.hm-feature-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.hm-feature-card:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-3px);
}

.hm-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #93c5fd;
  margin-bottom: 1.1rem;
}

.hm-feature-icon svg {
  width: 22px;
  height: 22px;
}

.hm-feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.6rem;
}

.hm-feature-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

/* Transition to white at bottom of features */
.hm-features::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #ffffff);
  pointer-events: none;
}

/* ── PRICING ── */
.hm-pricing {
  background: #ffffff;
}

.hm-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.hm-pricing-card {
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.25rem 2rem;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.hm-pricing-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 32px rgba(29, 78, 216, 0.12);
  transform: translateY(-3px);
}

.hm-pricing-featured {
  border-color: #2563eb;
  box-shadow: 0 8px 40px rgba(29, 78, 216, 0.18);
  transform: scale(1.03);
}

.hm-pricing-featured:hover {
  transform: scale(1.03) translateY(-3px);
}

.hm-pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}

.hm-pricing-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.6rem;
}

.hm-pricing-price {
  font-size: 2.75rem;
  font-weight: 900;
  color: #071a33;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.hm-pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0;
}

.hm-pricing-custom {
  font-size: 2rem;
}

.hm-pricing-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.hm-pricing-list li {
  font-size: 0.92rem;
  color: #4a3a5c;
  padding-left: 1.5rem;
  position: relative;
}

.hm-pricing-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
}

/* Pricing featured button override */
.hm-pricing-featured .hm-btn-outline {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.hm-pricing-featured .hm-btn-outline:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* ── DISCORD CTA ── */
.hm-discord-cta {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 3.5rem 0;
}

.hm-discord-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hm-discord-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: #5865f2;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.hm-discord-icon svg {
  width: 28px;
  height: 28px;
}

.hm-discord-text {
  flex: 1;
  min-width: 200px;
}

.hm-discord-text h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #071a33;
  margin: 0 0 0.35rem;
}

.hm-discord-text p {
  font-size: 0.92rem;
  color: #64748b;
  margin: 0;
}

/* ── FOOTER ── */
.hm-footer {
  background: #06122b;
  color: rgba(255,255,255,0.65);
  padding: 3rem 0;
}

.hm-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.hm-footer .hm-logo {
  color: rgba(255,255,255,0.9);
}

.hm-footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin: 0.25rem 0 0;
}

.hm-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}

.hm-footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}

.hm-footer-links a:hover {
  color: #ffffff;
}

.hm-footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hm-hero-inner {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .hm-hero-cta {
    justify-content: center;
  }

  .hm-hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hm-hero-visual {
    flex: none;
    width: 300px;
    height: 300px;
  }

  .hm-orb-canvas {
    width: 250px;
    height: 250px;
  }

  .hm-orb-ring-1 { width: 290px; height: 290px; }
  .hm-orb-ring-2 { width: 320px; height: 320px; }

  .hm-what-inner {
    flex-direction: column;
    gap: 2.5rem;
  }

  .hm-what-code {
    flex: none;
    width: 100%;
    height: 280px;
  }

  .hm-code-window:first-child {
    width: 68%;
  }

  .hm-code-window-bg {
    width: 38%;
  }
}

@media (max-width: 700px) {
  .hm-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 18, 43, 0.97);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .hm-nav-links.hm-nav-open {
    display: flex;
  }

  .hm-nav-links li {
    width: 100%;
  }

  .hm-nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
  }

  .hm-nav-mobile-toggle {
    display: flex;
  }

  .hm-nav-actions {
    display: none;
  }

  .hm-hero-visual {
    display: none;
  }

  .hm-what-code {
    display: none;
  }

  .hm-what-inner {
    flex-direction: column;
  }

  .hm-discord-inner {
    flex-direction: column;
    text-align: center;
  }
}
