/* Pramaan ID — product site.
 *
 * Built on the Pramaan token system (--ink/--navy/--blue/
 * --sky/--paper, the .shell/.band/.sec/.product/.feats/.cards/.steps vocabulary)
 * so the product site reads as the same family as frontier-labs.in. Two
 * departures, both grounded in the artwork rather than taste:
 *
 *  1. --jade / --spring are sampled from the Pramaan mark itself, whose gradient
 *     runs deep blue -> teal -> green. The pitch collateral used an indigo
 *     (#6E4FE9) that the logo has never contained; the mark wins.
 *  2. The display face is Space Grotesk, not Archivo. Pramaan's own collateral
 *     has always set in Space Grotesk, and a product is allowed its own voice
 *     inside the house style. Inter and JetBrains Mono are shared verbatim.
 *
 * No CDN: the CSP forbids one, and a login-adjacent property should not have a
 * third-party origin on its critical path.
 */

/* ---------- fonts (self-hosted) ---------- */
@font-face {
	font-family: "Space Grotesk";
	src: url("/assets/fonts/SpaceGrotesk-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Space Grotesk";
	src: url("/assets/fonts/SpaceGrotesk-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("/assets/fonts/InterVariable.woff2") format("woff2-variations");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("/assets/fonts/JetBrainsMono.woff2") format("woff2-variations");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

/* ---------- tokens ---------- */
:root {
	--ink: #070b14;
	--slate: #121c33;
	--navy: #16233d;
	--blue: #2570fb;
	/* Same hue, deep enough to carry text. #2570fb is the Frontier Labs brand
	 * blue and stays exactly as the house system defines it, but it is only
	 * 4.38:1 against white and 4.05:1 against --paper — so every use of it AS
	 * TEXT, and every white label sitting ON it, missed WCAG AA. Brand fill and
	 * accessible text are two different jobs; conflating them is what caused
	 * the failure, so they are two tokens. Measured: 5.10:1 with white,
	 * 4.71:1 on --paper, 5.10:1 on white. */
	--blue-aa: #2064ee;
	--sky: #4fa8ff;
	--jade: #10b3a0;
	--spring: #1eb45c;
	--paper: #f3f6fc;
	--signal: #ffb020;

	--on-ink: #e9eefb;
	--on-ink-dim: #9aa8c6;
	--on-paper: #101828;
	--on-paper-dim: #4a5876;

	--rule-dark: color-mix(in oklab, var(--on-ink) 14%, transparent);
	--rule-light: color-mix(in oklab, var(--on-paper) 12%, transparent);

	--display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
	--body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

	/* One fluid step drives the whole scale, so the rhythm holds at any width. */
	--step: clamp(1rem, 0.72rem + 1.35vw, 1.5rem);
	--gap: clamp(1.5rem, 1rem + 2.4vw, 3rem);
	--band-y: clamp(4.5rem, 3rem + 7vw, 9rem);
	--shell: 1180px;
	--radius: 14px;
	--ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--ink);
	color: var(--on-ink);
	font-family: var(--body);
	font-size: clamp(1rem, .96rem + .18vw, 1.075rem);
	line-height: 1.62;
	font-synthesis-weight: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }

.skip {
	position: absolute; left: -9999px; top: 0; z-index: 99;
	background: var(--blue-aa); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 700; line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
.h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5.1rem); margin: 0; }
.h2 { font-size: clamp(2.1rem, 1.35rem + 3.4vw, 4rem); margin: 0; }
.h2--light { color: var(--on-ink); }

.lede {
	font-size: clamp(1.05rem, .98rem + .38vw, 1.24rem);
	line-height: 1.62; color: var(--on-ink-dim); max-width: 58ch; text-wrap: pretty;
	margin: 1.1rem 0 0;
}
.lede--dark { color: var(--on-paper-dim); }

.mono { font-family: var(--mono); font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 500; }
.eyebrow {
	font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
	text-transform: uppercase; font-weight: 500; color: var(--sky); margin: 0 0 .9rem;
}
.band--paper .eyebrow { color: var(--blue-aa); }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; gap: .5rem;
	font: 600 .95rem/1 var(--body); padding: .85rem 1.35rem; border-radius: 999px;
	background: var(--blue-aa); color: #fff; text-decoration: none; border: 1px solid transparent;
	transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px -12px color-mix(in oklab, var(--blue) 70%, transparent);
}
.btn--ghost { background: transparent; color: inherit; border-color: var(--rule-dark); }
.band--paper .btn--ghost { border-color: var(--rule-light); }
.btn--ghost:hover { box-shadow: none; border-color: var(--sky); }
.btn--lg { padding: 1rem 1.7rem; font-size: 1rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ---------- nav ---------- */
.nav {
	position: sticky; top: 0; z-index: 40;
	backdrop-filter: blur(14px);
	background: color-mix(in oklab, var(--ink) 82%, transparent);
	border-bottom: 1px solid var(--rule-dark);
}
.nav__in { display: flex; align-items: center; gap: 1.5rem; padding: .85rem 0; }
.nav__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; margin-right: auto; }
.nav__brand img { width: 30px; height: 30px; }
.nav__word { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; font-size: 1.12rem; }
.nav__links { display: flex; gap: 1.4rem; }
.nav__links a { color: var(--on-ink-dim); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav__links a:hover { color: var(--on-ink); }
@media (max-width: 820px) { .nav__links { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(4rem, 2rem + 9vw, 8rem) 0 clamp(3rem, 2rem + 5vw, 6rem); overflow: hidden; }
.hero::before {
	content: ""; position: absolute; inset: -30% -10% auto -25%; height: 130%;
	background:
		radial-gradient(48% 42% at 22% 26%, color-mix(in oklab, var(--blue) 34%, transparent), transparent 70%),
		radial-gradient(40% 38% at 74% 12%, color-mix(in oklab, var(--jade) 22%, transparent), transparent 70%);
	filter: blur(10px); pointer-events: none;
}
.hero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--gap); align-items: center; }
@media (max-width: 900px) { .hero__in { grid-template-columns: 1fr; } }

.hero__gloss {
	font-family: var(--display); font-weight: 500; font-size: 1.05rem;
	color: var(--jade); margin: 0 0 .5rem;
}
.hero__gloss em { font-style: normal; color: var(--on-ink-dim); }
.grad {
	background: linear-gradient(100deg, var(--sky), var(--jade) 55%, var(--spring));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.trust { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-top: 2.4rem; }
.trust span { display: inline-flex; align-items: center; gap: .45rem; color: var(--on-ink-dim); font-size: .84rem; }
.trust svg { width: 15px; height: 15px; stroke: var(--jade); fill: none; stroke-width: 1.7; }

/* the shield artwork, ringed */
.emblem { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.emblem img { width: min(58%, 240px); filter: drop-shadow(0 24px 60px rgba(37,112,251,.35)); }
.emblem__rings { position: absolute; inset: 0; }
.emblem__rings ellipse { fill: none; stroke: url(#pg); stroke-width: 1; opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
	.emblem__rings { animation: spin 44s linear infinite; }
	@keyframes spin { to { transform: rotate(360deg); } }
}

/* ---------- bands ---------- */
.band { padding: var(--band-y) 0; }
.band--paper { background: var(--paper); color: var(--on-paper); }
.band--ink { background: var(--ink); color: var(--on-ink); border-top: 1px solid var(--rule-dark); }
.band--close {
	background:
		radial-gradient(70% 100% at 50% 0%, color-mix(in oklab, var(--jade) 16%, transparent), transparent 65%),
		var(--ink);
	border-top: 1px solid var(--rule-dark); text-align: center;
}
.band--close .lede { margin-inline: auto; }
.band--close .actions { justify-content: center; }
.sec { max-width: 62ch; margin-bottom: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); }
.sec--wide { max-width: 74ch; }

/* ---------- product proof points ---------- */
.product {
	background: #fff; border: 1px solid var(--rule-light); border-radius: var(--radius);
	padding: clamp(1.5rem, 1rem + 2vw, 2.6rem);
	box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 40px -28px rgba(16,24,40,.35);
}
.product__kicker { color: var(--blue-aa); margin: 0 0 .8rem; display: flex; align-items: center; gap: .5rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--spring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--spring) 22%, transparent); }
.product__name { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); margin: 0 0 .6rem; }

.feats {
	list-style: none; margin: 2rem 0 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1px; background: var(--rule-light); border: 1px solid var(--rule-light);
	border-radius: 10px; overflow: hidden;
}
.feats li { background: #fff; padding: 1.4rem 1.5rem; }
.feats h3 { font-family: var(--display); font-weight: 700; font-size: 1.02rem; margin: 0 0 .45rem; letter-spacing: -.005em; }
.feats p { margin: 0; font-size: .93rem; line-height: 1.58; color: var(--on-paper-dim); }

.boundary {
	margin: 1.8rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--rule-light);
	font-size: .9rem; color: var(--on-paper-dim);
}
.boundary .mono { color: var(--blue-aa); margin-right: .6rem; }

/* ---------- cards on ink ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.card {
	background: color-mix(in oklab, var(--slate) 55%, transparent);
	border: 1px solid var(--rule-dark); border-radius: var(--radius);
	padding: 1.5rem 1.5rem 1.6rem;
	transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--sky) 55%, transparent); }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 1.06rem; margin: .7rem 0 .5rem; letter-spacing: -.005em; }
.card p { margin: 0; font-size: .93rem; line-height: 1.6; color: var(--on-ink-dim); }
.card__ico { width: 26px; height: 26px; stroke: var(--sky); fill: none; stroke-width: 1.6; }

/* ---------- numbered steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 1.6rem; }
.steps li { border-top: 1px solid var(--rule-dark); padding-top: 1.1rem; }
.band--paper .steps li { border-top-color: var(--rule-light); }
.steps__n { display: block; color: var(--sky); margin-bottom: .7rem; }
.band--paper .steps__n { color: var(--blue-aa); }
.steps h3 { font-family: var(--display); font-weight: 700; font-size: 1.06rem; margin: 0 0 .45rem; }
.steps p { margin: 0; font-size: .93rem; color: var(--on-ink-dim); }
.band--paper .steps p { color: var(--on-paper-dim); }

/* ---------- comparison ---------- */
.cmp { border: 1px solid var(--rule-light); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cmp__row { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr); }
.cmp__row + .cmp__row { border-top: 1px solid var(--rule-light); }
.cmp__row > * { padding: 1rem 1.2rem; font-size: .93rem; }
.cmp__row--head > * { background: var(--paper); font-family: var(--mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--on-paper-dim); }
.cmp__k { font-weight: 600; }
.cmp__us { color: var(--on-paper); border-left: 2px solid var(--spring); }
.cmp__them { color: var(--on-paper-dim); }
@media (max-width: 760px) {
	.cmp__row { grid-template-columns: 1fr; }
	.cmp__row--head { display: none; }
	.cmp__us::before { content: "Pramaan ID — "; font-weight: 600; color: var(--spring); }
	.cmp__them::before { content: "Cloud SaaS stack — "; font-weight: 600; }
}

/* ---------- facts ---------- */
.facts {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1px; background: var(--rule-dark); border: 1px solid var(--rule-dark);
	border-radius: var(--radius); overflow: hidden; margin: 0;
}
.facts > div { background: var(--ink); padding: 1.4rem 1.5rem; }
.facts dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-dim); margin: 0 0 .5rem; }
.facts dd { margin: 0; font-size: .98rem; line-height: 1.55; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule-dark); padding: 2.4rem 0 3rem; background: var(--ink); }
.foot__in { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between; }
.foot__meta { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .88rem; color: var(--on-ink-dim); }
.foot__meta a { color: var(--sky); text-decoration: none; }
.foot__meta a:hover { text-decoration: underline; }
.foot__brand { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--on-ink-dim); }
.foot__brand img { width: 26px; height: 26px; }

/* ---------- scroll reveal (progressive; content is complete without it) ---------- */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.band .sec, .band .product, .band .cards, .band .steps, .band .cmp, .band .facts {
			animation: reveal linear both;
			animation-timeline: view();
			animation-range: entry 8% cover 26%;
		}
		@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
	}
}

/* ---------- long-form pages (privacy / delete-account) ---------- */
.prose { padding: clamp(3rem, 2rem + 4vw, 5rem) 0; }
.prose h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); letter-spacing: -.02em; margin: 0 0 .6rem; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: 1.35rem; margin: 2.4rem 0 .6rem; }
.prose p, .prose li { color: var(--on-ink-dim); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose .meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--on-ink-dim); }
.prose .card { display: block; margin: 1.6rem 0; }
.prose .shell { max-width: 76ch; }

/* ---------- utilities ----------
 * These exist so the markup carries NO style="" attributes: an inline style
 * attribute would force `style-src-attr 'unsafe-inline'` into this site's CSP,
 * and a marketing page has no reason to pay that. */
.lede--wide { max-width: 72ch; }
.mono--plain { text-transform: none; letter-spacing: 0; }

/* The proof reel lives in its own sheet, assets/reel.css: it is a large,
 * self-contained component with its own vocabulary, and keeping it out of here
 * means a change to the reel cannot disturb the rules that paint the fold. */

/* ---------- architecture diagram ----------
 * Inline SVG, not an <img>: the tier labels have to reflow with the page's own
 * fonts and stay selectable, and an external image would be a second asset to
 * keep in step with the mark. Colours are attributes on the SVG nodes rather
 * than CSS, because this site's CSP has no `style-src-attr` and pramaan-caddy-
 * deploy refuses an inline <style> — a stylesheet rule here would style the
 * diagram, but the SVG also has to survive being opened on its own. */
.arch { margin: 0 0 clamp(1.8rem, 1.2rem + 2vw, 3rem); }
.arch__svg {
	width: 100%; height: auto; display: block;
	border-radius: var(--radius);
	background: color-mix(in oklab, var(--navy) 34%, var(--ink));
	border: 1px solid var(--rule-dark);
	padding: clamp(.6rem, .3rem + 1vw, 1.1rem);
}
.facts--arch { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.facts--arch dd { color: var(--on-ink-dim); }

/* ---------- long-form pages (privacy, delete-account) ----------
 * These rules lived in an inline <style> on both documents, which this
 * site's CSP (`style-src 'self'`, no hash for them — pramaan-caddy-deploy
 * only hashes index.html) blocked outright. The privacy policy's data
 * table, which is the part of that page anyone actually reads, was
 * rendering with no borders and no padding, and nothing said so: a
 * blocked stylesheet is a console warning, not a broken page. */
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--rule-dark); vertical-align: top; color: var(--on-ink-dim); }
.prose th { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink); }
.prose strong { color: var(--on-ink); }
