/* =========================================================
   Trace0 Advisory — base: tokens, reset, nav, hero, shared UI
   ========================================================= */

/* --- THEME TOKENS (dark = default, light = [data-theme="light"]) --- */
:root,
[data-theme="dark"] {
	--t0-bg: #050505;
	--t0-bg-rgb: 5, 5, 5;
	--t0-panel: #0c0d10;
	--t0-panel-rgb: 12, 13, 16;
	--t0-panel-2: #111318;
	--t0-panel-3: #12141a;
	--t0-line: #232833;
	--t0-line-soft: #171a1f;
	--t0-text: #f5f7fa;
	--t0-text-2: #b8c0cc;
	--t0-text-3: #9aa6b5;
	--t0-muted: #7d8794;
	--t0-muted-2: #4a505c;
	--t0-blue: #34d399;
	--t0-blue-rgb: 52, 211, 153;
	--t0-blue-2: #6ee7b7;
	--t0-ice: #a7f3d0;
	--t0-ice-rgb: 167, 243, 208;
	--t0-gold: #cfae6e;
	--t0-gold-2: #d6c29a;
	--t0-glow: rgba(52, 211, 153, 0.18);
	--t0-glow-2: rgba(52, 211, 153, 0.10);
	--t0-overlay: rgba(5, 5, 5, 0.82);
	--t0-overlay-2: rgba(5, 5, 5, 0.55);
	--t0-overlay-3: rgba(9, 11, 14, 0.72);
	--t0-overlay-4: rgba(12, 13, 16, 0.6);
	--t0-input-bg: rgba(5, 5, 5, 0.55);
	--t0-input-bg-focus: rgba(5, 5, 5, 0.75);
	--t0-vignette-mid: rgba(5, 5, 5, 0.75);
	--t0-vignette-top: rgba(5, 5, 5, 0.5);
	--t0-stroke: rgba(125, 135, 148, 0.05);
	--t0-stroke-2: rgba(125, 135, 148, 0.10);
	--t0-marquee-bg: var(--t0-panel);
	--t0-aurora-1: rgba(38, 130, 180, 0.55);
	--t0-aurora-2: rgba(44, 170, 150, 0.4);
	--t0-aurora-3: rgba(30, 110, 170, 0.45);
	color-scheme: dark;
}

[data-theme="light"] {
	--t0-bg: #f4f6f9;
	--t0-bg-rgb: 244, 246, 249;
	--t0-panel: #ffffff;
	--t0-panel-rgb: 255, 255, 255;
	--t0-panel-2: #fafbfd;
	--t0-panel-3: #f1f3f7;
	--t0-line: #d6dbe3;
	--t0-line-soft: #e6eaf0;
	--t0-text: #0d1117;
	--t0-text-2: #2c333d;
	--t0-text-3: #4a5260;
	--t0-muted: #6b7380;
	--t0-muted-2: #aab1bc;
	--t0-blue: #0f9b6e;
	--t0-blue-rgb: 15, 155, 110;
	--t0-blue-2: #0a7a55;
	--t0-ice: #066c4d;
	--t0-ice-rgb: 6, 108, 77;
	--t0-gold: #8a6a2c;
	--t0-gold-2: #6e541f;
	--t0-glow: rgba(15, 155, 110, 0.14);
	--t0-glow-2: rgba(15, 155, 110, 0.08);
	--t0-overlay: rgba(255, 255, 255, 0.82);
	--t0-overlay-2: rgba(255, 255, 255, 0.65);
	--t0-overlay-3: rgba(255, 255, 255, 0.88);
	--t0-overlay-4: rgba(255, 255, 255, 0.7);
	--t0-input-bg: rgba(255, 255, 255, 0.85);
	--t0-input-bg-focus: rgba(255, 255, 255, 1);
	--t0-vignette-mid: rgba(244, 246, 249, 0.7);
	--t0-vignette-top: rgba(244, 246, 249, 0.4);
	--t0-stroke: rgba(11, 17, 23, 0.06);
	--t0-stroke-2: rgba(11, 17, 23, 0.12);
	--t0-marquee-bg: var(--t0-panel);
	--t0-aurora-1: rgba(15, 155, 110, 0.32);
	--t0-aurora-2: rgba(13, 148, 136, 0.26);
	--t0-aurora-3: rgba(56, 132, 168, 0.28);
	color-scheme: light;
}

:root {
	--t0-display: 'Michroma', sans-serif;
	--t0-body: 'Inter', sans-serif;
	--t0-max: 1200px;
	--t0-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Theme transition (lightweight: only color/bg) */
body.t0,
body.t0 .t0-card,
body.t0 .t0-btn,
body.t0 .t0-nav,
body.t0 .t0-section,
body.t0 .t0-marquee,
body.t0 .t0-footer,
body.t0 .t0-mobile-menu,
body.t0 .t0-field input,
body.t0 .t0-field textarea,
body.t0 .t0-cta__email,
body.t0 .t0-cta__glow,
body.t0 .t0-hero__panel,
body.t0 .t0-aurora__blob,
body.t0 .t0-deliv__card--feat {
	transition: background-color 0.35s var(--t0-ease), color 0.35s var(--t0-ease), border-color 0.35s var(--t0-ease);
}

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

html { scroll-behavior: smooth; }

body.t0 {
	margin: 0;
	background: var(--t0-bg);
	color: var(--t0-text);
	font-family: var(--t0-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

body.t0 img { max-width: 100%; height: auto; }
body.t0 a { color: inherit; text-decoration: none; }

body.t0 h1,
body.t0 h2,
body.t0 h3 { margin: 0; font-weight: 400; }

/* ---------- shared primitives ---------- */

.t0-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	background: var(--t0-blue);
	margin-right: 10px;
	vertical-align: middle;
	animation: t0-pulse 2.2s infinite;
}

.t0-dot--gold { background: var(--t0-gold); }
.t0-dot--blue { background: var(--t0-blue); }

@keyframes t0-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

.t0-blink { animation: t0-pulse 1.6s infinite; }

.t0-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--t0-display);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 16px 26px;
	border: 1px solid var(--t0-line);
	color: var(--t0-text);
	background: var(--t0-overlay-4);
	position: relative;
	overflow: hidden;
	transition: border-color 0.35s var(--t0-ease), background 0.35s var(--t0-ease), color 0.35s var(--t0-ease), transform 0.35s var(--t0-ease);
	cursor: pointer;
}

.t0-btn::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 40%, var(--t0-glow) 50%, transparent 60%);
	transform: translateX(-110%);
	transition: transform 0.7s var(--t0-ease);
}

.t0-btn:hover::after { transform: translateX(110%); }

.t0-btn--primary {
	background: linear-gradient(90deg, var(--t0-glow), var(--t0-overlay-4));
	border-color: rgba(var(--t0-blue-rgb), 0.45);
}

.t0-btn--primary:hover {
	border-color: var(--t0-blue);
	color: var(--t0-ice);
	transform: translateY(-2px);
}

.t0-btn--ghost:hover {
	border-color: var(--t0-muted);
	transform: translateY(-2px);
}

.t0-btn__arrow { transition: transform 0.35s var(--t0-ease); }
.t0-btn:hover .t0-btn__arrow { transform: translateX(5px); }

.t0-eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: var(--t0-display);
	font-size: 12px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--t0-text-3);
	margin: 0 0 28px;
}

.t0-eyebrow__line {
	display: inline-block;
	width: 34px;
	height: 1px;
	background: var(--t0-blue);
}

/* Section shell shared by all content sections */
.t0-section {
	position: relative;
	padding: 130px 24px;
	border-top: 1px solid var(--t0-line-soft);
	background: var(--t0-bg);
}

.t0-section__inner {
	max-width: var(--t0-max);
	margin: 0 auto;
}

.t0-kicker {
	font-family: var(--t0-display);
	font-size: 12px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--t0-muted);
	margin: 0 0 18px;
}

.t0-kicker b {
	color: var(--t0-gold);
	font-weight: 400;
}

.t0-h2 {
	font-family: var(--t0-display);
	font-size: clamp(28px, 4.4vw, 52px);
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--t0-text);
	margin: 0 0 22px;
}

.t0-h2 em {
	font-style: normal;
	color: var(--t0-blue);
}

.t0-lead {
	color: var(--t0-text-2);
	max-width: 640px;
	margin: 0 0 56px;
}

.t0-card {
	background: linear-gradient(180deg, var(--t0-panel-2), var(--t0-panel));
	border: 1px solid var(--t0-line);
	padding: 30px;
	position: relative;
	overflow: hidden;
	transition: border-color 0.4s var(--t0-ease), transform 0.4s var(--t0-ease), box-shadow 0.4s var(--t0-ease);
}

.t0-card:hover {
	border-color: rgba(var(--t0-blue-rgb), 0.45);
	transform: translateY(-4px);
	box-shadow: 0 18px 50px -24px rgba(var(--t0-blue-rgb), 0.35);
}

.t0-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(var(--t0-blue-rgb), 0.6), transparent);
	opacity: 0;
	transition: opacity 0.4s var(--t0-ease);
}

.t0-card:hover::before { opacity: 1; }

.t0-tag {
	display: inline-block;
	font-family: var(--t0-display);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--t0-text-3);
	border: 1px solid var(--t0-line);
	padding: 6px 10px;
	margin: 0 6px 6px 0;
	transition: color 0.3s, border-color 0.3s;
}

.t0-card:hover .t0-tag {
	color: var(--t0-blue-2);
	border-color: rgba(var(--t0-blue-rgb), 0.35);
}

.t0-num {
	font-family: var(--t0-display);
	font-size: 12px;
	letter-spacing: 0.2em;
	color: var(--t0-gold);
}

/* ---------- reveal system ---------- */

[data-reveal] {
	opacity: 0;
	transform: translateY(34px);
	transition: opacity 0.9s var(--t0-ease), transform 0.9s var(--t0-ease);
	transition-delay: var(--d, 0s);
	will-change: opacity, transform;
}

[data-reveal].is-visible {
	opacity: 1;
	transform: translateY(0);
}

[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.94); }

[data-reveal="left"].is-visible,
[data-reveal="right"].is-visible { transform: translateX(0); }
[data-reveal="scale"].is-visible { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
	[data-reveal] { opacity: 1; transform: none; transition: none; }
	html { scroll-behavior: auto; }
}

/* ---------- fixed nav ---------- */

.t0-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	border-bottom: 1px solid transparent;
	transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

.t0-nav.is-scrolled {
	background: var(--t0-overlay);
	backdrop-filter: blur(14px);
	border-bottom-color: var(--t0-line-soft);
}

.t0-nav__inner {
	max-width: 1320px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 18px 24px;
}

.t0-brand {
	display: flex;
	align-items: baseline;
	gap: 8px;
	white-space: nowrap;
}

.t0-brand__icon {
	width: 18px;
	height: 18px;
	color: var(--t0-blue);
	align-self: center;
}

.t0-brand__icon svg { width: 100%; height: 100%; }

.t0-brand__name {
	font-family: var(--t0-display);
	font-size: 15px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.t0-brand__sub {
	font-family: var(--t0-display);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--t0-muted);
}

.t0-nav__links {
	display: flex;
	border: 1px solid var(--t0-line-soft);
	background: var(--t0-overlay-2);
}

.t0-nav__links a {
	font-family: var(--t0-display);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--t0-text-3);
	padding: 12px 22px;
	border-right: 1px solid var(--t0-line-soft);
	transition: color 0.3s, background 0.3s;
}

.t0-nav__links a:last-child { border-right: 0; }

.t0-nav__links a:hover,
.t0-nav__links a.is-active {
	color: var(--t0-ice);
	background: rgba(var(--t0-blue-rgb), 0.08);
}

.t0-nav__cta { padding: 12px 22px; }

.t0-burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: 1px solid var(--t0-line);
	padding: 10px;
	cursor: pointer;
}

.t0-burger span {
	display: block;
	width: 20px;
	height: 1px;
	background: var(--t0-text);
	transition: transform 0.3s, opacity 0.3s;
}

.t0-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.t0-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.t0-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.t0-mobile-menu {
	display: none;
	flex-direction: column;
	background: var(--t0-bg);
	border-top: 1px solid var(--t0-line-soft);
	padding: 12px 24px 24px;
}

.t0-mobile-menu a {
	font-family: var(--t0-display);
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--t0-text-2);
	padding: 14px 0;
	border-bottom: 1px solid var(--t0-line-soft);
}

.t0-mobile-menu__cta { color: var(--t0-blue) !important; }

.t0-mobile-menu.is-open { display: flex; }

@media (max-width: 1024px) {
	.t0-nav__links, .t0-nav__cta { display: none; }
	.t0-burger { display: flex; }
}

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

.t0-hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding: 140px 24px 80px;
	overflow: hidden;
}

.t0-hero__bg { position: absolute; inset: 0; }

#t0-grid-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

/* Ambient glow only above the water line — the flowing aurora + its
   reflection are painted on #t0-grid-canvas by main.js */
.t0-aurora { position: absolute; top: 0; left: 0; right: 0; height: 60%; overflow: hidden; }

.t0-aurora__blob {
	position: absolute;
	width: 55vw;
	height: 34vh;
	filter: blur(70px);
	opacity: 0.3;
	border-radius: 50%;
	mix-blend-mode: screen;
}

.t0-aurora__blob--a {
	top: 4%;
	left: 12%;
	background: radial-gradient(ellipse at center, var(--t0-aurora-1), transparent 65%);
	animation: t0-drift-a 16s ease-in-out infinite alternate;
}

.t0-aurora__blob--b {
	top: 22%;
	right: -6%;
	background: radial-gradient(ellipse at center, var(--t0-aurora-2), transparent 65%);
	animation: t0-drift-b 21s ease-in-out infinite alternate;
}

.t0-aurora__blob--c {
	bottom: -8%;
	left: 4%;
	background: radial-gradient(ellipse at center, var(--t0-aurora-3), transparent 65%);
	animation: t0-drift-c 18s ease-in-out infinite alternate;
}

@keyframes t0-drift-a {
	from { transform: translate3d(-6%, 0, 0) scale(1); }
	to { transform: translate3d(10%, 14%, 0) scale(1.15); }
}

@keyframes t0-drift-b {
	from { transform: translate3d(0, -4%, 0) scale(1.05) rotate(-4deg); }
	to { transform: translate3d(-12%, 10%, 0) scale(0.92) rotate(5deg); }
}

@keyframes t0-drift-c {
	from { transform: translate3d(0, 6%, 0) scale(1); }
	to { transform: translate3d(14%, -6%, 0) scale(1.2); }
}

.t0-hero__ghost {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-family: var(--t0-display);
	font-size: clamp(160px, 26vw, 420px);
	letter-spacing: 0.04em;
	color: transparent;
	-webkit-text-stroke: 1px var(--t0-stroke-2);
	white-space: nowrap;
	user-select: none;
	will-change: transform;
}

.t0-hero__vignette {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 120% 90% at 50% 40%, transparent 40%, var(--t0-vignette-mid) 100%),
		linear-gradient(180deg, var(--t0-vignette-top), transparent 25%, transparent 75%, var(--t0-bg));
}

.t0-hero__content {
	position: relative;
	z-index: 2;
	max-width: 1320px;
	margin: 0 auto;
	width: 100%;
	padding: 0 16px;
}

.t0-hero__title {
	font-family: var(--t0-display);
	font-size: clamp(48px, 9vw, 118px);
	line-height: 1.02;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	margin: 0 0 34px;
}

.t0-hero__word { display: block; }

.t0-hero__word--accent { color: var(--t0-blue); text-shadow: 0 0 60px rgba(var(--t0-blue-rgb), 0.35); }

.t0-hero__word--dim { color: rgba(216, 224, 235, 0.5); }

.t0-hero__sub {
	color: var(--t0-text-2);
	max-width: 560px;
	margin: 0 0 40px;
}

.t0-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.t0-hero__panel {
	position: absolute;
	right: max(24px, calc((100vw - 1320px) / 2 + 24px));
	bottom: 96px;
	z-index: 2;
	width: 290px;
	background: var(--t0-overlay-3);
	border: 1px solid var(--t0-line);
	backdrop-filter: blur(10px);
	padding: 22px 24px;
}

.t0-hero__panel-head {
	font-family: var(--t0-display);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--t0-text-2);
	margin: 0 0 14px;
}

.t0-hero__panel dl { margin: 0; }

.t0-hero__panel-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 10px 0;
	border-top: 1px solid var(--t0-line-soft);
}

.t0-hero__panel-row dt {
	font-family: var(--t0-display);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--t0-muted);
}

.t0-hero__panel-row dd {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-align: right;
	color: var(--t0-text);
	font-variant-numeric: tabular-nums;
}

.t0-hero__panel-foot {
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--t0-line-soft);
	font-family: var(--t0-display);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--t0-gold-2);
}

@media (max-width: 1180px) {
	.t0-hero__panel { position: relative; right: auto; bottom: auto; margin: 56px auto 0; }
	.t0-hero { flex-direction: column; justify-content: center; }
}

/* fallback content styling */
.t0-content-fallback { max-width: 760px; margin: 0 auto; padding: 160px 24px 80px; }

/* ---------- theme toggle (manual: dark <-> light) ---------- */

.t0-theme {
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 1px solid var(--t0-line-soft);
	background: var(--t0-overlay-2);
	padding: 4px;
	font-family: var(--t0-display);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.t0-theme__btn {
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--t0-text-3);
	padding: 6px 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: color 0.3s var(--t0-ease), background 0.3s var(--t0-ease);
	border-radius: 2px;
}

.t0-theme__btn:hover { color: var(--t0-ice); }

.t0-theme__btn.is-active {
	color: var(--t0-bg);
	background: var(--t0-blue);
}

.t0-theme__btn svg { width: 12px; height: 12px; display: block; }

.t0-theme__btn .t0-theme__icon--sun { display: none; }
.t0-theme__btn .t0-theme__icon--moon { display: block; }

[data-theme="light"] .t0-theme__btn[data-theme-value="dark"] .t0-theme__icon--moon { display: block; }
[data-theme="light"] .t0-theme__btn[data-theme-value="dark"] .t0-theme__icon--sun { display: none; }
[data-theme="light"] .t0-theme__btn[data-theme-value="light"] .t0-theme__icon--sun { display: block; }
[data-theme="light"] .t0-theme__btn[data-theme-value="light"] .t0-theme__icon--moon { display: none; }

.t0-theme--mobile {
	justify-content: center;
	margin: 14px 0;
}

@media (prefers-reduced-motion: reduce) {
	body.t0,
	body.t0 .t0-card,
	body.t0 .t0-btn,
	body.t0 .t0-nav,
	body.t0 .t0-section,
	body.t0 .t0-marquee,
	body.t0 .t0-footer,
	body.t0 .t0-mobile-menu,
	body.t0 .t0-field input,
	body.t0 .t0-field textarea,
	body.t0 .t0-cta__email,
	body.t0 .t0-cta__glow,
	body.t0 .t0-hero__panel,
	body.t0 .t0-aurora__blob,
	body.t0 .t0-deliv__card--feat { transition: none; }
}
