:root {
  color-scheme: light;
  --background: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --surface-alt: #f1f7f4;
  --text: #172033;
  --muted: #667085;
  --line: #d8e0ee;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #0f766e;
  --support: #7c3aed;
  --shadow: 0 18px 42px rgba(23, 32, 51, 0.12);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-shell {
  width: calc(100% - clamp(24px, 5vw, 72px));
  max-width: none;
  margin: 0 auto;
  padding: 24px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 950;
  text-decoration: none;
}

.brand-link img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-nav a {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-weight: 850;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--primary);
}

.hero-product {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  padding: 36px 0 48px;
  overflow: hidden;
}

.hero-product::after {
  content: "";
  position: absolute;
  inset: 24px 0 24px auto;
  width: min(430px, 44vw);
  background: url("/documentation/images/assistia-logo.png") center / contain no-repeat;
  opacity: 0.16;
}

.hero-product > div {
  position: relative;
  z-index: 1;
}

.hero-product h1 {
  margin: 0 0 16px;
  max-width: 780px;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-product p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 950;
  text-decoration: none;
}

.button:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 14px 30px rgba(23, 32, 51, 0.1);
}

.button-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.button-secondary {
  background: var(--surface-soft);
}

.section {
  margin-top: 26px;
}

.section-header {
  max-width: 960px;
  margin-bottom: 18px;
}

.section-header h1,
.section-header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.section-header code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

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

.feature-card,
.download-card,
.doc-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
  padding: 20px;
}

.feature-card h3,
.download-card h2,
.doc-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.feature-card p,
.download-card p,
.doc-card p {
  margin: 0;
  color: var(--muted);
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doc-card .button {
  align-self: flex-start;
}

.download-page {
  padding-top: 18px;
}

.download-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-card {
  display: grid;
  gap: 16px;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 900;
}

.pill-success {
  background: #e8f6f2;
  color: var(--success);
}

.note-band {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #c8eadf;
  border-radius: 12px;
  background: var(--surface-alt);
  color: #145347;
  font-weight: 750;
}

.gallery-page {
  width: calc(100% - clamp(16px, 2.5vw, 40px));
  padding-top: 18px;
}

.gallery-intro {
  margin-top: 8px;
}

.carousel {
  margin-top: 18px;
}

.carousel-stage {
  position: relative;
  height: max(680px, calc(100vh - 190px));
  height: max(680px, calc(100dvh - 190px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(238, 244, 255, 0.96), rgba(255, 255, 255, 0.96)),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.carousel-track {
  position: relative;
  height: 100%;
  min-height: 0;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: stretch;
  padding: clamp(24px, 3vw, 42px) clamp(62px, 5vw, 92px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(216, 224, 238, 0.86);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 18px 42px rgba(23, 32, 51, 0.12);
}

.carousel-caption {
  max-width: none;
  padding: 14px 16px;
  border: 1px solid rgba(216, 224, 238, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(220px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.carousel-kicker {
  margin: 0;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 950;
  text-transform: uppercase;
}

.carousel-caption h2 {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.75rem);
  line-height: 1.15;
}

.carousel-caption p {
  margin: 0;
  color: var(--muted);
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  cursor: pointer;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.carousel-button:hover,
.carousel-dot:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 12px 24px rgba(23, 32, 51, 0.12);
}

.carousel-button-prev {
  left: 18px;
}

.carousel-button-next {
  right: 18px;
}

.carousel-footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: min(100%, 520px);
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.carousel-dot.is-active {
  border-color: var(--primary);
  background: var(--primary);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero-product {
    min-height: auto;
  }

  .hero-product::after {
    inset: auto 0 0 auto;
    width: 180px;
    height: 180px;
  }

  .feature-grid,
  .download-grid,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .carousel-stage,
  .carousel-track {
    height: max(720px, calc(100dvh - 110px));
  }

  .carousel-slide {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    align-content: center;
    padding: 34px 22px 76px;
  }

  .carousel-slide img {
    height: 100%;
    max-height: none;
  }

  .carousel-caption {
    max-width: none;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
  }

  .carousel-button {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .carousel-button-prev {
    left: 22px;
  }

  .carousel-button-next {
    right: 22px;
  }
}
