/* =============================================================================
   secondthought.ai — website styles (extends design-system tokens)
   ========================================================================== */

:root {
	/* Tighter, more editorial scale than the app */
	--site-max: 1200px;
	--ink-900: #0F172B;
	--ink-700: #334155;
	--ink-500: #64748B;
	--ink-300: #CBD5E1;
	--ink-200: #E2E8F0;
	--ink-100: #F1F5F9;
	--ink-50:  #F8FAFC;

	--v-deep: #4C1D95;
	--v-500:  #6D46F2;
	--v-300:  #A78BFA;
	--v-100:  #EDE9FE;
	--v-50:   #F5F3FF;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: var(--font-sans);
	background: #fff;
	color: var(--ink-900);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Site container -------------------------------------------------------- */
.container {
	max-width: var(--site-max);
	margin: 0 auto;
	padding: 0 28px;
}

/* Editorial typography -------------------------------------------------- */
.eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--v-500);
	font-family: var(--font-mono);
}
.display-xl {
	font-size: clamp(48px, 6.2vw, 88px);
	line-height: 0.98;
	letter-spacing: -0.035em;
	font-weight: 500;
	color: var(--ink-900);
}
.display-lg {
	font-size: clamp(40px, 4.8vw, 64px);
	line-height: 1.02;
	letter-spacing: -0.03em;
	font-weight: 500;
	color: var(--ink-900);
}
.display-md {
	font-size: clamp(32px, 3.4vw, 44px);
	line-height: 1.08;
	letter-spacing: -0.025em;
	font-weight: 500;
	color: var(--ink-900);
}
.lede {
	font-size: clamp(17px, 1.25vw, 19px);
	line-height: 1.55;
	color: var(--ink-700);
	max-width: 60ch;
	text-wrap: pretty;
}
.kicker {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
	font-family: var(--font-mono);
}
h1, h2, h3, h4 { text-wrap: balance; }

/* Buttons --------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 20px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
	white-space: nowrap;
}
.btn-primary {
	background: var(--v-500);
	color: #fff;
	box-shadow: 0 1px 2px rgb(15 23 43 / .08);
}
.btn-primary:hover { background: #5E37E8; transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgb(109 70 242 / .45); }
.btn-ghost {
	background: transparent;
	color: var(--ink-900);
	border-color: var(--ink-200);
}
.btn-ghost:hover { background: var(--ink-50); }
.btn-dark {
	background: var(--ink-900);
	color: #fff;
}
.btn-dark:hover { background: #1E293B; transform: translateY(-1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }

/* Section --------------------------------------------------------------- */
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }
.section-tight { padding: 64px 0; }
.section-dark {
	background: var(--ink-900);
	color: #E2E8F0;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--v-300); }
.section-dark .lede { color: #CBD5E1; }

/* Header ---------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	border-bottom: 1px solid var(--ink-200);
	box-shadow: 0 1px 0 rgb(15 23 43 / .02);
}
.site-header.dark {
	background: #0B1222;
	border-color: rgb(255 255 255 / .1);
	box-shadow: 0 1px 0 rgb(0 0 0 / .3);
	color: #fff;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; font-size: 16px; }
.brand img { width: 24px; height: 24px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav button.nav-link {
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 14px;
	color: var(--ink-700);
	font-weight: 500;
	border: 0;
	background: transparent;
	cursor: pointer;
	position: relative;
}
.nav a:hover, .nav button.nav-link:hover { color: var(--ink-900); background: var(--ink-50); }
.site-header.dark .nav a, .site-header.dark .nav button.nav-link { color: #CBD5E1; }
.site-header.dark .nav a:hover, .site-header.dark .nav button.nav-link:hover { color: #fff; background: rgb(255 255 255 / .06); }
.nav-group { position: relative; }
.nav-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: -8px;
	min-width: 320px;
	background: #fff;
	border: 1px solid var(--ink-200);
	border-radius: 14px;
	box-shadow: 0 24px 48px -20px rgb(15 23 43 / .18);
	padding: 10px;
	display: none;
}
.nav-group:hover .nav-menu { display: block; }
.nav-menu a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--ink-900) !important;
	background: transparent !important;
}
.nav-menu a:hover { background: var(--ink-50) !important; }
.nav-menu .nav-menu-title { font-weight: 600; font-size: 14px; }
.nav-menu .nav-menu-sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.nav-cta { margin-left: 8px; }

/* Footer ---------------------------------------------------------------- */
.site-footer {
	background: var(--ink-900);
	color: #CBD5E1;
	padding: 80px 0 40px;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.6fr repeat(4, 1fr);
	gap: 40px;
}
@media (max-width: 820px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-col h4 {
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #94A3B8;
	margin: 0 0 14px;
	font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: #CBD5E1; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 60px;
	padding-top: 24px;
	border-top: 1px solid rgb(255 255 255 / .08);
	font-size: 13px;
	color: #64748B;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-brand img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.newsletter {
	display: flex;
	gap: 8px;
	max-width: 320px;
}
.newsletter input {
	flex: 1;
	background: rgb(255 255 255 / .06);
	border: 1px solid rgb(255 255 255 / .1);
	color: #fff;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-family: inherit;
}
.newsletter input::placeholder { color: #64748B; }

/* Utility --------------------------------------------------------------- */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.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); }
@media (max-width: 900px) {
	.grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
	.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.stack { display: flex; flex-direction: column; }
.vio-rule {
	width: 48px; height: 2px; background: var(--v-500); margin-bottom: 18px;
}

.card {
	background: #fff;
	border: 1px solid var(--ink-200);
	border-radius: 18px;
	padding: 28px;
	transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 24px 48px -28px rgb(15 23 43 / .15); border-color: #D9D9F3; }
.card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.card p { margin: 0; font-size: 14px; color: var(--ink-500); line-height: 1.55; }
.card .card-kicker {
	display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--v-500); margin-bottom: 14px; font-family: var(--font-mono);
}

/* Violet pill */
.pill {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--v-50); color: var(--v-deep);
	border: 1px solid var(--v-100);
	padding: 6px 12px; border-radius: 999px;
	font-size: 12px; font-weight: 500;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--v-500); }

/* Stat */
.stat { }
.stat .n { font-size: clamp(40px, 4.8vw, 56px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--ink-900); font-feature-settings: 'tnum'; }
.stat .n.violet { color: var(--v-500); }
.stat .l { font-size: 13px; color: var(--ink-500); margin-top: 10px; max-width: 30ch; }

/* Quote */
.quote {
	font-size: 22px; line-height: 1.4; letter-spacing: -0.015em; font-weight: 400;
	color: var(--ink-900); text-wrap: pretty;
}
.quote cite { display: block; font-style: normal; font-size: 13px; color: var(--ink-500); margin-top: 16px; font-weight: 500; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms ease, transform 800ms cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Tweaks panel */
.tweaks-panel {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 280px;
	background: #fff;
	border: 1px solid var(--ink-200);
	border-radius: 14px;
	padding: 16px;
	box-shadow: 0 24px 60px -20px rgb(15 23 43 / .25);
	z-index: 100;
	display: none;
	font-size: 13px;
}
.tweaks-panel.active { display: block; }
.tweaks-panel h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.tweaks-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.tweaks-row label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--ink-500); }
.tweaks-row select, .tweaks-row input[type=text] {
	width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--ink-200); border-radius: 8px;
	background: #fff; color: var(--ink-900);
}
.tweaks-row .toggle { display: flex; gap: 6px; }
.tweaks-row .toggle button {
	flex: 1; padding: 8px 10px; font-size: 12px; border: 1px solid var(--ink-200); background: #fff;
	border-radius: 6px; cursor: pointer; color: var(--ink-700);
}
.tweaks-row .toggle button.on { background: var(--v-500); color: #fff; border-color: var(--v-500); }
