/* ==========================================================================
   Demo index. Deliberately neutral so it does not compete with the demos.
   ========================================================================== */

:root {
  --bg: #0c0d0f;
  --bg-2: #121316;
  --surface: #17191d;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #f1f3f5;
  --muted: #979da6;
  --dim: #666c75;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; color: var(--muted); }
p:last-child { margin-bottom: 0; }

.kicker {
  display: inline-block; margin-bottom: 18px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim);
}

/* --------------------------------------------------------------- header */

.top { padding: clamp(26px, 4vw, 40px) 0; }
.top .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.mark { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -0.02em; }
.mark i { width: 10px; height: 10px; border-radius: 3px; background: #fff; transform: rotate(45deg); }
.top a.ghost { font-size: 15px; color: var(--muted); }
.top a.ghost:hover { color: #fff; }

/* --------------------------------------------------------------- hero */

.intro { padding: clamp(24px, 4vw, 40px) 0 clamp(40px, 6vw, 70px); }
.intro p.lead { font-size: clamp(17px, 1.5vw, 20px); color: #c0c5cc; max-width: 62ch; margin-top: 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding: 0; list-style: none; }
.facts li {
  padding: 8px 15px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 14px; color: #c9ced6;
}

/* --------------------------------------------------------------- cards */

.demos { display: grid; gap: clamp(26px, 4vw, 44px); padding-bottom: clamp(50px, 7vw, 90px); }
.demo {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 3.5vw, 52px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.demo:hover { border-color: var(--line-2); transform: translateY(-3px); }
.demo:nth-child(even) .demo__frame { order: 2; }

/* live preview, scaled down */
.demo__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 11; border-radius: 12px;
  border: 1px solid var(--line); background: #000;
}
.demo__frame iframe {
  position: absolute; top: 0; left: 0;
  width: 1440px; height: 990px; border: 0;
  transform: scale(var(--s, 0.4)); transform-origin: 0 0;
  pointer-events: none;
}
.demo__frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12, 13, 15, 0.5), transparent 45%);
  pointer-events: none;
}
.demo__open {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.3s;
  background: rgba(12, 13, 15, 0.45);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.demo__frame:hover .demo__open, .demo__open:focus-visible { opacity: 1; }
.demo__open span {
  padding: 13px 24px; border-radius: 999px; background: #fff; color: #111;
  font-weight: 600; font-size: 15px;
}
.demo__load { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--dim); }

.demo__no { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; color: var(--dim); }
.demo h2 { margin: 12px 0 14px; }
.demo p { font-size: 16px; }
.specs { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.specs li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; font-size: 14.5px; color: #c5cad1; padding: 9px 0; border-top: 1px solid var(--line); }
.specs b { font-weight: 500; color: var(--dim); }
.swatch { display: inline-flex; align-items: center; gap: 9px; }
.swatch i { width: 13px; height: 13px; border-radius: 4px; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: #fff; color: #111; }
.btn--solid:hover { background: #e3e6ea; }
.btn--line { border-color: var(--line-2); color: var(--text); }
.btn--line:hover { border-color: #fff; }
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------- included */

.included { padding: clamp(50px, 7vw, 90px) 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: clamp(30px, 4vw, 46px); }
.grid > div { padding: 26px; background: var(--bg-2); transition: background-color 0.3s; }
.grid > div:hover { background: var(--surface); }
.grid h3 { font-size: 17px; margin-bottom: 8px; }
.grid p { font-size: 15px; margin: 0; }
.grid svg { width: 22px; height: 22px; color: #fff; margin-bottom: 16px; opacity: 0.85; }

/* --------------------------------------------------------------- footer */

.foot { padding: 34px 0; border-top: 1px solid var(--line); }
.foot .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--dim); }

/* --------------------------------------------------------------- reveal */

.up { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }
.up.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- small */

@media (max-width: 900px) {
  .demo, .demo:nth-child(even) .demo__frame { grid-template-columns: 1fr; order: 0; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .btn { width: 100%; justify-content: center; }
  .specs li { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .up { opacity: 1 !important; transform: none !important; }
}
