/* ==========================================================================
   Ptero SEO — marketing site
   Pterosoft Studio
   ========================================================================== */

:root {
	--ink:        #07090d;
	--ink-2:      #0d1016;
	--ink-3:      #131720;
	--line:       #1e242f;
	--line-soft:  #171c25;

	--text:       #e9ecf1;
	--text-dim:   #9aa4b2;
	--text-faint: #6b7583;

	--amber:      #f0a43a;
	--amber-soft: rgba(240, 164, 58, .12);
	--teal:       #4fd1c5;
	--green:      #4ade80;
	--red:        #f87171;

	--radius:     14px;
	--radius-sm:  8px;

	--display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
	--sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--mono:    ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

	--container: 1180px;
	--nav-h: 72px;
}

/* --- Reset ---------------------------------------------------------------- */

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

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

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

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

/* Must beat any component that sets its own display. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 400; }
p { margin: 0 0 1em; }

::selection { background: var(--amber); color: #0b0d12; }

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

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

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: 24px;
}

.section { padding-block: clamp(64px, 10vw, 128px); }
.section--tight { padding-block: clamp(48px, 7vw, 80px); }

.section--edge {
	border-top: 1px solid var(--line-soft);
}

.grid { display: grid; gap: 24px; }

/*
 * Grid children default to min-width:auto, so a wide child — a <pre> with
 * white-space:pre, say — refuses to shrink and pushes the column past the
 * viewport. Because body has overflow-x:hidden that would clip text rather
 * than scroll it, which is far worse than a scrollbar.
 */
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
	.grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* --- Type ----------------------------------------------------------------- */

.display {
	font-family: var(--display);
	font-weight: 400;
	letter-spacing: -.015em;
	line-height: 1.02;
}

.display--xl { font-size: clamp(2.75rem, 7vw, 5.25rem); }
.display--lg { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.display--md { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }

.lede {
	font-size: clamp(1.05rem, 1.7vw, 1.3rem);
	line-height: 1.55;
	color: var(--text-dim);
	max-width: 62ch;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--amber);
	margin-bottom: 20px;
}

.eyebrow::before {
	content: '';
	width: 22px;
	height: 1px;
	background: var(--amber);
	opacity: .6;
}

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.mono  { font-family: var(--mono); font-size: .86em; }
.amber { color: var(--amber); }

.measure { max-width: 68ch; }

/* --- Nav ------------------------------------------------------------------ */

.nav {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	/*
	 * backdrop-filter on a sticky bar forces the browser to re-sample whatever
	 * is behind it on every scrolled frame. Against a near-black ground a solid
	 * colour is visually all but identical and costs nothing. Re-add
	 * `backdrop-filter: blur(12px)` with a lower alpha if you want the glass.
	 */
	background: rgba(7, 9, 13, .94);
	border-bottom: 1px solid var(--line-soft);
}

.nav__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	width: 100%;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	letter-spacing: -.01em;
	white-space: nowrap;
}

.brand__mark {
	width: 26px;
	height: 26px;
	flex: 0 0 26px;
}

.brand__sub {
	font-size: .68rem;
	color: var(--text-faint);
	letter-spacing: .08em;
	text-transform: uppercase;
	font-weight: 500;
}

.nav__links {
	display: flex;
	align-items: center;
	gap: 26px;
	margin-left: auto;
	font-size: .92rem;
}

/*
 * :not(.btn) matters. `.nav__links a` is more specific than `.btn--primary`,
 * so without it the call-to-action inherits the dim link colour and renders
 * near-invisible grey text on amber.
 */
.nav__links a:not(.btn) { color: var(--text-dim); transition: color .18s ease; }
.nav__links a:not(.btn):hover,
.nav__links a:not(.btn)[aria-current="page"] { color: var(--text); }

.nav__toggle {
	display: none;
	margin-left: auto;
	background: none;
	border: 1px solid var(--line);
	color: var(--text);
	border-radius: var(--radius-sm);
	padding: 8px 12px;
	cursor: pointer;
}

@media (max-width: 860px) {
	.nav__links {
		position: fixed;
		inset: var(--nav-h) 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--ink-2);
		border-bottom: 1px solid var(--line);
		padding: 8px 24px 20px;
		display: none;
	}

	.nav__links.is-open { display: flex; }
	.nav__links a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
	.nav__links .btn { margin-top: 14px; text-align: center; }
	.nav__toggle { display: block; }
}

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

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
    font-size: .94rem;
	font-weight: 550;
	cursor: pointer;
	transition: transform .16s ease, background .18s ease, border-color .18s ease, color .18s ease;
	white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--amber); color: #0b0d12; }
.btn--primary:hover { background: #ffb954; }

.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: #313a48; background: var(--ink-3); }

.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

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

.hero {
	position: relative;
	padding-block: clamp(64px, 11vw, 140px) clamp(56px, 8vw, 96px);
	overflow: hidden;
}

/*
 * No filter: blur() here. A blurred 1100x620 element is re-rasterised as it
 * scrolls, which is one of the most expensive things you can ask a compositor
 * to do. A radial gradient is already soft, so the blur bought nothing and cost
 * frames. translateZ promotes it to its own layer so it is painted once and
 * only translated thereafter.
 */
.hero__glow {
	position: absolute;
	top: -280px;
	left: 50%;
	transform: translateX(-50%) translateZ(0);
	width: min(1100px, 130vw);
	height: 620px;
	background: radial-gradient(ellipse at center, rgba(240, 164, 58, .18), rgba(240, 164, 58, .06) 45%, transparent 70%);
	pointer-events: none;
}

.hero__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--line-soft) 1px, transparent 1px),
		linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 35%, transparent 78%);
	-webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 35%, transparent 78%);
	opacity: .5;
	pointer-events: none;
	/* Static content: rasterise once rather than re-masking every frame. */
	transform: translateZ(0);
}

.hero__inner { position: relative; }

.hero h1 { margin-bottom: 26px; max-width: 16ch; }

.hero .lede { margin-bottom: 34px; }

.hero__note {
	margin-top: 22px;
	font-size: .86rem;
	color: var(--text-faint);
}

/* --- Cards ---------------------------------------------------------------- */

.card {
	background: var(--ink-2);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	padding: 26px;
	transition: border-color .2s ease, transform .2s ease;
}

.card:hover { border-color: var(--line); }

.card__icon {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	display: grid;
	place-items: center;
	background: var(--amber-soft);
	color: var(--amber);
	margin-bottom: 16px;
}

.card h3 {
	font-size: 1.05rem;
	font-weight: 600;
	margin-bottom: 8px;
	line-height: 1.3;
}

.card p { color: var(--text-dim); font-size: .94rem; margin: 0; }

.card--feature h3 { font-family: var(--display); font-size: 1.35rem; font-weight: 400; }

/* --- Code / product artefacts --------------------------------------------- */

.artefact {
	background: var(--ink-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
}

.artefact__bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 16px;
	border-bottom: 1px solid var(--line-soft);
	background: var(--ink-3);
	font-size: .78rem;
	color: var(--text-faint);
	font-family: var(--mono);
}

.artefact__dot {
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--line);
}

.artefact__body {
	padding: 18px 20px;
	overflow-x: auto;
}

pre.code {
	margin: 0;
	font-family: var(--mono);
	font-size: .78rem;
	line-height: 1.75;
	color: var(--text-dim);
	white-space: pre;
}

.code .t { color: var(--teal); }
.code .k { color: var(--amber); }
.code .s { color: #a5d6a7; }
.code .c { color: var(--text-faint); font-style: italic; }

/* --- Checklist (product mock) --------------------------------------------- */

.checklist { display: grid; gap: 1px; background: var(--line-soft); }

.checkrow {
	display: grid;
	grid-template-columns: 78px 1fr;
	gap: 14px;
	align-items: baseline;
	background: var(--ink-2);
	padding: 13px 18px;
	font-size: .9rem;
}

.checkrow span:last-child { color: var(--text-dim); }

.pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 20px;
	font-size: .64rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-align: center;
}

.pill--pass { background: rgba(74, 222, 128, .14); color: var(--green); }
.pill--warn { background: rgba(240, 164, 58, .14); color: var(--amber); }
.pill--fail { background: rgba(248, 113, 113, .14); color: var(--red); }

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

.toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px;
	background: var(--ink-2);
	border: 1px solid var(--line);
	border-radius: 999px;
	margin-bottom: 14px;
}

.toggle button {
	border: 0;
	background: none;
	color: var(--text-dim);
	padding: 9px 20px;
	border-radius: 999px;
	cursor: pointer;
	font-size: .9rem;
	font-weight: 550;
	transition: background .2s ease, color .2s ease;
}

.toggle button.is-active { background: var(--amber); color: #0b0d12; }

.save-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	border-radius: 999px;
	background: rgba(74, 222, 128, .1);
	border: 1px solid rgba(74, 222, 128, .28);
	color: var(--green);
	font-size: .84rem;
	font-weight: 600;
}

.plans {
	display: grid;
	grid-template-columns: 1fr 1.08fr;
	gap: 24px;
	align-items: start;
	margin-top: 40px;
}

@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

.plan {
	background: var(--ink-2);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	padding: 32px;
	position: relative;
}

.plan--featured {
	border-color: rgba(240, 164, 58, .4);
	background:
		linear-gradient(180deg, rgba(240, 164, 58, .05), transparent 220px),
		var(--ink-2);
}

.plan__tag {
	position: absolute;
	top: -11px;
	left: 32px;
	background: var(--amber);
	color: #0b0d12;
	font-size: .67rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 999px;
}

.plan__name {
	font-family: var(--display);
	font-size: 1.6rem;
	margin-bottom: 6px;
}

.plan__desc { color: var(--text-dim); font-size: .92rem; min-height: 46px; }

.plan__price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 20px 0 4px;
}

.plan__amount {
	font-family: var(--display);
	font-size: 3.1rem;
	line-height: 1;
	letter-spacing: -.02em;
}

.plan__period { color: var(--text-dim); font-size: .95rem; }

.plan__sub {
	font-size: .86rem;
	color: var(--text-faint);
	min-height: 22px;
	margin-bottom: 22px;
}

.plan__sub strong { color: var(--green); font-weight: 600; }

.features {
	list-style: none;
	margin: 26px 0 0;
	padding: 0;
	display: grid;
	gap: 11px;
	font-size: .92rem;
}

.features li {
	display: grid;
	grid-template-columns: 20px 1fr;
	gap: 10px;
	align-items: start;
	color: var(--text-dim);
}

.features li strong { color: var(--text); font-weight: 550; }

.tick { color: var(--green); margin-top: 3px; }
.dash { color: var(--text-faint); margin-top: 3px; }

/* --- Comparison table ------------------------------------------------------ */

.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }

table.compare {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
	font-size: .93rem;
}

table.compare th,
table.compare td {
	text-align: left;
	padding: 14px 20px;
	border-bottom: 1px solid var(--line-soft);
}

table.compare thead th {
	background: var(--ink-3);
	font-weight: 600;
	font-size: .8rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--text-dim);
}

table.compare td:not(:first-child),
table.compare th:not(:first-child) { text-align: center; width: 140px; }

table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare td:first-child { color: var(--text); }

table.compare .group td {
	background: var(--ink-3);
	font-weight: 600;
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--amber);
}

/* --- Steps / docs --------------------------------------------------------- */

.steps { counter-reset: step; display: grid; gap: 20px; }

.step {
	counter-increment: step;
	background: var(--ink-2);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	padding: 24px 26px 24px 70px;
	position: relative;
}

.step::before {
	content: counter(step);
	position: absolute;
	left: 24px;
	top: 24px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--amber-soft);
	color: var(--amber);
	display: grid;
	place-items: center;
	font-size: .82rem;
	font-weight: 700;
	font-family: var(--mono);
}

.step h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--text-dim); font-size: .93rem; margin: 0; }
.step p + p { margin-top: .7em; }

/* --- FAQ ------------------------------------------------------------------ */

details.faq {
	border-bottom: 1px solid var(--line-soft);
	padding: 20px 0;
}

details.faq summary {
	cursor: pointer;
	font-size: 1.04rem;
	font-weight: 550;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 20px;
	align-items: center;
}

details.faq summary::-webkit-details-marker { display: none; }

details.faq summary::after {
	content: '+';
	color: var(--amber);
	font-size: 1.4rem;
	line-height: 1;
	flex: 0 0 auto;
	transition: transform .2s ease;
}

details.faq[open] summary::after { transform: rotate(45deg); }

details.faq p {
	color: var(--text-dim);
	margin: 14px 0 0;
	max-width: 74ch;
	font-size: .95rem;
}

/* --- Callout -------------------------------------------------------------- */

.callout {
	border-left: 3px solid var(--amber);
	background: var(--ink-2);
	border-radius: 0 var(--radius) var(--radius) 0;
	padding: 22px 26px;
}

.callout p:last-child { margin-bottom: 0; }

.callout--quiet { border-left-color: var(--line); }

/* --- Stat strip ----------------------------------------------------------- */

.stat { text-align: center; }

.stat__num {
	font-family: var(--display);
	font-size: clamp(2.2rem, 4.4vw, 3.4rem);
	line-height: 1;
	color: var(--amber);
	display: block;
}

.stat__label {
	font-size: .85rem;
	color: var(--text-dim);
	margin-top: 10px;
	display: block;
}

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

.footer {
	border-top: 1px solid var(--line-soft);
	padding-block: 64px 40px;
	background: var(--ink-2);
}

.footer__grid {
	display: grid;
	grid-template-columns: 1.6fr repeat(3, 1fr);
	gap: 40px;
}

@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

.footer h4 {
	font-size: .74rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--text-faint);
	margin-bottom: 16px;
	font-weight: 600;
}

.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer ul a { color: var(--text-dim); transition: color .18s ease; }
.footer ul a:hover { color: var(--text); }

.footer__bottom {
	margin-top: 52px;
	padding-top: 24px;
	border-top: 1px solid var(--line-soft);
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	font-size: .85rem;
	color: var(--text-faint);
}

/* --- Legal / prose -------------------------------------------------------- */

.prose { max-width: 74ch; }
.prose h2 { font-family: var(--display); font-size: 1.7rem; margin: 44px 0 14px; }
.prose h3 { font-size: 1.05rem; font-weight: 600; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { padding-left: 20px; display: grid; gap: 8px; margin-bottom: 1em; }
.prose a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.prose code {
	font-family: var(--mono);
	font-size: .86em;
	background: var(--ink-3);
	padding: 2px 6px;
	border-radius: 4px;
	color: var(--teal);
}

/* --- Motion --------------------------------------------------------------- */

/*
 * No blanket will-change. It sounds like a free optimisation and is the
 * opposite: every element carrying it is promoted to its own compositor layer
 * and held there for the life of the page, whether or not it is still
 * animating. A long page has dozens of [data-reveal] elements, so that is
 * dozens of permanent layers the compositor manages on every scrolled frame.
 * GSAP sets will-change itself for the duration of each tween and clears it
 * afterwards, which is what the property is actually for.
 */

.split-line { display: block; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}

	[data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* --- Utilities ------------------------------------------------------------ */

.center { text-align: center; }
.center .lede { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-l { margin-top: 40px; }
.mb-l { margin-bottom: 40px; }
.mb-m { margin-bottom: 24px; }

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 16px;
	top: 16px;
	z-index: 200;
	background: var(--amber);
	color: #0b0d12;
	padding: 10px 16px;
	border-radius: var(--radius-sm);
}
