/*---------------------------------------------------------------------------------------------
 *  Snoopy — marketing site.
 *
 *  Monochrome, matching the editor. Every competitor in this category leads with a purple or
 *  blue gradient glow (checked: Dribbble's "AI code editor landing page" results are almost
 *  uniformly that), so restraint is the differentiator here rather than a limitation.
 *
 *  No framework and no build step: the whole site is three files, so it deploys anywhere
 *  static and there is no toolchain to rot.
 *--------------------------------------------------------------------------------------------*/

:root {
	/* Not greyscale — tinted near-blacks and near-whites.
	 *
	 * The backgrounds run cool (a few points of blue) and the text runs warm (a few points of
	 * yellow). Neither reads as "coloured" on its own, but the temperature gap between them
	 * makes the page feel lit rather than printed, which flat grey never does. Everything here
	 * stays within a few percent of neutral, so it is still monochrome in character.
	 */
	--bg: #08090c;             /* cool near-black, the deepest surface */
	--surface: #0e1014;        /* one step up, still cool */
	--raised: #14161c;         /* cards and inputs; slightly bluer to separate from surface */
	--line: rgba(226, 232, 240, .10);
	--line-strong: rgba(226, 232, 240, .18);

	--fg: #f5f3ef;             /* warm near-white — the counterweight to the cool grounds */
	--muted: #9a9aa6;          /* neutral, so it sits between the two temperatures */
	--dim: #6e7079;

	--ok: #6fae8b;             /* desaturated, so a success tick never outshouts the content */
	--warm: #c9a227;           /* a single warm note, used only on the free-tier accent */

	--mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
	--sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;

	--radius: 14px;
	--radius-lg: 20px;
	--page: 1120px;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.03em; line-height: 1.08; font-weight: 600; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 24px; }

/* --- Navigation ------------------------------------------------------------------------- */

.nav {
	position: fixed; inset: 0 0 auto; z-index: 50;
	backdrop-filter: blur(14px);
	border-bottom: 1px solid transparent;
	transition: background .25s ease, border-color .25s ease;
}
/* Only gains a background once you have scrolled past the hero, so the page opens as one
   uninterrupted surface rather than a bar sitting on top of a picture. */
.nav.scrolled { background: rgba(11, 11, 13, .82); border-bottom-color: var(--line); }

.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -.02em; }
.brand svg { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; color: var(--muted); }
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--fg); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 18px; border-radius: 10px; font-size: 14.5px; font-weight: 500;
	border: 1px solid var(--line-strong); color: var(--fg);
	transition: transform .12s ease, background .15s ease, border-color .15s ease;
	cursor: pointer; background: none; font-family: inherit;
}
.btn:hover { background: rgba(255, 255, 255, .06); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fg); color: #0b0b0d; border-color: var(--fg); font-weight: 600; }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-lg { padding: 13px 24px; font-size: 15.5px; border-radius: 12px; }

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

.hero { position: relative; padding: 168px 0 92px; text-align: center; }
/* A single soft light source behind the headline. One, and monochrome — the category default
   is competing coloured glows, which read as noise at any size. */
.hero::before {
	content: ""; position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
	width: 900px; height: 620px; pointer-events: none;
	background:
		radial-gradient(closest-side, rgba(201, 162, 39, .05), transparent 62%),
		radial-gradient(closest-side, rgba(226, 232, 240, .07), transparent 74%);
	transform: translateX(-50%) translateY(var(--shift, 0));
}

.eyebrow {
	display: inline-flex; align-items: center; gap: 9px;
	padding: 5px 13px 5px 7px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--surface);
	font-size: 13px; color: var(--muted); margin-bottom: 26px;
}
.eyebrow b { color: var(--fg); font-weight: 600; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
/* A quiet, slow pulse. Fast enough to notice once, slow enough not to nag. */
.dot { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); text-wrap: balance; }
.hero p.lead {
	margin: 22px auto 0; max-width: 46ch; font-size: clamp(1rem, 1.6vw, 1.15rem);
	color: var(--muted); text-wrap: balance;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--dim); }

/* --- Terminal ---------------------------------------------------------------------------- */

/* The product's own surface as the hero image. Every competitor uses a screenshot of an
   editor; an actual working transcript says the same thing and stays legible at any width. */
.terminal {
	max-width: 760px; margin: 62px auto 0;
	border: 1px solid var(--line); border-radius: var(--radius-lg);
	background: linear-gradient(180deg, var(--raised), var(--surface));
	box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
	overflow: hidden; text-align: left;
}
.terminal-bar {
	display: flex; align-items: center; gap: 8px;
	padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.terminal-bar span { margin-left: 8px; font-size: 12.5px; color: var(--dim); font-family: var(--mono); }

.terminal-body { padding: 20px 22px 26px; font-family: var(--mono); font-size: 13.5px; line-height: 1.85; min-height: 232px; }
.line { display: flex; gap: 10px; opacity: 0; transform: translateY(4px); }
.line.in { animation: rise .32s ease forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.line .who { color: var(--dim); flex: none; width: 14px; }
.line .what { color: var(--fg); }
.line.tool .what { color: var(--muted); }
.line.tool .what b { color: #cdd6e4; }   /* command names, cool against the warm prose */
.line.tool .what b { color: var(--fg); font-weight: 500; }
.line.done .what { color: var(--ok); }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--fg); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* --- Sections ---------------------------------------------------------------------------- */

section { padding: 96px 0; }
.section-head { max-width: 620px; margin-bottom: 48px; }
/* The heading gets its own width, wider than the paragraph beneath it.
   
   Constrained to the paragraph's 620px it broke as "closes the / loop", stranding one word on
   a line by itself — which reads as a mistake rather than a deliberate break. Body copy still
   wants a narrow measure for reading; a heading does not, so they are sized separately.
   `balance` then distributes the words evenly across whatever lines it does use, instead of
   dumping the remainder on the last one. */
.section-head h2 {
	font-size: clamp(1.9rem, 3.4vw, 2.6rem);
	max-width: 20ch;
	text-wrap: balance;
}
/* At the widest sizes a heading of this length fits on one line, so let it. */
@media (min-width: 1000px) {
	.section-head h2 { max-width: none; white-space: nowrap; }
}
.section-head p { margin-top: 14px; color: var(--muted); font-size: 17px; }

/* Reveal on scroll. Transform + opacity only, so it never triggers layout while scrolling. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
	padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--surface);
	transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:hover { border-color: var(--line-strong); background: var(--raised); transform: translateY(-2px); }
.card h3 { font-size: 17px; margin-bottom: 9px; letter-spacing: -.015em; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.62; }
.card .glyph {
	width: 34px; height: 34px; margin-bottom: 16px; border-radius: 9px;
	display: grid; place-items: center;
	background: var(--raised); border: 1px solid var(--line);
	font-family: var(--mono); font-size: 14px; color: var(--fg);
}

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

.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.plan {
	padding: 30px 26px; border: 1px solid var(--line); border-radius: var(--radius-lg);
	background: var(--surface); position: relative;
	transition: border-color .2s ease, transform .2s ease;
}
.plan:hover { border-color: var(--line-strong); transform: translateY(-2px); }
/* The recommended plan is raised by contrast, not colour — a coloured card would be the one
   thing on the page shouting, and it would not be the product. */
.plan.featured { border-color: var(--line-strong); background: var(--raised); }
.plan .tag {
	position: absolute; top: -11px; left: 26px;
	padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
	background: var(--fg); color: #0b0b0d;
}
.plan h3 { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 4px; }
.price b { font-size: 2.6rem; font-weight: 600; letter-spacing: -.04em; }
.price span { color: var(--dim); font-size: 14.5px; }
.plan > p { color: var(--muted); font-size: 14px; min-height: 42px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-direction: column; gap: 11px; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; color: var(--muted); }
.plan li::before { content: "→"; color: var(--dim); flex: none; font-family: var(--mono); }
.plan li b { color: var(--fg); font-weight: 500; }
.plan .btn { width: 100%; }

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

footer { border-top: 1px solid var(--line); padding: 46px 0; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
footer .links { margin-left: auto; display: flex; gap: 22px; }
footer a:hover { color: var(--fg); }

@media (max-width: 720px) {
	.nav-links { display: none; }
	.hero { padding-top: 132px; }
	section { padding: 72px 0; }
}

/* --- Free tier ---------------------------------------------------------------------------
   The product's main claim gets its own panel rather than a bullet in a grid. */

#free { padding-top: 40px; }
.free-panel {
	display: grid; gap: 40px; grid-template-columns: 1.05fr .95fr; align-items: center;
	padding: 44px; border-radius: var(--radius-lg);
	border: 1px solid var(--line); background: var(--surface);
	position: relative; overflow: hidden;
}
/* A single light source from the top-left, so the panel reads as lit rather than filled. */
.free-panel::before {
	content: ""; position: absolute; inset: -50% 40% 40% -20%; pointer-events: none;
	background: radial-gradient(closest-side, rgba(201, 162, 39, .06), transparent 70%);
}
.free-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.free-copy > p { margin-top: 14px; color: var(--muted); font-size: 16px; max-width: 42ch; }

.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; gap: 11px; color: var(--muted); font-size: 15px; }
.ticks li::before {
	content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 50%;
	display: grid; place-items: center; font-size: 11px;
	background: rgba(111, 174, 139, .14); color: var(--ok); margin-top: 2px;
}
.ticks b { color: var(--fg); font-weight: 600; }

.free-models { display: flex; flex-direction: column; gap: 9px; }
.model-row {
	display: flex; align-items: center; gap: 14px;
	padding: 14px 16px; border-radius: 12px;
	border: 1px solid var(--line); background: var(--raised);
	transition: border-color .2s ease, transform .2s ease;
}
.model-row:hover { border-color: var(--line-strong); transform: translateX(3px); }
.model-row .role {
	font-family: var(--mono); font-size: 11.5px; color: var(--dim);
	width: 76px; flex: none;
}
.model-row b { font-size: 15px; font-weight: 500; }
.routing { margin-top: 8px; font-size: 13px; color: var(--dim); text-align: right; }

/* Each row arrives just after the one above it, so the list reads top-down as a sequence
   rather than four things appearing at once. */
.free-models .model-row:nth-child(1) { transition-delay: .05s; }
.free-models .model-row:nth-child(2) { transition-delay: .13s; }
.free-models .model-row:nth-child(3) { transition-delay: .21s; }
.free-models .model-row:nth-child(4) { transition-delay: .29s; }

@media (max-width: 860px) {
	.free-panel { grid-template-columns: 1fr; padding: 30px 24px; }
}

/* --- Emphasis ---------------------------------------------------------------------------- */

/* Monochrome, so emphasis comes from an underline that draws itself rather than a colour.
   Coloured highlight text is the one thing every competitor in this category does. */
.hl { position: relative; white-space: nowrap; }
.hl::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: 3px;
	background: var(--fg); border-radius: 2px;
	transform: scaleX(0); transform-origin: left;
	animation: draw .8s cubic-bezier(.2, .7, .3, 1) .5s forwards;
}
@keyframes draw { to { transform: scaleX(1); } }

/* --- Card hover --------------------------------------------------------------------------- */

/* A highlight that follows the cursor. Driven by two custom properties set in JS, so the
   browser only ever recomposites — no layout, no paint of the card itself. */
.tilt { position: relative; }
.tilt::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	opacity: 0; transition: opacity .25s ease;
	background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .06), transparent 65%);
}
.tilt:hover::after { opacity: 1; }

/* Cards arrive in sequence rather than as a block. */
.grid .card:nth-child(3n+2) { transition-delay: .07s; }
.grid .card:nth-child(3n+3) { transition-delay: .14s; }


/* A centred closing section, matching the hero. The page opens and closes on the same axis;
   left-aligning the last call to action made it read as another content block rather than
   the end of the argument. */
.centred { text-align: center; }
.centred .section-head { margin-left: auto; margin-right: auto; }
.centred .hero-actions { justify-content: center; }
