/**
 * RD Performance Toolkit — marketing site design system.
 *
 * Design direction: the signature element is the circular score gauge —
 * not decorative, it's literally what the product itself shows you
 * (Security Score, Core Web Vitals score). The hero's big gauge is meant
 * to feel like the moment right after a scan finishes.
 */

/* ---------------------------------------------------------------------
   Tokens
   --------------------------------------------------------------------- */
:root {
	--ink: #0b1120;
	--ink-soft: #4b5468;
	--base: #ffffff;
	--fog: #f4f6fb;
	--border: #e3e7f0;

	--primary: #3b5bfd;
	--primary-dark: #2a46d6;
	--primary-tint: #ebefff;

	--success: #16a34a;
	--success-dark: #0f7a37;
	--success-tint: #e8f8ee;

	--amber: #f59e0b;
	--amber-tint: #fff6e5;

	--danger: #dc2626;
	--danger-tint: #fdecec;

	--font-display: "Space Grotesk", "Segoe UI", sans-serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

	--radius-sm: 10px;
	--radius-md: 16px;
	--radius-lg: 28px;
	--radius-pill: 999px;

	--shadow-sm: 0 2px 10px rgba(11, 17, 32, 0.06);
	--shadow-md: 0 12px 32px rgba(11, 17, 32, 0.10);
	--shadow-lg: 0 24px 64px rgba(11, 17, 32, 0.16);

	--container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--base);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.01em;
	margin: 0 0 14px;
	color: var(--ink);
}

h1 { font-size: clamp(34px, 5vw, 60px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 20px; }

p { margin: 0 0 16px; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

code, .mono { font-family: var(--font-mono); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 820px; }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--primary);
	margin: 0 0 14px;
}

.section { padding: 88px 0; }
.section--fog { background: var(--fog); }
.section--ink { background: var(--ink); color: rgba(255,255,255,0.85); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 18px; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: var(--radius-pill);
	font-weight: 700;
	font-size: 15px;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none !important;
	line-height: 1;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 8px 24px rgba(59,91,253,0.32); }
.btn--primary:hover { background: var(--primary-dark); }

.btn--outline { background: transparent; border-color: var(--border); color: var(--ink); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

.btn--ghost-light { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); color: #fff; }
.btn--ghost-light:hover { background: rgba(255,255,255,0.16); }

.btn--sm { padding: 10px 20px; font-size: 13px; }
.btn--lg { padding: 18px 36px; font-size: 17px; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------------
   Nav
   --------------------------------------------------------------------- */
.nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,0.92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 24px; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); flex-shrink: 0; }
.nav__logo-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), #6b83ff); flex-shrink: 0; }
.nav__links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink-soft); font-weight: 600; font-size: 14px; }
.nav__links a:hover { color: var(--primary); text-decoration: none; }
.nav__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { display: block; width: 22px; height: 2px; background: var(--ink); position: relative; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; }
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after { top: 7px; }

/* ---------------------------------------------------------------------
   Signature: score gauge
   --------------------------------------------------------------------- */
.gauge {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.gauge svg { transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-linecap: round; }
.gauge__track { stroke: rgba(255,255,255,0.14); }
.gauge__fill { stroke: var(--success); transition: stroke-dashoffset 1.4s cubic-bezier(.16,1,.3,1); }
.gauge__value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge__number { font-family: var(--font-display); font-weight: 700; color: #fff; }
.gauge__label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); }

.gauge--light .gauge__track { stroke: var(--border); }
.gauge--light .gauge__number { color: var(--ink); }
.gauge--light .gauge__label { color: var(--ink-soft); }

.gauge--sm .gauge__number { font-size: 20px; }
.gauge--lg .gauge__number { font-size: 44px; }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero {
	background: linear-gradient(175deg, var(--ink) 0%, #17224a 60%, #101a3a 100%);
	color: #fff;
	padding: 90px 0 70px;
	overflow: hidden;
	position: relative;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero p.lede { font-size: 19px; color: rgba(255,255,255,0.72); max-width: 520px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: rgba(255,255,255,0.55); }
.hero__chips span { display: flex; align-items: center; gap: 6px; }
.hero__visual { display: flex; justify-content: center; }
.hero__gauge-card {
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: var(--radius-lg);
	padding: 40px;
	text-align: center;
	backdrop-filter: blur(6px);
}
.hero__gauge-stats { display: flex; gap: 24px; margin-top: 24px; justify-content: center; }
.hero__gauge-stats div { text-align: center; }
.hero__gauge-stats strong { display: block; font-family: var(--font-mono); font-size: 15px; color: #fff; }
.hero__gauge-stats span { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------------------------------------------------------------------
   Cards / grids
   --------------------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
	background: var(--base);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 28px;
	transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-tint); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; font-size: 17px; }
.card p { font-size: 14px; margin-bottom: 0; }

.tag {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: var(--radius-pill);
	font-size: 11px;
	font-weight: 700;
	font-family: var(--font-mono);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: var(--primary-tint);
	color: var(--primary-dark);
}
.tag--green { background: var(--success-tint); color: var(--success-dark); }
.tag--amber { background: var(--amber-tint); color: #935900; }
.tag--pro { background: linear-gradient(90deg, #7c3aed, #a855f7); color: #fff; }

/* ---------------------------------------------------------------------
   Feature list (features page)
   --------------------------------------------------------------------- */
.feature-row {
	display: grid;
	grid-template-columns: 28px 1fr auto;
	gap: 14px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: none; }
.feature-row__check { color: var(--success); font-size: 18px; line-height: 1.5; }
.feature-row h4 { margin: 0 0 4px; font-size: 15px; font-family: var(--font-body); font-weight: 700; }
.feature-row p { font-size: 13px; margin: 0; }

.feature-category {
	margin-bottom: 12px;
}
.feature-category summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	background: var(--fog);
	border-radius: var(--radius-md);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 17px;
}
.feature-category summary::-webkit-details-marker { display: none; }
.feature-category summary::after { content: "+"; font-size: 22px; color: var(--primary); transition: transform .2s ease; }
.feature-category[open] summary::after { transform: rotate(45deg); }
.feature-category .feature-category__body { padding: 8px 24px 8px; }

/* ---------------------------------------------------------------------
   Pricing
   --------------------------------------------------------------------- */
.pricing-card {
	background: var(--base);
	border: 2px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 36px;
	position: relative;
}
.pricing-card--featured { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.pricing-card__badge {
	position: absolute;
	top: -14px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 16px;
	border-radius: var(--radius-pill);
	font-family: var(--font-mono);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.pricing-card__price { font-family: var(--font-display); font-size: 44px; font-weight: 700; margin: 12px 0; }
.pricing-card__price span { font-size: 15px; font-weight: 500; color: var(--ink-soft); font-family: var(--font-body); }
.pricing-card ul { list-style: none; margin: 24px 0; padding: 0; }
.pricing-card li { display: flex; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--ink-soft); }
.pricing-card li::before { content: "✓"; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ---------------------------------------------------------------------
   Testimonials / reviews
   --------------------------------------------------------------------- */
.stars { color: var(--amber); letter-spacing: 2px; font-size: 15px; }
.testimonial {
	background: var(--base);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 28px;
}
.testimonial__quote { font-size: 15px; color: var(--ink); margin: 12px 0 20px; }
.testimonial__person { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-tint); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--primary-dark); flex-shrink: 0; }
.testimonial__person strong { display: block; font-size: 14px; }
.testimonial__person span { display: block; font-size: 12px; color: var(--ink-soft); }

.rating-summary { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.rating-summary__score { text-align: center; }
.rating-summary__score strong { display: block; font-family: var(--font-display); font-size: 56px; }
.rating-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.rating-bar__track { flex: 1; height: 8px; background: var(--fog); border-radius: 999px; overflow: hidden; }
.rating-bar__fill { height: 100%; background: var(--amber); border-radius: 999px; }

.placeholder-note {
	background: var(--amber-tint);
	border: 1px dashed #d99a1f;
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	font-size: 13px;
	color: #7a5400;
	margin-bottom: 32px;
}

/* ---------------------------------------------------------------------
   FAQ accordion
   --------------------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
	cursor: pointer;
	list-style: none;
	padding: 20px 0;
	font-weight: 700;
	font-size: 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--primary); font-size: 20px; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 20px; font-size: 14px; }

/* ---------------------------------------------------------------------
   Docs / knowledge base layout
   --------------------------------------------------------------------- */
.docs-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.docs-sidebar { position: sticky; top: 90px; background: var(--fog); border-radius: var(--radius-md); padding: 20px; }
.docs-sidebar h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin: 18px 0 8px; }
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; margin: 0 0 4px; padding: 0; }
.docs-sidebar a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.docs-sidebar a:hover, .docs-sidebar a.is-active { background: #fff; color: var(--primary); text-decoration: none; }
.docs-article h2 { margin-top: 40px; }
.docs-article h2:first-child { margin-top: 0; }
.docs-article pre { background: var(--ink); color: #d7e0ff; padding: 18px 20px; border-radius: var(--radius-sm); overflow-x: auto; font-family: var(--font-mono); font-size: 13px; }
.docs-article code { background: var(--fog); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.docs-search { display: flex; gap: 8px; margin-bottom: 32px; }
.docs-search input { flex: 1; padding: 14px 18px; border: 2px solid var(--border); border-radius: var(--radius-pill); font-family: var(--font-body); font-size: 15px; }
.docs-search input:focus { outline: none; border-color: var(--primary); }

/* ---------------------------------------------------------------------
   Legal pages
   --------------------------------------------------------------------- */
.legal h2 { margin-top: 40px; font-size: 22px; }
.legal h2:first-child { margin-top: 0; }
.legal ul { color: var(--ink-soft); }
.legal .updated { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); background: var(--fog); display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill); margin-bottom: 32px; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.footer { background: var(--ink); color: rgba(255,255,255,0.6); padding: 64px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; margin-bottom: 40px; }
.footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer .nav__logo { color: #fff; }

/* ---------------------------------------------------------------------
   Utility CTA band
   --------------------------------------------------------------------- */
.cta-band {
	background: linear-gradient(120deg, var(--primary), #6b40e0);
	border-radius: var(--radius-lg);
	padding: 56px 48px;
	color: #fff;
	text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 480px; margin: 0 auto 24px; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 900px) {
	.nav__links { display: none; }
	.nav__toggle { display: block; }
	.nav__inner.is-open .nav__links {
		display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
		position: absolute; top: 100%; left: 0; right: 0; background: #fff;
		border-bottom: 1px solid var(--border); padding: 20px 24px;
	}
	.hero__grid { grid-template-columns: 1fr; }
	.hero__visual { order: -1; }
	.grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.docs-layout { grid-template-columns: 1fr; }
	.docs-sidebar { position: static; }
	.rating-summary { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
	.section { padding: 56px 0; }
	.footer__grid { grid-template-columns: 1fr; }
	.cta-band { padding: 40px 24px; }
}
