/* Owlet Labs and Feathers. Tokens are the plugin's own default palette (burgundy ground,
   orchid accent, pink modulation, green values). The motif is a terrain seen as contour lines
   with one modulation arc crossing it; the Libra constellation is the mark. */
:root {
	--bg: #030103;
	--surface: #0e080e;
	--surface2: #1a101b;
	--line: #462b43;
	--contour: #6f5069;
	--ink: #f8f2f7;
	--mute: #a38b9f;
	--disabled: #755970;
	--accent: #c790cd;
	--mod: #d88dc3;
	--value: #acc27e;
	--code-bg: #150c15;
	--btn-ink: #030103;
	--shot-glow: rgba(199, 144, 205, .16);
	--shot-bg: #030103;
	--disp: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
	--mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
	color-scheme: dark;
}
@media (prefers-color-scheme: light) {
	:root {
		--bg: #f6eff3;
		--surface: #fbf7f9;
		--surface2: #ebdfe7;
		--line: #d6c3d0;
		--contour: #b595ab;
		--ink: #2a0f26;
		--mute: #6a4a66;
		--disabled: #a58ba0;
		--accent: #7a3b84;
		--mod: #a02f7e;
		--value: #4f6a1e;
		--code-bg: #ebdfe7;
		--btn-ink: #ffffff;
		--shot-glow: rgba(122, 59, 132, .14);
		color-scheme: light;
	}
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 1.0625rem/1.65 var(--disp);
	font-optical-sizing: auto;
	overflow-x: hidden;
}
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.025em; font-variation-settings: 'wdth' 90; }
h3 { font-size: 1.2rem; letter-spacing: -.01em; color: var(--value); }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
strong { font-weight: 650; }

/* header */
header.top { position: sticky; top: 0; z-index: 5; padding: 12px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 22px; height: 29px; color: var(--ink); }
nav { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: .95rem; }
nav a { color: var(--mute); text-decoration: none; padding: 4px 0; }
nav a:hover { color: var(--ink); }

/* hero: the terrain, with one modulation arc crossing it */
.hero { position: relative; padding: 56px 0 24px; overflow: hidden; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.field .ct { fill: none; stroke: var(--contour); stroke-width: 1.1; vector-effect: non-scaling-stroke; opacity: .55; }
.field .arc { fill: none; stroke: var(--mod); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.field .puck-ring { fill: none; stroke: var(--value); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.field .puck { fill: var(--value); }
@media (prefers-reduced-motion: no-preference) {
	.field .arc { animation: draw 2.4s .2s cubic-bezier(.3, .6, .2, 1) both; }
	.field .puck, .field .puck-ring { animation: appear .5s 2.2s both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
.hero .wrap { position: relative; }
h1 { font-size: clamp(4rem, 17vw, 9.5rem); line-height: .9; letter-spacing: -.045em; font-weight: 800; margin: 0 0 .22em -.04em; font-variation-settings: 'wdth' 80; }
.hero .tag { font-size: clamp(1.15rem, 3.4vw, 1.6rem); line-height: 1.4; max-width: 34rem; margin: 0 0 1.4em; }
.hero .tag span { color: var(--mute); }
.cta { display: inline-block; background: var(--accent); color: var(--btn-ink); font-weight: 650; padding: .7em 1.5em; border-radius: 999px; text-decoration: none; }
.cta:hover { color: var(--btn-ink); filter: brightness(1.12); }
.cta.alt { background: transparent; color: var(--accent); border: 1px solid var(--contour); }
.cta.alt:hover { color: var(--ink); border-color: var(--accent); }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }

figure { margin: 0 0 2em; }
figure img, .shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--shot-bg); }
figcaption { font-size: .92rem; color: var(--mute); margin-top: .7em; max-width: 46rem; }
.hero figure { margin-top: 48px; }
.hero .shot { box-shadow: 0 0 0 1px var(--line), 0 30px 80px -20px var(--shot-glow), 0 0 120px -30px var(--shot-glow); }

/* ridge divider: one contour line between sections */
.ridge { height: 22px; margin: 40px 0 0; border: 0; background: var(--contour); opacity: .7;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='22' viewBox='0 0 480 22'%3E%3Cpath d='M0 11 C40 1 80 1 120 11 S200 21 240 11 S320 1 360 11 S440 21 480 11' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x center / 480px 22px;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='22' viewBox='0 0 480 22'%3E%3Cpath d='M0 11 C40 1 80 1 120 11 S200 21 240 11 S320 1 360 11 S440 21 480 11' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x center / 480px 22px; }

/* sections: heading in the margin column on wide screens */
section { padding: 40px 0 8px; }
.sec { display: block; }
.sec > h2, .sec > h3 { margin-bottom: .6em; }
.sec > * { min-width: 0; }
.sec p, .sec ul, .sec dl { max-width: 44rem; }
@media (min-width: 900px) {
	.sec { display: grid; grid-template-columns: 15rem minmax(0, 1fr); column-gap: 48px; }
	.sec > h2, .sec > h3 { grid-column: 1; position: sticky; top: 76px; align-self: start; margin-bottom: 0; }
	.sec > :not(h2):not(h3) { grid-column: 2; }
	.sec > figure, .sec > .pair { max-width: none; }
}
.sub { padding-top: 28px; }
ul { padding-left: 1.2em; }
li { margin-bottom: .5em; }
li::marker { color: var(--mod); }
.pair { display: grid; gap: 20px; grid-template-columns: 1fr; margin-bottom: 0; }
@media (min-width: 700px) { .pair { grid-template-columns: 1fr 1fr; } }

/* modes as a definition list */
dl.modes { margin: 0 0 1em; }
dl.modes dt { font-weight: 650; margin-top: 1em; padding-top: .8em; border-top: 1px solid var(--line); }
dl.modes dd { margin: .2em 0 0; color: var(--ink); }

/* install */
.cmd { position: relative; margin: 0 0 1em; background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; }
.cmd pre { margin: 0; padding: 16px 16px 16px 18px; overflow-x: auto; font: .92rem/1.5 var(--mono); }
.cmd pre::before { content: attr(data-prompt); color: var(--value); margin-right: .8em; user-select: none; -webkit-user-select: none; }
.cmd code { background: none; padding: 0; font-size: inherit; }
.cmd.js pre { padding-right: 84px; }
.copy { position: absolute; top: 8px; right: 8px; font: 600 .82rem var(--disp); color: var(--accent); background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: .35em .9em; cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--accent); }
.oslabel { font-size: .95rem; font-weight: 650; color: var(--mute); margin: 1.4em 0 .5em; }
.note { border-left: 3px solid var(--value); padding: .2em 0 .2em 16px; color: var(--mute); margin-top: 1.6em; }
.note strong { color: var(--value); }

/* platforms: rows, not cards */
.plat { display: grid; gap: 4px 32px; padding: 20px 0; border-top: 1px solid var(--line); max-width: 44rem; }
.plat h3 { margin: 0; }
.plat p { margin: 0; }
@media (min-width: 700px) { .plat { grid-template-columns: 11rem 1fr; } }

footer { margin-top: 72px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--mute); font-size: .95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* the Libra mark */
.hero-libra { display: block; width: clamp(84px, 16vw, 140px); aspect-ratio: 109 / 143; height: auto; color: var(--ink); margin: 0 0 28px; }

/* Owlet Labs landing page */
.labs .hero { padding-bottom: 8px; }
.labs h1 { font-size: clamp(3rem, 12vw, 6.5rem); }
/* the Owlet Labs lockup: the Libra beside the name, the name in its own display face */
.lockup { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); margin: 0 0 .3em; }
.lockup .hero-libra { width: auto; height: clamp(64px, 13vw, 132px); margin: 0; flex: none; }
.lockup h1 { margin: 0; font-family: 'Montserrat', var(--disp); font-weight: 400; font-variation-settings: normal; letter-spacing: -.01em; line-height: .95; font-size: clamp(2rem, 9vw, 6.2rem); white-space: nowrap; }
.labs .tag { margin-bottom: 0; }
.projects { padding: 24px 0 0; }
.proj { display: grid; gap: 20px; grid-template-columns: 1fr; max-width: 56rem; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.proj:hover { border-color: var(--accent); color: var(--ink); }
.proj h2 { font-size: 1.8rem; margin: 0 0 .3em; }
.proj p { margin: 0; color: var(--mute); }
.proj img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--shot-bg); }
@media (min-width: 700px) { .proj { grid-template-columns: 1fr 1.2fr; align-items: center; } }

/* shared site nav */
.sitenav { font-size: .85rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.sitenav .wrap { display: flex; gap: 20px; padding-top: 6px; padding-bottom: 6px; }
.sitenav a { color: var(--mute); text-decoration: none; }
.sitenav a:hover { color: var(--ink); }

/* plugins page: a grid of cards, add more as more plugins ship */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; padding: 8px 0 0; }
@media (min-width: 800px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 8px; background: var(--shot-bg); }
.card h2 { font-size: 1.7rem; margin: 0; }
.card p { margin: 0; }
.card .meta { color: var(--mute); font-size: .92rem; }
.card .cta { align-self: flex-start; margin-top: auto; }
.proj .more { color: var(--accent); white-space: nowrap; }

/* one display face for every page's headline and for the brand name */
h1, .brand { font-family: 'Montserrat', var(--disp); font-variation-settings: normal; }
h1 { font-weight: 400; letter-spacing: -.01em; }
.brand { font-weight: 500; letter-spacing: .01em; }

/* the lockup's subtitle, aligned under the name */
.labs .tag.lab-sub { font-family: 'Montserrat', var(--disp); font-weight: 300; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-size: clamp(.85rem, 2vw, 1.1rem); margin: .6em 0 0; }

/* the home page's smaller project cards, two to a row on wide screens */
.proj-row { display: grid; gap: 20px; grid-template-columns: 1fr; max-width: 56rem; margin-top: 20px; }
@media (min-width: 700px) { .proj-row { grid-template-columns: 1fr 1fr; } }
.proj.small { grid-template-columns: 1fr; align-items: start; }
.proj.small h2 { font-size: 1.5rem; }
.proj.small img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.proj.soon { border-style: dashed; background: transparent; }
.proj.soon:hover { border-color: var(--line); }
.projects .more { display: inline-block; margin-top: 18px; }

/* stickers: "Free" and "GPL" on a project card */
.stickers { display: flex; gap: 8px; margin: 0 0 .5em; }
.card .stickers { margin: 0; }
.sticker { display: inline-block; font: 800 .78rem/1 var(--disp); letter-spacing: .06em; text-transform: uppercase; padding: .45em .8em; border-radius: 999px; background: var(--value); color: var(--btn-ink); transform: rotate(-4deg); box-shadow: 0 2px 0 color-mix(in srgb, var(--value) 45%, var(--bg)); }
.sticker.alt { background: var(--accent); transform: rotate(3deg); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 45%, var(--bg)); }
.card.soon { border-style: dashed; background: transparent; }
