:root {
	color-scheme: light dark;
	--ink: #16161a;
	--muted: #5d5d68;
	--rule: #e4e4e9;
	--card: #f7f7f9;
	--accent: #0a63d6;
	--page: #ffffff;
	--hero: linear-gradient(140deg, #2b2b31 0%, #121215 55%, #000 100%);
	--wordmark-fill: linear-gradient(100deg, #0b0b0b 0%, #0b0b0b 38%, #7c7c86 100%);
}

/* Dark follows the system unless someone has chosen. :not([data-theme="light"]) is what lets
   a manual light choice survive a dark system; the second rule is the manual dark choice. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #f1f1f4;
		--muted: #a2a2ac;
		--rule: #313138;
		--card: #1b1b20;
		--accent: #7db0ff;
		--page: #121215;
		--wordmark-fill: linear-gradient(100deg, #f1f1f4 0%, #f1f1f4 38%, #8a8a95 100%);
	}
}
:root[data-theme="dark"] {
		--ink: #f1f1f4;
		--muted: #a2a2ac;
		--rule: #313138;
		--card: #1b1b20;
		--accent: #7db0ff;
		--page: #121215;
		--wordmark-fill: linear-gradient(100deg, #f1f1f4 0%, #f1f1f4 38%, #8a8a95 100%);
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--page);
	color: var(--ink);
	font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-text-size-adjust: 100%;
}

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.brand {
	font-weight: 750; font-size: 18px; letter-spacing: 0.02em; text-decoration: none;
	color: var(--ink);  /* the fallback, kept first: without background-clip the text would vanish */
	background: var(--wordmark-fill);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
	.brand { background: none; -webkit-text-fill-color: currentColor; }
}
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
/* An app tab is a product name: let the row wrap, never the name itself. Without this "Text
   Snatch" breaks across two lines on a phone and the nav goes ragged. */
.top nav a { white-space: nowrap; }
@media (max-width: 560px) {
	.top .wrap { flex-wrap: wrap; gap: 10px; }
	.top nav { gap: 8px 14px; font-size: 15px; }
}
.top nav a { color: var(--muted); text-decoration: none; font-size: 16px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }

/* Hero */
.hero { background: var(--hero); color: #fff; padding: 76px 0 84px; }
.hero h1 { margin: 0 0 14px; font-size: 40px; line-height: 1.15; letter-spacing: -0.025em; max-width: 22ch; }
.hero p { margin: 0; font-size: 20px; max-width: 46ch; color: rgba(255, 255, 255, 0.88); }

/* Sections */
section { padding: 56px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }
h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -0.02em; }
h3 { margin: 0 0 6px; font-size: 19px; }
.sub { margin: 0 0 28px; color: var(--muted); max-width: 60ch; }
p { max-width: 68ch; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card { padding: 24px; background: var(--card); border-radius: 14px; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card a { color: var(--accent); text-decoration: none; font-weight: 500; }
.card a:hover { text-decoration: underline; }
.tag { display: inline-block; margin-bottom: 10px; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }

a { color: var(--accent); }

footer { padding: 32px 0 56px; color: var(--muted); font-size: 15px; }
footer p { margin: 4px 0; max-width: none; }

@media (max-width: 640px) {
	.hero { padding: 52px 0 56px; }
	.hero h1 { font-size: 31px; }
	.hero p { font-size: 18px; }
	.top .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
	dl { grid-template-columns: 1fr; gap: 2px 0; }
	dd { margin-bottom: 12px; }
}

/* ---- Editorial home page ---------------------------------------------------
   Light, typographic and image-led: a full-bleed showcase card with the
   headline over it, then rounded tiles. Only index.html opts in, via
   <body class="editorial">, so About and Contact keep the plainer look. */
.editorial { --ink: #0b0b0b; --muted: #6a6a72; --rule: #e6e6ea; --card: #f4f4f6; --page: #fff; --accent: #0b0b0b;
	--wordmark-fill: linear-gradient(100deg, #0b0b0b 0%, #0b0b0b 38%, #7c7c86 100%); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .editorial { --ink: #f4f4f6; --muted: #9c9ca6; --rule: #2a2a30; --card: #17171b; --page: #0d0d10; --accent: #f4f4f6; --wordmark-fill: linear-gradient(100deg, #f4f4f6 0%, #f4f4f6 38%, #8a8a95 100%); }
}
:root[data-theme="dark"] .editorial { --ink: #f4f4f6; --muted: #9c9ca6; --rule: #2a2a30; --card: #17171b; --page: #0d0d10; --accent: #f4f4f6; --wordmark-fill: linear-gradient(100deg, #f4f4f6 0%, #f4f4f6 38%, #8a8a95 100%); }
.editorial { background: var(--page); color: var(--ink); }
.editorial main > .wrap { padding-top: 22px; padding-bottom: 60px; }

/* Showcase: type on its own ground, image beside it. Overlaying a headline on a desktop
   screenshot has nowhere quiet to sit, so the two get their own halves instead. */
.showcase {
	border-radius: 26px; overflow: hidden; display: grid; grid-template-columns: 1fr;
	background: linear-gradient(135deg, #3a3a42 0%, #16161a 46%, #000 100%); color: #fff;
}
.showcase img { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.showcase-copy { padding: 40px 34px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.showcase h1 {
	margin: 0 0 12px; font-size: clamp(46px, 8vw, 92px); line-height: 0.9;
	letter-spacing: -0.045em; font-weight: 800;
}
.showcase p { margin: 0 0 22px; font-size: clamp(16px, 1.6vw, 19px); max-width: 32ch; color: rgba(255, 255, 255, 0.82); }

@media (min-width: 820px) {
	.showcase { grid-template-columns: 1fr 1.05fr; min-height: 430px; }
	.showcase-copy { padding: 48px 44px; }
}

.pill {
	display: inline-block; background: #fff; color: #0b0b0b; text-decoration: none;
	padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
}
.pill:hover { background: rgba(255, 255, 255, 0.86); }

/* Tiles. Six columns wide, two on a tablet, one on a phone; each tile spans its own. */
.bento { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 14px; }
.tile {
	background: var(--card); border: 1px solid var(--rule); border-radius: 22px;
	padding: 26px; display: flex; flex-direction: column; gap: 10px;
}
.tile h3 { margin: 0; font-size: 20px; letter-spacing: -0.015em; }
.tile p { margin: 0; max-width: 46ch; }
.tile-note p, .tile-cta p, .figure-note { color: var(--muted); }

.tile-app { padding: 0; overflow: hidden; }
.tile-app .shot { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--rule); }
.tile-app .body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tile-app h3 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 750; letter-spacing: -0.03em; }
.tile-app .tag { align-self: flex-start; }
.tile-app .body > a { margin-top: auto; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--ink); align-self: flex-start; padding-bottom: 1px; }

/* Stand-in artwork for an app with no screenshots yet: its own tab strip, drawn in CSS. */
.tabstrip {
	aspect-ratio: 16 / 10; display: flex; flex-direction: column; justify-content: center; gap: 10px;
	padding-left: 0; background: linear-gradient(120deg, #edeef2 0%, #dfe1e8 100%);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabstrip { background: linear-gradient(120deg, #232329 0%, #16161a 100%); } }
:root[data-theme="dark"] .tabstrip { background: linear-gradient(120deg, #232329 0%, #16161a 100%); }
.tabstrip i { display: block; height: 22px; width: 42%; border-radius: 0 11px 11px 0; }
.tabstrip i:nth-child(2) { width: 30%; }
.tabstrip i:nth-child(3) { width: 52%; }
.tabstrip i:nth-child(4) { width: 36%; }
.tabstrip i:nth-child(5) { width: 24%; }

.figure { font-size: clamp(40px, 7vw, 62px); font-weight: 750; letter-spacing: -0.045em; line-height: 1; margin: 0; }
.figure-note { font-size: 15px; }

.tile-cta { text-decoration: none; color: inherit; }
.tile-cta:hover { border-color: var(--ink); }
.cta-link { margin-top: auto; font-weight: 600; overflow-wrap: anywhere; border-bottom: 2px solid var(--ink); align-self: flex-start; }

@media (min-width: 640px) {
	.bento { grid-template-columns: repeat(2, 1fr); }
	.tile-cta { grid-column: span 2; }
}

@media (min-width: 1000px) {
	.bento { grid-template-columns: repeat(6, 1fr); }
	.tile-app  { grid-column: span 3; }
	.tile-mark { grid-column: span 2; justify-content: flex-end; }
	.tile-note { grid-column: span 2; }
	.tile-cta  { grid-column: span 6; flex-direction: row; align-items: baseline; gap: 26px; }
	.tile-cta h3 { flex: none; }
	.tile-cta p { flex: 1; }
	.cta-link { margin-top: 0; align-self: baseline; }
}

/* Theme switch. Sits in the header on every page; the page starts on whatever the system says and
   remembers a choice per browser. */
.theme {
	appearance: none; -webkit-appearance: none; cursor: pointer;
	background: none; border: 1px solid var(--rule); border-radius: 999px;
	color: var(--muted); font: inherit; font-size: 13px; line-height: 1;
	padding: 6px 12px; margin-left: 18px;
}
.theme:hover { color: var(--ink); border-color: var(--ink); }
/* theme.js writes the label, so an empty button means the script never ran — 404, blocked, or threw.
   The border and padding would otherwise leave a dead pill sitting in the nav of every page, which
   reads as a broken site rather than as a missing feature. Fail to nothing, not to wrong. */
.theme:empty { display: none; }
