/* ────────────────────────────────────────────────────────────────────
 * Plan Recipes — launch page
 *
 * Aesthetic: editorial food-magazine meets precision agentic-product.
 * Warm bone base, ink text, paprika accent. Display = Fraunces (with WONK).
 * Body = Inter Tight. Mono detail = JetBrains Mono.
 * Subtle film grain overlay across the whole page (no glassmorphism, no
 * AI gradient slop, no stock photo crutches).
 * ──────────────────────────────────────────────────────────────────── */

:root {
	/* palette */
	--bone:    #f4efe6;
	--bone-2:  #ece4d3;
	--ink:     #1a1614;
	--ink-2:   #2c2620;
	--paprika: #c2410c;
	--paprika-2: #9a3009;
	--olive:   #3b5b3a;
	--butter:  #e8a56c;
	--rule:    #d8cfbc;
	--muted:   #6f655a;

	/* type */
	--serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
	--sans:  'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

	/* sizes (fluid clamps so it scales well 320 → 1400) */
	--fs-display: clamp(3.2rem, 1.6rem + 7vw, 7.5rem);
	--fs-h2:      clamp(2rem, 1.2rem + 3vw, 3.4rem);
	--fs-h3:      clamp(1.35rem, 1rem + 1vw, 1.65rem);
	--fs-body:    clamp(1.02rem, 0.96rem + 0.3vw, 1.13rem);
	--fs-mono:    0.86rem;
	--fs-eyebrow: 0.78rem;

	/* spacing */
	--gut:    clamp(1.2rem, 4vw, 2.4rem);
	--bleed:  clamp(1.4rem, 5vw, 4rem);
	--section: clamp(4rem, 8vw, 7rem);

	/* misc */
	--radius: 14px;
	--radius-sm: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--sans);
	font-size: var(--fs-body);
	line-height: 1.55;
	color: var(--ink);
	background: var(--bone);
	font-feature-settings: 'ss01', 'cv11';
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

/* ─── Film grain overlay (4% opacity, doesn't intercept clicks) ── */
body::after {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 999;
	mix-blend-mode: multiply;
	opacity: 0.06;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
	background-size: 240px 240px;
}

/* ─── Accessibility helpers ──────────────────────────────────── */
.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: var(--bone);
	padding: 0.6rem 1rem;
	z-index: 1000;
}
.skip:focus { left: 0.6rem; top: 0.6rem; }

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

/* ─── Top bar ─────────────────────────────────────────────── */
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem var(--bleed);
	position: sticky;
	top: 0;
	background: color-mix(in srgb, var(--bone) 88%, transparent);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid transparent;
	z-index: 50;
	transition: border-color 0.25s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--rule); }

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--ink);
	font-weight: 500;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; color: var(--ink); }
.brand-cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.brand-text {
	font-family: var(--serif);
	font-weight: 500;
	font-variation-settings: 'wght' 500, 'SOFT' 50, 'WONK' 0;
	letter-spacing: -0.01em;
	font-size: 1.15rem;
}

.topnav {
	display: flex;
	align-items: center;
	gap: 1.6rem;
	font-size: 0.93rem;
}
.topnav a {
	color: var(--ink);
	font-weight: 500;
}
.topnav a:hover { color: var(--paprika); text-decoration: none; }
.topnav-cta {
	background: var(--ink);
	color: var(--bone) !important;
	padding: 0.5rem 0.95rem;
	border-radius: 999px;
	font-weight: 500;
}
.topnav-cta:hover { background: var(--paprika); }

@media (max-width: 640px) {
	.topnav a:not(.topnav-cta) { display: none; }
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
	max-width: 1240px;
	margin: 0 auto;
	padding: clamp(2.5rem, 8vw, 6rem) var(--bleed) var(--section);
	position: relative;
}

.hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-family: var(--mono);
	font-size: var(--fs-eyebrow);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: color-mix(in srgb, var(--bone) 100%, var(--bone-2) 40%);
}
.hero-eyebrow .dot {
	width: 7px;
	height: 7px;
	background: var(--paprika);
	border-radius: 50%;
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--paprika) 60%, transparent);
	animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
	0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--paprika) 70%, transparent); }
	70%  { box-shadow: 0 0 0 9px color-mix(in srgb, var(--paprika) 0%, transparent); }
	100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-headline {
	font-family: var(--serif);
	font-size: var(--fs-display);
	font-weight: 400;
	line-height: 0.92;
	letter-spacing: -0.035em;
	margin: 1.6rem 0 1.4rem;
	font-variation-settings: 'wght' 460, 'opsz' 144, 'SOFT' 50, 'WONK' 0;
	max-width: 18ch;
}
.hero-headline em {
	font-style: italic;
	color: var(--paprika);
	font-variation-settings: 'wght' 380, 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}

.hero-sub {
	max-width: 56ch;
	font-size: clamp(1.08rem, 0.9rem + 0.6vw, 1.24rem);
	color: var(--ink-2);
	margin: 0 0 2rem;
	line-height: 1.55;
}

.hero-form, .cta-form {
	display: flex;
	align-items: stretch;
	gap: 0.6rem;
	max-width: 480px;
	padding: 0.45rem;
	background: #fff;
	border: 1px solid var(--rule);
	border-radius: 999px;
	box-shadow: 0 1px 0 rgba(26, 22, 20, 0.04), 0 18px 50px -28px rgba(26, 22, 20, 0.25);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hero-form:focus-within, .cta-form:focus-within {
	border-color: var(--ink);
	box-shadow: 0 1px 0 rgba(26, 22, 20, 0.04), 0 18px 50px -28px rgba(26, 22, 20, 0.35);
}
.hero-form input, .cta-form input {
	flex: 1;
	min-width: 0;
	padding: 0.7rem 1rem;
	border: none;
	outline: none;
	background: transparent;
	font: inherit;
	color: var(--ink);
}
.hero-form input::placeholder, .cta-form input::placeholder { color: var(--muted); }
.hero-form button, .cta-form button {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.7rem 1.25rem;
	border: none;
	background: var(--ink);
	color: var(--bone);
	border-radius: 999px;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease;
}
.hero-form button:hover, .cta-form button:hover { background: var(--paprika); }
.hero-form button:active, .cta-form button:active { transform: translateY(1px); }

.hero-meta {
	margin: 0.85rem 0 0;
	font-size: 0.83rem;
	color: var(--muted);
}

/* ─── Hero demo terminal — the "signature" element ───────────── */
.hero-demo {
	margin: 4rem 0 0;
	max-width: 720px;
	background: var(--ink);
	color: #ddd6c7;
	border-radius: var(--radius);
	box-shadow: 0 30px 60px -30px rgba(26, 22, 20, 0.45);
	overflow: hidden;
	transform: rotate(-0.4deg);
	transition: transform 0.4s ease;
}
.hero-demo:hover { transform: rotate(0deg); }

.demo-chrome {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.8rem 1rem;
	background: #14100e;
	border-bottom: 1px solid #2a221c;
}
.demo-chrome .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.demo-title {
	margin-left: 0.75rem;
	font-family: var(--mono);
	font-size: 0.78rem;
	color: #8a7e6e;
	letter-spacing: 0.04em;
}

.demo-body { padding: 1.4rem 1.4rem 1.6rem; font-family: var(--mono); font-size: var(--fs-mono); line-height: 1.65; }
.demo-line { display: grid; grid-template-columns: 4rem 1fr; gap: 0.8rem; margin-bottom: 1rem; }
.demo-line:last-child { margin-bottom: 0; }
.demo-prefix {
	color: #6b6056;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.7rem;
	padding-top: 0.25rem;
}
.demo-user .demo-text { color: #cdc2af; }
.demo-agent .demo-text { color: #f4efe6; }
.demo-agent .demo-text em { color: var(--butter); font-style: italic; }
.typed { display: inline; }
.caret {
	display: inline-block;
	width: 0.5ch;
	height: 1em;
	background: var(--butter);
	margin-left: 2px;
	transform: translateY(2px);
	animation: blink 1.1s steps(1) infinite;
}

/* ─── Section eyebrow ──────────────────────────────────────── */
.section-eyebrow {
	font-family: var(--mono);
	font-size: var(--fs-eyebrow);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--muted);
	font-weight: 500;
	margin: 0 0 2rem;
}

/* ─── How it works (3 cards) ──────────────────────────────── */
.how {
	max-width: 1240px;
	margin: 0 auto;
	padding: var(--section) var(--bleed);
	border-top: 1px solid var(--rule);
}
.how-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.4rem, 2vw, 2.2rem);
}
@media (max-width: 880px) {
	.how-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.card {
	background: var(--bone-2);
	padding: clamp(1.5rem, 2.5vw, 2.2rem);
	border-radius: var(--radius);
	position: relative;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 40px -22px rgba(26, 22, 20, 0.25);
}
.card-num {
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--paprika);
	letter-spacing: 0.1em;
	margin-bottom: 1.4rem;
}
.card h3 {
	font-family: var(--serif);
	font-size: var(--fs-h3);
	font-weight: 500;
	font-variation-settings: 'wght' 500, 'opsz' 36, 'SOFT' 0, 'WONK' 0;
	letter-spacing: -0.015em;
	margin: 0 0 0.7rem;
}
.card p { color: var(--ink-2); margin: 0; line-height: 1.6; }
.card-plan { background: #f0ead9; }
.card-shop { background: #efe6d1; }
.card-cook { background: #ecdfca; }

/* ─── Why this why now (editorial) ────────────────────────── */
.why {
	background: var(--ink);
	color: var(--bone);
	padding: var(--section) var(--bleed);
	margin-top: var(--section);
}
.why-inner { max-width: 720px; margin: 0 auto; }
.why-kicker {
	font-family: var(--mono);
	font-size: var(--fs-eyebrow);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--butter);
	margin: 0 0 1.5rem;
}
.why-body {
	font-family: var(--serif);
	font-size: clamp(1.4rem, 1rem + 1.4vw, 1.95rem);
	line-height: 1.4;
	font-weight: 380;
	font-variation-settings: 'wght' 380, 'opsz' 72, 'SOFT' 40, 'WONK' 0;
	letter-spacing: -0.015em;
	margin: 0;
	color: var(--bone);
}
.why-body em {
	color: var(--butter);
	font-style: italic;
	font-variation-settings: 'wght' 380, 'opsz' 72, 'SOFT' 80, 'WONK' 1;
}

/* ─── Integrations ────────────────────────────────────────── */
.integrations {
	max-width: 1240px;
	margin: 0 auto;
	padding: var(--section) var(--bleed);
}
.logo-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1px;
	background: var(--rule);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
}
@media (max-width: 880px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } }
.logo-grid li {
	background: var(--bone);
	padding: 1.8rem 1rem;
	text-align: center;
	font-family: var(--serif);
	font-size: 1.08rem;
	font-variation-settings: 'wght' 480, 'opsz' 36, 'SOFT' 30, 'WONK' 0;
	color: var(--ink);
	letter-spacing: -0.005em;
	transition: background 0.2s ease, color 0.2s ease;
}
.logo-grid li:hover { background: var(--bone-2); color: var(--paprika); }
.integrations-note {
	margin: 1.8rem auto 0;
	max-width: 56ch;
	color: var(--muted);
	font-size: 0.95rem;
	text-align: center;
}
.integrations-note strong { color: var(--ink); font-weight: 600; }

/* ─── Final CTA ──────────────────────────────────────────── */
.cta {
	max-width: 720px;
	margin: 0 auto;
	padding: var(--section) var(--bleed);
	text-align: center;
}
.cta-headline {
	font-family: var(--serif);
	font-size: var(--fs-h2);
	font-weight: 400;
	font-variation-settings: 'wght' 460, 'opsz' 120, 'SOFT' 30, 'WONK' 0;
	letter-spacing: -0.025em;
	line-height: 1;
	margin: 0 0 1rem;
}
.cta-sub {
	color: var(--ink-2);
	max-width: 46ch;
	margin: 0 auto 1.8rem;
}
.cta-form { margin: 0 auto; }
.cta-meta {
	margin: 1rem 0 0;
	font-size: 0.83rem;
	color: var(--muted);
}

/* ─── Footer ─────────────────────────────────────────────── */
.foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 2rem var(--bleed);
	border-top: 1px solid var(--rule);
	color: var(--muted);
	font-size: 0.88rem;
	max-width: 1240px;
	margin: 0 auto;
	flex-wrap: wrap;
}
.foot-left { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.foot-tag { color: var(--muted); }
.foot a { color: var(--ink); }
.foot a:hover { color: var(--paprika); }

/* ─── Reduce motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
