/* ===========================================================
   RYDEN AI — "Quant Terminal" dark system
   =========================================================== */

@font-face {
	font-family: "Space Grotesk";
	src: url("assets/fonts/space-grotesk.woff2") format("woff2");
	font-weight: 300 700;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("assets/fonts/jetbrains-mono.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}

:root {
	/* dark quant-terminal palette */
	--ink: #04060a; /* deep canvas + recessed panels */
	--panel: #0a0f17; /* alternating section band */
	--paper: #0b1119; /* raised card */
	--ivory: #e6eef8; /* primary text on dark */
	--cobalt: #00e5ff; /* electric accent */
	--cobalt-dim: rgba(0, 229, 255, 0.1);
	--cobalt-line: rgba(0, 229, 255, 0.32);
	--muted: #93a4b8;
	--faint: #5f7189;
	--up: #34f5a0;
	--dn: #ff5f6d;
	--line: rgba(255, 255, 255, 0.09);
	--line-dark: rgba(255, 255, 255, 0.14);
	--maxw: 1320px;
	--cjk: "PingFang HK", "PingFang TC", "Hiragino Sans CNS", "Noto Sans CJK HK",
		"Noto Sans TC", "Microsoft JhengHei", sans-serif;
	--grotesk: "Space Grotesk", var(--cjk);
	--sans: "Inter", var(--cjk);
	--mono: "JetBrains Mono", ui-monospace, var(--cjk);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

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

body {
	font-family: var(--sans);
	background: var(--ink);
	color: var(--ivory);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	line-height: 1.5;
}

::selection {
	background: var(--cobalt);
	color: var(--ink);
}

img,
svg,
canvas {
	display: block;
	max-width: 100%;
}
a {
	color: inherit;
	text-decoration: none;
}
button {
	font-family: inherit;
	cursor: pointer;
	border: none;
	background: none;
	color: inherit;
}

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

.mono {
	font-family: var(--mono);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 500;
}

.idx {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.14em;
	color: var(--cobalt);
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
}
.eyebrow b {
	color: var(--ivory);
	font-weight: 500;
}
.eyebrow.on-dark {
	color: var(--faint);
}
.eyebrow.on-dark b {
	color: #fff;
}

.section {
	padding: 120px 0;
	position: relative;
}
@media (max-width: 720px) {
	.section {
		padding: 80px 0;
	}
}

.headline {
	font-family: var(--grotesk);
	font-weight: 500;
	letter-spacing: -0.03em;
	line-height: 1.08;
}

/* ---------- reveal animations ---------- */
.reveal {
	opacity: 0;
	transform: translateY(48px);
	transition:
		opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
		transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
	opacity: 1;
	transform: none;
}
.d1 {
	transition-delay: 0.08s;
}
.d2 {
	transition-delay: 0.16s;
}
.d3 {
	transition-delay: 0.24s;
}
.d4 {
	transition-delay: 0.32s;
}
.d5 {
	transition-delay: 0.4s;
}

.mask {
	overflow: hidden;
	display: block;
}
.mask > span {
	display: block;
	transform: translateY(110%);
	transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in .mask > span,
.mask.in > span {
	transform: none;
}

.uline {
	position: relative;
	display: inline-block;
}
.uline::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	height: 1px;
	width: 100%;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}
.uline:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* =================== HEADER =================== */
.header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 100;
	padding: 20px 0;
	transition:
		padding 0.3s,
		background 0.3s,
		box-shadow 0.3s;
}
.header.scrolled {
	padding: 12px 0;
	background: rgba(4, 6, 10, 0.72);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.logo {
	font-family: var(--grotesk);
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.02em;
	color: #fff;
	transition: color 0.3s;
	white-space: nowrap;
}
.logo .sep {
	color: var(--cobalt);
	text-shadow: 0 0 14px var(--cobalt-line);
}
.header.scrolled .logo {
	color: var(--ivory);
}

.clock {
	display: none;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	color: #fff;
	transition: color 0.3s;
	text-align: center;
	line-height: 1.5;
}
.clock .lbl {
	opacity: 0.55;
}
.header.scrolled .clock {
	color: var(--ivory);
}
@media (min-width: 900px) {
	.clock {
		display: block;
	}
}

.menu-wrap {
	position: relative;
}
.menu-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: var(--paper);
	border: 1px solid var(--line);
	padding: 9px 16px;
	border-radius: 3px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: background 0.25s;
}
.menu-btn:hover {
	background: var(--cobalt-dim);
	border-color: var(--cobalt-line);
}
.menu-btn svg {
	transition: transform 0.3s;
}
.menu-btn.open svg {
	transform: rotate(90deg);
}
.dropdown {
	position: absolute;
	right: 0;
	top: calc(100% + 12px);
	width: 256px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition:
		opacity 0.25s,
		transform 0.25s,
		visibility 0.25s;
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.3);
}
.dropdown.open {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.dropdown a {
	display: block;
	padding: 11px 20px;
	font-size: 14px;
	font-weight: 500;
	transition:
		background 0.2s,
		color 0.2s;
}
.dropdown a:hover {
	background: rgba(255, 255, 255, 0.05);
	color: var(--cobalt);
}
.dropdown hr {
	border: none;
	border-top: 1px solid var(--line);
	margin: 6px 0;
}

/* =================== HERO =================== */
.hero {
	position: relative;
	min-height: 92vh;
	background: var(--ink);
	color: var(--ivory);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	padding: 150px 0 56px;
}
#hero-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0.5;
}
.hero .wrap {
	position: relative;
	z-index: 2;
}
.hero-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 40px;
	margin-bottom: 64px;
	flex-wrap: wrap;
}
.hero-lead {
	max-width: 440px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.hero-lead p {
	font-size: clamp(17px, 1.5vw, 21px);
	line-height: 1.5;
	font-weight: 400;
	color: rgba(230, 238, 248, 0.9);
}

.ticker-card {
	width: 300px;
	max-width: 100%;
	background: var(--paper);
	color: var(--ivory);
	border: 1px solid var(--line-dark);
	border-radius: 4px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	transform: rotate(1.5deg);
	transform-origin: bottom right;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.ticker-card:hover {
	transform: rotate(0deg);
}
.tc-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.tc-tag {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}
.tc-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cobalt);
	box-shadow: 0 0 0 0 var(--cobalt-line);
	animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
	70% {
		box-shadow: 0 0 0 9px rgba(0, 229, 255, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(0, 229, 255, 0);
	}
}
.tc-chart {
	height: 88px;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.03);
	position: relative;
	overflow: hidden;
}
.tc-chart svg {
	width: 100%;
	height: 100%;
}
.tc-metric {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.tc-metric .val {
	font-family: var(--grotesk);
	font-weight: 700;
	/* holds an eval-loop step name now, so it has to wrap instead of overflow */
	font-size: 20px;
	line-height: 1.15;
	letter-spacing: -0.02em;
	min-height: 2.3em;
}
.tc-metric .val em {
	color: var(--cobalt);
	font-style: normal;
}
.tc-metric .lab {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.tc-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	position: relative;
	width: fit-content;
	padding-bottom: 4px;
}
.tc-cta::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 1px;
	width: 100%;
	background: var(--ivory);
	transform: scaleX(1);
	transform-origin: left;
	transition: transform 0.35s;
}
.tc-cta:hover::after {
	transform: scaleX(0);
	transform-origin: right;
}

.hero-word {
	font-family: var(--grotesk);
	font-weight: 700;
	font-size: clamp(58px, 16vw, 248px);
	line-height: 0.86;
	letter-spacing: -0.05em;
	color: var(--ivory);
	user-select: none;
}

/* =================== MARQUEE =================== */
.marquee-strip {
	background: var(--panel);
	color: var(--ivory);
	border-top: 1px solid var(--line-dark);
	border-bottom: 1px solid var(--line-dark);
	overflow: hidden;
}
.marquee {
	display: flex;
	width: max-content;
	animation: marquee 32s linear infinite;
}
.marquee:hover {
	animation-play-state: paused;
}
@keyframes marquee {
	to {
		transform: translateX(-50%);
	}
}
.tick {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	white-space: nowrap;
	border-right: 1px solid var(--line-dark);
}
.tick .up {
	color: var(--up);
}
.tick .neu {
	color: var(--cobalt);
}
.tick .dn {
	color: var(--dn);
}

/* =================== THESIS =================== */
#thesis {
	background: var(--ink);
}
.thesis-head {
	display: flex;
	gap: 40px;
	align-items: flex-start;
}
.thesis-head .idx {
	padding-top: 14px;
	flex-shrink: 0;
}
.thesis-statement {
	font-family: var(--grotesk);
	font-weight: 500;
	letter-spacing: -0.03em;
	font-size: clamp(26px, 4vw, 48px);
	line-height: 1.12;
	max-width: 920px;
}
.thesis-statement em {
	color: var(--cobalt);
	font-style: normal;
}

.thesis-split {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 64px;
	margin-top: 88px;
	align-items: start;
}
@media (max-width: 900px) {
	.thesis-split {
		grid-template-columns: 1fr;
		gap: 48px;
	}
	.thesis-head {
		flex-direction: column;
		gap: 18px;
	}
}

.method-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	border: 1px solid var(--line);
}
.method-cell {
	padding: 26px 24px;
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 168px;
	justify-content: space-between;
	transition: background 0.3s;
}
.method-cell:nth-child(2n) {
	border-right: none;
}
/* works for a 4-cell or an 8-cell grid: only the final row loses its rule */
.method-cell:nth-last-child(-n + 2) {
	border-bottom: none;
}
@media (max-width: 560px) {
	.method-grid {
		grid-template-columns: 1fr;
	}
	.method-cell {
		border-right: none;
		min-height: 0;
	}
	.method-cell:nth-last-child(-n + 2) {
		border-bottom: 1px solid var(--line);
	}
	.method-cell:last-child {
		border-bottom: none;
	}
}
.method-cell:hover {
	background: var(--paper);
}
.method-cell .step {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	color: var(--cobalt);
}
.method-cell h4 {
	font-family: var(--grotesk);
	font-weight: 700;
	font-size: 20px;
	letter-spacing: -0.02em;
}
.method-cell p {
	font-size: 13.5px;
	color: var(--muted);
	line-height: 1.45;
}

.thesis-copy {
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.thesis-copy h3 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: 22px;
	letter-spacing: -0.02em;
	line-height: 1.25;
}
.thesis-copy p {
	color: var(--muted);
	font-size: 15px;
	line-height: 1.65;
}
.linkrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-top: 6px;
	width: fit-content;
}
.linkrow .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cobalt);
	transition: transform 0.3s;
}
.linkrow:hover .dot {
	transform: scale(1.6);
}

/* =================== CAPABILITIES =================== */
#capabilities {
	background: var(--panel);
	color: var(--ivory);
}
.cap-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 32px;
	flex-wrap: wrap;
	margin-bottom: 64px;
}
.cap-head h2 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: clamp(24px, 3vw, 34px);
	letter-spacing: -0.03em;
	max-width: 460px;
	line-height: 1.15;
}
.cap-pill {
	border: 1px solid var(--line-dark);
	border-radius: 3px;
	padding: 12px 22px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition:
		background 0.3s,
		color 0.3s;
}
.cap-pill:hover {
	background: var(--cobalt);
	color: var(--ink);
	border-color: var(--cobalt);
}

.acc {
	border-top: 1px solid var(--line-dark);
}
.acc-item {
	border-bottom: 1px solid var(--line-dark);
}
.acc-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 30px 8px;
	text-align: left;
}
.acc-btn .left {
	display: flex;
	align-items: baseline;
	gap: clamp(20px, 6vw, 96px);
}
.acc-btn .num {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--faint);
}
.acc-btn h3 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: clamp(22px, 3.4vw, 40px);
	letter-spacing: -0.04em;
	transition: color 0.3s;
}
.acc-item:hover .acc-btn h3 {
	color: var(--cobalt);
}
.acc-ico {
	width: 46px;
	height: 46px;
	flex-shrink: 0;
	border: 1px solid var(--line-dark);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition:
		background 0.3s,
		color 0.3s,
		transform 0.4s;
}
.acc-item.open .acc-ico {
	transform: rotate(135deg);
	background: var(--cobalt);
	color: var(--ink);
	border-color: var(--cobalt);
}
.acc-content {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition:
		max-height 0.45s ease,
		opacity 0.45s ease;
}
.acc-item.open .acc-content {
	opacity: 1;
}
.acc-inner {
	padding: 4px 8px 36px;
	display: flex;
	gap: clamp(24px, 8vw, 128px);
}
.acc-inner .spacer {
	width: 96px;
	flex-shrink: 0;
}
@media (max-width: 760px) {
	.acc-inner .spacer {
		display: none;
	}
}
.acc-body {
	max-width: 640px;
}
.acc-body p {
	color: var(--faint);
	font-size: clamp(15px, 1.6vw, 18px);
	line-height: 1.55;
	margin-bottom: 24px;
}
.acc-body ul {
	list-style: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
@media (max-width: 540px) {
	.acc-body ul {
		grid-template-columns: 1fr;
	}
}
.acc-body li {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ivory);
}
.acc-body li::before {
	content: "/ ";
	color: var(--cobalt);
}

/* =================== METRICS =================== */
#metrics {
	background: var(--ink);
	border-top: 1px solid var(--line);
}
.metrics-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
}
@media (max-width: 860px) {
	.metrics-grid {
		grid-template-columns: 1fr 1fr;
		gap: 40px 24px;
	}
}
@media (max-width: 460px) {
	.metrics-grid {
		grid-template-columns: 1fr;
	}
}
.metric {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.metric .fig {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: clamp(44px, 6vw, 76px);
	letter-spacing: -0.04em;
	line-height: 0.95;
}
.metric .fig em {
	color: var(--cobalt);
	font-style: normal;
}
.metric .lab {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

/* =================== ENGAGEMENTS / PRICING =================== */
#engagements {
	background: var(--panel);
	border-top: 1px solid var(--line);
}
.eng-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 32px;
	flex-wrap: wrap;
	margin-bottom: 56px;
}
.eng-head h2 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: clamp(22px, 2.6vw, 30px);
	letter-spacing: -0.03em;
	max-width: 440px;
	line-height: 1.2;
}
.eng-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
@media (max-width: 940px) {
	.eng-grid {
		grid-template-columns: 1fr;
		max-width: 460px;
		margin: 0 auto;
	}
}

.plan {
	border: 1px solid var(--line);
	border-radius: 5px;
	padding: 30px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
	background: var(--paper);
}
.plan.dark {
	background: var(--ink);
	color: var(--ivory);
	border-color: var(--ink);
}
.plan.cobalt {
	border-color: var(--cobalt);
	box-shadow: 0 0 44px -14px var(--cobalt-line);
}
.plan-top {
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.plan-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.plan-badge {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--paper);
}
.plan.dark .plan-badge {
	background: var(--ivory);
	color: var(--ink);
	border: none;
}
.plan.cobalt .plan-badge {
	background: var(--cobalt-dim);
	color: var(--cobalt);
	border-color: var(--cobalt-line);
}

.toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.toggle .t-off {
	color: var(--faint);
}
.toggle .t-on {
	color: inherit;
}
.plan.dark .toggle .t-on {
	color: var(--ivory);
}
.knob {
	width: 34px;
	height: 18px;
	border-radius: 999px;
	padding: 2px;
	display: inline-flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.14);
	transition: background 0.3s;
}
.plan.dark .knob {
	background: var(--ivory);
}
.plan.cobalt .knob {
	background: var(--cobalt);
}
.knob .dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--ivory);
	transition: transform 0.3s;
}
.plan.dark .knob .dot {
	background: var(--ink);
}
.plan.cobalt .knob .dot {
	background: var(--ink);
}
.knob.on .dot {
	transform: translateX(16px);
}

.plan-price {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.plan-price .cap {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}
.plan.dark .plan-price .cap {
	color: var(--faint);
}
.plan-price .amt {
	display: flex;
	align-items: flex-end;
	gap: 6px;
}
.plan-price .amt strong {
	font-family: var(--grotesk);
	font-weight: 700;
	font-size: 34px;
	letter-spacing: -0.03em;
	line-height: 1;
}
.plan-price .amt span {
	font-size: 12px;
	color: var(--muted);
	padding-bottom: 3px;
}
.plan.dark .plan-price .amt span {
	color: var(--faint);
}

.plan-bottom {
	display: flex;
	flex-direction: column;
	gap: 26px;
}
.plan-bottom h4 {
	font-family: var(--grotesk);
	font-weight: 700;
	font-size: 19px;
	letter-spacing: -0.02em;
}
.plan ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 11px;
}
.plan li {
	display: flex;
	align-items: center;
	gap: 11px;
	font-size: 13px;
	color: var(--muted);
}
.plan.dark li {
	color: rgba(230, 238, 248, 0.72);
}
.plan li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--faint);
	flex-shrink: 0;
}
.plan.cobalt li::before {
	background: var(--cobalt);
}
.plan-cta {
	display: block;
	text-align: center;
	padding: 13px;
	border-radius: 3px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	transition:
		opacity 0.25s,
		background 0.25s,
		color 0.25s;
}
.plan.dark .plan-cta {
	background: var(--ivory);
	color: var(--ink);
}
.plan .plan-cta {
	background: rgba(255, 255, 255, 0.07);
	color: var(--ivory);
	border: 1px solid var(--line-dark);
}
.plan.cobalt .plan-cta {
	background: var(--cobalt);
	color: var(--ink);
	border-color: var(--cobalt);
}
.plan-cta:hover {
	opacity: 0.85;
}

/* =================== CASES =================== */
#cases {
	background: var(--ink);
	border-top: 1px solid var(--line);
}
.cases-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	max-width: 1000px;
	margin: 0 auto;
}
@media (max-width: 800px) {
	.cases-grid {
		grid-template-columns: 1fr;
		gap: 56px;
	}
}
.case {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.case:nth-child(2) {
	margin-top: 56px;
}
@media (max-width: 800px) {
	.case:nth-child(2) {
		margin-top: 0;
	}
}
.case-thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow: hidden;
	background: var(--paper);
}
.case-thumb svg {
	width: 100%;
	height: 100%;
	transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.case:hover .case-thumb svg {
	transform: scale(1.06);
}
.case-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--ink);
	color: var(--ivory);
	border: 1px solid var(--line-dark);
	font-family: var(--mono);
	font-size: 9px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 999px;
}
.case h3 {
	font-family: var(--grotesk);
	font-weight: 700;
	font-size: clamp(20px, 2.4vw, 26px);
	letter-spacing: -0.03em;
}
.case p {
	color: var(--muted);
	font-size: 14px;
	line-height: 1.55;
	max-width: 380px;
}
.case-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid var(--line);
	padding-top: 18px;
	margin-top: 4px;
}
.case-foot .meta {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.case-foot .out {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* =================== FAQ =================== */
#faq {
	background: var(--ink);
	border-top: 1px solid var(--line);
}
.faq-split {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 64px;
	align-items: start;
}
@media (max-width: 900px) {
	.faq-split {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}
.faq-cta {
	position: sticky;
	top: 110px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.faq-cta h3 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: 26px;
	letter-spacing: -0.03em;
	line-height: 1.15;
}
.faq-cta p {
	color: var(--muted);
	font-size: 15px;
	line-height: 1.6;
}
.faq-cta a {
	width: fit-content;
	background: var(--cobalt);
	color: var(--ink);
	padding: 14px 26px;
	border-radius: 3px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	transition: background 0.3s;
}
.faq-cta a:hover {
	background: var(--ivory);
}
.faq-list {
	border-top: 1px solid var(--line);
}
.faq-q {
	border-bottom: 1px solid var(--line);
}
.faq-qbtn {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	text-align: left;
	padding: 26px 0;
}
.faq-qbtn h4 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: clamp(17px, 2vw, 22px);
	letter-spacing: -0.02em;
	transition: color 0.3s;
}
.faq-q:hover .faq-qbtn h4 {
	color: var(--cobalt);
}
.faq-ico {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.4s;
}
.faq-q.open .faq-ico {
	transform: rotate(135deg);
}
.faq-ans {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition:
		max-height 0.4s ease,
		opacity 0.4s ease;
}
.faq-ans p {
	color: var(--muted);
	font-size: 15px;
	line-height: 1.65;
	padding-bottom: 26px;
	max-width: 560px;
}

/* =================== BIG CTA =================== */
#contact {
	background: var(--ink);
	border-top: 1px solid var(--line);
	text-align: center;
}
.bigcta {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}
.bigcta h2 {
	font-family: var(--grotesk);
	font-weight: 700;
	font-size: clamp(44px, 11vw, 150px);
	letter-spacing: -0.05em;
	line-height: 0.92;
	transition: color 0.5s;
	white-space: nowrap;
}
.bigcta:hover h2 {
	color: var(--cobalt);
}
.bigcta .badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.4);
	width: clamp(80px, 12vw, 124px);
	height: clamp(80px, 12vw, 124px);
	border-radius: 50%;
	background: var(--cobalt);
	color: var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition:
		opacity 0.5s,
		transform 0.5s;
	pointer-events: none;
}
.bigcta:hover .badge {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* =================== FOOTER =================== */
.footer {
	background: var(--panel);
	color: var(--ivory);
	padding: 110px 0 40px;
}
.footer-top {
	display: flex;
	justify-content: space-between;
	gap: 56px;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--line-dark);
	padding-bottom: 64px;
	margin-bottom: 48px;
}
.footer-quote {
	max-width: 320px;
	display: flex;
	flex-direction: column;
	gap: 26px;
}
.footer-mark {
	font-family: var(--grotesk);
	font-weight: 700;
	font-size: 22px;
	letter-spacing: -0.02em;
}
.footer-mark .sep {
	color: var(--cobalt);
}
.footer-quote h5 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: 18px;
	letter-spacing: -0.02em;
	line-height: 1.4;
}
/* the `hidden` attribute must beat any author display rule below */
[hidden] {
	display: none !important;
}
.footer-news {
	max-width: 460px;
	flex: 1 1 320px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.footer-news h5 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: 18px;
	letter-spacing: -0.02em;
}
.news-form {
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.news-field {
	border-bottom: 1px solid var(--line-dark);
	padding-bottom: 12px;
}
.news-field input {
	width: 100%;
	background: none;
	border: none;
	color: #fff;
	font-family: var(--sans);
	font-size: 15px;
	outline: none;
}
.news-field input::placeholder {
	color: var(--faint);
}
.news-form button {
	align-self: flex-start;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-top: 6px;
	position: relative;
	padding-bottom: 4px;
}
.news-form button::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 1px;
	width: 100%;
	background: #fff;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s;
}
.news-form button:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}
.news-msg {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	min-height: 14px;
}
.news-msg.ok {
	color: var(--up);
}
.news-msg.err {
	color: var(--dn);
}

.footer-cols {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
}
@media (max-width: 720px) {
	.footer-cols {
		grid-template-columns: 1fr 1fr;
		gap: 32px;
	}
}
.fcol h6 {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: 17px;
	letter-spacing: -0.02em;
	margin-bottom: 18px;
}
.fcol a {
	display: block;
	color: var(--faint);
	font-size: 14px;
	padding: 5px 0;
	transition: color 0.25s;
}
.fcol a:hover {
	color: #fff;
}
.fcol .big-mail {
	font-family: var(--grotesk);
	font-weight: 500;
	font-size: clamp(20px, 2.4vw, 26px);
	letter-spacing: -0.03em;
	color: #fff;
	margin-top: 14px;
}
.footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 56px;
	padding-top: 28px;
	border-top: 1px solid var(--line-dark);
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
}
.footer-bottom .legal {
	display: flex;
	gap: 14px;
}
.footer-bottom .legal a:hover {
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms;
		animation-iteration-count: 1;
		transition-duration: 0.001ms;
		scroll-behavior: auto;
	}
	.reveal {
		opacity: 1;
		transform: none;
	}
	.mask > span {
		transform: none;
	}
}

/* =================== RYDEN AI — dark additions =================== */

/* cyan bloom behind the hero wordmark */
.hero::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -22%;
	width: min(1100px, 120%);
	height: 60%;
	transform: translateX(-50%);
	background: radial-gradient(
		ellipse at center,
		rgba(0, 229, 255, 0.16),
		transparent 68%
	);
	pointer-events: none;
	z-index: 1;
}
.hero-word {
	position: relative;
	text-shadow: 0 0 90px rgba(0, 229, 255, 0.22);
}

/* hairline top rule on every band, reads as a terminal frame */
.section + .section {
	border-top: 1px solid var(--line);
}

/* risk / regulatory disclaimer — must stay legible, never decorative */
.footer-disclaimer {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--line-dark);
	color: var(--muted);
	font-size: 12px;
	line-height: 1.7;
	max-width: 900px;
}
.footer-disclaimer strong {
	color: var(--ivory);
	font-weight: 600;
}

/* =================== LANGUAGE SWITCH =================== */
.header-right {
	display: flex;
	align-items: center;
	gap: 10px;
}
.lang-switch {
	display: inline-flex;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: var(--paper);
	overflow: hidden;
	flex-shrink: 0;
}
.lang-opt {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	padding: 9px 12px;
	color: var(--faint);
	line-height: 1;
	transition:
		color 0.25s,
		background 0.25s;
}
.lang-opt + .lang-opt {
	border-left: 1px solid var(--line);
}
.lang-opt:hover {
	color: var(--ivory);
}
.lang-opt.is-active {
	background: var(--cobalt-dim);
	color: var(--cobalt);
}
@media (max-width: 420px) {
	.lang-opt {
		padding: 9px 9px;
	}
	.menu-btn {
		padding: 9px 12px;
	}
	.header-right {
		gap: 7px;
	}
}

/* =================== CHINESE TYPOGRAPHY =================== */
/* Negative tracking is drawn for Latin; on CJK the glyphs collide. */
html[lang^="zh"] h2,
html[lang^="zh"] h3,
html[lang^="zh"] h4,
html[lang^="zh"] h5,
html[lang^="zh"] h6,
html[lang^="zh"] .thesis-statement {
	letter-spacing: 0;
}
/* CJK needs more leading than Latin at the same size. */
html[lang^="zh"] .hero-lead p,
html[lang^="zh"] .thesis-copy p,
html[lang^="zh"] .method-cell p,
html[lang^="zh"] .acc-body p,
html[lang^="zh"] .faq-cta p,
html[lang^="zh"] .faq-ans p,
html[lang^="zh"] .case p,
html[lang^="zh"] .footer-disclaimer {
	line-height: 1.85;
}
html[lang^="zh"] .thesis-statement,
html[lang^="zh"] .cap-head h2,
html[lang^="zh"] .footer-quote h5 {
	line-height: 1.45;
}

/* =================== EVALS LOOP LAYOUT =================== */
/* The loop grid is eight cells tall; without this the prose column leaves a
   large dead space beside it. Sticky keeps the two reading together. */
@media (min-width: 901px) {
	.thesis-copy {
		position: sticky;
		top: 120px;
	}
}
/* A Chinese section headline needs more room than the English one before it
   breaks to a third line and orphans a character. */
html[lang^="zh"] .eng-head h2,
html[lang^="zh"] .cap-head h2 {
	max-width: 560px;
}
