/* ==========================================================================
   INDEX 12 — Airy Humanized Landing Page
   Pure white canvas (#ffffff), silky pill buttons (999px), soft 18px frames,
   minimal interactive dot-matrix particle constellations, warm readable copy.
   ========================================================================== */

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

:root {
  --bg: #ffffff;
  --surface: #f5f6f9;
  --surface-hover: #eceef4;
  --ink: #111216;
  --ink-muted: #525663;
  --ink-faint: #676c7a;
  --blue: #2563eb;
  --border: rgba(17, 18, 22, 0.09);
  --border-hi: rgba(17, 18, 22, 0.18);
  --font-sans: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

button {
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ==========================================================================
   SILKY PILL BUTTONS (Zero Harsh 0px Edges)
   ========================================================================== */

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 150ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.pill-btn:active {
  transform: scale(0.97);
}

.pill-btn.is-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

.pill-btn.is-xs {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.pill-btn.is-primary {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 4px 14px -4px rgba(17, 18, 22, 0.28);
}

.pill-btn.is-primary:hover {
  background: #23252e;
  transform: translateY(-1px);
}

.pill-btn.is-soft {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

.pill-btn.is-soft:hover {
  background: var(--surface-hover);
  border-color: var(--border-hi);
}

/* ==========================================================================
   CLEAN AIRY TOPBAR
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 140ms var(--ease);
}

.nav-link:hover {
  color: var(--ink);
}

/* ==========================================================================
   HERO WITH SUBTLE DOT-MATRIX ATMOSPHERE + LIVE STAGE
   ========================================================================== */

.hero {
  position: relative;
  padding: 72px 0 80px;
  background: #ffffff;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-center {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 44px;
}

.hero-title {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.58;
  color: var(--ink-muted);
  max-width: 580px;
  margin: 0 auto 28px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-cli {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  max-width: 100%;
}

.hero-cli code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Softly Rounded Interactive Hero Stage */
.stage-card {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 24px 60px -24px rgba(17, 18, 22, 0.14), 0 4px 14px -4px rgba(17, 18, 22, 0.06);
  overflow: hidden;
}

.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.stage-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.stage-tab {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: background 140ms var(--ease), color 140ms var(--ease);
}

.stage-tab:hover {
  color: var(--ink);
  background: var(--surface);
}

.stage-tab.is-active {
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
}

.plate-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.mode-btn {
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: background 130ms var(--ease), color 130ms var(--ease);
}

.mode-btn:hover {
  color: var(--ink);
}

.mode-btn.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(17, 18, 22, 0.1);
}

.stage-viewport {
  position: relative;
  height: 540px;
  background: #fafbfc;
  overflow: hidden;
}

.stage-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ink), transparent);
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 160ms var(--ease);
}

.stage-viewport.is-loading::after {
  opacity: 0.7;
  animation: stageBarSlide 900ms linear infinite;
}

@keyframes stageBarSlide {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.stage-viewport iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}

.stage-viewport iframe.is-visible {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* ==========================================================================
   INTERACTIVE DOT-MATRIX CONSTELLATION BAND (Antigravity-Inspired!)
   Hover Left -> Blue particles morph into { } brackets
   Hover Right -> Blue particles morph into 6-circle constellation
   ========================================================================== */

.dot-band {
  position: relative;
  margin: 24px auto 48px;
  max-width: 1240px;
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
}

.dot-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.dot-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 430px;
}

.dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 36px;
  gap: 10px;
}

.dot-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.dot-heading {
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.dot-sub {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

/* ==========================================================================
   FRIENDLY CATALOGUE (Inline Expand + Light/Dark Switch + 1-Click CLI)
   ========================================================================== */

.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(1.9rem, 3.2vw, 2.65rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-note {
  font-size: 14px;
  color: var(--ink-muted);
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  overflow: hidden;
  transition: border-color 150ms var(--ease), box-shadow 160ms var(--ease);
}

.cat-item:hover,
.cat-item.is-open {
  border-color: var(--border-hi);
  box-shadow: 0 8px 24px -12px rgba(17, 18, 22, 0.12);
}

.cat-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 230px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  text-align: left;
  transition: background 140ms var(--ease);
}

.cat-row:hover {
  background: #fafbfc;
}

.cat-id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
}

.cat-name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.cat-desc {
  font-size: 13.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.cat-item.is-open .cat-pill {
  background: var(--ink);
  color: #ffffff;
}

.cat-drawer {
  display: none;
  padding: 14px 18px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  flex-direction: column;
  gap: 12px;
}

.cat-item.is-open .cat-drawer {
  display: flex;
}

.cat-drawer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cat-drawer-frame {
  width: 100%;
  height: 520px;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #ffffff;
}

.cat-drawer-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.cat-drawer-frame iframe.is-ready {
  opacity: 1;
}

/* ==========================================================================
   CASE STUDIES (Soft Airy Editorial Spreads)
   ========================================================================== */

.study-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.study-card {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 32px;
  align-items: center;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #fafbfc;
}

.study-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.study-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
}

.study-title {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.study-p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 52ch;
  text-wrap: pretty;
}

.study-p strong {
  color: var(--ink);
  font-weight: 600;
}

.study-plate {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.study-plate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.study-plate-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

.study-plate-frame {
  width: 100%;
  height: 430px;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #ffffff;
}

.study-plate-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.study-plate-frame iframe.is-ready {
  opacity: 1;
}

/* ==========================================================================
   AIRY CLOSING CTA & FOOTER
   ========================================================================== */

.closing {
  padding: 112px 0 120px;
  text-align: center;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.closing-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.closing .wrap {
  position: relative;
  z-index: 1;
}

.closing-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
  max-width: 640px;
  margin: 0 auto 16px;
}

.closing-sub {
  font-size: 16px;
  color: var(--ink-muted);
  max-width: 480px;
  margin: 0 auto 28px;
  text-wrap: pretty;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 36px;
  font-size: 13px;
  color: var(--ink-muted);
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-links a:hover {
  color: var(--ink);
}

@media (max-width: 980px) {
  .dot-grid,
  .study-card {
    grid-template-columns: 1fr;
  }
  .cat-row {
    grid-template-columns: 38px 1fr auto;
  }
  .cat-desc {
    display: none;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 44px 0 56px;
  }
  .stage-viewport,
  .study-plate-frame,
  .cat-drawer-frame {
    height: 400px;
  }
  .study-card {
    padding: 18px;
  }
}
