/* ============================================================
   Huntley — AI for Insurance
   Type system: Newsreader (display) / Inter (body + UI)
   ============================================================ */

:root {
  /* --- color --- */
  --indigo-deep: #0b0055;   /* hero + demo background */
  --indigo: #170260;        /* FAQ card, footer, strong headings */
  --indigo-soft: #221078;
  --indigo-mid: #4531a8;    /* accents on light surfaces */
  --lavender: #cfc6ff;      /* italic accents on dark surfaces */
  --ink: #1e1950;           /* headings on light */
  --ink-body: #45416b;      /* body text on light */
  --ink-muted: #6f6b92;
  --paper: #f7f5f0;         /* warm page background */
  --cream: #faf8f3;
  --surface: #fffefb;
  --line: rgba(24, 0, 96, .09);
  --green: #3fae68;

  /* --- type --- */
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-hero: clamp(3rem, 5.8vw, 5.5rem);
  --text-h2: clamp(2.5rem, 3.8vw, 3.9rem);
  --text-h2-sm: clamp(2.15rem, 2.7vw, 2.9rem);
  --text-h3: 1.625rem;

  /* --- shape & motion --- */
  --radius-lg: 22px;
  --radius-md: 14px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --shadow-card: 0 2px 6px rgba(22, 12, 90, .035), 0 22px 48px -26px rgba(22, 12, 90, .18);
  --shadow-card-hover: 0 4px 10px rgba(22, 12, 90, .045), 0 30px 56px -26px rgba(22, 12, 90, .24);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }
html.programmatic-scroll { scroll-behavior: auto; }

body {
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-synthesis: none;
  font-size: 17px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

a:focus-visible,
button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

::selection { background: #2a1580; color: #fff; }

.container {
  max-width: 1272px;
  margin: 0 auto;
  padding: 0 48px;
}

/* Keep emphasized heading words in the same unmodified type style. */
h1 em, h2 em {
  font-style: normal;
  font-weight: inherit;
}

/* ============ Scroll reveal (classes added by script.js) ============ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .85s ease,
    transform .85s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.reveal.in { opacity: 1; transform: none; }

.feature-grid > :nth-child(2),
.steps-grid > :nth-child(2) { --reveal-delay: 90ms; }

.steps-grid > :nth-child(3) { --reveal-delay: 180ms; }

/* ============ Liquid glass buttons ============
   .glass-button-wrap > .glass-button > .glass-button-text
   plus a .glass-button-shadow layer underneath.
   Variants: .gb-sm, .gb-icon (sizes) and .gb-dark (for light surfaces). */

.glass-button-wrap {
  position: relative;
  display: inline-block;
  border-radius: 999px;
}

.glass-button {
  all: unset;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  isolation: isolate;
  z-index: 1;
  display: block;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 550;
  color: #ffffff;
  white-space: nowrap;
  background:
    linear-gradient(155deg,
      rgba(255, 255, 255, .30) 0%,
      rgba(255, 255, 255, .10) 36%,
      rgba(255, 255, 255, .03) 62%,
      rgba(255, 255, 255, .20) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .24),
    inset 1.5px 2.5px 0 -1px rgba(255, 255, 255, .6),
    inset -1px -1px 0 0 rgba(255, 255, 255, .3),
    inset 0 -7px 14px -7px rgba(255, 255, 255, .28);
  transition: transform .24s var(--ease-out), box-shadow .24s ease;
}

.glass-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .75);
  outline-offset: 2px;
}

.glass-button-wrap:hover .glass-button {
  transform: scale(1.02);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .38),
    inset 1.5px 2.5px 0 -1px rgba(255, 255, 255, .75),
    inset -1px -1px 0 0 rgba(255, 255, 255, .4),
    inset 0 -7px 14px -7px rgba(255, 255, 255, .4);
}

.glass-button-wrap:active .glass-button { transform: scale(.965); }

.glass-button-text {
  position: relative;
  display: block;
  padding: 13px 27px;
  font-size: 15.5px;
  line-height: 1.2;
  letter-spacing: .005em;
  user-select: none;
  -webkit-user-select: none;
  text-shadow: none;
}

.glass-button-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 58%;
  bottom: -8px;
  border-radius: 999px;
  background: rgba(8, 0, 55, .42);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}

.glass-button-wrap:hover .glass-button-shadow {
  opacity: .8;
  transform: translateY(2px);
}

/* size variants */
.gb-sm .glass-button-text { padding: 9px 18px; font-size: 14px; }

.gb-icon .glass-button-text {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gb-icon .glass-button-text svg { width: 19px; height: 19px; }

.gb-icon .glass-button-shadow { bottom: -7px; filter: blur(9px); }

/* dark variant — for glass sitting on light surfaces */
.gb-dark .glass-button {
  color: var(--indigo);
  background:
    linear-gradient(155deg,
      rgba(255, 255, 255, .65) 0%,
      rgba(255, 255, 255, .28) 40%,
      rgba(237, 236, 248, .22) 62%,
      rgba(255, 255, 255, .55) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(24, 0, 96, .12),
    inset 1.5px 2.5px 0 -1px rgba(255, 255, 255, .95),
    inset -1px -1px 0 0 rgba(255, 255, 255, .6),
    inset 0 -7px 14px -7px rgba(255, 255, 255, .55);
}

.glass-button-wrap.gb-dark:hover .glass-button {
  box-shadow:
    inset 0 0 0 1px rgba(24, 0, 96, .18),
    inset 1.5px 2.5px 0 -1px rgba(255, 255, 255, 1),
    inset -1px -1px 0 0 rgba(255, 255, 255, .7),
    inset 0 -7px 14px -7px rgba(255, 255, 255, .7);
}

.gb-dark .glass-button:focus-visible { outline-color: rgba(24, 0, 96, .5); }

.gb-dark .glass-button-text { text-shadow: none; }

.gb-dark .glass-button-shadow { background: rgba(24, 0, 96, .2); }

/* ============ Badges / eyebrows ============ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

.badge-light {
  background: rgba(247, 245, 251, .9);
  color: var(--indigo);
  border: 1px solid rgba(24, 0, 96, .07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 4px 12px -8px rgba(10, 0, 60, .32);
}

/* ============ Header ============ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 16px 16px 0;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 10px 0 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    inset -1px -1px 0 rgba(255, 255, 255, .1),
    0 10px 30px -12px rgba(8, 0, 55, .35);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.logo {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 430;
  letter-spacing: -.02em;
  color: #ffffff;
  transition: color .35s ease;
}

/* light glass once scrolled past the hero (class set by script.js) */
.site-header.scrolled .header-bar {
  background: rgba(250, 248, 243, .78);
  border-color: rgba(24, 0, 96, .09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    0 12px 32px -14px rgba(8, 0, 55, .22);
}

.site-header.scrolled .logo { color: var(--indigo); }

/* ============ Hero ============ */

.hero {
  position: relative;
  background: var(--indigo-deep);
  overflow: hidden;
  padding: 168px 0 84px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 316px 316px;
  background-position: center top;
  pointer-events: none;
}

/* animated WebGL grid replaces the static lines when it loads */
.hero.has-shader .hero-grid { background-image: none; }

.hero-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-grid::after {
  content: "";
  position: absolute;
  top: 6%;
  right: 8%;
  width: 34%;
  height: 42%;
  background: rgba(255, 255, 255, .015);
  border: 1px solid rgba(255, 255, 255, .05);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-top: 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--text-hero);
  line-height: 1.01;
  letter-spacing: -.026em;
  color: #ffffff;
  max-width: 11.5em;
  text-wrap: balance;
}

.hero h1 em { color: var(--lavender); }

.hero-sub {
  margin-top: 32px;
  font-size: 18.5px;
  line-height: 1.62;
  color: rgba(255, 255, 255, .9);
  max-width: 33em;
}

.hero-cta { margin-top: 44px; }

/* staggered entrance */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.hero .badge   { animation: rise .9s var(--ease-out) .05s both; }
.hero h1       { animation: rise .95s var(--ease-out) .14s both; }
.hero-sub      { animation: rise .95s var(--ease-out) .26s both; }
.hero-cta      { animation: rise .95s var(--ease-out) .38s both; }
.chat-panel    { animation: rise 1.05s var(--ease-out) .52s both; }

/* ============ Chat panel ============ */

.chat-panel {
  margin-top: 64px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: linear-gradient(180deg,
      rgba(237, 236, 248, .05) 0%,
      rgba(237, 236, 248, .32) 26%,
      rgba(226, 223, 242, .74) 56%,
      rgba(214, 210, 234, .93) 100%);
  padding: 80px 44px 62px;
}

.chat-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.chat-card {
  border-radius: 26px;
  background: rgba(255, 255, 255, .34);
  border: 1px solid rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  padding: 28px 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset -1px -1px 0 rgba(255, 255, 255, .18),
    0 24px 50px -24px rgba(8, 0, 55, .4);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: none;
}

.chat-messages::-webkit-scrollbar { display: none; }

.msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: msg-in .32s ease both;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.msg-user { justify-content: flex-end; }
.msg-ai   { justify-content: flex-start; }

.bubble {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: .002em;
  color: #26232e;
  background: rgba(251, 251, 253, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 16px;
  padding: 13px 17px;
  max-width: 63%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 2px 6px rgba(20, 12, 70, .07);
  overflow-wrap: break-word;
}

.msg-user .bubble {
  background: rgba(255, 255, 255, .88);
  border-bottom-right-radius: 6px;
}

.msg-ai .bubble { border-bottom-left-radius: 6px; }

.avatar {
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar-user {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(20, 12, 70, .18);
}

.avatar-user svg { width: 100%; height: 100%; }

.avatar-h {
  width: 31px;
  height: 31px;
  margin-top: 2px;
  border-radius: 8px;
  background: var(--indigo);
  color: #ffffff;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(20, 12, 70, .25);
}

/* typing indicator */
.typing .bubble {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #4d4a58;
}

.typing .spinner { width: 15px; height: 15px; }

.spinner { animation: spin 1s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* chat input */
.chat-input-card {
  position: relative;
  border-radius: 26px;
  background: rgba(253, 253, 255, .78);
  border: 1px solid rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  padding: 16px 18px 18px;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset -1px -1px 0 rgba(255, 255, 255, .4),
    0 18px 44px rgba(22, 12, 90, .12);
  transition: box-shadow .25s ease, border-color .25s ease;
}

.chat-input-card:focus-within {
  border-color: rgba(255, 255, 255, .95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset -1px -1px 0 rgba(255, 255, 255, .4),
    0 18px 44px rgba(22, 12, 90, .16),
    0 0 0 4px rgba(34, 16, 120, .07);
}

.search-pill-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
}

.search-pill-text svg { width: 15px; height: 15px; }

.chat-tools { display: flex; }

.chat-textarea {
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  field-sizing: content;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.5;
  color: #232030;
  margin-top: 16px;
  padding-right: 52px;
  width: 100%;
  max-height: 120px;
}

.chat-textarea::placeholder {
  font-family: var(--sans);
  font-style: normal;
  color: #9b98a8;
}

.send-wrap {
  position: absolute;
  right: 14px;
  bottom: 14px;
}

/* ============ Shared sections ============ */

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  margin-top: 24px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--text-h2);
  line-height: 1.04;
  letter-spacing: -.025em;
  color: var(--indigo);
  text-align: center;
  max-width: 18ch;
  text-wrap: balance;
}

.section-title em { color: var(--indigo-mid); }

.section-sub {
  margin: 26px auto 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.66;
  color: var(--ink-body);
  max-width: 39em;
}

.card {
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(24, 0, 96, .08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), var(--shadow-card);
  transition:
    transform .5s var(--ease-out),
    box-shadow .5s var(--ease-out),
    border-color .5s ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    border-color: rgba(24, 0, 96, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), var(--shadow-card-hover);
  }
}

.card-body { padding: 30px 32px 36px; }

.card-body h3 {
  font-family: var(--serif);
  font-weight: 450;
  font-size: var(--text-h3);
  line-height: 1.26;
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: balance;
}

.card-body p {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-body);
  max-width: 60ch;
}

.media {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: .3;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ============ Platform section ============ */

.platform { padding: 136px 0 48px; background: var(--paper); }

.feature-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 40.5% 1fr;
  gap: 32px;
  align-items: stretch;
}

.feature-card { display: flex; flex-direction: column; }
.feature-card .card-body { flex: 1; }

.feature-card .media { height: 340px; flex: 0 0 auto; }

/* --- dark mock (card 1) --- */

.media-dark {
  background:
    radial-gradient(58% 46% at 50% -6%, rgba(218, 212, 246, .6) 0%, rgba(120, 104, 200, .16) 55%, transparent 100%),
    linear-gradient(180deg, #1d0f60 0%, #17085a 55%, #130551 100%);
}

.mock-window {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: 62%;
  min-width: 250px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 13px 14px 30px;
}

.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 16px;
}

.tdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
}

.mock-urlbar {
  margin-left: 10px;
  width: 118px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
}

.mock-rows {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0 6px;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fcfcfe;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(10, 4, 50, .25);
}

.row-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.mock-drafting {
  position: absolute;
  left: 50%;
  top: calc(56% + 106px);
  transform: translateX(-58%);
  border-radius: 999px;
  padding: 7px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.drafting-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fcfcfe;
  border-radius: 999px;
  padding: 9px 20px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(10, 4, 50, .3);
}

.drafting-pill .spinner { width: 15px; height: 15px; }

/* --- light upload mock (card 2) --- */

.media-light {
  background:
    radial-gradient(90% 90% at 8% 0%, #efedf8 0%, transparent 55%),
    radial-gradient(80% 90% at 96% 12%, #f3f1fa 0%, transparent 50%),
    radial-gradient(120% 130% at 88% 100%, #3d2b96 0%, rgba(103, 88, 178, .55) 38%, transparent 72%),
    radial-gradient(110% 120% at 0% 100%, #6a59b4 0%, rgba(160, 148, 212, .5) 45%, transparent 78%),
    linear-gradient(120deg, #cfc8e8 0%, #e7e4f4 50%, #b3a7dc 100%);
}

.glass-panel {
  position: absolute;
  border-radius: 18px;
  background: rgba(255, 255, 255, .3);
  border: 1px solid rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.gp-back {
  left: 50%;
  top: 50%;
  transform: translate(-76%, -50%);
  width: 46%;
  height: 71%;
  padding: 14px;
  display: flex;
  gap: 5px;
  align-items: flex-start;
}

.gp-back .tdot { background: rgba(255, 255, 255, .9); }

.gp-side {
  left: 50%;
  top: 50%;
  transform: translate(18%, -50%);
  width: 34%;
  height: 64%;
  background: rgba(255, 255, 255, .38);
}

.doc-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 232px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(24, 10, 80, .28);
  padding: 22px 22px 20px;
}

.doc-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--indigo);
  margin-bottom: 16px;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.doc-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.doc-row .check,
.check-space {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.doc-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-lines span {
  height: 5px;
  border-radius: 3px;
  background: var(--indigo-soft);
}

.w-100 { width: 100%; }
.w-92 { width: 92%; }
.w-88 { width: 88%; }
.w-78 { width: 78%; }
.w-64 { width: 64%; }

.doc-btn {
  margin: 20px auto 0;
  display: block;
  width: fit-content;
  border: 1.5px solid #2b1a86;
  border-radius: 999px;
  padding: 3px;
}

.doc-btn-inner {
  display: block;
  background: linear-gradient(180deg, #372492 0%, #1f0e6e 100%);
  background-color: #241275;
  color: #ffffff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  padding: 9px 42px;
}

/* --- analysis card --- */

.analysis-card {
  width: 66%;
  min-width: 640px;
  margin: 32px auto 0;
  padding: 9px;
}

.analysis-card .media {
  height: 340px;
  border-radius: 18px;
}

.analysis-card .card-body { padding: 26px 21px 30px; }

.media-analysis {
  background:
    radial-gradient(70% 110% at 100% 0%, #f4f3fa 0%, rgba(244, 243, 250, 0) 55%),
    radial-gradient(52% 120% at 66% 50%, rgba(214, 209, 236, .9) 0%, rgba(214, 209, 236, 0) 70%),
    radial-gradient(85% 140% at 96% 92%, #493294 0%, rgba(73, 50, 148, 0) 55%),
    linear-gradient(100deg, #1d0d64 0%, #33218272 36%, #d7d3ea 58%, #efedf7 78%, #8f7fc8 100%),
    #1d0d64;
}

.mock-window.aw {
  left: 26%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38%;
  height: 74%;
  padding: 14px;
  background: rgba(255, 255, 255, .22);
}

.ap-right {
  left: auto;
  right: 4.5%;
  top: 50%;
  transform: translateY(-50%);
  width: 26%;
  height: 62%;
  background: rgba(255, 255, 255, .42);
}

.chart-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52%;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 26px 56px rgba(20, 8, 76, .3);
  padding: 15px;
}

.chart-area {
  position: relative;
  height: 208px;
  border-radius: 12px;
  background: #f2f2f5;
  overflow: hidden;
}

.gridline {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 1px;
  background: #dcdce4;
}

.gridline-22 { top: 22%; }
.gridline-48 { top: 48%; }
.gridline-74 { top: 74%; }

.bars {
  position: absolute;
  inset: 0 9% 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 26px;
  padding-top: 22px;
}

.bars span {
  width: clamp(10px, 2.1vw, 27px);
  height: var(--h);
  background: var(--indigo-soft);
  border-radius: 4px 4px 2px 2px;
  transform-origin: bottom;
  transition: transform .6s var(--ease-out);
}

.bar-52 { --h: 52%; }
.bar-70 { --h: 70%; }
.bar-63 { --h: 63%; }
.bar-78 { --h: 78%; }
.bar-32 { --h: 32%; }
.bar-72 { --h: 72%; }

.analysis-card:hover .bars span { transform: scaleY(1.04); }

.analysis-card:hover .bars span:nth-child(2n) { transform: scaleY(.96); }

/* ============ Steps section ============ */

.steps { padding: 96px 0 72px; background: var(--paper); }

.steps-banner {
  background: rgba(250, 248, 243, .8);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 42px 40px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 16px 36px -20px rgba(22, 12, 90, .14);
}

.steps-banner .badge { margin-bottom: 20px; }

.steps-banner h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--text-h2-sm);
  line-height: 1.04;
  letter-spacing: -.025em;
  color: var(--indigo);
}

.steps-banner h2 em { color: var(--indigo-mid); }

.steps-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card .media { height: 260px; }

.step-card .card-body { padding: 26px 26px 32px; }

.step-card h3 { font-size: 1.4rem; }

.step-card p { font-size: 16px; margin-top: 12px; }

/* smoky purple media backgrounds */

.media-smoke::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: .16;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.media-smoke.s1 {
  background:
    radial-gradient(95% 85% at 88% 6%, #2a1875 0%, rgba(42, 24, 117, .5) 40%, transparent 68%),
    radial-gradient(90% 80% at 4% 96%, #31207e 0%, rgba(49, 32, 126, .45) 42%, transparent 70%),
    radial-gradient(60% 55% at 38% 38%, #f0eef9 0%, transparent 70%),
    linear-gradient(135deg, #b6abdc 0%, #e3e0f2 48%, #9d90cf 100%);
}

.media-smoke.s2 {
  background:
    radial-gradient(85% 80% at 10% 8%, #2c1a78 0%, rgba(44, 26, 120, .5) 38%, transparent 66%),
    radial-gradient(95% 85% at 94% 90%, #251371 0%, rgba(37, 19, 113, .45) 40%, transparent 70%),
    radial-gradient(55% 52% at 56% 44%, #efedf8 0%, transparent 72%),
    linear-gradient(150deg, #a99cd6 0%, #ddd9ee 52%, #a396d2 100%);
}

.media-smoke.s3 {
  background:
    radial-gradient(90% 85% at 90% 10%, #2b1976 0%, rgba(43, 25, 118, .5) 40%, transparent 68%),
    radial-gradient(85% 80% at 8% 88%, #2e1c7a 0%, rgba(46, 28, 122, .45) 40%, transparent 68%),
    radial-gradient(58% 55% at 44% 42%, #eeecf8 0%, transparent 70%),
    linear-gradient(120deg, #b0a4d8 0%, #e0dcf0 50%, #9c8fce 100%);
}

/* centerpiece objects float gently on card hover */
.glass-chip,
.shield-tile,
.sphere-wrap {
  transition: transform .55s var(--ease-out);
}

.step-card:hover .glass-chip,
.step-card:hover .shield-tile { transform: translate(-50%, -53%); }

.step-card:hover .sphere-wrap { transform: translate(-50%, -50%) rotate(-4deg); }

.glass-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: rgba(255, 255, 255, .28);
  border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  padding: 10px;
  box-shadow: 0 14px 34px rgba(22, 10, 82, .25);
}

.connect-btn {
  display: block;
  background: linear-gradient(180deg, #3b2a97 0%, #221078 100%);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 9px;
  padding: 12px 42px;
}

.shield-tile {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 118px;
  height: 118px;
  border-radius: 24px;
  background: linear-gradient(160deg, #ffffff 0%, #efecf8 100%);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 20px 44px rgba(22, 10, 82, .3), inset 0 0 0 1px rgba(24, 0, 96, .04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-tile::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 17px;
  border: 1px solid rgba(24, 0, 96, .12);
  pointer-events: none;
}

.shield-tile svg { width: 52px; height: 52px; }

.sphere-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 162px;
  height: 162px;
}

.sphere {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 22px 26px rgba(20, 8, 76, .4));
}

/* ============ FAQ ============ */

.faq { padding: 112px 0 128px; background: var(--cream); }

.faq-card {
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(120, 100, 220, .25) 0%, transparent 55%),
    var(--indigo);
  border-radius: 28px;
  padding: 46px 44px 50px;
  display: grid;
  grid-template-columns: 1fr 1.62fr;
  gap: 56px;
  align-items: start;
}

.faq-intro h2 {
  margin-top: 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 2.6vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -.012em;
  color: #ffffff;
  max-width: 9em;
}

.faq-intro h2 em { color: var(--lavender); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: rgba(250, 248, 243, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 10px 22px -12px rgba(0, 0, 25, .45);
  transition: background .25s ease, transform .35s var(--ease-out);
}

.faq-item:hover { background: rgba(255, 253, 248, .97); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  padding: 22px 24px;
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 550;
  letter-spacing: -.01em;
  color: var(--indigo);
}

.faq-question:focus-visible {
  outline: 2px solid var(--indigo-soft);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}

.faq-question .plus {
  width: 30px;
  height: 30px;
  padding: 6px;
  flex: 0 0 auto;
  color: var(--indigo);
  border: 1px solid rgba(24, 0, 96, .22);
  border-radius: 50%;
  transition: transform .32s var(--ease-out), background .25s ease, color .25s ease;
}

.faq-item.open .plus {
  transform: rotate(45deg);
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .34s var(--ease-out);
}

.faq-item.open .faq-answer { max-height: 400px; }

.faq-answer p {
  padding: 0 26px 24px;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.66;
  color: #3d3866;
  max-width: 60ch;
}

/* ============ Book a demo ============ */

.demo {
  position: relative;
  background: var(--indigo-deep);
  overflow: hidden;
  padding: 120px 0 128px;
}

/* reuses the hero grid texture, minus its decorative rectangle */
.demo .hero-grid::after { display: none; }

.demo-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 72px;
  align-items: start;
}

.demo-intro h2 {
  margin-top: 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--text-h2-sm);
  line-height: 1.06;
  letter-spacing: -.025em;
  color: #ffffff;
  max-width: 12em;
  text-wrap: balance;
}

.demo-intro h2 em { color: var(--lavender); }

.demo-intro p {
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.66;
  color: rgba(255, 255, 255, .84);
  max-width: 44ch;
}

.demo-card {
  background: var(--cream);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 24px;
  padding: 34px 32px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 34px 80px -34px rgba(0, 0, 25, .6);
}

.demo-fields {
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.demo-fields[hidden] { display: none; }

.field { min-width: 0; }

.field label {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 9px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.4;
  color: #232030;
  background: #ffffff;
  border: 1px solid #e2dfd4;
  border-radius: 12px;
  padding: 13px 15px;
  outline: none;
  box-shadow: 0 1px 2px rgba(20, 12, 70, .04);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.field input::placeholder,
.field textarea::placeholder { color: #9b98a8; }

.field input:hover,
.field textarea:hover { border-color: #cfcabb; }

.field input:focus,
.field textarea:focus {
  border-color: var(--indigo-soft);
  box-shadow: 0 0 0 3.5px rgba(34, 16, 120, .12);
}

.field textarea { resize: vertical; min-height: 150px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.demo-submit {
  margin-top: 6px;
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 550;
  letter-spacing: .01em;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(180deg, #3b2a97 0%, #221078 100%);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 13px;
  padding: 16px 20px;
  box-shadow: 0 12px 26px -12px rgba(24, 0, 96, .55);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.demo-submit:hover {
  filter: brightness(1.09);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -12px rgba(24, 0, 96, .65);
}

.demo-submit:active { transform: translateY(0) scale(.985); }

.demo-submit:focus-visible {
  outline: 2px solid var(--indigo-soft);
  outline-offset: 2px;
}

/* success state (shown after submit) */
.demo-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 26px;
  animation: msg-in .32s ease both;
}

.demo-success[hidden] { display: none; }

.success-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3b2a97 0%, #221078 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px -12px rgba(24, 0, 96, .6);
}

.success-icon svg { width: 26px; height: 26px; }

.demo-success h3 {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 440;
  font-size: 27px;
  color: var(--ink);
}

.demo-success p {
  margin-top: 12px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-body);
  max-width: 40ch;
}

/* ============ Footer ============ */

.site-footer {
  background: var(--indigo);
  padding: 76px 0 0;
  overflow: hidden;
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, .24);
}

.footer-row {
  margin-top: 58px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 430;
  letter-spacing: -.02em;
  color: #ffffff;
}

.footer-tagline {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}

.footer-social-wrap { margin-top: 22px; }

.footer-social { color: rgba(255, 255, 255, .85); transition: color .15s ease; }

.footer-social:hover { color: #ffffff; }

/* giant editorial wordmark, cropped by the footer edge */
.footer-watermark {
  margin-top: 64px;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 340;
  font-size: clamp(110px, 20vw, 290px);
  line-height: .74;
  letter-spacing: -.035em;
  text-align: center;
  color: rgba(255, 255, 255, .07);
  white-space: nowrap;
  transform: translateY(12%);
  user-select: none;
  pointer-events: none;
}

/* ============ Responsive ============ */

@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: 1fr; }
  .analysis-card { width: 100%; min-width: 0; }
  .steps-grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .faq-card { grid-template-columns: 1fr; gap: 36px; }
  .faq-intro h2 { max-width: none; }
  .demo-layout { grid-template-columns: 1fr; gap: 48px; }
  .demo-intro p { max-width: 56ch; }
}

@media (max-width: 720px) {
  .container { padding: 0 24px; }
  .hero { padding: 128px 0 80px; }
  .chat-panel { margin-top: 60px; padding: 48px 18px 38px; border-radius: 30px; }
  .chat-inner { gap: 24px; }
  .bubble { max-width: 80%; }
  .platform { padding: 96px 0 32px; }
  .feature-grid { margin-top: 52px; gap: 24px; }
  .feature-card .media { height: 300px; }
  .analysis-card { margin-top: 24px; }
  .analysis-card .media { height: 300px; }
  .chart-card { width: 68%; padding: 12px; }
  .steps { padding: 72px 0 56px; }
  .steps-banner { padding: 36px 30px; }
  .steps-grid { margin-top: 40px; gap: 24px; }
  .step-card .media { height: 240px; }
  .footer-row { flex-direction: column; }
  .card-body { padding: 22px 22px 28px; }
  .faq { padding: 80px 0 96px; }
  .faq-card { padding: 30px 22px 34px; }
  .faq-question { font-size: 16px; padding: 19px 20px; }
  .demo { padding: 88px 0 96px; }
  .demo-card { padding: 28px 22px; border-radius: 20px; }
  .field-row { grid-template-columns: 1fr; }
  .site-footer { padding-top: 72px; }
  .footer-watermark { margin-top: 40px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }

  .site-header { padding: 10px 10px 0; }
  .header-bar { height: 52px; padding: 0 8px 0 16px; border-radius: 14px; }
  .logo { font-size: 24px; }
  .gb-sm .glass-button-text { padding: 8px 14px; font-size: 13px; }

  .hero { padding: 120px 0 68px; }
  .hero h1 { margin-top: 22px; font-size: clamp(2.75rem, 13vw, 3.35rem); }
  .hero-sub { margin-top: 24px; font-size: 16.5px; line-height: 1.6; }
  .hero-cta { margin-top: 32px; }

  .chat-panel { margin-top: 52px; padding: 32px 10px 24px; border-radius: 24px; }
  .chat-card { padding: 18px 12px; border-radius: 18px; }
  .chat-messages { gap: 14px; }
  .bubble { max-width: 84%; padding: 10px 12px; font-size: 13.5px; }
  .avatar-user { width: 30px; height: 30px; border-radius: 8px; }
  .avatar-h { width: 28px; height: 28px; font-size: 15px; }
  .chat-input-card { min-height: 118px; padding: 12px 14px 14px; border-radius: 18px; }
  .chat-textarea { margin-top: 12px; font-size: 16px; }

  .feature-card .media,
  .analysis-card .media { height: 260px; }
  .chart-card { width: 74%; }
  .chart-area { height: 160px; }
  .steps-banner { padding: 28px 22px; }
  .step-card .media { height: 220px; }

  .faq-card { padding: 24px 16px 28px; border-radius: 22px; }
  .faq-list { gap: 12px; }
  .faq-question { padding: 17px 16px; font-size: 15.5px; gap: 14px; }
  .faq-question .plus { width: 27px; height: 27px; }
  .faq-answer p { padding: 0 18px 20px; }

  .field input,
  .field textarea { font-size: 16px; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero .badge,
  .hero h1,
  .hero-sub,
  .hero-cta,
  .chat-panel,
  .msg,
  .demo-success { animation: none; }

  .card,
  .card:hover,
  .glass-chip,
  .shield-tile,
  .sphere-wrap { transform: none; transition: none; }

  .spinner { animation: none; }
}
