:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --text: #0f172a;
  --muted: #667085;
  --line: #e4e7ec;
  --brand: #111827;
  --brand-soft: #eef2ff;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --success: #067647;
  --success-soft: #ecfdf3;
  --shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --container: min(1200px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.11), transparent 28%),
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 24%),
    var(--bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

code {
  padding: 0.1em 0.42em;
  border-radius: 8px;
  background: #f2f4f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.94em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.page-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(228, 231, 236, 0.72);
  backdrop-filter: blur(18px);
  background: rgba(245, 247, 251, 0.78);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
  box-shadow: var(--shadow);
}

.brand-text {
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  padding: 50px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.guide-card,
.demo-card,
.controls,
.site-footer,
.dialog-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-copy {
  padding: 34px;
  border-radius: var(--radius-lg);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #4338ca;
  font-size: 0.88rem;
  font-weight: 600;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.78;
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
}

.btn-secondary {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.stat-card strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel {
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.feature-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  align-items: center;
}

.feature-card img {
  width: 112px;
  height: 84px;
  object-fit: cover;
  border-radius: 14px;
}

.feature-card p {
  margin: 0 0 6px;
  color: #4338ca;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feature-card h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.25;
}

.feature-card span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.controls-section {
  padding: 14px 0 0;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.search-wrap {
  flex: 1 1 320px;
}

.search-wrap input {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.search-wrap input:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-weight: 600;
  transition: all 0.2s ease;
}

.filter-btn.is-active,
.filter-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.gallery-section {
  padding: 28px 0 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.section-heading--compact {
  margin-bottom: 20px;
}

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

.demo-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.demo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.10);
}

.card-image-wrap {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10.4;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-image-wrap:hover .card-image {
  transform: scale(1.03);
}

.card-body {
  padding: 18px 18px 20px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.status-badge,
.dialog-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 700;
}

.case-path {
  color: var(--muted);
  font-size: 0.84rem;
}

.card-title {
  margin: 0 0 10px;
  font-size: 1.18rem;
  line-height: 1.32;
  letter-spacing: -0.03em;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.96rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.empty-state {
  margin-top: 20px;
  padding: 30px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.guide-section {
  padding: 20px 0 52px;
}

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

.guide-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.guide-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.guide-card h3 {
  margin: 18px 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer {
  width: var(--container);
  margin: 0 auto 24px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.footer-inner a {
  color: var(--text);
  font-weight: 600;
}

.preview-dialog {
  width: min(980px, calc(100% - 24px));
  border: 0;
  padding: 0;
  border-radius: 24px;
  background: transparent;
}

.preview-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}

.dialog-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  color: var(--text);
  box-shadow: var(--shadow);
}

.dialog-copy {
  padding: 26px 26px 12px;
}

.dialog-copy h3 {
  margin: 12px 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.dialog-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.dialog-image-wrap {
  padding: 0 26px 26px;
}

.dialog-image-wrap img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 1080px) {
  .hero-grid,
  .guide-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: 2;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  :root {
    --container: min(100% - 24px, 1000px);
  }

  .site-header {
    position: static;
  }

  .nav {
    min-height: auto;
    padding: 16px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-copy {
    padding: 24px;
  }

  .hero-stats,
  .guide-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    align-items: stretch;
    flex-direction: column;
  }

  .feature-card {
    grid-template-columns: 96px 1fr;
  }

  .feature-card img {
    width: 96px;
    height: 72px;
  }

  .card-actions {
    flex-direction: column;
  }

  .card-actions .btn {
    width: 100%;
  }

  .site-footer {
    margin-bottom: 16px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-dialog {
    width: min(100% - 16px, 980px);
  }

  .dialog-copy,
  .dialog-image-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .dialog-image-wrap {
    padding-bottom: 16px;
  }
}
