:root {
  --bg: #f0eee6;
  --bg-soft: #e7e2d8;
  --surface: #f8f6ef;
  --surface-strong: #e1dace;
  --ink: #333331;
  --muted: #776f66;
  --line: #c8c0b5;
  --dark: #404040;
  --dark-soft: #5c5954;
  --red: #c00000;
  --red-deep: #980000;
  --clay: #d97757;
  --gold: #ffc000;
  --radius: 18px;
  --radius-small: 12px;
  --shadow: 0 24px 70px rgba(64, 64, 64, 0.12);
  --shadow-soft: 0 14px 40px rgba(64, 64, 64, 0.09);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-display: "Noto Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Noto Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid rgba(193, 187, 178, 0.72);
  background: rgba(248, 246, 239, 0.96);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1336px, calc(100vw - 64px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-link img {
  width: 118px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.nav-link,
.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
  background: rgba(225, 218, 206, 0.68);
}

.account-link {
  margin-left: 6px;
  background: var(--dark);
  color: var(--surface);
  box-shadow: 0 10px 24px rgba(64, 64, 64, 0.14);
}

.account-link:hover {
  transform: translateY(-1px);
  background: #303030;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--dark);
  color: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: currentColor;
}

.page {
  overflow: hidden;
}

.section {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 96px 0;
}

.section-tight {
  padding: 70px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Hero top line — larger, heavier, wider tracking */
.hero-top .eyebrow {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.hero {
  position: relative;
  width: 100%;
  min-height: min(620px, calc(100dvh - 72px));
  border-bottom: 1px solid rgba(193, 187, 178, 0.72);
  background: var(--surface);
  overflow: hidden;
}

/* Faint analytics grid texture, masked to fade toward the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(64, 64, 64, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 64, 64, 0.05) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  -webkit-mask-image: radial-gradient(115% 78% at 50% 0%, #000 32%, transparent 82%);
  mask-image: radial-gradient(115% 78% at 50% 0%, #000 32%, transparent 82%);
}

/* Soft brand glow behind the headline */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(68% 48% at 50% -4%, rgba(192, 0, 0, 0.07), transparent 62%);
}

.hero-layout {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100vw - 64px));
  min-height: inherit;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 54px 0 56px;
}

.hero-top {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  text-align: center;
  animation: rise-in 640ms var(--ease-out) both;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero h1 > span {
  display: block;
  /* keep each line unbroken so the title stays exactly 2 lines on desktop,
     even for the longest rotating word ("Patient Recruitment").
     Use the child combinator so the nested .type-rotate / .type-caret
     spans stay inline rather than inheriting display:block. */
  white-space: nowrap;
}

.hero h1 > span + span {
  margin-top: 0.08em;
  color: var(--dark);
}

.title-accent {
  color: var(--red);
}

.type-rotate {
  color: inherit;
  /* reserve a fixed slot (widest word ~9.55em) and left-align the word so
     "that knows " stays anchored while the typed word/caret change width */
  display: inline-block;
  min-width: 10.2em;
  text-align: left;
  white-space: nowrap;
}

.type-rotate::after {
  content: "";
  display: inline-block;
  width: 0.05em;
  min-width: 2px;
  height: 0.92em;
  margin-left: 0.04em;
  background: currentColor;
  vertical-align: -0.05em;
  animation: type-caret-blink 1s steps(1) infinite;
}

@keyframes type-caret-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .type-rotate::after { animation: none; }
}

.hero-subtitle {
  margin: 22px auto 0;
  max-width: 960px;
  color: var(--dark);
  font-size: clamp(1.03rem, 1.2vw, 1.18rem);
  line-height: 1.58;
  text-wrap: balance;
}

.hero-note {
  margin: 18px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
}

.hero-actions .button {
  min-width: 172px;
}

.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 19px;
  border: 0;
  border-radius: 999px;
  color: var(--surface);
  background: var(--red);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 28px rgba(192, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.button:hover {
  transform: translateY(-1px);
  background: var(--red-deep);
  box-shadow: 0 16px 32px rgba(192, 0, 0, 0.24);
}

.button:active {
  transform: scale(0.98);
}

.button-secondary {
  color: var(--surface);
  background: var(--dark);
  box-shadow: 0 12px 28px rgba(64, 64, 64, 0.16);
}

.button-secondary:hover {
  background: #303030;
  box-shadow: 0 16px 32px rgba(64, 64, 64, 0.19);
}

.button-soft {
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: none;
}

.button-soft:hover {
  color: var(--surface);
  background: var(--dark);
}

.hero-media {
  position: relative;
  z-index: 1;
  width: min(100%, 1200px);
  margin-top: 54px;
  animation: rise-in 820ms var(--ease-out) 120ms both;
}

.hero-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 5px solid #ffffff;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(64, 64, 64, 0.16),
    0 18px 40px -12px rgba(64, 64, 64, 0.30),
    0 48px 90px -32px rgba(64, 64, 64, 0.42);
  animation: float-y 7s ease-in-out infinite;
}

.hero-video-frame.is-playing {
  animation: none;
}

.hero-video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  transition: opacity 260ms var(--ease-out);
}

.hero-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 16px 36px rgba(192, 0, 0, 0.34);
  cursor: pointer;
  transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), opacity 220ms var(--ease-out);
}

.hero-play svg {
  width: 38px;
  height: 38px;
  margin-left: 4px;
}

.hero-play:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: var(--red-deep);
  box-shadow: 0 20px 44px rgba(192, 0, 0, 0.4);
}

.hero-play:active {
  transform: translate(-50%, -50%) scale(0.97);
}

.hero-video-frame.is-playing .hero-poster,
.hero-video-frame.is-playing .hero-play {
  opacity: 0;
  pointer-events: none;
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.trusted-strip {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 4px;
}

.trusted-label {
  margin: 0 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.logo-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.logo-track {
  display: flex;
  width: max-content;
  gap: 10px;
  animation: marquee 36s linear infinite;
}

/* pause the marquee on hover so a logo can be inspected */
.logo-marquee:hover .logo-track {
  animation-play-state: paused;
}

.logo-row {
  display: flex;
  gap: 10px;
}

.logo-item {
  width: 94px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(193, 187, 178, 0.72);
  border-radius: 12px;
  background: rgba(227, 223, 214, 0.75);
}

.logo-item img {
  max-width: 78px;
  max-height: 24px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.04);
  opacity: 0.82;
  transition: filter 220ms var(--ease-out), opacity 220ms var(--ease-out);
}

.logo-item:hover img {
  filter: grayscale(0) contrast(1);
  opacity: 1;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-heading p,
.page-hero p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.58;
}

/* Match the hero headline treatment */
#highlights .section-heading {
  max-width: none;
}

#highlights .section-heading h2 {
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Keep the Platform title to 4 lines max */
#features .section-heading {
  max-width: 820px;
}

#features .section-heading h2 {
  font-size: clamp(2rem, 3.6vw, 3.5rem);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.highlight-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 28px;
  border: 1px solid rgba(193, 187, 178, 0.88);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.highlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 119, 87, 0.55);
  box-shadow: 0 24px 60px rgba(64, 64, 64, 0.13);
}

.highlight-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(217, 119, 87, 0.14);
  color: var(--red);
}

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

.highlight-card h3 {
  margin: 38px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.42rem;
  line-height: 1.12;
}

.highlight-card h3 em {
  font-style: italic;
  font-weight: 700;
}

.highlight-card p {
  margin: 30px 0 0;
  color: var(--muted);
  line-height: 1.52;
  font-size: 0.98rem;
}

/* Use-case carousel */
/* Hero use-case carousel (light theme) */
.hero-media--carousel {
  width: 100%;
  max-width: none;
}

.hero-howto-eyebrow {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.hero-howto {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.carousel {
  position: relative;
  width: min(1320px, calc(100vw - 64px));
  margin: 8px auto 0;
}

.carousel-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 12px 4px 24px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-pane {
  flex: 0 0 auto;
  width: 100%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
}

.carousel-pane-title {
  margin: 0 0 30px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.26rem, 1.98vw, 1.8rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--ink);
}

/* Unified line-icon set (inline SVG, consistent grid + stroke) */
.pane-title-icon {
  width: 1.18em;
  height: 1.18em;
  flex: none;
  vertical-align: -0.2em;
  margin-right: 0.45em;
  color: var(--ink);
}

.carousel-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1240px, calc(100% - 140px));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--surface);
  /* soft, layered drop shadow so the clip appears to float above the page */
  box-shadow:
    0 26px 50px -20px rgba(64, 64, 64, 0.45),
    0 10px 24px -16px rgba(64, 64, 64, 0.32);
}

.carousel-media-label {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.carousel-media--filled {
  background: #ffffff;
  overflow: hidden;
}

.carousel-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--surface);
}

.carousel-arrow {
  position: absolute;
  top: calc(50% + 22px);
  transform: translateY(-50%);
  z-index: 3;
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(193, 187, 178, 0.9);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.carousel-arrow svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.6;
}

.carousel-arrow:hover {
  background: var(--dark);
  color: var(--surface);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.carousel-arrow-prev {
  left: -8px;
}

.carousel-arrow-next {
  right: -8px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(64, 64, 64, 0.22);
  cursor: pointer;
  transition: background-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.carousel-dot.is-active {
  background: var(--red);
  transform: scale(1.25);
}

.feature-stack {
  display: grid;
  gap: 86px;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 52px;
  align-items: center;
}

.feature-row.reverse {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
}

.feature-row.reverse .feature-copy {
  order: 2;
}

/* Give row 4 (Experiment) a wider copy column so its two-line title fits */
@media (min-width: 981px) {
  #features .feature-row:nth-of-type(4) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.feature-copy h3 {
  margin: 0;
  max-width: 620px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Feature #2: title is hard-split at the comma; size it down so each half
   fits the (narrower) copy column on one line across the 2-column range. */
.feature-copy h3.feature-title--split {
  font-size: clamp(1.7rem, 2.4vw, 2.6rem);
  text-wrap: nowrap;
}

.feature-copy p {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.62;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  color: var(--dark);
  line-height: 1.45;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--clay);
}

.visual-panel {
  min-height: 420px;
  border: 1px solid rgba(193, 187, 178, 0.88);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(248, 246, 239, 0.92), rgba(225, 218, 206, 0.9)),
    var(--surface-strong);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
}

.visual-panel.dark {
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 192, 0, 0.18), transparent 25%),
    radial-gradient(circle at 86% 22%, rgba(217, 119, 87, 0.22), transparent 28%),
    var(--dark);
  color: var(--surface);
}

/* Bare media panel (illustration / gif) */
.visual-panel--media {
  min-height: 0;
  border: none;
  background: var(--bg);
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-media {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

/* Clickable image fan */
.visual-panel--fan {
  min-height: 420px;
  border: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.card-fan {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.fan-card {
  position: absolute;
  width: min(76%, 400px);
  aspect-ratio: 3 / 2;
  padding: 0;
  border: 1px solid rgba(193, 187, 178, 0.95);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transform-origin: bottom center;
  box-shadow: 0 8px 22px rgba(64, 64, 64, 0.16);
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out), opacity 320ms var(--ease-out);
}

.fan-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

/* Fanned out from a bottom pivot so each card has a large, clickable area */
.fan-card.is-front {
  transform: rotate(0deg) translateY(-8px) scale(1);
  box-shadow: 0 26px 54px rgba(64, 64, 64, 0.28);
}

.fan-card.is-back-1 {
  transform: rotate(-17deg) translateX(-14px) scale(0.95);
  opacity: 0.98;
}

.fan-card.is-back-2 {
  transform: rotate(17deg) translateX(14px) scale(0.95);
  opacity: 0.98;
}

.fan-card.is-back-1:hover {
  transform: rotate(-12deg) translateX(-14px) scale(0.98);
  box-shadow: 0 18px 40px rgba(64, 64, 64, 0.24);
}

.fan-card.is-back-2:hover {
  transform: rotate(12deg) translateX(14px) scale(0.98);
  box-shadow: 0 18px 40px rgba(64, 64, 64, 0.24);
}

.mock-browser {
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(193, 187, 178, 0.72);
  border-radius: 20px;
  background: rgba(248, 246, 239, 0.9);
  overflow: hidden;
}

.mock-browser.dark {
  border-color: rgba(240, 238, 230, 0.18);
  background: rgba(30, 30, 30, 0.78);
}

.mock-topbar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(193, 187, 178, 0.6);
}

.mock-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--line);
}

.mock-content {
  padding: 22px;
}

.graph {
  position: relative;
  min-height: 300px;
}

.graph-node {
  position: absolute;
  min-width: 120px;
  padding: 12px 13px;
  border: 1px solid rgba(193, 187, 178, 0.85);
  border-radius: 16px;
  background: var(--surface);
  color: var(--dark);
  font-size: 0.82rem;
  box-shadow: 0 12px 32px rgba(64, 64, 64, 0.1);
}

.graph-node strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.graph-node.one { top: 6px; left: 0; }
.graph-node.two { top: 70px; right: 4px; }
.graph-node.three { top: 178px; left: 18px; }
.graph-node.four { bottom: 0; right: 38px; }

.graph-line {
  position: absolute;
  inset: 68px 90px 70px 96px;
  border: 1px solid rgba(217, 119, 87, 0.55);
  border-radius: 999px;
  transform: rotate(-11deg);
}

.sim-panel {
  display: grid;
  gap: 14px;
}

.sim-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 15px;
  border-radius: 15px;
  background: rgba(248, 246, 239, 0.88);
  border: 1px solid rgba(193, 187, 178, 0.68);
}

.sim-bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(193, 187, 178, 0.6);
  overflow: hidden;
}

.sim-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--clay);
}

.quote-band {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 64px;
  border-radius: 32px;
  background: var(--dark);
  color: var(--surface);
  box-shadow: var(--shadow);
}

.quote-brandline {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.quote-brand {
  display: inline-flex;
  align-items: center;
}

.quote-brand img {
  width: 156px;
  height: auto;
  display: block;
  /* logo PNG has uneven internal padding (content center ~40% of height);
     nudge down so the wordmark sits on the same line as the adjacent text */
  transform: translateY(5.5px);
  filter: brightness(0) invert(1);
}

.quote-divider {
  width: 1px;
  height: 30px;
  background: rgba(240, 238, 230, 0.4);
}

.quote-brandline-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--surface);
}

.quote-band p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .quote-band p {
    white-space: normal;
  }
}

.quote-sub {
  display: block;
  margin-top: 22px;
  color: rgba(240, 238, 230, 0.72);
  font-size: 1rem;
  line-height: 1.55;
}

.page-hero {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 92px 0 52px;
  text-align: center;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: start;
}

.copy-panel,
.form-panel,
.pricing-card {
  border: 1px solid rgba(193, 187, 178, 0.88);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.copy-panel {
  padding: 34px;
}

.copy-panel h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.1;
}

.copy-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pricing-card {
  padding: 28px;
}

.pricing-card.featured {
  border-color: rgba(192, 0, 0, 0.32);
  transform: translateY(-14px);
}

.pricing-card h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.price {
  margin: 18px 0 0;
  font-size: 2rem;
  font-weight: 800;
}

.pricing-card p {
  color: var(--muted);
  line-height: 1.5;
}

.pricing-card ul,
.addon-grid {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  padding: 11px 0;
  border-top: 1px solid rgba(193, 187, 178, 0.72);
  color: var(--dark);
}

.addon-panel {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid rgba(193, 187, 178, 0.88);
  border-radius: 24px;
  background: var(--surface-strong);
}

.addon-panel h2 {
  margin: 0;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 24px;
}

.addon-grid li {
  color: var(--dark);
  line-height: 1.42;
}

.form-panel {
  padding: 30px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--dark);
  font-size: 0.88rem;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(193, 187, 178, 0.92);
  border-radius: 13px;
  background: rgba(248, 246, 239, 0.88);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(217, 119, 87, 0.75);
  box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.13);
  background: var(--surface);
}

.site-footer {
  margin-top: 80px;
  padding: 54px 24px 32px;
  background: var(--dark);
  color: var(--surface);
}

.footer-inner {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(140px, 0.35fr));
  gap: 36px;
}

.footer-logo {
  width: 132px;
  filter: brightness(0) invert(1);
}

.footer-copy {
  margin: 18px 0 0;
  max-width: 390px;
  color: rgba(240, 238, 230, 0.74);
  line-height: 1.55;
}

.footer-col h3 {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--gold);
}

.footer-col a,
.footer-col span {
  display: block;
  margin: 10px 0;
  color: rgba(240, 238, 230, 0.75);
  text-decoration: none;
}

.footer-col a {
  width: fit-content;
  transition: color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.footer-col a:hover {
  color: var(--surface);
  transform: translateX(3px);
}

/* ---- Micro-interactions & accessibility ---- */
.nav-link:hover {
  transform: translateY(-1px);
}

/* Clear, branded focus ring for keyboard users (removed for mouse via :focus-visible) */
a:focus-visible,
button:focus-visible,
.button:focus-visible,
[data-fan-card]:focus-visible,
.carousel-arrow:focus-visible,
.carousel-dot:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 8px;
}

.footer-bottom {
  width: min(1160px, calc(100vw - 32px));
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(240, 238, 230, 0.16);
  color: rgba(240, 238, 230, 0.54);
  font-size: 0.86rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(45, 43, 40, 0.44);
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(100%, 620px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid rgba(193, 187, 178, 0.92);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 34px 90px rgba(40, 40, 40, 0.28);
  animation: modal-in 180ms var(--ease-out) both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 26px 8px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.7rem;
}

.modal-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.modal-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--surface-strong);
  cursor: pointer;
}

.modal-body {
  padding: 18px 26px 26px;
}

[data-reveal] {
  transition:
    opacity 820ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 820ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 820ms ease;
}

/* Hidden state only applies once JS marks the page ready, so content is
   never stuck invisible if the script fails to run. */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(46px) scale(0.972);
  filter: blur(3px);
  will-change: opacity, transform, filter;
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Staggered cascade for items revealed together in a grid */
.highlight-card:nth-child(2) { transition-delay: 110ms; }
.highlight-card:nth-child(3) { transition-delay: 220ms; }
.highlight-card:nth-child(4) { transition-delay: 330ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes edge-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.5;
  }
}

@keyframes node-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bar-grow {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 5px)); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

}

@media (max-width: 980px) {
  .feature-row,
  .feature-row.reverse,
  .split-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-layout {
    width: min(100% - 40px, 760px);
    min-height: auto;
    padding: 64px 0 56px;
  }

  .hero h1 > span {
    white-space: normal;
  }

  .type-rotate {
    /* drop the reserved slot on small screens so it can't overflow */
    min-width: 0;
  }

  .hero-media {
    margin-top: 36px;
  }

  .feature-row.reverse .feature-copy {
    order: 0;
  }

  .highlight-grid,
  .pricing-grid,
  .addon-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-card.featured {
    transform: none;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  #highlights .section-heading h2 {
    white-space: normal;
    font-size: clamp(1.7rem, 7vw, 2.1rem);
  }

  .site-header {
    padding: 0;
  }

  .nav-shell {
    width: calc(100vw - 32px);
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(193, 187, 178, 0.88);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link,
  .account-link {
    justify-content: flex-start;
    margin: 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-layout {
    padding: 48px 0 44px;
  }

  .hero h1 {
    font-size: clamp(2rem, 7.6vw, 2.5rem);
    line-height: 1.12;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-media {
    margin-top: 28px;
  }

  .section {
    padding: 66px 0;
  }

  .highlight-grid,
  .pricing-grid,
  .field-grid,
  .footer-inner,
  .addon-grid {
    grid-template-columns: 1fr;
  }

  .visual-panel {
    min-height: 360px;
  }

  .quote-band {
    padding: 34px 24px;
    border-radius: 24px;
  }
}

/* ---- Pricing page ---- */
.page-pricing .page-hero { padding-bottom: 16px; }
.page-pricing .pricing-section { padding-top: 14px; }

.price-from {
  font-size: 0.42em;
  font-weight: 600;
  color: var(--muted);
  vertical-align: super;
  margin-right: 0.85em;
  letter-spacing: 0.02em;
}

.price-per {
  font-size: 0.4em;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.28em;
  letter-spacing: 0.01em;
}

/* Add-ons: match the card background, centered header, bulleted items */
.addon-panel {
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.addon-panel h2 {
  text-align: center;
}

.addon-sub {
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted);
}

.addon-grid li {
  position: relative;
  padding-left: 20px;
}

.addon-grid li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.56em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

/* ---- Feature fan: enlarge hint + lightbox ---- */
.fan-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(32, 32, 30, 0.82);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms var(--ease-out), visibility 220ms var(--ease-out);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 3px solid #fff;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
  transform: scale(0.97);
  transition: transform 240ms var(--ease-out);
}

.lightbox.open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.lightbox-close:hover {
  transform: scale(1.06);
  background: #fff;
}
