/* Cognifity — design system
 * Colors: Deep Navy #0B1730, Signal Cyan #00C2FF, Slate #6B7B8C, Mist #F5F7FA
 * Type: Inter (variable) + JetBrains Mono
 */

:root {
  --navy: #0B1730;
  --navy-2: #0F1E3F;
  --navy-3: #142a55;
  --cyan: #00C2FF;
  --cyan-soft: rgba(0, 194, 255, 0.12);
  --slate: #6B7B8C;
  --slate-2: #94a0ae;
  --mist: #F5F7FA;
  --mist-2: #EAEFF5;
  --line: #E2E8F0;
  --line-dark: rgba(255, 255, 255, 0.08);
  --green: #22C55E;
  --amber: #F59E0B;
  --red: #EF4444;
  --ink: #0B1730;
  --ink-2: #2F3B52;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(11, 23, 48, 0.04), 0 1px 3px rgba(11, 23, 48, 0.06);
  --shadow: 0 4px 14px rgba(11, 23, 48, 0.06), 0 1px 3px rgba(11, 23, 48, 0.04);
  --shadow-lg: 0 24px 60px rgba(11, 23, 48, 0.12);

  --max: 1180px;
  --pad: 24px;

  --t-fast: 120ms ease;
  --t-med: 240ms cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Type scale */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(40px, 5.5vw, 72px); line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -0.028em; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.3; }
h4 { font-size: 16px; line-height: 1.4; }
p { margin: 0 0 1em; }
a { color: var(--cyan); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: #66d9ff; }
code, pre { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 194, 255, 0.18);
}

/* Layout */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }
.section--dark {
  background: var(--navy);
  color: var(--mist);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: var(--slate-2); }
.section--mist { background: var(--mist); }

.grid { display: grid; gap: 24px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
}

.lede { font-size: 19px; line-height: 1.55; color: var(--slate); max-width: 620px; }
.section--dark .lede { color: var(--slate-2); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 23, 48, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
}
.nav__logo svg { display: block; }
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}
.nav__links a {
  color: var(--slate-2);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav__links a:hover { color: #fff; }
.nav__cta {
  background: var(--cyan);
  color: var(--navy) !important;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav__cta:hover { background: #2dd2ff; color: var(--navy) !important; }

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__cta.nav__cta--mobile { display: inline-flex !important; margin-left: auto; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: none;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--cyan);
  color: var(--navy);
}
.btn--primary:hover { background: #2dd2ff; color: var(--navy); box-shadow: 0 8px 24px rgba(0, 194, 255, 0.3); }
.btn--ghost {
  background: transparent;
  color: var(--mist);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.btn--dark {
  background: var(--navy);
  color: #fff;
}
.btn--dark:hover { background: var(--navy-2); color: #fff; }
.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn--outline:hover { border-color: var(--navy); }

.btn .arrow {
  transition: transform var(--t-fast);
}
.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 80px;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  /* faint grid backdrop */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  /* signal glow */
  content: '';
  position: absolute;
  width: 720px;
  height: 720px;
  right: -180px;
  top: -240px;
  background: radial-gradient(circle, rgba(0, 194, 255, 0.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero h1 {
  color: #fff;
  max-width: 900px;
  margin-bottom: 24px;
}
.hero__sub {
  font-size: 20px;
  line-height: 1.55;
  color: var(--slate-2);
  max-width: 620px;
  margin-bottom: 36px;
}
.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero__small {
  margin-top: 28px;
  font-size: 13.5px;
  color: var(--slate-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero__small .pulse { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-fast);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #cdd6e0;
}
.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cyan-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--cyan);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--slate); margin-bottom: 0; }

/* Product hero card (used on home) */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  transition: transform var(--t-med), box-shadow var(--t-med);
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--cyan-soft), transparent 50%);
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
}
.product-card:hover::before { opacity: 1; }
.product-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.product-card__logo { display: flex; align-items: center; gap: 12px; }
.product-card__logo svg { display: block; }
.product-card__logo .name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--navy);
}
.product-card__badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
}
.product-card__badge--preview {
  background: rgba(245, 158, 11, 0.12);
  color: #b46905;
}
.product-card__tag {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-bottom: 10px;
}
.product-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--navy);
}
.product-card p { color: var(--slate); margin-bottom: 24px; font-size: 15.5px; }
.product-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 10px;
}
.product-card__features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--ink-2);
}
.product-card__features li::before {
  content: '';
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-top: 8px;
}
.product-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
}
.product-card__cta .arrow { transition: transform var(--t-fast); }
.product-card:hover .product-card__cta .arrow { transform: translateX(3px); }

/* Pillars (Why Cognifity) */
.pillar {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-dark);
}
.pillar__num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.pillar h3 { color: #fff; font-size: 19px; margin-bottom: 10px; }
.pillar p { color: var(--slate-2); font-size: 14.5px; margin-bottom: 0; line-height: 1.55; }

/* Use case */
.usecase {
  padding: 32px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.usecase__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.usecase h3 { font-size: 19px; margin-bottom: 12px; }
.usecase p { color: var(--slate); font-size: 14.5px; margin-bottom: 0; }
.usecase__metric {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.usecase__metric strong { color: var(--navy); }

/* Code blocks */
.code-block {
  background: #0a1530;
  color: #d3e0f5;
  padding: 24px 28px;
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.code-block .c-comment { color: #6b7b8c; }
.code-block .c-keyword { color: #00C2FF; }
.code-block .c-string { color: #a7e3a7; }
.code-block .c-func { color: #f5d273; }
.code-block .c-num { color: #ff9d9d; }

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 36px 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.stat__num {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
  font-feature-settings: 'tnum';
}
.stat__num .accent { color: var(--cyan); }
.stat__label {
  font-size: 13px;
  color: var(--slate-2);
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Founder strip */
.founder {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 36px;
  background: var(--mist);
  border-radius: var(--radius-lg);
}
.founder__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--cyan));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.founder p { color: var(--ink-2); margin-bottom: 8px; font-size: 16px; }
.founder p:last-child { margin-bottom: 0; font-size: 14px; color: var(--slate); }
@media (max-width: 720px) {
  .founder { flex-direction: column; align-items: flex-start; padding: 24px; }
}

/* Footer */
.footer {
  background: var(--navy);
  color: var(--slate-2);
  padding: 64px 0 32px;
}
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-dark);
}
@media (max-width: 880px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
}
.footer__brand p { color: var(--slate-2); font-size: 14.5px; max-width: 360px; margin-top: 16px; }
.footer__col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; font-weight: 600; }
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer__col a { color: var(--slate-2); font-size: 14.5px; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  gap: 16px;
  font-size: 13px;
  color: var(--slate);
  flex-wrap: wrap;
}

/* Contact form */
.form {
  display: grid;
  gap: 20px;
}
.form__row { display: grid; gap: 8px; }
.form__row label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.005em;
}
.form__row .hint { font-size: 12.5px; color: var(--slate); font-weight: 400; }
.form input, .form select, .form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 194, 255, 0.15);
}
.form textarea { min-height: 140px; resize: vertical; }
.form__row--inline { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .form__row--inline { grid-template-columns: 1fr; } }
.form__submit { margin-top: 6px; justify-self: start; }
.form__status {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  display: none;
}
.form__status--ok { display: block; background: rgba(34, 197, 94, 0.1); color: #166534; border: 1px solid rgba(34, 197, 94, 0.3); }
.form__status--err { display: block; background: rgba(239, 68, 68, 0.1); color: #991b1b; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Product-page hero */
.product-hero { padding: 88px 0 64px; background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.product-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% -20%, rgba(0, 194, 255, 0.18), transparent 55%);
  pointer-events: none;
}
.product-hero__head { display: flex; gap: 20px; align-items: center; margin-bottom: 28px; position: relative; z-index: 1; }
.product-hero__head .name { font-size: 38px; font-weight: 700; color: #fff; letter-spacing: -0.03em; }
.product-hero__head .badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 194, 255, 0.15);
  color: var(--cyan);
  text-transform: uppercase;
}
.product-hero h1 { color: #fff; max-width: 880px; font-size: clamp(34px, 4.4vw, 56px); }
.product-hero .lede { color: var(--slate-2); font-size: 18px; }

/* Feature list (used on product pages) */
.feature-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: none; }
.feature-row__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cyan-soft);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feature-row h3 { font-size: 18px; margin-bottom: 4px; }
.feature-row p { color: var(--slate); margin-bottom: 0; font-size: 14.5px; }

/* Validation table */
.vtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.vtable th, .vtable td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.vtable th { color: var(--navy); font-weight: 600; background: var(--mist); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.vtable td { color: var(--ink-2); }
.vtable tr:last-child td { border-bottom: none; }

/* Helpers */
.center { text-align: center; }
.muted { color: var(--slate); }
.small { font-size: 13.5px; }
.spacer-l { height: 56px; }
.spacer-m { height: 32px; }

.hr-soft {
  border: none;
  border-top: 1px solid var(--line);
  margin: 64px 0;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
