/* ============================================================
   Cortex AI LLC — Liquid Glass Design System
   ============================================================ */

:root {
  --bg-0: #05060a;
  --bg-1: #0a0d16;
  --fg: #f5f6fa;
  --fg-dim: rgba(245, 246, 250, 0.72);
  --fg-mute: rgba(245, 246, 250, 0.5);

  --accent-a: #7c5cff;   /* violet  */
  --accent-b: #22d3ee;   /* cyan    */
  --accent-c: #ff6ec7;   /* magenta */
  --accent-d: #ffd56b;   /* amber   */

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-strong: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45),
                  inset 0 1px 0 rgba(255, 255, 255, 0.18);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --max-w: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  /* Static deep-space vignette underlay */
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(124, 92, 255, 0.25), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(34, 211, 238, 0.20), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(255, 110, 199, 0.18), transparent 55%);
  z-index: -2;
  pointer-events: none;
}

body::after {
  /* Subtle grain */
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.35;
  mix-blend-mode: overlay;
  z-index: -1;
  pointer-events: none;
}

/* ---- Animated blobs ---- */
.blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: screen;
  animation: drift 22s var(--ease-smooth) infinite alternate;
}
.blob.a { width: 520px; height: 520px; background: var(--accent-a); top: -120px; left: -120px; }
.blob.b { width: 480px; height: 480px; background: var(--accent-b); top: 20%; right: -140px; animation-duration: 28s; }
.blob.c { width: 560px; height: 560px; background: var(--accent-c); bottom: -160px; left: 30%; animation-duration: 34s; }
.blob.d { width: 360px; height: 360px; background: var(--accent-d); top: 55%; left: 10%; animation-duration: 40s; opacity: 0.35; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 40px) scale(0.96); }
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--fg-dim); }

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

.gradient-text {
  background: linear-gradient(120deg, #fff 0%, #dcd6ff 35%, #a0ecff 70%, #ffc4e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding: 6px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-b);
  box-shadow: 0 0 10px var(--accent-b);
}
.eyebrow.amber .dot { background: var(--accent-d); box-shadow: 0 0 10px var(--accent-d); }

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

section {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 1120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(10, 13, 22, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--glass-shadow);
}

.nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav .brand svg { width: 26px; height: 26px; }

.nav .links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav .links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--fg-dim);
  transition: color 0.2s, background 0.2s;
}
.nav .links a:hover { color: var(--fg); background: var(--glass-bg); }

.nav .cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #fff;
  font-weight: 500;
  font-size: 0.92rem;
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.35);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring);
}
.nav .cta:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(124, 92, 255, 0.5); }

@media (max-width: 720px) {
  .nav .links { display: none; }
}

/* ---- Hero ---- */
.hero {
  padding-top: clamp(140px, 18vw, 220px);
  padding-bottom: clamp(60px, 8vw, 100px);
  text-align: center;
}
.hero h1 { max-width: 14ch; margin: 18px auto 20px; }
.hero p.lead {
  max-width: 620px;
  margin: 0 auto 36px;
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  color: var(--fg-dim);
}

.hero-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  color: var(--fg);
  transition: transform 0.25s var(--ease-spring),
              border-color 0.25s, background 0.25s;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-strong);
  background: var(--glass-bg-strong);
}
.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.4);
}
.btn.primary:hover { box-shadow: 0 14px 38px rgba(124, 92, 255, 0.55); }

/* ---- Glass card ---- */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.glass::before {
  /* top-light rim */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 30%);
  mix-blend-mode: overlay;
}
.glass::after {
  /* liquid highlight */
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.35), transparent 60%);
  transform: rotate(-6deg);
  filter: blur(30px);
  opacity: 0.35;
  pointer-events: none;
}

/* ---- Products grid ---- */
.products {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.product-card {
  grid-column: span 6;
  padding: 32px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.5s var(--ease-spring), border-color 0.3s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-strong);
}
.product-card .tag {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 5px 12px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #9cecff;
}
.product-card .tag.soon {
  background: rgba(255, 213, 107, 0.12);
  border-color: rgba(255, 213, 107, 0.35);
  color: #ffe6a3;
}
.product-card .tag.dev {
  background: rgba(255, 110, 199, 0.14);
  border-color: rgba(255, 110, 199, 0.35);
  color: #ffc4e8;
}

.product-card .icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}
.product-card h3 { font-size: 1.55rem; }
.product-card p  { margin: 0 0 20px; }

.product-card .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--fg);
  opacity: 0.85;
  transition: gap 0.25s var(--ease-spring), opacity 0.2s;
}
.product-card:hover .more { gap: 10px; opacity: 1; }

@media (max-width: 820px) {
  .product-card { grid-column: span 12; min-height: unset; }
}

/* ---- Feature / capability row ---- */
.capabilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.capability {
  padding: 26px;
}
.capability .ico {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,0.35), rgba(34,211,238,0.25));
  border: 1px solid var(--glass-border);
  margin-bottom: 16px;
}
.capability h4 { font-size: 1.05rem; margin-bottom: 6px; }
.capability p  { font-size: 0.95rem; margin: 0; }

@media (max-width: 820px) {
  .capabilities { grid-template-columns: 1fr; }
}

/* ---- About / numbers ---- */
.about {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat {
  padding: 22px;
  text-align: left;
}
.stat .num {
  font-size: 2rem;
  font-weight: 600;
  background: linear-gradient(135deg, #fff, #a0ecff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label { color: var(--fg-mute); font-size: 0.88rem; }

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
}

/* ---- Contact ---- */
.contact-card {
  padding: 48px;
  text-align: center;
}
.contact-card h2 { margin-bottom: 12px; }
.contact-card p  { max-width: 520px; margin: 0 auto 28px; }

/* ---- Footer ---- */
footer {
  padding: 40px 0 48px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 40px;
}
footer .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
footer .copy { color: var(--fg-mute); font-size: 0.9rem; }
footer .brand { display: inline-flex; align-items: center; gap: 10px; }
footer .brand svg { width: 22px; height: 22px; }
footer nav { display: flex; gap: 18px; }
footer nav a { color: var(--fg-dim); font-size: 0.9rem; }
footer nav a:hover { color: var(--fg); }

/* ---- Product hero (detail pages) ---- */
.product-hero {
  padding-top: clamp(140px, 18vw, 220px);
  text-align: center;
}
.product-hero .emoji {
  font-size: 3rem;
  display: inline-block;
  padding: 18px;
  border-radius: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  margin-bottom: 22px;
  line-height: 0;
}

.app-icon {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.product-card .card-icon {
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.product-card .card-icon img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: block;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.product-hero h1 { max-width: 16ch; margin: 0 auto 18px; }
.product-hero p.lead { max-width: 620px; margin: 0 auto 30px; color: var(--fg-dim); font-size: 1.12rem; }

/* ---- Legal (privacy / terms) pages ---- */
.legal {
  padding: clamp(32px, 5vw, 56px);
  max-width: 860px;
  margin: 0 auto;
}
.legal h2 {
  font-size: 1.35rem;
  margin-top: 2em;
  margin-bottom: 0.6em;
  letter-spacing: -0.015em;
}
.legal h2:first-of-type { margin-top: 0.4em; }
.legal h3 {
  font-size: 1.05rem;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  color: var(--fg);
}
.legal p, .legal li {
  color: var(--fg-dim);
  font-size: 1rem;
  line-height: 1.7;
}
.legal p { margin: 0 0 1em; }
.legal ul {
  margin: 0 0 1.2em;
  padding-left: 1.25em;
}
.legal li { margin-bottom: 0.45em; }
.legal a {
  color: #a0ecff;
  border-bottom: 1px solid rgba(160, 236, 255, 0.3);
  transition: color 0.2s, border-color 0.2s;
}
.legal a:hover { color: #fff; border-color: #fff; }
.legal strong { color: var(--fg); }

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-smooth), transform 0.9s var(--ease-spring);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Accessibility ---- */
:focus-visible {
  outline: 2px solid var(--accent-b);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
