/* jpa-software.com — space theme in the colours of JPA Software's logo (blue #0f83f4 → violet #602fe0, navy).
   A WebGL scene (public/js/space.min.js, source site/js/space.js) runs behind the page: html.webgl.
   Without WebGL, the hero shows the SVG launch and a static planet glow. Hanken Grotesk + Newsreader. */

@import url("/fonts/fonts.css");

:root {
	--bg: #040817;
	--bg-2: #0b1430;
	--ink: #eef1fb;        /* 17:1 on --bg */
	--ink-2: #c3cae0;      /* 12:1 */
	--muted: #98a3c4;      /* 7.8:1 */
	--blue: #7cc0ff;       /* light blue, text: 10:1 */
	--violet: #b39dff;     /* light violet, text: 8.6:1 */
	--logo-blue: #0f83f4;
	--logo-violet: #602fe0;
	--gradient: linear-gradient(100deg, #7cc0ff 10%, #b39dff 90%);
	--glow: linear-gradient(90deg, #0f83f4, #602fe0);
	--line: rgb(169 184 255 / 0.16);
	--glass: rgb(11 20 48 / 0.55);
	--sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--serif: "Newsreader", Georgia, serif;
	--maxw: 1180px;
	--radius: 22px;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--ink-2); background: var(--bg); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: #602fe0; color: #fff; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 780px; }

/* The 3D scene, fixed behind everything */
#space { position: fixed; inset: 0; width: 100%; height: 100%; display: none; z-index: 0; }
html.webgl #space { display: block; }
/* A shade over the scene on the text side, so the planet never fights the words */
html.webgl body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgb(2 4 12 / 0.62) 0%, rgb(2 4 12 / 0.28) 45%, rgb(2 4 12 / 0) 70%); }
h1, h2 { text-shadow: 0 2px 30px rgb(2 4 12 / 0.65); }
h1 em, h2 em { text-shadow: none; }
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* ── Header ───────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 20; background: linear-gradient(rgb(4 8 23 / 0.85), rgb(4 8 23 / 0)); backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 76px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 54px; height: 32px; }
.brand span { font-weight: 700; font-size: 1.02rem; letter-spacing: 0.1em; text-transform: uppercase; }
.nav ul { display: flex; gap: 26px; list-style: none; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.lang { display: flex; gap: 4px; font-size: 13px; font-weight: 700; }
.lang a, .lang span { padding: 5px 9px; border-radius: 8px; }
.lang span { background: var(--ink); color: var(--bg); }
.lang a { color: var(--ink); text-decoration: none; border: 1px solid var(--line); }

/* ── Type ─────────────────────────────────── */
h1, h2, h3 { color: var(--ink); font-weight: 700; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.9rem, 7vw, 5.8rem); line-height: 0.98; }
h2 { font-size: clamp(2.2rem, 4.8vw, 3.9rem); line-height: 1.02; }
h3 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.02em; }
h1 em, h2 em, .grad { font-style: normal; color: var(--violet); background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 38em; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; border: 1px solid rgb(169 184 255 / 0.35); background: rgb(255 255 255 / 0.04); color: var(--ink); font-size: 14px; font-weight: 600; backdrop-filter: blur(8px); margin-bottom: 26px; }
.badge::before { content: "✦"; color: var(--violet); }

/* ── Buttons ──────────────────────────────── */
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.actions.spaced { margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 14px; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; border: 1px solid transparent; font-family: inherit; transition: transform 0.25s, box-shadow 0.25s; }
.btn-ink { background: linear-gradient(180deg, #f4f6ff, #c9d3ff); color: #0b1430; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.4) inset, 0 10px 40px rgb(124 140 255 / 0.45); }
.btn-ink:hover { color: #0b1430; transform: translateY(-2px); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.5) inset, 0 16px 56px rgb(124 140 255 / 0.65); }
.btn-ghost { background: rgb(11 20 48 / 0.5); color: var(--ink); border-color: rgb(169 184 255 / 0.3); backdrop-filter: blur(10px); }
.btn-ghost:hover { color: var(--ink); background: rgb(30 42 90 / 0.6); }

/* ── Hero: NASA footage, full bleed ───────── */
.hero-video { position: absolute; inset: 0; overflow: hidden; z-index: -1; background: #02040c; }
.hero-video video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.05); }
.hero-video::after { content: ""; position: absolute; inset: 0; background:
	linear-gradient(90deg, rgb(2 4 12 / 0.82) 0%, rgb(2 4 12 / 0.4) 36%, rgb(2 4 12 / 0) 62%),
	linear-gradient(0deg, #02040c 0%, rgb(2 4 12 / 0) 28%),
	linear-gradient(180deg, rgb(2 4 12 / 0.75) 0%, rgb(2 4 12 / 0) 22%),
	radial-gradient(80% 60% at 70% 60%, rgb(96 47 224 / 0.12), transparent 70%); }
.credit { position: absolute; right: 28px; bottom: 22px; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.hero { min-height: 100vh; min-height: 100svh; margin-top: -76px; padding: 116px 0 120px; display: flex; align-items: center; position: relative; isolation: isolate; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: center; width: 100%; }
.hero .lead { margin: 26px 0 36px; }
.hero-text { max-width: 640px; }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.scroll-hint::after { content: ""; display: block; width: 1px; height: 44px; margin: 10px auto 0; background: linear-gradient(var(--blue), transparent); animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
/* ── Sections ─────────────────────────────── */
.section { padding: 140px 0; position: relative; }
.section.tall { min-height: 120vh; display: flex; align-items: center; }
.section-head { margin-bottom: 56px; max-width: 46em; }
.section-head .lead { margin-top: 18px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }

.showcase { display: grid; gap: 120px; }
.show { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.show:nth-child(2) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.show:nth-child(2) .show-text { order: 2; }
.show-text { padding: 40px; }
.show-text .tag { color: var(--violet); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; margin-bottom: 8px; }
.show-text h3 { font-size: clamp(2rem, 3.6vw, 2.8rem); letter-spacing: -0.04em; margin-bottom: 14px; }
.show-text p { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-bottom: 22px; }
.chips li { font-size: 13px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: rgb(255 255 255 / 0.04); }
.shot { position: relative; border-radius: 18px; padding: 10px; background: linear-gradient(160deg, rgb(124 192 255 / 0.35), rgb(179 157 255 / 0.15) 40%, rgb(255 255 255 / 0.03)); box-shadow: 0 30px 120px rgb(96 47 224 / 0.45), 0 0 0 1px rgb(169 184 255 / 0.25); }
.shot img { border-radius: 10px; width: 100%; height: auto; }
.shot::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: radial-gradient(closest-side, rgb(15 131 244 / 0.45), transparent); filter: blur(30px); }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; list-style: none; counter-reset: p; }
.principles li { counter-increment: p; padding: 34px; }
.principles li::before { content: counter(p, decimal-leading-zero); display: block; font-weight: 700; font-size: 14px; letter-spacing: 0.1em; color: var(--blue); margin-bottom: 14px; }
.principles h3 { margin-bottom: 10px; }

.ai .wrap { text-align: center; }
.ai .lead { margin: 22px auto 0; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; list-style: none; margin-top: 64px; text-align: left; }
.facts li { padding: 28px; }
.facts strong { display: block; color: var(--ink); font-size: 1.15rem; margin-bottom: 8px; }

.contact .wrap { text-align: center; }
.contact .lead { margin: 20px auto 30px; }
.mail { font-weight: 700; font-size: clamp(1.8rem, 5vw, 3.6rem); letter-spacing: -0.04em; text-decoration: none; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--violet); }
.mail:hover { filter: brightness(1.2); }

/* Scroll-driven entrances, where the browser supports them (Chrome, Edge, Safari 26). */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
		.shot.reveal { animation-name: reveal-shot; }
		.hero-text { animation: lift linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
		.hero-video { animation: away linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
	}
}
@keyframes reveal { from { opacity: 0; transform: translateY(80px) scale(0.96); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes reveal-shot { from { opacity: 0; transform: perspective(1200px) rotateX(24deg) translateY(120px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes lift { to { opacity: 0; transform: translateY(-120px); filter: blur(6px); } }
@keyframes away { to { opacity: 0; transform: scale(1.12); filter: blur(10px); } }

/* ── Plain pages ──────────────────────────── */
.page-head { padding: 90px 0 30px; }
.prose { padding: 36px 40px; margin-bottom: 100px; }
.prose h2 { font-size: 1.6rem; margin: 34px 0 12px; letter-spacing: -0.02em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-bottom: 14px; }
.prose ul { padding-left: 1.3em; }
.prose dl { display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr); gap: 8px 20px; margin-bottom: 14px; }
.prose dt { font-weight: 600; color: var(--ink); }
.todo { background: rgb(179 157 255 / 0.18); color: #e2d9ff; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.notice { border-left: 3px solid var(--violet); background: rgb(255 255 255 / 0.04); padding: 14px 18px; margin-bottom: 24px; border-radius: 0 10px 10px 0; }
.lead + .notice, .page-head .lead { margin-top: 14px; }

/* ── Footer ───────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 15px; background: linear-gradient(rgb(4 8 23 / 0), rgb(4 8 23 / 0.9)); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: baseline; justify-content: space-between; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; }
.site-footer a { color: var(--ink-2); }

@media (max-width: 960px) {
	.hero-grid, .show, .show:nth-child(2), .principles, .facts { grid-template-columns: minmax(0, 1fr); }
	.show:nth-child(2) .show-text { order: 0; }
	.hero { align-items: flex-end; padding-top: 40vh; padding-bottom: 70px; }
	.hero-video::after { background: linear-gradient(0deg, #02040c 8%, rgb(2 4 12 / 0.35) 60%, rgb(2 4 12 / 0.6) 100%); }
	.credit { right: 18px; bottom: 12px; }
	html.webgl body::before { background: rgb(2 4 12 / 0.35); }
	.hero-text { background: rgb(4 8 23 / 0.62); border: 1px solid var(--line); border-radius: 22px; padding: 26px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
	.scroll-hint { display: none; }
	.section { padding: 100px 0; }
	.showcase { gap: 80px; }
	.prose dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.prose dd { margin-bottom: 10px; }
}
@media (max-width: 520px) {
	.wrap { padding: 0 18px; }
	.site-header .wrap { gap: 6px 16px; padding-top: 10px; padding-bottom: 10px; }
	.nav ul { gap: 4px 16px; }
	.show-text, .principles li, .facts li, .prose { padding: 24px; }
	.btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .scroll-hint::after { animation: none; } }

