/* try.shapi.app. One brand blue for the whole page, and white. The editor demo keeps its own light theme. */
:root {
  --blue: #5b4dff;
  --blue-deep: #4e40f2;
  --paper: var(--blue);
  --paper-2: var(--blue-deep);
  --raised: #ffffff;
  --ink: #ffffff;
  --ink-2: rgb(255 255 255 / .88);
  --ink-3: rgb(255 255 255 / .74);
  --line: rgb(255 255 255 / .22);
  --line-2: rgb(255 255 255 / .45);
  --grid: rgb(91 77 255 / .22);
  --pen: #ffffff;
  --pen-soft: rgb(255 255 255 / .3);
  --on-ink: var(--blue);
  --r: 10px;
  --wrap: 1180px;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background-color: var(--paper); background-image: linear-gradient(rgb(255 255 255 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .07) 1px, transparent 1px); background-size: 40px 40px; background-position: -1px -1px; color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, kbd { font-family: var(--mono); font-size: 0.86em; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 0.4em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: rgb(255 255 255 / .1); text-align: center; line-height: 1.5; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--on-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
.fine { color: var(--ink-3); font-size: 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 999px; font: 600 16px/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s cubic-bezier(.25, 1, .5, 1); }
.btn:active { transform: translateY(1px); }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { color: var(--on-ink); background: #ecebff; }
.btn-line { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in oklch, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; }
.brand.small { font-size: 14px; font-weight: 600; gap: 6px; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; color: var(--ink-2); }
.nav a { text-decoration: none; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-block: clamp(48px, 9vw, 112px) clamp(56px, 8vw, 104px); }
.eyebrow { font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 22px; }
h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -0.035em; }
.lede { margin-top: 24px; font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero .fine { margin-top: 18px; max-width: 36em; }

.hero-art { margin: 0; }
.board { position: relative; aspect-ratio: 1; background: var(--raised); border: 0; border-radius: 18px; box-shadow: 0 30px 80px -40px rgb(20 10 90 / .6); overflow: hidden; }
.board svg { position: absolute; inset: 7%; width: 86%; height: 86%; overflow: visible; }
.board .grid { color: var(--grid); }
.board .pad { stroke: var(--grid); }
.board .key { stroke: var(--blue); opacity: .3; }
.board .ink { color: var(--blue); }
.board .ink path, .board .ink rect, .board .ink circle { transition: d .5s cubic-bezier(.25, 1, .5, 1); }
.board .ink .moved { stroke: #1d1478; }
#heroTip { fill: #1d1478; transition: opacity .2s; }
.hero-art figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; font: 400 13px/1.3 var(--mono); color: var(--ink-3); }
.status { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.status span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pen); flex: none; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--pen-soft); } 100% { box-shadow: 0 0 0 8px transparent; } }
.sizes { display: inline-flex; align-items: flex-end; gap: 16px; color: var(--ink); }
.sizes > span { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.sizes b { font-weight: 400; color: var(--ink-3); font-size: 11px; }
.sizes svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* section heads */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px; align-items: end; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; }
.section-head p { color: var(--ink-2); max-width: 38em; }

/* demo */
.demo { background-color: rgb(20 10 90 / .14); border-block: 1px solid var(--line); padding-block: clamp(56px, 8vw, 96px); }
.try-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 15px; color: var(--ink-3); }
.try-label { margin-right: 4px; }
.try-then { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: 10px; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgb(255 255 255 / .08); color: var(--ink); font: 500 14px/1 var(--sans); cursor: pointer; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--ink); background: rgb(255 255 255 / .16); }
.chip.ghost { background: transparent; }
.frame { scroll-margin-top: 84px; position: relative; border: 0; border-radius: 14px; overflow: hidden; background: var(--raised); box-shadow: 0 30px 80px -36px rgb(20 10 90 / .65); }
.frame-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-bottom: 1px solid #ecebf7; font: 400 12px/1 var(--mono); color: #8a86b3; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #dddbf0; }
.frame-bar span { margin-left: 10px; }
.frame iframe { display: block; width: 100%; height: min(780px, 82vh); min-height: 620px; border: 0; background: var(--raised); }
.frame-narrow { display: none; padding: 28px 22px; color: var(--blue); }

/* how */
.how { padding-block: clamp(64px, 9vw, 112px) 32px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.steps li { padding: 28px 28px 8px 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps .n { display: block; font: 500 14px/1 var(--mono); color: var(--ink-3); margin-bottom: 18px; }
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--ink-2); font-size: 16px; }

/* details */
.details { padding-block: 40px clamp(64px, 9vw, 112px); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; }
.facts > div { display: grid; grid-template-columns: 13em minmax(0, 1fr); gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--ink-2); font-size: 16px; }

/* VS Code screenshot */
.native { padding-block: 8px clamp(56px, 8vw, 96px); }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 30px 80px -36px rgb(20 10 90 / .65); }
.shot figcaption { margin-top: 14px; color: var(--ink-2); font-size: 15px; max-width: 70ch; }
.clip { display: block; width: 100%; max-width: 560px; height: auto; margin-top: 12px; border-radius: 10px; }

/* compare */
.compare { padding-block: 40px 24px; }
.table-scroll { overflow-x: auto; }
.vs { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 16px; }
.vs th, .vs td { text-align: left; padding: 14px 16px 14px 0; border-top: 1px solid var(--line); vertical-align: top; }
.vs thead th { border-top: 0; font: 500 13px/1.3 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 10px; }
.vs tbody th { font-weight: 600; width: 28%; }
.vs td { color: var(--ink-2); }
.vs .us { color: var(--ink); font-weight: 600; }
.vs thead .us { color: var(--ink); }

/* faq */
.faq { padding-block: 0 clamp(64px, 9vw, 104px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; }
.faq h2 { font-size: clamp(30px, 3.4vw, 42px); }
.qa details { border-top: 1px solid var(--line); }
.qa details:last-child { border-bottom: 1px solid var(--line); }
.qa summary { cursor: pointer; padding: 18px 28px 18px 0; font-weight: 600; list-style: none; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font: 400 20px/1 var(--mono); color: var(--ink-3); transition: transform .2s cubic-bezier(.25, 1, .5, 1); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa p { padding: 0 0 18px; color: var(--ink-2); max-width: 62ch; }

/* install */
.install { background-color: var(--ink); background-image: linear-gradient(rgb(91 77 255 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(91 77 255 / .07) 1px, transparent 1px); background-size: 40px 40px; background-position: -1px -1px; color: var(--on-ink); padding-block: clamp(64px, 9vw, 104px); }
.install a:hover { color: var(--on-ink); }
.install-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.install h2 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 26px; }
.install-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.install-steps li { counter-increment: s; display: grid; grid-template-columns: 2em minmax(0, 1fr); padding: 14px 0; border-top: 1px solid color-mix(in oklch, var(--on-ink) 16%, transparent); }
.install-steps li::before { content: counter(s); font: 500 14px/1.7 var(--mono); color: color-mix(in oklch, var(--on-ink) 55%, transparent); }
.install-steps li > * { grid-column: 2; }
.install code { background: color-mix(in oklch, var(--on-ink) 10%, transparent); padding: 1px 6px; border-radius: 5px; }
.code { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 10px 10px 14px; border-radius: 10px; background: color-mix(in oklch, var(--on-ink) 8%, transparent); border: 1px solid color-mix(in oklch, var(--on-ink) 14%, transparent); }
.code code { background: none; padding: 0; overflow-x: auto; white-space: nowrap; flex: 1; min-width: 0; }
.copy { flex: none; height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid color-mix(in oklch, var(--on-ink) 24%, transparent); background: transparent; color: inherit; font: 500 13px/1 var(--sans); cursor: pointer; }
.copy:hover { border-color: var(--on-ink); }
.needs h3 { font-size: 18px; margin-bottom: 14px; }
.needs ul { margin: 0 0 22px; padding-left: 1.1em; }
.needs li { margin-bottom: 8px; }
.needs .fine { color: color-mix(in oklch, var(--on-ink) 60%, transparent); }
.install kbd { background: transparent; border-color: color-mix(in oklch, var(--on-ink) 30%, transparent); }

/* footer */
.foot { padding-block: 28px; border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0 8px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .facts { grid-template-columns: 1fr; }
  .install-grid { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .top-row { justify-content: space-between; }
  .frame iframe { display: none; }
  .frame-narrow { display: block; }
  .try-row { display: none; }
  .facts > div { grid-template-columns: 1fr; gap: 6px; }
  .hero-art figcaption { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  .btn, .board .ink path { transition: none; }
}

/* the playground: editing marks drawn on the page canvas, behind the content */
.playground { position: absolute; inset: 0 0 auto 0; height: 980px; overflow: hidden; pointer-events: none; z-index: 0; }
.playground svg { position: absolute; left: 50%; top: 0; width: 1600px; height: 980px; transform: translateX(-50%); }
.playground .ln { fill: none; stroke: rgb(255 255 255 / .55); stroke-width: 1.5; }
.playground .soft { stroke: rgb(255 255 255 / .3); }
.playground .dash { stroke-dasharray: 5 5; }
.playground .anchor { fill: var(--blue); stroke: #fff; stroke-width: 1.5; }
.playground .knob { fill: #fff; }
.playground .label { fill: #fff; font: 500 12px var(--mono); }
.playground .tag { fill: #fff; }
.playground .tag-text { fill: var(--blue); font: 600 12px var(--sans); }
.playground .float-a { animation: drift 9s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.playground .float-b { animation: drift 11s cubic-bezier(.45, 0, .55, 1) -4s infinite alternate-reverse; }
@keyframes drift { from { transform: translateY(-6px); } to { transform: translateY(6px); } }
main, .top, .foot { position: relative; z-index: 1; }
.top { z-index: 5; }
@media (max-width: 900px) { .playground { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .playground .float-a, .playground .float-b { animation: none; } }

/* the hero board reads as a selected object on the canvas */
.hero-art { position: relative; }
.hero-art .sel { position: absolute; inset: -12px; border: 1.5px dashed rgb(255 255 255 / .6); border-radius: 4px; pointer-events: none; }
.hero-art .sel i { position: absolute; width: 11px; height: 11px; background: var(--blue); border: 1.5px solid #fff; }
.hero-art .sel i:nth-child(1) { left: -6px; top: -6px; } .hero-art .sel i:nth-child(2) { right: -6px; top: -6px; }
.hero-art .sel i:nth-child(3) { left: -6px; bottom: -6px; } .hero-art .sel i:nth-child(4) { right: -6px; bottom: -6px; }

/* more marks through the page, kept to the side margins */
html, body, main { overflow-x: clip; }
.how, .faq { position: relative; }
.marks { position: absolute; left: 50%; top: 0; width: 1600px; height: 600px; transform: translateX(-50%); pointer-events: none; z-index: -1; }
.marks svg { width: 100%; height: 100%; }
.marks .ln { fill: none; stroke: rgb(255 255 255 / .55); stroke-width: 1.5; }
.marks .soft { stroke: rgb(255 255 255 / .3); }
.marks .dash { stroke-dasharray: 5 5; }
.marks .anchor { fill: var(--blue); stroke: #fff; stroke-width: 1.5; }
.marks .knob { fill: #fff; }
.marks .tag { fill: #fff; }
.marks .tag-text { fill: var(--blue); font: 600 12px var(--sans); }
.marks .float-a { animation: drift 9s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.marks .float-b { animation: drift 11s cubic-bezier(.45, 0, .55, 1) -4s infinite alternate-reverse; }
@media (max-width: 1500px) { .marks { opacity: .6; } }
@media (max-width: 900px) { .marks { display: none; } }
@media (prefers-reduced-motion: reduce) { .marks .float-a, .marks .float-b { animation: none; } }
