/* CognitixERP product site — aligned with cognitivebd.com (navy + brand blue/red) */

:root {
  --navy-deep: #060d18;
  --navy: #0b1526;
  --navy-card: rgba(15, 28, 48, 0.72);
  --blue: #3e5896;
  --blue-light: #6b87c4;
  --blue-deep: #243868;
  --red: #e11d27;
  --red-soft: #ff6b73;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.16);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --shell: min(1140px, calc(100% - 2.5rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--navy-deep);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--text);
  color: var(--navy-deep);
  padding: 0.6rem 1rem;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* Ambient background like cognitivebd */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.brand-noise {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.brand-dots {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
}

.brand-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(62, 88, 150, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 35% at 10% 30%, rgba(225, 29, 39, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(62, 88, 150, 0.05), transparent 35%, rgba(225, 29, 39, 0.04));
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
  backdrop-filter: blur(16px);
  background: rgba(6, 13, 24, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(6, 13, 24, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
  overflow: visible;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-mark img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.brand-erp {
  color: var(--red);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a,
.nav-dropdown-toggle {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible,
.nav-dropdown.is-open .nav-dropdown-toggle {
  color: var(--text);
}

.nav-dropdown {
  position: relative;
  z-index: 70;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.nav-dropdown-toggle svg {
  transition: transform 0.2s var(--ease);
}

.nav-dropdown.is-open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0;
  min-width: 16rem;
  max-height: min(70vh, 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 18, 32, 0.98);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 80;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.nav-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: grid;
  gap: 0.15rem;
}

.nav-dropdown-menu.is-fixed {
  position: fixed;
  left: auto;
  top: auto;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  color: var(--text) !important;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600 !important;
  border: 1px solid rgba(107, 135, 196, 0.35);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  color: var(--text) !important;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 0.35rem auto;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Hero */
.hero {
  min-height: min(92vh, 820px);
  display: flex;
  align-items: center;
  padding-block: clamp(5rem, 12vh, 7rem) clamp(3rem, 7vh, 4.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-light);
}

.hero-brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.2vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-brand::after {
  content: "";
  display: block;
  width: 4rem;
  height: 3px;
  margin-top: 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--blue-light));
  transform-origin: left;
  animation: rule-in 0.9s var(--ease) 0.3s both;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 20ch;
  color: rgba(248, 250, 252, 0.95);
}

.hero-lede {
  margin: 0 0 1.75rem;
  max-width: 40ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-copy,
.hero-visual {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.85s var(--ease) forwards;
}

.hero-copy {
  animation-delay: 0.05s;
}

.hero-visual {
  animation-delay: 0.18s;
}

.hero-logo-frame {
  position: relative;
  padding: 1.75rem;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(62, 88, 150, 0.18), rgba(15, 28, 48, 0.55));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(225, 29, 39, 0.05) inset;
}

.hero-logo-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(225, 29, 39, 0.25), transparent 40%, rgba(62, 88, 150, 0.25));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 1px;
}

.hero-logo {
  width: min(100%, 480px);
  margin-inline: auto;
  animation: logo-float 7s ease-in-out infinite;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--red);
  color: var(--text);
  border: 1px solid transparent;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #c41720;
}

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: rgba(248, 250, 252, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

/* Capability marquee */
.capability-strip {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(11, 21, 38, 0.55);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.capability-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  padding: 1rem 0;
  animation: marquee 38s linear infinite;
}

.capability-track span {
  flex: none;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Sections */
.section {
  padding-block: clamp(4.25rem, 9vw, 6.25rem);
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-soft);
}

.section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.3vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.section-lede {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.intro-grid p {
  margin: 0;
  color: var(--text-muted);
  padding-top: 0.35rem;
}

.inline-link {
  color: var(--blue-light);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.inline-link:hover {
  color: var(--text);
}

/* Module cards — product catalog style like cognitivebd */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.module-card,
.platform-card {
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  background: var(--navy-card);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), border-color 0.2s ease, background 0.2s ease;
}

.module-card.is-visible,
.platform-card.is-visible {
  opacity: 1;
  transform: none;
}

.module-card:hover,
.platform-card:hover {
  border-color: rgba(107, 135, 196, 0.4);
  background: rgba(20, 36, 62, 0.85);
}

.module-index,
.platform-num {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--red-soft);
}

.module-card h3,
.platform-card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.module-card p,
.platform-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

/* Demo login — first section below hero */
.demo-login {
  padding-block: clamp(3rem, 7vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(62, 88, 150, 0.14), transparent 55%),
    rgba(8, 15, 28, 0.55);
}

.demo-login-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
  max-width: none;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.demo-login-head .section-lede {
  max-width: 40rem;
}

.demo-cred-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.demo-cred-card {
  padding: 1.25rem 1.15rem;
  border-radius: var(--radius);
  background: var(--navy-card);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), border-color 0.2s ease;
}

.demo-cred-card.is-visible {
  opacity: 1;
  transform: none;
}

.demo-cred-card:hover {
  border-color: rgba(107, 135, 196, 0.45);
}

.demo-role {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 39, 0.35);
  background: rgba(225, 29, 39, 0.12);
  color: var(--red-soft);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-cred-card dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.demo-cred-card dl > div {
  display: grid;
  gap: 0.25rem;
}

.demo-cred-card dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.demo-cred-card dd {
  margin: 0;
}

.demo-cred-card code {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  word-break: break-all;
}

.demo-note {
  margin: 1.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 48rem;
}

/* Stack pills */
.stack-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.stack-pills li {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
}

/* CTA */
.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 5vw, 3.25rem);
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 80% at 90% 20%, rgba(225, 29, 39, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(62, 88, 150, 0.28), transparent 50%),
    rgba(12, 22, 40, 0.9);
}

.cta-panel h2 {
  max-width: 18ch;
  margin-bottom: 0.85rem;
}

.cta-panel p {
  margin: 0 0 1.5rem;
  max-width: 44ch;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 1.75rem;
  background: rgba(4, 9, 16, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  margin: 0.85rem 0 0.65rem;
  color: var(--text-muted);
  max-width: 28ch;
  font-size: 0.95rem;
}

.site-footer h4 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.site-footer li a {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.site-footer li a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-bottom p {
  margin: 0;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rule-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-copy,
  .hero-visual,
  .hero-brand::after,
  .hero-logo,
  .capability-track,
  .module-card,
  .platform-card {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-grid,
  .demo-cred-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --shell: min(1140px, calc(100% - 1.4rem));
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.2rem 1.2rem;
    background: rgba(6, 13, 24, 0.98);
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - 4.25rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 60;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav > a,
  .nav-dropdown {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    translate: none;
    left: auto;
    top: auto;
    min-width: 0;
    max-height: min(50vh, 16rem);
    margin-top: 0.55rem;
    box-shadow: none;
  }

  .nav-dropdown-menu.is-fixed {
    position: static;
    width: auto !important;
    max-width: none !important;
  }

  .nav-dropdown-menu a {
    white-space: normal;
  }

  .nav-cta {
    margin-top: 0.55rem;
    text-align: center;
    border-bottom: 0 !important;
  }

  .hero {
    min-height: auto;
  }

  .module-grid,
  .platform-grid,
  .demo-cred-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .demo-login-head {
    align-items: flex-start;
  }
}
