/*
 * Design Brief: Quantelis ← inspired by https://quantelisai.com/
 *
 * Structure: nav-sticky → hero-split-chat → four-step-process → feature-rows
 *            → use-case-grid → tech-differentiation → cta-band → footer-minimal
 *
 * Reference DNA: Clean white enterprise SaaS, dark blue headings (#1a3a5c),
 * teal accent in logo, subtle hex patterns, product-demo hero, horizontal step cards,
 * bold-title feature lists, FAQ-style accordion feel — NOT dark gradient orbs.
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  /* Tokens derived from quantelisai.com */
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fc;
  --color-bg-hex: #eef3f9;
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;
  --color-text: #1a3a5c;
  --color-text-muted: #5a7089;
  --color-text-light: #8a9bb0;
  --color-accent: #1e6bb8;
  --color-accent-teal: #0d9ea8;
  --color-accent-hover: #155a94;
  --color-accent-soft: #e8f2fb;
  --color-cta-band: #1a4a7c;
  --color-border: #dde4ed;
  --color-border-light: #edf1f7;

  --font-display: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --space-section: clamp(4rem, 8vw, 6.5rem);
  --space-grid: clamp(2rem, 4vw, 4rem);
  --container-max: 1200px;
  --container-narrow: 900px;

  --shadow-sm: 0 1px 3px rgba(26, 58, 92, 0.06);
  --shadow-md: 0 4px 20px rgba(26, 58, 92, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 58, 92, 0.1);

  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-reveal: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

  --header-height: 72px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: min(var(--container-max), 100% - 2.5rem);
  margin-inline: auto;
}

.container--narrow {
  width: min(var(--container-narrow), 100% - 2.5rem);
  margin-inline: auto;
}

/* ── Typography ── */

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-teal);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.section-title--accent {
  color: var(--color-accent);
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--color-text-muted);
  max-width: 62ch;
  line-height: 1.7;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base), color var(--transition-base),
              border-color var(--transition-base), transform var(--transition-base),
              box-shadow var(--transition-base);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--color-bg-alt);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-accent-soft);
}

.btn--white {
  background: #fff;
  color: var(--color-cta-band);
}

.btn--white:hover {
  background: var(--color-accent-soft);
  transform: translateY(-1px);
}

.btn--outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ── Header / nav-horizontal-sticky ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--color-text);
  flex-shrink: 0;
}

.site-logo:hover {
  color: var(--color-text);
}

.site-logo__mark {
  width: 42px;
  height: 42px;
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-logo__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.site-logo__tagline {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.site-nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.site-nav__links a:hover,
.site-nav__links a.is-active {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero: hero-split-with-chat-visual ── */

.hero {
  position: relative;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: var(--space-section);
  background: var(--color-bg);
  overflow: hidden;
}

.hero__hex-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
}

.hero__hex-bg svg {
  position: absolute;
  width: 280px;
  height: auto;
}

.hero__hex-bg svg:first-child {
  top: 10%;
  left: -40px;
}

.hero__hex-bg svg:last-child {
  bottom: 5%;
  right: -40px;
}

.hero--split .hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-grid);
  align-items: center;
  min-height: min(85vh, 820px);
}

.hero__title {
  font-size: clamp(2rem, 4.5vw, 3.125rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 48ch;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.hero__attribution {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

/* Chat mockup visual */
.hero__visual {
  position: relative;
}

.chat-mockup {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.chat-mockup__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.chat-mockup__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.chat-mockup__dot:nth-child(1) { background: #ff5f57; }
.chat-mockup__dot:nth-child(2) { background: #febc2e; }
.chat-mockup__dot:nth-child(3) { background: #28c840; }

.chat-mockup__title {
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.chat-mockup__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 320px;
}

.chat-bubble {
  max-width: 88%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.55;
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--color-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble--ai {
  align-self: flex-start;
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
  border-bottom-left-radius: 4px;
}

.chat-bubble--ai strong {
  color: var(--color-accent);
}

.chat-mockup__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.25rem 1.25rem;
}

.chat-suggestion {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(30, 107, 184, 0.15);
}

.chat-mockup__input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.chat-mockup__input span {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.chat-mockup__send {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-mockup__send svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

/* ── Platform Overview: four-step-horizontal-cards ── */

.section {
  padding-block: var(--space-section);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section__header .section-subtitle {
  margin-inline: auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 0.875rem;
}

.step-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.step-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.step-card__icon {
  width: 100%;
  height: 80px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-light);
}

.step-card__icon svg {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
}

/* ── Capabilities: feature-rows-bold-title ── */

.capabilities-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-grid);
  align-items: start;
}

.capabilities-split__intro {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feature-item {
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: padding-left var(--transition-base);
}

.feature-item:first-child {
  border-top: 1px solid var(--color-border-light);
}

.feature-item:hover {
  padding-left: 0.5rem;
}

.feature-item__title {
  font-weight: 700;
  color: var(--color-text);
  font-size: 1rem;
}

.feature-item__desc {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-top: 0.25rem;
  line-height: 1.6;
}

/* ── Solutions: use-case-grid-2col ── */

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.solution-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.solution-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.solution-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.solution-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
}

.solution-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.625rem;
}

.solution-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

/* ── Technology: tech-split-diagram ── */

.tech-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-grid);
  align-items: center;
}

.tech-diagram {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.tech-diagram__layers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tech-layer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
}

.tech-layer--user {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border: 1px solid rgba(30, 107, 184, 0.2);
}

.tech-layer--platform {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.tech-layer--ai {
  background: linear-gradient(135deg, #0d9ea8 0%, #1e6bb8 100%);
  color: #fff;
}

.tech-layer__arrow {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.25rem;
  line-height: 1;
}

.tech-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.tech-point {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.tech-point__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
}

.tech-point__icon svg {
  width: 18px;
  height: 18px;
}

.tech-point__title {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.2rem;
}

.tech-point__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ── CTA: cta-band-blue ── */

.cta-band {
  background: var(--color-cta-band);
  color: #fff;
  padding-block: clamp(3.5rem, 7vw, 5rem);
  position: relative;
  overflow: hidden;
}

.cta-band__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.cta-band__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.cta-band__subtitle {
  font-size: 1.0625rem;
  opacity: 0.85;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
}

/* ── Footer: footer-minimal-links ── */

.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
  padding-block: 2.5rem 2rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.site-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-footer__brand p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  max-width: 36ch;
  line-height: 1.6;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  list-style: none;
}

.site-footer__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-accent);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-light);
}

.site-footer__copy {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.site-footer__email a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ── Modals ── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 92, 0.45);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: background var(--transition-base), color var(--transition-base);
}

.modal__close:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.modal__panel h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal__panel p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 0.875rem;
}

.modal__panel ul {
  margin: 0.75rem 0 1rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.modal__panel .btn {
  margin-top: 0.5rem;
}

/* ── Policy pages ── */

.page-content {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: var(--space-section);
}

.page-content h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-content .last-updated {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
}

.page-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.page-content p,
.page-content li {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.page-content ul {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}
