/* API access page - overhaul */

.subscription-page {
	max-width: 1160px;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 48px) 16px 64px;
	display: grid;
	gap: 22px;
	color: var(--text-0);
}

.eyebrow {
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(230, 237, 243, 0.64);
}

.access-hero,
.access-foundation,
.access-terms {
	position: relative;
	border: 1px solid rgba(120, 146, 255, 0.15);
	border-radius: 28px;
	background: linear-gradient(180deg, rgba(13, 18, 38, 0.98), rgba(9, 13, 29, 0.94));
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
	overflow: hidden;
}

.access-hero::before,
.access-foundation::before,
.access-terms::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at top right, rgba(0, 180, 216, 0.12), transparent 34%);
	pointer-events: none;
}

.access-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.8fr);
	gap: 24px;
	padding: clamp(24px, 4vw, 42px);
}

.hero-copy,
.hero-panel,
.access-foundation,
.access-terms__primary,
.access-terms__secondary {
	position: relative;
	z-index: 1;
}

.hero-copy {
	display: grid;
	align-content: start;
	gap: 18px;
}

.hero-copy h1 {
	margin: 0;
	max-width: 11ch;
	font-size: clamp(2.4rem, 1.8rem + 2vw, 4.2rem);
	line-height: 0.96;
	letter-spacing: -0.03em;
	font-family: var(--font-display, 'Space Grotesk', sans-serif);
}

.lede,
.hero-supporting-copy {
	margin: 0;
	max-width: 62ch;
	color: rgba(230, 237, 243, 0.82);
	line-height: 1.68;
	font-size: 1rem;
}

.hero-supporting-copy {
	max-width: 54ch;
	color: rgba(230, 237, 243, 0.62);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.cta,
.secondary {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 16px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	font-weight: 700;
	letter-spacing: 0.03em;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.cta {
	color: #071120;
	background: linear-gradient(180deg, #d7fbff, #8fdcf0);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.secondary {
	color: var(--text-0);
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.12);
}

.cta:hover,
.secondary:hover {
	transform: translateY(-1px);
	border-color: rgba(143, 220, 240, 0.42);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.hero-panel {
	padding: 18px;
	border-radius: 22px;
	background: linear-gradient(180deg, rgba(16, 24, 49, 0.94), rgba(10, 15, 31, 0.96));
	border: 1px solid rgba(143, 220, 240, 0.16);
	display: grid;
	align-content: start;
	gap: 16px;
}

.hero-panel__header {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: center;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel__label,
.hero-panel__status {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(230, 237, 243, 0.62);
}

.hero-panel__status {
	color: #8fdcf0;
}

.hero-panel__rows {
	display: grid;
	gap: 10px;
}

.hero-panel__row {
	display: grid;
	gap: 6px;
	padding: 12px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel__row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.hero-panel__key {
	font-size: 0.74rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(230, 237, 243, 0.52);
}

.hero-panel__value {
	font-size: 1rem;
	line-height: 1.5;
	color: var(--text-0);
}

.hero-panel__row--price .hero-panel__value {
	font-size: 1.3rem;
	color: #8fdcf0;
	font-family: 'JetBrains Mono', monospace;
}

.access-foundation {
	padding: clamp(22px, 3vw, 34px);
}

.section-heading {
	display: grid;
	gap: 8px;
	margin-bottom: 18px;
	position: relative;
	z-index: 1;
}

.section-heading h2 {
	margin: 0;
	font-size: clamp(1.4rem, 1.1rem + 1vw, 2.2rem);
	font-family: var(--font-display, 'Space Grotesk', sans-serif);
}

.foundation-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	position: relative;
	z-index: 1;
}

.foundation-card {
	display: grid;
	gap: 14px;
	padding: 20px;
	min-height: 220px;
	border-radius: 22px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.foundation-card__icon {
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: rgba(0, 180, 216, 0.1);
	border: 1px solid rgba(143, 220, 240, 0.22);
	color: #8fdcf0;
}

.foundation-card__icon i,
.process-step__index,
.form-actions .cta i {
	flex: 0 0 auto;
}

.foundation-card__icon i,

.foundation-card__icon i {
	width: 18px;
	height: 18px;
	stroke-width: 2;
}

.foundation-card h3,
.process-step h3 {
	margin: 0;
	font-size: 1.08rem;
}

.foundation-card p,
.process-step p,
.access-terms__lede,
.access-price-card__copy {
	margin: 0;
	line-height: 1.65;
	color: rgba(230, 237, 243, 0.72);
}

.access-terms {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.95fr);
	gap: 0;
}

.access-terms__primary,
.access-terms__secondary {
	padding: clamp(22px, 3vw, 34px);
}

.access-terms__secondary {
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.02);
}

.access-terms__lede {
	max-width: 48ch;
	margin-bottom: 20px;
}

.access-price-card {
	display: grid;
	gap: 14px;
	padding: 24px;
	border-radius: 24px;
	background: linear-gradient(180deg, rgba(143, 220, 240, 0.12), rgba(255, 255, 255, 0.03));
	border: 1px solid rgba(143, 220, 240, 0.22);
	max-width: 420px;
}

.access-price-card__label {
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(230, 237, 243, 0.64);
}

.access-price-card__value {
	font-size: clamp(2rem, 1.6rem + 1vw, 3rem);
	line-height: 0.95;
	font-family: var(--font-display, 'Space Grotesk', sans-serif);
}

.access-price-card__value span {
	font-size: 0.42em;
	font-family: 'JetBrains Mono', monospace;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(230, 237, 243, 0.72);
}

.process-list {
	display: grid;
	gap: 14px;
}

.process-step {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.process-step:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.process-step__index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	color: #8fdcf0;
}

.subscription-modal {
	position: fixed;
	inset: 0;
	display: none;
	place-items: center;
	z-index: 1200;
}

.subscription-modal.is-open {
	display: grid;
}

.subscription-modal[hidden] {
	display: none !important;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(3px);
}

.modal-dialog {
	position: relative;
	z-index: 1;
	width: min(760px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	background: linear-gradient(180deg, #0d1117, #0b1323);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 24px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
	padding: 22px 22px 18px;
	display: flex;
	flex-direction: column;
}

.modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: none;
	background: transparent;
	color: var(--text-0);
	font-size: 1.6rem;
	cursor: pointer;
}

.modal-body {
	overflow-y: auto;
	padding-right: 4px;
}

.modal-body h3 {
	margin: 6px 0;
	font-size: 1.5rem;
	font-family: var(--font-display, 'Space Grotesk', sans-serif);
}

.modal-lede {
	margin: 0 0 10px;
	color: var(--text-1);
	line-height: 1.5;
}

.subscription-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

@media (max-width: 540px) {
	.form-grid {
		grid-template-columns: 1fr;
	}
}

.form-row {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.form-row label {
	font-weight: 600;
	font-size: 0.86rem;
	letter-spacing: 0.02em;
	color: #e6edf3;
}

.form-row label .required {
	color: #f85149;
	margin-left: 2px;
}

.form-row input,
.form-row textarea,
.form-row select {
	width: 100%;
	padding: 11px 12px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: #161b22;
	color: #e6edf3;
	font: inherit;
	font-size: 0.92rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-row textarea {
	min-height: 92px;
	resize: vertical;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
	color: #6e7681;
}

.form-row select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236e7681' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

.form-row select option {
	background: #161b22;
	color: #e6edf3;
}

.form-row input:hover,
.form-row textarea:hover,
.form-row select:hover {
	border-color: rgba(255, 255, 255, 0.2);
	background: #1c2128;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
	outline: none;
	border-color: #00b4d8;
	box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
	background: #1c2128;
}

.form-note {
	margin: 4px 0 0;
	padding: 12px 14px;
	background: rgba(0, 180, 216, 0.08);
	border: 1px solid rgba(0, 180, 216, 0.2);
	border-radius: 14px;
	color: #8b949e;
	font-size: 0.84rem;
	line-height: 1.45;
}

.form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	align-items: center;
	margin-top: 4px;
}

.form-actions .cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.form-status {
	min-height: 20px;
	font-size: 0.9rem;
	text-align: center;
	margin-top: 4px;
}

.form-status[data-tone="success"] {
	color: #3fb950;
}

.form-status[data-tone="error"] {
	color: #f85149;
}

@media (max-width: 640px) {
	.hero-actions {
		align-items: stretch;
	}
	.access-hero,
	.access-terms {
		grid-template-columns: 1fr;
	}
	.access-terms__secondary {
		border-left: none;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}
	.foundation-grid {
		grid-template-columns: 1fr;
	}
	.hero-copy h1 {
		max-width: 12ch;
	}
	.form-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.modal-dialog {
		width: calc(100vw - 16px);
		max-height: calc(100vh - 16px);
		padding: 16px 14px 12px;
	}
}
