/* ============================================================
   DefectLog — landing page
   Reuses the app's "Precision Instrument" design system:
   IBM Plex family · blueprint off-white · ink navy
   steel accent (controls) · rust reserved for £ and the caliper mark
   Kept standalone (no build step) so the page opens and deploys
   as plain static files.
   ============================================================ */

:root {
	/* Surfaces */
	--paper:        #f3f4f1;
	--surface:      #ffffff;
	--surface-2:    #f8f9f7;

	/* Ink */
	--ink:          #16202e;
	--ink-soft:     #56677a;
	--ink-faint:    #5f7080;

	/* Lines */
	--line:         #dde1de;
	--line-strong:  #c3cac4;
	--grid:         rgba(22, 32, 46, 0.035);

	/* Accent — steel */
	--accent:       #33658a;
	--accent-ink:   #274e6b;
	--accent-soft:  #e4edf3;
	--accent-ring:  #5f92b8;

	/* Cost — rust: ONLY for £ and the caliper mark */
	--cost:         #bd3c14;
	--cost-ink:     #952e0d;
	--cost-soft:    #f6e7df;

	/* CAPA states, borrowed for the objection ticks */
	--closed:       #0f766e;

	/* Type */
	--sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

	/* Metrics */
	--radius:    3px;
	--radius-lg: 5px;
	--maxw:      1080px;
	--shadow:    0 1px 2px rgba(22, 32, 46, 0.05), 0 1px 0 rgba(22, 32, 46, 0.02);
	--shadow-lg: 0 6px 24px rgba(22, 32, 46, 0.08), 0 1px 2px rgba(22, 32, 46, 0.05);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background-color: var(--paper);
	/* the same barely-there engineering-paper grid as the app */
	background-image:
		linear-gradient(var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: 26px 26px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-weight: 600; line-height: 1.18; margin: 0; letter-spacing: -0.01em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }

.cost { color: var(--cost-ink); }

/* ---------- Layout ---------- */

.wrap {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 clamp(20px, 4vw, 40px);
}

section { padding: clamp(56px, 8vw, 104px) 0; }

.eyebrow {
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin: 0 0 14px;
}

/* ---------- Top bar ---------- */

.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(243, 244, 241, 0.85);
	-webkit-backdrop-filter: saturate(1.2) blur(8px);
	backdrop-filter: saturate(1.2) blur(8px);
	border-bottom: 1px solid var(--line);
}
.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-weight: 700;
	font-size: 18px;
	color: var(--ink);
	letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-tag {
	font-family: var(--mono);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.12em;
	color: var(--ink-faint);
	border: 1px solid var(--line-strong);
	border-radius: 2px;
	padding: 2px 5px;
	margin-left: 2px;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--sans);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	padding: 13px 22px;
	border-radius: var(--radius);
	border: 1px solid var(--accent-ink);
	background: var(--accent);
	color: #fff;
	cursor: pointer;
	transition: background 0.14s, transform 0.06s;
	white-space: nowrap;
}
.btn:hover { background: var(--accent-ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

.btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 15px;
	padding: 13px 22px;
	border-radius: var(--radius);
	border: 1px solid var(--line-strong);
	background: var(--surface);
	color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero h1 {
	font-size: clamp(2rem, 5vw, 3.25rem);
	line-height: 1.08;
	max-width: 20ch;
}
.hero .lede {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	color: var(--ink-soft);
	max-width: 46ch;
	margin: 22px 0 0;
}
.hero .byline {
	font-size: 15px;
	color: var(--ink-faint);
	max-width: 52ch;
	margin: 18px 0 0;
	padding-left: 14px;
	border-left: 2px solid var(--line-strong);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 32px; }
.hero-cta .note { font-size: 14px; color: var(--ink-faint); }

.promise {
	display: inline-block;
	margin-top: 40px;
	font-family: var(--mono);
	font-size: clamp(0.9rem, 1.6vw, 1.05rem);
	font-weight: 500;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 3px solid var(--cost);
	border-radius: var(--radius);
	padding: 14px 18px;
	box-shadow: var(--shadow);
}

/* ---------- Pain strip ---------- */

.pain { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pain-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(20px, 3vw, 40px);
}
.pain blockquote {
	margin: 0;
	font-size: 1.12rem;
	line-height: 1.5;
	color: var(--ink);
}
.pain .who {
	display: block;
	margin-top: 12px;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--ink-faint);
}
.pain .qmark {
	font-family: var(--mono);
	color: var(--cost);
	font-size: 22px;
	line-height: 1;
	display: block;
	margin-bottom: 10px;
}

/* ---------- Pillars ---------- */

.pillar { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.pillar + .pillar { margin-top: clamp(48px, 7vw, 96px); }
.pillar.flip .pillar-copy { order: 2; }
.pillar-num {
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: var(--accent);
	margin-bottom: 12px;
}
.pillar h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); max-width: 16ch; }
.pillar p { color: var(--ink-soft); margin: 16px 0 0; max-width: 46ch; }
.pillar .honesty {
	margin-top: 18px;
	font-size: 14.5px;
	color: var(--ink-faint);
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 12px 15px;
	max-width: 46ch;
}

/* ---------- Screenshot placeholder / figure ---------- */

.shot {
	margin: 0;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}
.shot img { display: block; width: 100%; height: auto; }
.shot-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 9px 12px;
	background: var(--surface-2);
	border-bottom: 1px solid var(--line);
}
.shot-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.shot-bar .label {
	width: auto; height: auto; border-radius: 0; background: none;
	margin-left: 8px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.06em;
	color: var(--ink-faint);
}
/* placeholder body — shown until a real screenshot is dropped in */
.shot-ph {
	position: relative;
	aspect-ratio: 16 / 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
	padding: 24px;
	color: var(--ink-faint);
	background-image:
		linear-gradient(var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: 22px 22px;
}
.shot-ph .ph-title { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--ink-soft); }
.shot-ph .ph-file { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.shot-ph .ph-hint { font-size: 12px; max-width: 30ch; }

/* ---------- Report band ---------- */

.report-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.report-band h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); max-width: 15ch; }
.report-band p { color: var(--ink-soft); margin: 16px 0 0; max-width: 44ch; }

/* ---------- Builder ---------- */

.builder { text-align: center; }
.builder h2 { font-size: clamp(1.5rem, 3vw, 2rem); max-width: 22ch; margin: 0 auto; }
.builder p { color: var(--ink-soft); max-width: 52ch; margin: 20px auto 0; }
.builder .creds {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 26px;
}
.builder .creds span {
	font-family: var(--mono);
	font-size: 12.5px;
	letter-spacing: 0.04em;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 7px 15px;
}

/* ---------- Objections ---------- */

.objections h2 { font-size: clamp(1.5rem, 3vw, 2rem); text-align: center; max-width: 20ch; margin: 0 auto clamp(32px, 5vw, 52px); }
.obj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.obj {
	background: var(--surface);
	padding: clamp(20px, 3vw, 30px);
}
.obj .q {
	display: flex;
	gap: 10px;
	font-weight: 600;
	font-size: 1.02rem;
	color: var(--ink);
}
.obj .q::before {
	content: "";
	flex: none;
	margin-top: 6px;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--accent);
}
.obj .a { margin: 12px 0 0 18px; color: var(--ink-soft); font-size: 15px; }

/* ---------- Pricing ---------- */

.pricing { text-align: center; }
.price-card {
	max-width: 460px;
	margin: 0 auto;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: clamp(30px, 5vw, 44px);
}
.price-headline {
	font-size: clamp(1.4rem, 3vw, 1.85rem);
	max-width: 18ch;
	margin: 0 auto;
}
.price-sub { color: var(--ink-soft); margin: 16px auto 0; max-width: 42ch; }
.price-offer {
	margin: 24px 0 0;
	padding: 16px;
	background: var(--accent-soft);
	border: 1px solid #cfe0ea;
	border-radius: var(--radius);
	font-weight: 600;
	color: var(--accent-ink);
}
.price-card .btn { margin-top: 26px; width: 100%; justify-content: center; }
.price-card .fineprint { font-size: 13px; color: var(--ink-faint); margin: 16px 0 0; }

/* ---------- Footer ---------- */

.site-foot {
	border-top: 1px solid var(--line);
	background: var(--surface);
	padding: 40px 0;
	font-size: 14px;
	color: var(--ink-faint);
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.disclaimer { max-width: 60ch; line-height: 1.5; margin: 18px 0 0; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
	.pain-grid { grid-template-columns: 1fr; }
	.pillar, .report-grid { grid-template-columns: 1fr; }
	.pillar.flip .pillar-copy { order: 0; }
	.pillar .pillar-shot { order: -1; }
	.report-grid .report-shot { order: -1; }
	.obj-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
	.hero-cta { flex-direction: column; align-items: stretch; }
	.hero-cta .btn, .hero-cta .btn-ghost { justify-content: center; }
	.brand-tag { display: none; }
}
