:root {
  /* static palette */
  --c-bg: #f7f7f5;
  --c-bg-alt: #eef0f4;
  --c-panel: #ffffff;
  --c-code: #0f1016;
  --c-border: #e3e4e8;
  --c-border-strong: #d3d5dc;
  --c-text: #15161c;
  --c-muted: #6a6d78;
  --c-accent: #4b4fe0;
  --c-accent-soft: #ecedfc;
  --c-on-accent: #ffffff;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--c-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* ===== HERO (full-screen WebM background) ===== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #0f1016;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-bg-layer.is-active {
  opacity: 1;
}

.hero-bg-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(8, 9, 14, 0.4) 100%);
}

/* ===== HERO CONTENT ===== */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 6rem 1.5rem 3.5rem;
  background: linear-gradient(
    to bottom,
    rgba(8, 9, 14, 0) 0%,
    rgba(8, 9, 14, 0.5) 32%,
    rgba(8, 9, 14, 0.86) 68%,
    #0f1016 100%
  );
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.hero-tagline {
  margin: 1rem auto 2rem;
  max-width: 30rem;
  font-size: clamp(0.92rem, 2vw, 1.08rem);
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

/* Buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.55rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--c-accent);
  color: var(--c-on-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.55);
  cursor: not-allowed;
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  transform: none;
  box-shadow: none;
}

/* ===== SECTIONS ===== */
.main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 6.5rem 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.section-alt {
  max-width: none;
  background:
    radial-gradient(circle at 1px 1px, var(--c-border-strong) 1px, transparent 0) 0 0 / 28px 28px,
    var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.section-alt > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  text-align: center;
  margin-bottom: 3.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.55rem;
}

.section-sub {
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* Feature slider */
.slider {
  position: relative;
}

.slider-track {
  position: relative;
  height: min(72vh, 640px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: #0b0c10;
  box-shadow: 0 20px 50px -20px rgba(20, 22, 30, 0.25);
}

.slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.slider-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.slider-media {
  position: absolute;
  inset: 0;
}

.slider-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b0c10;
}

.slider-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3.5rem 2rem 1.75rem;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.62) 58%, rgba(0, 0, 0, 0.86) 100%);
}

.slider-caption h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
  color: #fff;
}

.slider-caption p {
  max-width: 42rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.97rem;
}

/* Slider arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(15, 16, 22, 0.4);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.18s ease, transform 0.18s ease;
}

.slider-arrow:hover {
  background: rgba(15, 16, 22, 0.72);
}

.slider-prev {
  left: 1rem;
}

.slider-next {
  right: 1rem;
}

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

/* Slider dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: color-mix(in srgb, var(--c-text) 20%, transparent);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

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

.slider-dot.is-active {
  width: 22px;
  background: var(--c-accent);
}

/* Showcase */
.showcase-category + .showcase-category {
  margin-top: 3.75rem;
}

.showcase-category > h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 1.35rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--c-border);
}

.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.35rem;
}

.widget-card {
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.widget-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-border));
  box-shadow: 0 18px 34px -18px rgba(75, 79, 224, 0.35);
}

/* Signature texture: a faint dot-grid, echoing the product's own grid,
   used consistently as the widget "stage" behind every thumbnail. */
.widget-card-media {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 1px 1px, var(--c-border-strong) 1px, transparent 0) 0 0 / 18px 18px,
    var(--c-bg-alt);
}

.widget-card-media img {
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(20, 22, 30, 0.08));
}

.widget-card-body {
  padding: 1.3rem 1.35rem 1.4rem;
}

.widget-card-body h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.widget-card-body p {
  color: var(--c-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.grid-size {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

/* Screenshots */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.shot-frame {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, var(--c-border-strong) 1px, transparent 0) 0 0 / 18px 18px,
    var(--c-panel);
  aspect-ratio: 16 / 10;
  box-shadow: 0 20px 40px -24px rgba(20, 22, 30, 0.3);
}

.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot figcaption {
  margin-top: 0.85rem;
  color: var(--c-muted);
  font-size: 0.9rem;
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* Installation */
.install-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.install-cta .btn {
  font-size: 1.02rem;
  padding: 0.95rem 2.1rem;
}

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

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (max-width: 640px) {
  .section {
    padding: 4.5rem 1.25rem;
  }
  .slider-track {
    height: min(58vh, 460px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg-layer { transition: none; }
  .slider-slide { transition: none; }
  .reveal { opacity: 1; transform: none; }
}