:root {
  --background: #f5f8f8;
  --foreground: #1a2b2b;
  --primary: #2a6b6b;
  --primary-deep: #1a4545;
  --primary-hover: #235959;
  --primary-gradient: linear-gradient(
    165deg,
    var(--primary) 0%,
    var(--primary-deep) 100%
  );
  --muted: #e8efef;
  --muted-foreground: #5a6e6e;
  --card: #ffffff;
  --shadow: rgba(26, 43, 43, 0.28);
  --surface-deep: #1e4a4a;
  --surface-deeper: #123535;
  --surface-deep-gradient: linear-gradient(
    160deg,
    var(--surface-deep) 0%,
    var(--surface-deeper) 100%
  );
  --font: "Geist", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --page-wash: radial-gradient(
      120% 80% at 70% 8%,
      rgba(122, 191, 191, 0.38),
      transparent 55%
    ),
    radial-gradient(
      90% 60% at 12% 88%,
      rgba(42, 107, 107, 0.14),
      transparent 52%
    ),
    var(--background);
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local("Geist"), local("Geist Variable");
}

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

html {
  scroll-behavior: smooth;
  /* Fan cards sit far off-axis; clip page width so they never create sideways scroll. */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--foreground);
  background: transparent;
  line-height: 1.55;
  overflow-x: clip;
  max-width: 100%;
}

/* Fixed atmosphere — does not scroll with content */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--page-wash);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--background) 42%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  border-bottom: 1px solid color-mix(in srgb, var(--foreground) 6%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-decoration: none;
}

.brand-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4rem;
  flex-shrink: 0;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

.nav a:hover,
.nav-source {
  color: var(--foreground);
}

.hero {
  background: transparent;
  padding: clamp(2rem, 5vw, 3.5rem) 0 3rem;
  text-align: center;
  /* Clip only the sideways bleed of the fan; keep full viewport width usable. */
  overflow-x: clip;
  max-width: 100%;
}

.hero > .eyebrow,
.hero > .hero-title,
.hero > .hero-lead,
.hero > .cta-row,
.hero > .carousel-dots,
.hero > .feature-panel {
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero-lead {
  margin: 1rem auto 0;
  max-width: 36rem;
  font-size: 1.1rem;
  color: var(--muted-foreground);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.06);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--foreground);
  border-color: color-mix(in srgb, var(--foreground) 18%, transparent);
}

.btn-secondary:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* Fan carousel — motion inspired by https://codepen.io/supah/pen/xxJMbbg */
.carousel-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
  margin: 2.5rem 0 0;
  width: 100%;
  max-width: 100%;
  padding: 0 clamp(0.35rem, 1.5vw, 1rem);
  /* Contain horizontal overflow here so abspos slides cannot widen the document. */
  overflow-x: clip;
}

.carousel {
  position: relative;
  /* Tall enough for scaled + rotated fan cards. */
  height: clamp(420px, 62vw, 620px);
  min-width: 0;
  overflow: visible;
  touch-action: auto;
  cursor: grab;
  user-select: none;
}

.carousel.is-dragging {
  cursor: grabbing;
}

.carousel-nav {
  z-index: 5;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid color-mix(in srgb, var(--foreground) 14%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 72%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--foreground);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--shadow) 35%, transparent);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.carousel-nav:hover {
  background: var(--muted);
  border-color: color-mix(in srgb, var(--foreground) 22%, transparent);
}

.carousel-nav:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.carousel-item {
  --items: 5;
  --width: clamp(260px, 48vw, 560px);
  --height: clamp(186px, 34vw, 400px);
  --scale: 1;
  --x: calc(var(--active) * 620%);
  --y: calc(var(--active) * 120%);
  --rot: calc(var(--active) * 85deg);
  --opacity: calc(var(--zIndex) / var(--items) * 3 - 2);
  position: absolute;
  z-index: var(--zIndex);
  width: var(--width);
  height: var(--height);
  margin: calc(var(--height) * -0.5) 0 0 calc(var(--width) * -0.5);
  top: 52%;
  left: 50%;
  transform-origin: 50% 100%;
  background: transparent;
  transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(var(--scale));
  transition: transform 0.8s cubic-bezier(0, 0.02, 0, 1);
}

.carousel-box {
  position: absolute;
  inset: 0;
  opacity: var(--opacity);
  transition: opacity 0.8s cubic-bezier(0, 0.02, 0, 1);
  background: transparent;
}

.carousel-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  pointer-events: none;
  display: block;
  vertical-align: top;
  background: transparent;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin: 1.1rem auto 0;
}

.carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--foreground) 22%, transparent);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.carousel-dot:hover {
  background: color-mix(in srgb, var(--foreground) 40%, transparent);
}

.carousel-dot.is-active {
  width: 1.55rem;
  background: var(--primary-gradient);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.feature-panel {
  margin: 1.25rem auto 0;
  max-width: 34rem;
  min-height: 7.5rem;
}

@media (max-width: 640px) {
  .carousel-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "stage stage"
      "prev next";
    gap: 0.75rem;
  }

  .carousel {
    grid-area: stage;
  }

  .carousel-nav-prev {
    grid-area: prev;
    justify-self: start;
  }

  .carousel-nav-next {
    grid-area: next;
    justify-self: end;
  }
}

.feature-title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.feature-body {
  margin: 0.55rem 0 0;
  color: var(--muted-foreground);
}

.section {
  padding: 3rem clamp(1rem, 4vw, 2.5rem);
  max-width: 720px;
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 1.25rem;
  color: var(--muted-foreground);
}

.section-note {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--muted-foreground);
}

.benefit-list,
.steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--foreground);
}

.benefit-list li,
.steps li {
  margin-bottom: 0.85rem;
}

.install-block {
  margin: 0 0 1.75rem;
  padding: 1.35rem clamp(1rem, 3vw, 1.5rem) 1.5rem;
  border-radius: 16px;
  background: var(--surface-deep-gradient);
  color: #e8f2f2;
  box-shadow: 0 14px 40px color-mix(in srgb, var(--shadow) 55%, transparent);
}

.install-heading {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #f3fafa;
}

.install-note {
  margin: 0 0 1.1rem;
  color: color-mix(in srgb, #e8f2f2 78%, #7aa8a8);
}

:not(pre) > code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.12em 0.35em;
  border-radius: 5px;
  background: color-mix(in srgb, #1a4545 10%, transparent);
  color: #1a5c3a;
}

.install-block :not(pre) > code {
  background: color-mix(in srgb, #000 28%, transparent);
  color: #b8f0c8;
}

.install-label {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fd4d4;
}

.install-label:first-of-type {
  margin-top: 0;
}

.code-block {
  margin: 0;
  padding: 0.95rem 1.05rem;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, #7ddea0 28%, transparent);
  background: color-mix(in srgb, #041a12 72%, #0d3d2a);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #9dffc0 12%, transparent);
  color: #b8f0c8;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
}

.code-block code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  white-space: pre;
}

.position-callout {
  margin: 0;
  padding: 1.75rem clamp(1.15rem, 3vw, 1.85rem);
  border-radius: 18px;
  background: var(--surface-deep-gradient);
  color: #e8f2f2;
  box-shadow: 0 16px 44px color-mix(in srgb, var(--shadow) 50%, transparent);
  text-align: left;
}

.position-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9fd4d4;
}

.position-title {
  margin: 0;
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #f3fafa;
}

.position-body {
  margin: 1rem 0 0;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: color-mix(in srgb, #e8f2f2 82%, #7aa8a8);
}

.integration-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.integration-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--foreground) 8%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.integration-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.integration-note {
  font-size: 0.95rem;
  color: var(--muted-foreground);
}

.section-wide {
  max-width: 860px;
}

.video-block {
  margin-top: 1.5rem;
  padding: 1.35rem clamp(1rem, 3vw, 1.5rem) 1.5rem;
  border-radius: 16px;
  background: var(--surface-deep-gradient);
  color: #e8f2f2;
  box-shadow: 0 14px 40px color-mix(in srgb, var(--shadow) 55%, transparent);
}

.video-block + .video-block {
  margin-top: 1.75rem;
}

.video-heading {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #f3fafa;
}

.video-summary {
  margin: 0 0 1rem;
  color: color-mix(in srgb, #e8f2f2 78%, #7aa8a8);
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, #000 35%, var(--surface-deeper));
  box-shadow: 0 8px 28px color-mix(in srgb, #000 35%, transparent);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  color: color-mix(in srgb, #e8f2f2 70%, #7aa8a8);
}

.video-fallback a {
  color: #9fd4d4;
}

.video-fallback a:hover {
  color: #c5ecec;
}

.site-footer {
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  border-top: 1px solid color-mix(in srgb, var(--foreground) 8%, transparent);
}

.site-footer a {
  color: var(--primary);
}

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

  .carousel-item {
    --x: calc(var(--active) * 120%);
    --y: 0%;
    --rot: 0deg;
    transition: transform 0.35s ease, opacity 0.35s ease;
  }

  .carousel-box {
    transition: opacity 0.35s ease;
  }
}
