/* OwnMind Deck v0.2
   Dark industrial / tech. Motion + interactive objects. Reduced-motion safe. */

:root {
	--bg: #0b0f14;
	--bg-elev: #121820;
	--fg: #e8eef5;
	--muted: #8b9bb0;
	--accent: #3dd6c6;
	--accent-2: #f0a202;
	--danger: #e85d4c;
	--line: rgba(232, 238, 245, 0.12);
	--chip: #1a2330;
	--font: "Segoe UI", system-ui, -apple-system, sans-serif;
	--mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
	--chrome-h: 3.25rem;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
	scroll-behavior: smooth;
	scroll-snap-type: y mandatory;
}

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

body.ownmind-deck {
	margin: 0;
	font-family: var(--font);
	background: var(--bg);
	color: var(--fg);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* Hero photo/video story styles kept minimal/off until re-enabled with better assets. */
.hero-stage {
	display: none;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--accent);
	color: #041016;
	padding: 0.5rem 1rem;
	z-index: 100;
}
.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

/* Progress */
.deck-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 60;
	background: transparent;
	pointer-events: none;
}
.deck-progress__bar {
	display: block;
	height: 100%;
	width: 100%;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	transform: scaleX(0);
	transform-origin: left center;
	will-change: transform;
}

/* Chrome */
.deck-chrome {
	position: fixed;
	inset: 0 0 auto 0;
	top: 3px;
	height: var(--chrome-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0 1.25rem;
	background: rgba(11, 15, 20, 0.82);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
	z-index: 50;
}

.deck-brand {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	white-space: nowrap;
}
.deck-brand__product {
	color: var(--fg);
}
.deck-brand__by {
	color: var(--muted);
	font-weight: 500;
	font-size: 0.85rem;
}

.deck-dots {
	display: flex;
	gap: 0.45rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.deck-dots li button {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 999px;
	border: 0;
	padding: 0;
	background: var(--line);
	cursor: pointer;
	transition: transform 0.2s var(--ease), background 0.2s;
}
.deck-dots li button[aria-current="true"] {
	background: var(--accent);
	transform: scale(1.35);
}
.deck-dots li button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.deck-hint {
	font-size: 0.75rem;
	color: var(--muted);
	white-space: nowrap;
}
.deck-hint kbd {
	font-family: var(--mono);
	font-size: 0.7rem;
	padding: 0.1rem 0.35rem;
	border: 1px solid var(--line);
	border-radius: 0.25rem;
	background: var(--bg-elev);
}

@media (max-width: 720px) {
	.deck-hint {
		display: none;
	}
}

/* Scenes */
.deck {
	position: relative;
	z-index: 1;
	padding-top: var(--chrome-h);
}

.scene {
	position: relative;
	min-height: calc(100vh - var(--chrome-h));
	min-height: calc(100dvh - var(--chrome-h));
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	align-items: center;
	padding: 2.5rem 1.5rem 3.5rem;
	overflow: hidden;
	border-bottom: 1px solid var(--line);
	background: var(--bg);
}

.scene__inner {
	position: relative;
	z-index: 1;
	width: min(1100px, 100%);
	margin: 0 auto;
}

.scene__split {
	display: grid;
	gap: 2rem;
	align-items: center;
}
@media (min-width: 860px) {
	.scene__split {
		grid-template-columns: 1.1fr 1fr;
	}
}

.scene__bg--grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
	opacity: 0.55;
	pointer-events: none;
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	color: var(--accent);
	font-weight: 650;
	margin: 0 0 0.75rem;
}

h1,
h2 {
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 1rem;
}

h1 {
	font-size: clamp(1.85rem, 4.5vw, 3rem);
}
h2 {
	font-size: clamp(1.45rem, 3.2vw, 2.15rem);
}

.lede {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	color: var(--muted);
	max-width: 40rem;
	margin: 0 0 1.25rem;
}

.meta {
	color: var(--muted);
	font-size: 0.95rem;
}
.meta strong {
	color: var(--fg);
}

.text-muted {
	color: var(--muted);
	font-weight: 550;
}

.fineprint {
	font-size: 0.85rem;
	color: var(--muted);
	margin-top: 1.25rem;
}

code {
	font-family: var(--mono);
	font-size: 0.9em;
	background: var(--chip);
	padding: 0.1em 0.35em;
	border-radius: 0.25rem;
	color: var(--accent-2);
}

.copy p {
	color: var(--muted);
	max-width: 36rem;
}

/* Buttons */
.btn-primary,
.btn-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.7rem 1.15rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: inherit;
	transition: transform 0.15s var(--ease), background 0.15s, border-color 0.15s;
}
.btn-primary {
	background: var(--accent);
	color: #041016;
}
.btn-primary:hover {
	transform: translateY(-1px);
}
.btn-ghost {
	background: transparent;
	color: var(--fg);
	border-color: var(--line);
}
.btn-ghost:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.btn-sm {
	padding: 0.4rem 0.85rem;
	font-size: 0.82rem;
}
.btn-magnetic {
	will-change: transform;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.cta-line {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}
.interact-hint {
	font-size: 0.9rem;
	color: var(--muted);
	margin: 0.75rem 0 0.35rem;
}
.interact-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
}

/* Hero FX */
.hero-orbs {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 0;
}
.orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(40px);
	opacity: 0.35;
}
.orb-a {
	width: 220px;
	height: 220px;
	background: var(--accent);
	top: 18%;
	right: 12%;
}
.orb-b {
	width: 180px;
	height: 180px;
	background: #3d7cff;
	bottom: 20%;
	left: 8%;
}
.orb-c {
	width: 140px;
	height: 140px;
	background: var(--accent-2);
	top: 55%;
	right: 30%;
	opacity: 0.22;
}
.cursor-glow {
	position: absolute;
	width: 280px;
	height: 280px;
	margin: -140px 0 0 -140px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(61, 214, 198, 0.18), transparent 65%);
	pointer-events: none;
	opacity: 0;
	z-index: 0;
	transition: opacity 0.2s;
}
.scene--hero .scene__inner {
	position: relative;
	z-index: 1;
}

/* Visuals: mud (digital pile story) */
.visual--mud {
	min-height: 280px;
	position: relative;
}
#mud-stage {
	isolation: isolate;
}
.mud-window {
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 0.85rem;
	overflow: hidden;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.mud-window__chrome {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.55rem 0.75rem;
	background: #0e141c;
	border-bottom: 1px solid var(--line);
	font-size: 0.78rem;
	color: var(--muted);
}
.mud-window__dots {
	width: 42px;
	height: 10px;
	border-radius: 999px;
	background:
		radial-gradient(circle at 6px 5px, #e85d4c 3px, transparent 4px),
		radial-gradient(circle at 18px 5px, #f0a202 3px, transparent 4px),
		radial-gradient(circle at 30px 5px, #3dd6c6 3px, transparent 4px);
	flex-shrink: 0;
}
.mud-window__title {
	font-family: var(--mono);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mud-search {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.65rem 0.75rem 0.35rem;
	padding: 0.5rem 0.7rem;
	border-radius: 0.5rem;
	border: 1px solid var(--line);
	background: #0b1016;
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--muted);
	min-height: 2.1rem;
}
.mud-search__icon {
	width: 0.7rem;
	height: 0.7rem;
	border: 2px solid var(--muted);
	border-radius: 50%;
	position: relative;
	flex-shrink: 0;
	opacity: 0.8;
}
.mud-search__icon::after {
	content: "";
	position: absolute;
	width: 0.35rem;
	height: 2px;
	background: var(--muted);
	right: -0.25rem;
	bottom: -0.1rem;
	transform: rotate(40deg);
}
.mud-search__text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mud-search__caret {
	width: 1px;
	height: 0.95em;
	background: var(--accent);
	opacity: 0;
}
.mud-pile {
	position: relative;
	height: 210px;
	margin: 0.35rem 0.5rem;
	border-radius: 0.5rem;
	background:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 24px 24px;
	background-color: #0a0e13;
	overflow: hidden;
}
.mud-joe {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	margin: 0 0.75rem 0.55rem;
	padding: 0.65rem 0.75rem;
	border-radius: 0.6rem;
	border: 1px solid rgba(240, 162, 2, 0.4);
	background: rgba(240, 162, 2, 0.08);
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
}
.mud-joe.is-on {
	pointer-events: auto;
}
.mud-joe__avatar {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 0.9rem;
	color: #041016;
	background: var(--accent-2);
}
.mud-joe__copy {
	display: grid;
	gap: 0.15rem;
	min-width: 0;
}
.mud-joe__label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--accent-2);
	font-weight: 650;
}
.mud-joe__text {
	font-size: 0.86rem;
	color: var(--fg);
	line-height: 1.35;
}
.mud-status {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.35rem 0.75rem;
	padding: 0.55rem 0.75rem 0.7rem;
	border-top: 1px solid var(--line);
	font-size: 0.75rem;
}
.mud-status__line {
	color: var(--muted);
	font-family: var(--mono);
}
.mud-status__badge {
	color: var(--danger);
	font-weight: 650;
	font-family: var(--mono);
}
.file-chip,
.mud-file {
	position: absolute;
	font-family: var(--mono);
	font-size: 0.72rem;
	background: var(--chip);
	border: 1px solid var(--line);
	padding: 0.4rem 0.55rem;
	border-radius: 0.35rem;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
	white-space: nowrap;
	color: inherit;
	user-select: none;
	pointer-events: none;
	will-change: transform, opacity;
}
.mud-file--folder {
	border-color: rgba(240, 162, 2, 0.45);
	color: var(--accent-2);
}
.mud-file--dup {
	border-color: rgba(232, 93, 76, 0.4);
}
.mud-file.is-miss {
	border-color: rgba(232, 93, 76, 0.75);
	box-shadow: 0 0 0 1px rgba(232, 93, 76, 0.35);
}
.mud-file.is-hit {
	border-color: var(--accent);
	color: var(--accent);
	box-shadow: 0 0 0 1px rgba(61, 214, 198, 0.4);
	z-index: 3;
}
.mud-file.is-buried {
	opacity: 0.55;
	filter: saturate(0.7);
	z-index: 0;
}
.file-chip.sm {
	position: static;
}
.file-chip.ok {
	border-color: var(--accent);
	color: var(--accent);
}

/* Tunnel */
.tunnel {
	display: grid;
	gap: 1rem;
	padding: 1.25rem;
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 1rem;
}
.tunnel__in,
.tunnel__out {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.tunnel__pipe {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.4rem;
}
.tunnel__step {
	text-align: center;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.65rem 0.35rem;
	border-radius: 0.5rem;
	background: #0e1620;
	border: 1px solid var(--line);
	color: var(--muted);
	transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, background 0.2s;
}
.tunnel__step.is-lit {
	color: #041016;
	background: var(--accent);
	border-color: var(--accent);
	box-shadow: 0 0 24px rgba(61, 214, 198, 0.35);
}
.tunnel__step.is-done {
	color: var(--accent);
	border-color: rgba(61, 214, 198, 0.45);
}
.tunnel__packet {
	position: absolute;
	top: 50%;
	left: 2%;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	border-radius: 4px;
	background: var(--accent-2);
	box-shadow: 0 0 16px rgba(240, 162, 2, 0.7);
	opacity: 0;
	z-index: 2;
	pointer-events: none;
}
.tunnel__counter {
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--muted);
	text-align: right;
}

/* Brain */
.brain-tree {
	position: relative;
	padding: 1.5rem;
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 1rem;
	text-align: center;
	overflow: hidden;
}
.brain-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.brain-link {
	fill: none;
	stroke: rgba(61, 214, 198, 0.45);
	stroke-width: 2;
}
.brain-node {
	display: inline-block;
	padding: 0.55rem 0.9rem;
	margin: 0.35rem;
	border-radius: 0.5rem;
	background: var(--chip);
	border: 1px solid var(--line);
	font-size: 0.9rem;
	font-family: inherit;
	color: inherit;
	cursor: pointer;
	position: relative;
	z-index: 1;
	transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.brain-node:hover,
.brain-node:focus-visible {
	border-color: var(--accent);
	outline: none;
	transform: translateY(-2px);
}
.brain-node.is-selected {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px rgba(61, 214, 198, 0.4);
	color: var(--accent);
}
.brain-node.root {
	border-color: var(--accent);
	color: var(--accent);
	font-weight: 650;
}
.brain-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 1rem;
	position: relative;
	z-index: 1;
}
.node-detail {
	margin-top: 1rem;
	padding: 0.9rem 1rem;
	background: var(--bg-elev);
	border: 1px solid rgba(61, 214, 198, 0.35);
	border-radius: 0.75rem;
	max-width: 36rem;
}
.node-detail__title {
	margin: 0 0 0.35rem;
	font-weight: 650;
	color: var(--accent);
}
.node-detail__body {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* Ask */
.ask-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 1rem 0 0;
}
.ask-tab {
	font-family: inherit;
	font-size: 0.82rem;
	padding: 0.4rem 0.8rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--muted);
	cursor: pointer;
}
.ask-tab.is-active,
.ask-tab:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.ask-demo {
	max-width: 36rem;
	display: grid;
	gap: 0.85rem;
	margin-top: 1.25rem;
}
.ask-bubble {
	padding: 1rem 1.15rem;
	border-radius: 1rem;
	border: 1px solid var(--line);
}
.ask-bubble--q {
	background: #152030;
	font-style: italic;
}
.ask-bubble--a {
	background: var(--bg-elev);
	border-color: rgba(61, 214, 198, 0.35);
}
.ask-bubble--a p {
	margin: 0 0 0.5rem;
}
.ask-cite {
	font-size: 0.8rem;
	color: var(--accent) !important;
	margin: 0 !important;
}

/* Raw ordered list */
.file-order {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}
.file-order li {
	font-family: var(--mono);
	font-size: 0.82rem;
	padding: 0.7rem 0.9rem;
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 0.5rem;
	border-left: 3px solid var(--accent);
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.file-order li.interactive:hover,
.file-order li.interactive:focus-visible,
.file-order li.is-open {
	border-color: var(--accent);
	background: #152030;
	outline: none;
}
.file-order .path {
	color: var(--muted);
}
.open-cue {
	margin: 0.75rem 0 0;
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--accent-2);
}

/* Why */
.why-list {
	list-style: none;
	margin: 1.25rem 0;
	padding: 0;
	display: grid;
	gap: 0.85rem;
	max-width: 40rem;
	perspective: 800px;
}
.why-list li,
.why-card {
	padding: 1rem 1.1rem;
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 0.75rem;
	color: var(--muted);
	transform-style: preserve-3d;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.why-card:hover,
.why-card:focus-visible {
	border-color: rgba(61, 214, 198, 0.45);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
	outline: none;
}
.why-list strong {
	color: var(--fg);
	display: block;
	margin-bottom: 0.25rem;
}

/* Reveal defaults (GSAP enhances) */
.reveal {
	will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
	.reveal {
		opacity: 1 !important;
		transform: none !important;
	}
	.mud-file {
		opacity: 1 !important;
		filter: none !important;
	}
	.mud-pile {
		height: auto;
		min-height: 140px;
		display: flex;
		flex-wrap: wrap;
		gap: 0.35rem;
		padding: 0.5rem;
		align-content: flex-start;
	}
	.mud-file {
		position: static !important;
		transform: none !important;
	}
	.orb,
	.cursor-glow,
	.deck-progress__bar {
		display: none !important;
	}

	.why-card {
		transform: none !important;
	}
}
