/* ClaiStore marketing site — shared styles.
   Dark, committed look. Built mobile-first; scales to desktop.
   App-like on phones: safe-area insets, 44px targets, dynamic viewport units,
   full-screen slide-down menu, no horizontal scroll. */

:root {
	--ink:        #070707;
	--ink-2:      #101012;
	--ink-3:      #17171b;
	--line:       rgba(255, 255, 255, .10);
	--line-2:     rgba(255, 255, 255, .16);
	--text:       #f4f2ef;
	--text-dim:   #a7a39c;
	--text-mute:  #74706a;
	--orange:     #c74102;
	--orange-2:   #ff5a1f;
	--orange-3:   #ff8a4d;
	--glow:       0 0 40px rgba(255, 90, 31, .35);
	--header-h:   64px;
	--pad:        clamp(16px, 5vw, 40px);
	--maxw:       1200px;
	--radius:     14px;
	--ease:       cubic-bezier(.22, 1, .36, 1);
	--font:       "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	color-scheme: dark;
}

@media (min-width: 900px) {
	:root { --header-h: 76px; }
}

/* ---------- 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(--font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	min-height: 100vh;
	min-height: 100dvh;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -.02em;
	margin: 0 0 .5em;
	text-wrap: balance;
}

::selection { background: var(--orange-2); color: #fff; }

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

/* ---------- shared layout ---------- */

.wrap {
	width: 100%;
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: var(--pad);
}

.btn {
	--btn-bg: var(--orange);
	--btn-fg: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55em;
	min-height: 46px;
	padding: 0 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--btn-bg);
	color: var(--btn-fg);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .01em;
	white-space: nowrap;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn svg { flex-shrink: 0; }

/* electric primary CTA: an orange charge runs the rim on hover */
.btn--primary {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	box-shadow: 0 10px 30px -8px rgba(199, 65, 2, .6);
}
.btn--primary::before {
	content: "";
	position: absolute;
	inset: -60%;
	z-index: -1;
	background: conic-gradient(from 0deg, transparent 0deg, rgba(255,214,170,.95) 40deg, transparent 90deg, transparent 360deg);
	opacity: 0;
	transition: opacity .25s var(--ease);
	animation: btn-charge 1.4s linear infinite paused;
}
.btn--primary::after {
	content: "";
	position: absolute;
	inset: 1.5px;
	z-index: -1;
	border-radius: inherit;
	background: var(--btn-bg);
	transition: background .2s var(--ease);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 46px -12px rgba(255, 90, 31, .8); }
.btn--primary:hover::before { opacity: 1; animation-play-state: running; }
.btn--primary:hover::after { background: var(--orange-2); }
.btn--primary:hover .btn__ico--dl { transform: translateY(2px); }
@keyframes btn-charge { to { transform: rotate(1turn); } }

.btn--ghost {
	--btn-bg: transparent;
	--btn-fg: var(--text);
	border-color: var(--line-2);
	backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--orange-3); background: rgba(255, 255, 255, .04); }

/* ---------- header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	padding-top: env(safe-area-inset-top);
	background: rgba(14, 14, 16, .55);
	backdrop-filter: saturate(140%) blur(14px);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	border-bottom: 1px solid transparent;
	transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled {
	background: rgba(12, 12, 14, .9);
	border-bottom-color: var(--line);
}

.site-header__bar {
	height: var(--header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	user-select: none;
}
.brand img { height: 26px; width: auto; }
.brand__mark { display: none; }

/* desktop nav */
.nav {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}
.nav a, .nav button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 14px;
	border-radius: 10px;
	background: transparent;
	border: 0;
	color: var(--text-dim);
	font-size: 15px;
	font-weight: 500;
	transition: color .18s var(--ease), background .18s var(--ease);
}
.nav a:hover, .nav button:hover,
.nav a.is-active { color: var(--text); background: rgba(255, 255, 255, .05); }

.nav__drop { position: relative; }
.nav__drop-menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 220px;
	padding: 8px;
	border-radius: var(--radius);
	background: #16161a;
	border: 1px solid var(--line-2);
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
	display: grid;
	gap: 2px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.nav__drop:hover .nav__drop-menu,
.nav__drop:focus-within .nav__drop-menu,
.nav__drop-menu.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.nav__drop-menu a {
	height: auto;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--text-dim);
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}
.nav__drop-menu a span {
	font-size: 12.5px;
	color: var(--text-mute);
	font-weight: 400;
}
.nav__drop-menu a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav__caret { transition: transform .2s var(--ease); }
.nav__drop:hover .nav__caret,
.nav__drop:focus-within .nav__caret { transform: rotate(180deg); }

.header-cta { margin-left: 10px; }

/* hamburger */
.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	margin-right: -8px;
	border: 0;
	background: transparent;
	border-radius: 10px;
	position: relative;
	flex-shrink: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
	content: "";
	position: absolute;
	left: 11px;
	width: 22px;
	height: 2px;
	background: var(--text);
	border-radius: 2px;
	transition: transform .3s var(--ease), opacity .2s var(--ease), top .3s var(--ease);
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
body.menu-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- mobile menu sheet ---------- */

.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 90;
	padding: calc(var(--header-h) + env(safe-area-inset-top) + 12px) var(--pad) calc(env(safe-area-inset-bottom) + 28px);
	background: rgba(10, 10, 12, .98);
	backdrop-filter: blur(8px);
	display: flex;
	flex-direction: column;
	gap: 6px;
	transform: translateY(-12px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	overscroll-behavior: contain;
	overflow-y: auto;
	transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
body.menu-open .mobile-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}
.mobile-menu a,
.mobile-menu summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	padding: 8px 6px;
	font-size: 20px;
	font-weight: 600;
	color: var(--text);
	border-bottom: 1px solid var(--line);
}
.mobile-menu details summary {
	list-style: none;
	cursor: pointer;
}
.mobile-menu details summary::-webkit-details-marker { display: none; }
.mobile-menu details[open] summary .nav__caret { transform: rotate(180deg); }
.mobile-menu details > div { padding: 4px 6px 12px; display: grid; gap: 2px; }
.mobile-menu details > div a {
	min-height: 48px;
	font-size: 16px;
	font-weight: 500;
	color: var(--text-dim);
	border-bottom: 0;
}
.mobile-menu details > div a span { display: block; font-size: 13px; color: var(--text-mute); font-weight: 400; }
.mobile-menu .btn {
	margin-top: 20px;
	width: 100%;
	min-height: 54px;
	font-size: 16px;
}

/* ---------- footer ---------- */

.site-footer {
	border-top: 1px solid var(--line);
	padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
	color: var(--text-mute);
	font-size: 14px;
}
.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	align-items: center;
	justify-content: space-between;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer a:hover { color: var(--text-dim); }

/* ---------- hero ---------- */

.hero {
	position: relative;
	min-height: calc(100vh - var(--header-h));
	min-height: calc(100dvh - var(--header-h));
	display: flex;
	align-items: center;
	overflow: hidden;
	isolation: isolate;
}
.hero__canvas {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	touch-action: pan-y;
	transition: opacity .4s var(--ease);
}
/* mobile: 3D sits low behind the copy — keep the top clean */
.hero__scrim {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(7,7,8,.92) 0%, rgba(7,7,8,.7) 40%, rgba(7,7,8,.5) 66%, rgba(7,7,8,.8) 100%),
		radial-gradient(70% 46% at 50% 84%, rgba(199,65,2,.14), rgba(7,7,8,0) 70%);
}
/* desktop: 3D lives on the right — scrim the left text column hard */
@media (min-width: 900px) {
	.hero__scrim {
		background:
			linear-gradient(90deg, rgba(7,7,8,.98) 0%, rgba(7,7,8,.95) 36%, rgba(7,7,8,.7) 50%, rgba(7,7,8,.2) 66%, rgba(7,7,8,0) 80%),
			radial-gradient(52% 78% at 86% 50%, rgba(199,65,2,.14), rgba(7,7,8,0) 72%),
			linear-gradient(180deg, rgba(7,7,8,.25) 0%, rgba(7,7,8,0) 22%, rgba(7,7,8,.5) 100%);
	}
}
.hero__inner {
	padding-block: clamp(48px, 12vh, 120px);
}
.hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 10px;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	background: rgba(255, 255, 255, .03);
	backdrop-filter: blur(6px);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--text-dim);
	margin-bottom: 22px;
}
.hero__eyebrow .dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--orange-2);
	box-shadow: 0 0 12px var(--orange-2);
	animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero__title {
	font-size: clamp(2.4rem, 7.4vw, 4.5rem);
	line-height: 1.06;
	letter-spacing: -.025em;
	max-width: 15ch;
	margin: 0 0 .55em;
}
.hero__title .r {
	display: block;
	overflow: hidden;
	padding-bottom: .04em;
}
.hero__title .r > span {
	display: block;
	will-change: transform;
}
.hero__title .accent {
	font-style: normal;
	background: linear-gradient(100deg, var(--orange-3) 0%, var(--orange-2) 55%, #ffd0b0 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.hero p {
	font-size: clamp(1.02rem, 2.4vw, 1.24rem);
	color: var(--text-dim);
	max-width: 50ch;
	margin: 20px 0 0;
}
.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 32px;
}
.hero__actions .btn__ico { transition: transform .25s var(--ease); }
.hero__meta {
	margin-top: 26px;
	font-size: 13px;
	color: var(--text-mute);
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { color: var(--orange-3); flex-shrink: 0; }
.hero__meta b { color: var(--text-dim); font-weight: 600; }

/* staggered entrance (only when motion is allowed and JS is arming it) */
html.anim .hero:not(.is-ready) [data-in] { opacity: 0; }
html.anim .hero:not(.is-ready) .hero__title .r > span { transform: translateY(115%); }

/* contextual node status chip drawn over the 3D stage */
.hero__status {
	position: absolute;
	top: 0; left: 0;
	z-index: 3;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(12, 10, 9, .82);
	border: 1px solid rgba(255, 138, 77, .4);
	color: #ffd8bd;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .01em;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity .28s var(--ease);
	backdrop-filter: blur(6px);
	box-shadow: 0 8px 30px -10px rgba(255, 90, 31, .5);
}
.hero__status.is-on { opacity: 1; }
@media (max-width: 900px) { .hero__status { display: none; } }

.scroll-hint {
	position: absolute;
	left: 50%;
	bottom: calc(18px + env(safe-area-inset-bottom));
	transform: translateX(-50%);
	color: var(--text-mute);
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.scroll-hint::after {
	content: "";
	width: 1px;
	height: 34px;
	background: linear-gradient(var(--text-mute), transparent);
	animation: drop 1.8s var(--ease) infinite;
}
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* WebGL-less fallback: animated orbital diagram */
.hero.no-webgl .hero__canvas { display: none; }
.hero__fallback { display: none; }
.hero.no-webgl .hero__fallback {
	display: block;
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(60% 60% at 50% 45%, rgba(255,90,31,.28), rgba(14,14,16,0) 70%),
		var(--ink);
	overflow: hidden;
}
.hero__fallback i {
	position: absolute;
	top: 50%; left: 50%;
	border: 1px solid rgba(255,138,77,.22);
	border-radius: 50%;
	transform: translate(-50%, -50%);
}
.hero__fallback i:nth-child(1) { width: 220px; height: 220px; animation: spin 26s linear infinite; }
.hero__fallback i:nth-child(2) { width: 420px; height: 420px; animation: spin 44s linear infinite reverse; }
.hero__fallback i:nth-child(3) { width: 640px; height: 640px; animation: spin 66s linear infinite; }
.hero__fallback i::before {
	content: "";
	position: absolute; top: -5px; left: 50%;
	width: 10px; height: 10px; border-radius: 50%;
	background: var(--orange-2);
	box-shadow: 0 0 20px var(--orange-2);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---------- legal / article pages ---------- */

.page {
	padding-block: clamp(40px, 8vh, 96px) 64px;
}
.page__head {
	max-width: 48rem;
	margin-bottom: 40px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--line);
}
.page__head h1 { font-size: clamp(2rem, 6vw, 3rem); }
.page__head p { color: var(--text-dim); margin: 10px 0 0; }
.page__updated {
	margin-top: 18px;
	font-size: 13px;
	color: var(--text-mute);
	letter-spacing: .02em;
}
.prose {
	max-width: 46rem;
	font-size: 16.5px;
	color: #ded9d2;
}
.prose h2 {
	font-size: 1.35rem;
	margin-top: 2.2em;
	color: var(--text);
	scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose h3 { font-size: 1.08rem; margin-top: 1.8em; color: var(--text); }
.prose p, .prose li { line-height: 1.72; }
.prose a { color: var(--orange-3); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--orange-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose strong { color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code {
	background: var(--ink-3);
	border: 1px solid var(--line);
	padding: .12em .4em;
	border-radius: 6px;
	font-size: .92em;
}
.prose .toc {
	margin: 0 0 2.4em;
	padding: 16px 18px;
	background: var(--ink-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font-size: 14.5px;
}
.prose .toc strong { display: block; margin-bottom: 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); }
.prose .toc a { display: inline-block; margin: 3px 14px 3px 0; color: var(--text-dim); text-decoration: none; }
.prose .toc a:hover { color: var(--orange-3); }

/* ---------- simple content blocks (pricing / how-it-works) ---------- */

.cards {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	max-width: 46rem;
	margin-top: 8px;
}
.card {
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: linear-gradient(180deg, var(--ink-2), var(--ink));
}
.card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.card .price { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 2px; }
.card .price span { font-size: .95rem; font-weight: 500; color: var(--text-mute); }
.card p { color: var(--text-dim); font-size: 15px; margin: 10px 0 0; }
.card ul { margin: 14px 0 0; padding-left: 1.15em; color: var(--text-dim); font-size: 14.5px; }
.card li { margin: .35em 0; }
.card .btn { margin-top: 18px; }

.steps { counter-reset: step; max-width: 44rem; margin-top: 8px; display: grid; gap: 14px; }
.step {
	position: relative;
	padding: 20px 20px 20px 66px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--ink-2);
}
.step::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	left: 18px; top: 18px;
	width: 34px; height: 34px;
	display: grid; place-items: center;
	border-radius: 10px;
	background: rgba(255, 90, 31, .14);
	border: 1px solid rgba(255, 90, 31, .35);
	color: var(--orange-3);
	font-weight: 700;
	font-size: 15px;
}
.step h3 { margin: 0 0 4px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* ---------- responsive switch ---------- */

@media (max-width: 899px) {
	.nav, .header-cta { display: none; }
	.nav-toggle { display: block; }
	.brand img.brand__word { display: none; }
	.brand__mark { display: block; height: 30px; }
}

@media (min-width: 900px) {
	.mobile-menu { display: none; }
}

/* ---------- motion / data preferences ---------- */

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