/*
 * ormus: oakshi's quiet UI. One accent, neutrals for everything else,
 * hairlines and quiet depth, one composition (the card: sections divided by hairlines) repeated.
 */

:root {
	/* White & Cobalt: clean white, cobalt blue, slate ink. */
	--bg: #f5f7fb;
	--surface: #ffffff;
	--tile: rgb(0 0 0 / 0.045);
	--ink: #0f172a;
	--ink-2: #475569; /* body copy, icons */
	--ink-3: #7c879a; /* labels, meta */
	--line: rgb(0 0 0 / 0.11);
	--line-soft: rgb(0 0 0 / 0.07);
	--dot: rgb(0 0 0 / 0.2);

	--accent: #2563eb;
	--accent-top: #3b76f6;
	--accent-ink: #ffffff;
	--accent-text: #1d4ed8; /* accent used as words on the page */
	--accent-hover: #1d5ae0;
	--accent-wash: color-mix(in srgb, var(--accent) 10%, transparent);
	--accent-line: color-mix(in srgb, var(--accent) 42%, transparent);
	--accent-ring: color-mix(in srgb, var(--accent) 30%, transparent);
	--accent-glow: color-mix(in srgb, var(--accent) 9%, transparent);
	--control: rgb(0 0 0 / 0.025);
	--control-hover: rgb(0 0 0 / 0.06);
	--sheen: rgb(255 255 255 / 0.7);
	--input: #ffffff;
	--scrim: rgb(20 20 30 / 0.4);
	--shade: rgb(20 20 30 / 0.16);
	--danger: #dc2626;
	--danger-ring: rgb(220 38 38 / 0.18);

	--r-card: 18px;
	--r-control: 12px;
	--r-tile: 10px;
	--shadow-card: 0 1px 0 var(--sheen) inset, 0 20px 40px -24px var(--shade);
	--ease: cubic-bezier(0.2, 0, 0, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	--font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--t-meta: 13px;
	--t-body: 15px;
	--t-input: 16px; /* 16 or iOS zooms on focus */
	--t-title: 17px;
	--t-heading: 22px;

	color-scheme: light;
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 16px;
}
html:has(dialog[open]) {
	overflow: hidden;
}

body {
	margin: 0;
	min-height: 100dvh;
	background:
		radial-gradient(60rem 28rem at 50% -8rem, var(--accent-glow), transparent 70%),
		var(--bg);
	background-repeat: no-repeat;
	color: var(--ink);
	font-family: var(--font);
	font-size: var(--t-body);
	line-height: 1.5;
	letter-spacing: -0.006em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
}

a {
	color: inherit;
}
p,
h1,
h2,
h3 {
	margin: 0;
}

.i {
	flex: none;
	width: 1em;
	height: 1em;
}

.page {
	width: 100%;
	max-width: 62rem;
	margin: 0 auto;
	padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
		max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* ---------- Top and foot ---------- */

.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 52px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: var(--t-title);
	font-weight: 650;
	letter-spacing: -0.02em;
	text-decoration: none;
}
.mark {
	width: 26px;
	height: 26px;
}
.top__link,
.foot a {
	color: var(--ink-3);
	font-size: var(--t-meta);
	text-decoration: none;
	transition: color 150ms var(--ease);
}
.top__link:hover,
.foot a:hover {
	color: var(--ink);
}

.foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 56px;
	padding-top: 20px;
	border-top: 1px solid var(--line-soft);
	color: var(--ink-3);
	font-size: var(--t-meta);
}
.foot a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: inherit;
}

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

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--ink-2);
	font-size: var(--t-meta);
	font-weight: 500;
}
.eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-ring);
}
.title {
	font-size: clamp(24px, 6vw, 30px);
	font-weight: 650;
	line-height: 1.15;
	letter-spacing: -0.028em;
	text-wrap: balance;
}
.heading {
	font-size: var(--t-heading);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.022em;
	text-wrap: balance;
}
.text {
	color: var(--ink-2);
	text-wrap: pretty;
}
.text strong {
	color: var(--ink);
	font-weight: 600;
}
.meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ink-3);
	font-size: var(--t-meta);
}
.meta a {
	color: var(--ink-2);
}
.label {
	color: var(--ink-3);
	font-size: var(--t-meta);
	font-weight: 500;
}
.accent {
	color: var(--accent-text);
}
.stack {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.spacer {
	flex: 1;
}

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

.hero {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	padding: 40px 4px 8px;
}
.hero__title {
	max-width: 15ch;
	font-size: clamp(38px, 11vw, 68px);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.04em;
	text-wrap: balance;
}
.hero__title .accent {
	display: block;
}
.hero__lede {
	max-width: 34rem;
	color: var(--ink-2);
	font-size: 17px;
	line-height: 1.5;
	text-wrap: pretty;
}
.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}
.assurances {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	color: var(--ink-3);
	font-size: var(--t-meta);
}
.assurances li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.assurances .i {
	color: var(--ink-2);
	font-size: 15px;
}

/* ---------- Blocks ---------- */

.block {
	padding-top: 56px;
}
.block__head {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 4px 18px;
	max-width: 36rem;
}

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

.card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	box-shadow: var(--shadow-card);
	overflow: clip;
}
.section {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 20px;
}
.section + .section {
	border-top: 1px solid var(--line-soft);
}
.foot-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
	padding: 12px;
	border-top: 1px solid var(--line-soft);
}
.foot-row > .meta:first-child {
	padding-left: 6px;
}

.header {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 10px 12px 14px;
	border-bottom: 1px solid var(--line-soft);
}
.header__title {
	flex: 1;
	min-width: 0;
	font-size: var(--t-title);
	font-weight: 550;
	letter-spacing: -0.012em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.header__aside {
	color: var(--ink-2);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
}
.progress__fill {
	width: 100%;
	height: 100%;
	background: var(--accent);
	border-radius: 0 2px 2px 0;
	transform-origin: left;
	transform: scaleX(0.5);
	transition: transform 500ms var(--ease);
}

/* ---------- Tile, pill, status ---------- */

.tile {
	flex: none;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: var(--r-tile);
	background: var(--tile);
	color: var(--ink-2);
	font-size: 18px;
}
.tile[data-tone="accent"] {
	background: var(--accent-wash);
	color: var(--accent-text);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.tile[data-size="sm"] {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	font-size: 15px;
}
.tile:empty {
	visibility: hidden;
}

.pill {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--accent-wash);
	box-shadow: inset 0 0 0 1px var(--accent-line);
	color: var(--accent-text);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.01em;
}
.status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ink-3);
	font-size: var(--t-meta);
	white-space: nowrap;
}

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

.button {
	appearance: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border-radius: var(--r-control);
	border: 1px solid var(--line);
	background: var(--control);
	box-shadow: inset 0 1px 0 var(--sheen);
	color: var(--ink);
	font: inherit;
	font-weight: 550;
	letter-spacing: -0.01em;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		transform 120ms var(--ease),
		background-color 150ms var(--ease),
		opacity 120ms;
	touch-action: manipulation;
}
.button .i {
	font-size: 18px;
	stroke-width: 1.9;
}
.button:hover:not(:disabled) {
	background-color: var(--control-hover);
}
.button:active:not(:disabled) {
	transform: translateY(1px);
}
.button:disabled {
	cursor: default;
	opacity: 0.55;
}
.button[data-variant="primary"] {
	border-color: color-mix(in srgb, var(--accent-top) 70%, transparent);
	background: linear-gradient(to bottom, var(--accent-top), var(--accent));
	color: var(--accent-ink);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.35),
		0 1px 2px rgb(0 0 0 / 0.3),
		0 8px 20px -8px color-mix(in srgb, var(--accent) 55%, transparent);
}
.button[data-variant="primary"]:hover:not(:disabled) {
	background: linear-gradient(to bottom, var(--accent-top), var(--accent-hover));
	filter: brightness(1.05);
}
.button[data-variant="primary"]:disabled {
	opacity: 0.6;
}
.button[data-variant="ghost"] {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
	color: var(--ink-2);
	padding: 0 14px;
}
.button[data-variant="ghost"]:hover:not(:disabled) {
	background: var(--tile);
	color: var(--ink);
}
.button[data-icon-only] {
	flex: none;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: var(--r-tile);
}
.button[data-icon-only]::after {
	content: "";
	position: absolute;
	inset: -4px;
}
.button[data-block] {
	width: 100%;
}
.button:focus-visible,
.faq summary:focus-visible,
.brand:focus-visible,
.top__link:focus-visible,
.foot a:focus-visible {
	outline: none;
	border-radius: var(--r-control);
	box-shadow:
		0 0 0 1px var(--bg),
		0 0 0 4px var(--accent-ring);
}

.spinner {
	display: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid currentColor;
	border-right-color: transparent;
	animation: spin 700ms linear infinite;
}
.button[aria-busy="true"] .spinner {
	display: block;
}
.button[aria-busy="true"] .i {
	display: none;
}
.button[aria-busy="true"]:disabled {
	opacity: 1;
}
@keyframes spin {
	to {
		transform: rotate(1turn);
	}
}

/* ---------- Offers ---------- */

.offers {
	display: grid;
	gap: 12px;
}
.offer__lead {
	gap: 8px;
}
.offer__top {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin-bottom: 10px;
}
.offer__top .status {
	margin-left: auto;
}
.offer__price {
	font-size: 40px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
}
.offer__name {
	font-size: 20px;
	font-weight: 620;
	line-height: 1.25;
	letter-spacing: -0.02em;
	text-wrap: balance;
}
.offer[data-featured] {
	border-color: var(--accent-line);
	background:
		radial-gradient(28rem 14rem at 0% 0%, var(--accent-wash), transparent 70%),
		var(--surface);
	box-shadow:
		var(--shadow-card),
		0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent);
}
.offer[data-featured] .offer__price {
	color: var(--accent-text);
}

.checks {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--ink-2);
}
.checks li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}
.checks .i {
	margin-top: 3px;
	font-size: 16px;
	stroke-width: 2.4;
	color: var(--accent);
}

/* ---------- How it works, guarantee ---------- */

.duo {
	display: grid;
	gap: 12px;
}
.steps {
	margin: 0;
	padding: 0;
	list-style: none;
}
.step {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 20px;
}
.step + .step {
	border-top: 1px solid var(--line-soft);
}
.step__title {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: var(--t-title);
	font-weight: 600;
	letter-spacing: -0.012em;
}
.step__n {
	color: var(--accent-text);
	font-variant-numeric: tabular-nums;
}
.guarantee .section {
	gap: 10px;
	height: 100%;
	justify-content: center;
}

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

.faq + .faq {
	border-top: 1px solid var(--line-soft);
}
.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
	padding: 14px 20px;
	font-weight: 550;
	cursor: pointer;
	list-style: none;
}
.faq summary::-webkit-details-marker {
	display: none;
}
.faq summary .i {
	color: var(--ink-3);
	font-size: 18px;
	transition: transform 200ms var(--ease);
}
.faq[open] summary .i {
	transform: rotate(180deg);
}
.faq .text {
	padding: 0 20px 18px;
	max-width: 40rem;
}

/* ---------- Final call ---------- */

.final .section {
	align-items: center;
	gap: 10px;
	padding: 36px 20px;
	text-align: center;
}
.final .button {
	margin-top: 10px;
}

/* ---------- Buy sheet ---------- */

.sheet {
	width: min(100% - 16px, 30rem);
	max-width: none;
	max-height: calc(100dvh - 16px);
	margin: max(8px, env(safe-area-inset-top)) auto auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	overflow: visible;
}
.sheet::backdrop {
	background: var(--scrim);
}
.sheet[open] {
	animation: sheet-in 320ms var(--ease-out);
}
.sheet[open]::backdrop {
	animation: fade-in 200ms var(--ease);
}
.sheet .card {
	max-height: calc(100dvh - 16px);
	overflow: auto;
	box-shadow: 0 24px 60px -20px var(--shade);
}
@keyframes sheet-in {
	from {
		opacity: 0;
		transform: translateY(-12px) scale(0.98);
	}
}
@keyframes fade-in {
	from {
		opacity: 0;
	}
}
@media (min-width: 640px) {
	.sheet {
		margin: 12vh auto auto;
	}
}

.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
}
.field__label {
	color: var(--ink-2);
	font-size: var(--t-meta);
	font-weight: 500;
}
.field__meta {
	display: flex;
	align-items: baseline;
	gap: 12px;
}
.field__meta .count {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
}
.input {
	appearance: none;
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border-radius: var(--r-control);
	border: 1px solid var(--line);
	background: var(--input);
	color: var(--ink);
	font: inherit;
	font-size: var(--t-input);
	transition:
		border-color 150ms var(--ease),
		box-shadow 150ms var(--ease);
}
.textarea {
	height: auto;
	min-height: 128px;
	padding: 12px 14px;
	line-height: 1.45;
	resize: vertical;
}
.input::placeholder {
	color: var(--ink-3);
}
.input:focus {
	outline: none;
	border-color: var(--accent-line);
	box-shadow: 0 0 0 3px var(--accent-ring);
}
.input[aria-invalid="true"] {
	border-color: var(--danger);
	box-shadow: 0 0 0 3px var(--danger-ring);
}
.field__error,
.pay-error {
	color: var(--danger);
	font-size: var(--t-meta);
}
.pay-error {
	flex: 1;
	min-width: 0;
	line-height: 1.35;
}

.summary {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
}
.summary dt,
.summary dd {
	margin: 0;
}
.summary__line,
.summary__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}
.summary__line {
	padding-bottom: 12px;
	font-weight: 550;
}
.summary__detail {
	display: block;
	margin-top: 2px;
	color: var(--ink-3);
	font-size: var(--t-meta);
	font-weight: 500;
}
.summary__total {
	padding-top: 12px;
	border-top: 1px solid var(--line-soft);
	color: var(--ink-3);
}
.summary__total dd {
	color: var(--ink);
	font-size: var(--t-title);
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

[hidden] {
	display: none !important;
}

/* ---------- Thanks ---------- */

.thanks {
	display: grid;
	place-items: center;
	min-height: 60dvh;
	padding-top: 24px;
}
.thanks .card {
	width: 100%;
	max-width: 30rem;
}
.thanks .foot-row {
	justify-content: flex-end;
}

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
	.page {
		padding-left: max(32px, env(safe-area-inset-left));
		padding-right: max(32px, env(safe-area-inset-right));
	}
	.hero {
		padding-top: 88px;
		gap: 22px;
	}
	.hero__lede {
		font-size: 19px;
	}
	.block {
		padding-top: 88px;
	}
	.offers {
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}
	.duo {
		grid-template-columns: 3fr 2fr;
		gap: 16px;
	}
	.foot {
		margin-top: 88px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
	}
	.spinner {
		animation: spin 1.4s linear infinite !important;
	}
}
