/* ============================================
   Mistiq Portal
   Dark / Glacier / Space / Mysterious
   ============================================ */

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

:root {
  --bg: #020206;
  --bg-elevated: #04040a;
  --surface: rgba(255, 255, 255, 0.02);
  --surface-hover: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #e0e4ec;
  --text-dim: #6b7280;
  --text-muted: #3a3f4b;
  --ice: #8ec5db;
  --ice-bright: #b8dced;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

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

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

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }

#frost {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Gradient Mesh Background --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(20, 45, 80, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(35, 60, 95, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 60% 80%, rgba(15, 40, 75, 0.08) 0%, transparent 50%);
  animation: mesh-drift 20s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes mesh-drift {
  0% {
    background:
      radial-gradient(ellipse 80% 50% at 20% 40%, rgba(20, 45, 80, 0.1) 0%, transparent 60%),
      radial-gradient(ellipse 60% 80% at 80% 20%, rgba(35, 60, 95, 0.07) 0%, transparent 50%),
      radial-gradient(ellipse 50% 60% at 60% 80%, rgba(15, 40, 75, 0.08) 0%, transparent 50%);
  }
  50% {
    background:
      radial-gradient(ellipse 70% 60% at 40% 30%, rgba(25, 50, 85, 0.08) 0%, transparent 60%),
      radial-gradient(ellipse 80% 50% at 60% 60%, rgba(20, 45, 80, 0.07) 0%, transparent 50%),
      radial-gradient(ellipse 60% 70% at 20% 70%, rgba(35, 60, 95, 0.09) 0%, transparent 50%);
  }
  100% {
    background:
      radial-gradient(ellipse 60% 70% at 70% 50%, rgba(22, 48, 82, 0.09) 0%, transparent 60%),
      radial-gradient(ellipse 70% 40% at 30% 70%, rgba(30, 55, 90, 0.07) 0%, transparent 50%),
      radial-gradient(ellipse 80% 50% at 50% 20%, rgba(18, 42, 78, 0.1) 0%, transparent 50%);
  }
}

/* --- Noise texture overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.03;
  pointer-events: none;
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 0;
  transition: all 0.5s ease;
}

.nav-scrolled {
  padding: 14px 0;
  background: rgba(2, 2, 6, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; z-index: 101; }
.nav-logo-img {
  height: 40px;
  width: auto;
  filter: brightness(1.8) drop-shadow(0 0 8px rgba(142, 197, 219, 0.3));
  transition: filter 0.3s;
}
.nav-logo:hover .nav-logo-img {
  filter: brightness(2.2) drop-shadow(0 0 14px rgba(142, 197, 219, 0.5));
}

.nav-links { display: flex; gap: 36px; }

.nav-link {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
.nav-link:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-dim);
  transition: all 0.3s;
}
.nav-toggle.active span:first-child { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:last-child { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 6, 0.98);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.mobile-menu.active { opacity: 1; pointer-events: all; }

.mobile-link {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  transition: color 0.3s;
}
.mobile-link:hover { color: var(--ice); }

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(60, 120, 180, 0.12) 0%, rgba(40, 80, 140, 0.06) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: glow-pulse 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-content::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(142, 197, 219, 0.06);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: ring-expand 4s ease-in-out infinite;
  pointer-events: none;
}

.hero-content::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(142, 197, 219, 0.03);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: ring-expand 4s ease-in-out 2s infinite;
  pointer-events: none;
}

@keyframes ring-expand {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

@keyframes glow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  opacity: 0;
  animation: logo-enter 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  filter: brightness(2) drop-shadow(0 0 30px rgba(142, 197, 219, 0.4)) drop-shadow(0 0 60px rgba(142, 197, 219, 0.15));
}

@keyframes logo-enter {
  0% { opacity: 0; transform: scale(0.8) rotate(-10deg); filter: blur(10px) brightness(1); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0) brightness(2) drop-shadow(0 0 30px rgba(142, 197, 219, 0.4)) drop-shadow(0 0 60px rgba(142, 197, 219, 0.15)); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--ice-bright);
  opacity: 0;
  animation: text-up 1s ease 0.8s forwards;
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  opacity: 0;
  animation: text-up 1s ease 1.1s forwards;
}

.hero-line {
  width: 40px;
  height: 1px;
  background: var(--ice);
  opacity: 0;
  animation: text-up 1s ease 1.3s forwards;
}

@keyframes text-up {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: text-up 1s ease 1.8s forwards;
}

.scroll-cue span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); transform-origin: top; }
}

/* --- Sections --- */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section-center { text-align: center; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow { max-width: 720px; }

.label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: 20px;
  opacity: 0.7;
}

.heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 24px;
}

.heading-large {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

.body-text {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 16px;
}

.divider {
  position: relative;
  z-index: 1;
  padding: 0 32px;
}

.divider-line {
  max-width: 1100px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 197, 219, 0.1), transparent);
}

/* --- About --- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ice-bright);
  margin-bottom: 2px;
}

.stat-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* --- Products --- */
.product-hero {
  margin-top: 48px;
  margin-bottom: 40px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice), transparent);
  opacity: 0.2;
}

.product-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6ee7b7;
  background: rgba(110, 231, 183, 0.06);
  border: 1px solid rgba(110, 231, 183, 0.12);
  border-radius: 100px;
  margin-bottom: 28px;
}

.product-hero-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6ee7b7;
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.product-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ice-bright);
  margin-bottom: 6px;
}

.product-tagline {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.product-tags span {
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ice);
  transition: gap 0.3s, color 0.3s;
}

.link-arrow:hover { gap: 10px; color: var(--ice-bright); }

/* Browser mockup */
.browser-frame {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.browser-dots { display: flex; gap: 5px; }
.browser-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

.browser-url {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
}

.browser-body { padding: 14px; }

.mock-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.mock-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.mock-filter {
  padding: 4px 10px;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.mock-filter.active {
  color: var(--ice);
  border-color: rgba(142, 197, 219, 0.2);
  background: rgba(142, 197, 219, 0.06);
}

.mock-job-card {
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}

.mock-job-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mock-company-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(142, 197, 219, 0.15), rgba(100, 160, 200, 0.08));
  border: 1px solid rgba(142, 197, 219, 0.1);
  flex-shrink: 0;
}

.mock-job-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.mock-job-company {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.mock-job-tags {
  display: flex;
  gap: 5px;
}

.mock-job-tags span {
  padding: 2px 7px;
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 4px;
  letter-spacing: 0.01em;
}

/* Future product cards */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.product-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 197, 219, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.product-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow: 0 8px 40px rgba(40, 80, 140, 0.06);
}

.product-card:hover::before { opacity: 1; }

.product-card-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.product-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.product-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Vision --- */
.values {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}

.value {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.value:last-child { border-bottom: none; }

.value h5 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.value p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* --- Contact --- */
.contact-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 24px;
  filter: brightness(1.8) drop-shadow(0 0 20px rgba(142, 197, 219, 0.3));
}

/* --- Contact cards --- */
.contact-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 197, 219, 0.25), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.contact-card:hover {
  border-color: var(--border-hover);
  color: var(--ice);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.contact-card:hover::before { opacity: 1; }

.contact-card svg { color: var(--ice); opacity: 0.6; }
.contact-card:hover svg { opacity: 1; }

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(1.6) drop-shadow(0 0 6px rgba(142, 197, 219, 0.25));
}

.footer-name {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-left: 4px;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.3s;
  letter-spacing: 0.02em;
}

.footer-nav a:hover { color: var(--ice); }

/* --- Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-hero-visual { order: -1; }

  .product-grid { grid-template-columns: 1fr; }

  .stats { flex-wrap: wrap; gap: 24px; }
}

@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .container { padding: 0 20px; }
  .divider { padding: 0 20px; }

  .hero-logo { width: 140px; height: 140px; }
  .hero-title { letter-spacing: 0.2em; }

  .product-hero { padding: 24px; }
  .product-name { font-size: 1.6rem; }

  .footer-row { flex-direction: column; gap: 16px; text-align: center; }
  .footer-left { justify-content: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .scroll-cue { display: none; }
}
