/* ============================================================
   Specimen base
   Every style renders this same little landing page. Themes
   (themes-*.css) restyle it by scoping rules under .s-<id>.
   Container queries resolve against the surrounding .frame.
   ============================================================ */

.sp {
  --bg: #ffffff;
  --fg: #15171c;
  --muted: #5f6672;
  --accent: #2f4bff;
  --on-accent: #ffffff;
  --surface: #f3f4f6;
  --line: #dde0e5;
  --r: 10px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--font);
  --pad: clamp(18px, 4cqi, 46px);
  --gap: clamp(22px, 4cqi, 40px);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--pad);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.sp *, .sp *::before, .sp *::after { box-sizing: border-box; }
.sp button, .sp input { font: inherit; color: inherit; margin: 0; }
.sp a { color: inherit; text-decoration: none; cursor: pointer; }

.sp-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sp-bg i, .sp-art i { position: absolute; display: block; }
.sp-bg i { display: none; }

/* nav */
.sp-nav { position: relative; display: flex; align-items: center; gap: clamp(12px, 2.4cqi, 28px); }
.sp-logo { display: flex; align-items: center; gap: 9px; margin-right: auto; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1; }
.sp-mark { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--accent); }
.sp-links { display: flex; gap: clamp(12px, 2cqi, 26px); font-size: 14px; }
@container (max-width: 540px) { .sp-links { display: none; } }

/* hero */
.sp-hero { position: relative; display: grid; gap: var(--gap); align-items: center; }
@container (min-width: 720px) { .sp-hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.sp-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; }
.sp-kicker { font-size: 12px; font-weight: 600; letter-spacing: .04em; line-height: 1.3; }
.sp-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 7.2cqi, 78px);
  line-height: 1.02;
  letter-spacing: -.02em;
}
.sp-title span { display: block; }
.sp-lede { margin: 0; max-width: 46ch; color: var(--muted); font-size: clamp(15px, 1.65cqi, 18px); line-height: 1.55; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* buttons */
.sp-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  padding: .8em 1.35em;
  border: 0;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s, background-color .15s, filter .15s, color .15s;
}
.sp-btn--primary { background: var(--accent); color: var(--on-accent); }
.sp-btn--secondary { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.sp-btn--nav { font-size: 13px; padding: .55em 1.05em; }

/* hero art: five generic shapes each style arranges its own way */
.sp-art { position: relative; width: 100%; max-width: 100%; aspect-ratio: 5 / 4; min-height: 200px; }
@container (max-width: 719px) { .sp-art { aspect-ratio: auto; height: 200px; width: min(100%, 320px); } }

/* cards */
.sp-cards { position: relative; display: grid; gap: 16px; }
@container (min-width: 560px) { .sp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sp-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--surface); border-radius: var(--r); transition: transform .2s, box-shadow .2s; }
.sp-card h3 { margin: 0; font-family: var(--display); font-size: 18px; line-height: 1.2; }
.sp-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.sp-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: calc(var(--r) * .8); background: var(--bg); color: var(--accent); }
.sp-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: var(--icon-sw, 2); stroke-linecap: round; stroke-linejoin: round; }

/* panel: form + controls */
.sp-panel { position: relative; display: grid; gap: 18px 32px; padding: 22px; background: var(--surface); border-radius: var(--r); }
@container (min-width: 720px) { .sp-panel { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; } }
.sp-sub { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sp-label { font-size: 13px; font-weight: 600; }
.sp-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-input {
  flex: 1 1 170px;
  min-width: 0;
  font-size: 15px;
  padding: .75em 1em;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  outline: none;
}
.sp-input::placeholder { color: var(--muted); opacity: .85; }
.sp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; font-size: 13px; }
.sp-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.sp-switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line); transition: background-color .2s, box-shadow .2s; }
.sp-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s, background-color .2s; }
.sp-toggle.is-on .sp-switch { background: var(--accent); }
.sp-toggle.is-on .sp-switch::after { transform: translateX(16px); }
.sp-meter { display: inline-flex; align-items: center; gap: 10px; }
.sp-bar { position: relative; width: 120px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.sp-bar > span { position: absolute; top: 0; bottom: 0; left: 0; width: 64%; background: var(--accent); border-radius: inherit; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-chips span { padding: .3em .8em; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; line-height: 1.4; }

/* ripple (used by Material) */
.sp-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .28; pointer-events: none; animation: sp-ripple .6s ease-out forwards; }
@keyframes sp-ripple { to { transform: scale(2.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .sp *, .sp *::before, .sp *::after { animation: none !important; }
}
