/* =====================================================================
   TechAmplio home (studio)
   Paper and ink, one brand purple from the logo, the logo's node as the
   recurring marker. Spacing on a 4px grid.
   ===================================================================== */

:root {
	/* Neutral ramp, warm paper toward ink */
	--st-paper: #f1efe9;
	--st-paper-2: #e9e6de;      /* raised: hover rows, card 4 */
	--st-card: #fbfaf7;         /* lightest card */
	--st-ink: #0d0b1a;
	--st-ink-2: #4a4754;        /* secondary text */
	--st-ink-3: #6b6875;        /* muted text, meta */
	--st-line: rgba(13, 11, 26, 0.1);

	/* Dark surfaces */
	--st-night: #0d0b1a;
	--st-on-dark: #f1efe9;
	--st-on-dark-2: rgba(241, 239, 233, 0.72);
	--st-line-dark: rgba(241, 239, 233, 0.14);

	/* The one accent: the logo purple, and a light tint of it for dark surfaces */
	--st-brand: #5e56a8;
	--st-brand-deep: #4b4490;
	--st-brand-light: #b3adec;

	--st-sans: "Sora", "Manrope", system-ui, sans-serif;
	--st-body: "Manrope", system-ui, sans-serif;
	--st-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

	--st-pad: clamp(24px, 4.5vw, 64px);
	--st-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--st-fast: 160ms;
	--st-enter: 480ms;
}

html { scroll-behavior: smooth; }

body.st-home {
	background: var(--st-paper);
	padding: 0 !important;
	overflow-x: hidden;
}

.st-root, .st-root * { box-sizing: border-box; }

.st-root {
	position: relative;
	z-index: 0;
	color: var(--st-ink);
	font-family: var(--st-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
:where(.st-root) a { color: inherit; text-decoration: none; }
:where(.st-root) :where(p, h1, h2, h3) { margin: 0; }
.st-root em { font-style: normal; color: var(--st-brand); }
.st-root :focus-visible { outline: 2px solid var(--st-brand); outline-offset: 4px; border-radius: 4px; }
.st-root [data-nav="dark"] :focus-visible, .st-footer :focus-visible { outline-color: var(--st-brand-light); }

#st-scene {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	pointer-events: none;
}
.st-no-webgl #st-scene { display: none; }

.st-wrap, .st-hero__in, .st-stack-row, .st-statement__in, .st-footer { position: relative; z-index: 2; }

/* ---------- Signature: the logo's ringed node ---------- */
.st-node {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--st-brand);
	box-shadow: 0 0 0 2px var(--st-paper), 0 0 0 3px var(--st-brand);
}

/* ---------- Nav ---------- */
.st-nav {
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 20px var(--st-pad);
	color: var(--st-ink);
	transition: color var(--st-enter) var(--st-ease), background-color var(--st-enter) var(--st-ease), padding var(--st-enter) var(--st-ease);
}
.admin-bar .st-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .st-nav { top: 46px; } }
.st-nav.is-scrolled { padding-top: 12px; padding-bottom: 12px; background: rgba(241, 239, 233, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--st-line); }
.st-nav.is-dark { color: var(--st-on-dark); }
.st-nav.is-dark.is-scrolled { background: rgba(13, 11, 26, 0.88); box-shadow: 0 1px 0 var(--st-line-dark); }

.st-brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--st-sans); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
.st-brand img { display: block; }
.st-nav.is-dark .st-brand img, .st-footer .st-brand img { filter: brightness(1.6) saturate(0.9); }

.st-links { display: flex; gap: 32px; }
.st-links a { font-size: 15px; font-weight: 500; color: inherit; opacity: 0.72; transition: opacity var(--st-fast) var(--st-ease); }
.st-links a:hover { opacity: 1; }

.st-burger { display: none; background: none; border: 0; width: 44px; height: 44px; position: relative; cursor: pointer; color: inherit; }
.st-burger i { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform 240ms var(--st-ease); }
.st-burger i:nth-child(1) { top: 18px; }
.st-burger i:nth-child(2) { top: 25px; }
.st-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.st-burger[aria-expanded="true"] i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.st-menu {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	padding: 0 var(--st-pad);
	background: var(--st-paper);
	opacity: 0;
	visibility: hidden;
	transition: opacity 220ms var(--st-ease), visibility 220ms;
}
.st-menu.is-open { opacity: 1; visibility: visible; }
.st-menu a { font-family: var(--st-sans); font-size: clamp(2rem, 9vw, 3rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.2; }
@media (max-width: 900px) {
	.st-links, .st-nav .st-nav__bar > .st-btn { display: none; }
	.st-burger { display: block; }
	.st-nav.is-menu-open { z-index: 101; color: var(--st-ink); background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Buttons and links ---------- */
.st-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--st-ink);
	color: var(--st-paper) !important;
	font-family: var(--st-body);
	font-size: 15px;
	font-weight: 600;
	transition: background-color var(--st-fast) var(--st-ease), transform var(--st-fast) var(--st-ease);
}
.st-btn:hover { background: var(--st-brand-deep); }
.st-btn:active { transform: scale(0.98); }
.st-btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.st-nav.is-dark .st-btn { background: var(--st-on-dark); color: var(--st-ink) !important; }
.st-nav.is-dark .st-btn:hover { background: #fff; }
.st-btn--lg { height: 64px; padding: 0 32px; font-size: clamp(1.0625rem, 1.8vw, 1.375rem); font-weight: 500; }

.st-link { font-weight: 600; font-size: 15px; padding: 4px 0; border-bottom: 1.5px solid currentColor; transition: color var(--st-fast) var(--st-ease); }
.st-link:hover { color: var(--st-brand); }

/* ---------- Type ---------- */
.st-h1, .st-h2, .st-rows h3, .st-pcard h3, .st-stat b, .st-statement p, .st-menu a { font-family: var(--st-sans); }
.st-h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 500; line-height: 1.06; letter-spacing: -0.03em; }
.st-h2 { margin-top: 16px; font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; max-width: 20ch; }
.st-lead { max-width: 36rem; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.55; color: var(--st-ink-2); }

.st-label { display: flex; align-items: baseline; gap: 12px; font-family: var(--st-mono); font-size: 13px; letter-spacing: 0; color: var(--st-ink-3); }
.st-label span { color: var(--st-brand); }
.st-eyebrow { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; color: var(--st-ink-2); }

.st-reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--st-enter) var(--st-ease), transform var(--st-enter) var(--st-ease); }
.st-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Layout ---------- */
.st-sec { position: relative; padding: clamp(80px, 13vh, 128px) var(--st-pad); }
.st-wrap { max-width: 1320px; margin: 0 auto; }
.st-head { margin-bottom: clamp(40px, 6vh, 64px); }

/* ---------- Hero ---------- */
.st-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 128px 0 0; }
.st-hero__in { width: 100%; max-width: calc(1320px + 2 * var(--st-pad)); margin: 0 auto; padding: 0 var(--st-pad); display: flex; flex-direction: column; align-items: flex-start; gap: 24px; flex: 1; justify-content: center; }
.st-hero .st-h1 { max-width: 13ch; margin-top: 8px; }
.st-hero .st-actions { margin-top: 16px; }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }

.st-stack-row { display: flex; align-items: center; gap: 24px; border-top: 0; position: relative; width: 100%; max-width: calc(1320px + 2 * var(--st-pad)); margin: 48px auto 0; padding: 20px var(--st-pad) 24px; font-family: var(--st-mono); font-size: 13px; color: var(--st-ink-3); }
.st-stack-row::before { content: ""; position: absolute; top: 0; left: var(--st-pad); right: var(--st-pad); height: 1px; background: var(--st-line); }
.st-stack-row__label { flex: none; color: var(--st-ink-2); }
.st-stack-row ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }

/* ---------- Services rows ---------- */
.st-rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--st-line); }
.st-rows li { position: relative; border-top: 1px solid var(--st-line); }
.st-rows a {
	position: relative;
	display: grid;
	grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1fr) 24px;
	align-items: center;
	gap: 24px;
	padding: 32px 16px;
	margin: 0 -16px;
	border-radius: 12px;
	transition: background-color var(--st-fast) var(--st-ease);
}
.st-rows a:hover { background: var(--st-paper-2); }
.st-rows .n { font-family: var(--st-mono); font-size: 13px; color: var(--st-ink-3); font-variant-numeric: tabular-nums; }
.st-rows h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.st-rows p { font-size: 15px; color: var(--st-ink-2); max-width: 40ch; }
.st-rows .arr { width: 20px; height: 20px; fill: none; stroke: var(--st-ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--st-fast) var(--st-ease), transform var(--st-fast) var(--st-ease); }
.st-rows a:hover .arr { stroke: var(--st-brand); transform: translate(2px, -2px); }

@media (max-width: 900px) {
	.st-rows a { grid-template-columns: 40px 1fr 20px; gap: 8px 16px; padding: 24px 12px; margin: 0 -12px; }
	.st-rows p { grid-column: 2 / 3; grid-row: 2; }
	.st-rows .arr { grid-column: 3; grid-row: 1; }
}

/* ---------- Statement ---------- */
.st-statement { position: relative; height: 200vh; }
.st-statement__in { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding: 0 var(--st-pad); max-width: calc(1320px + 2 * var(--st-pad)); margin: 0 auto; }
.st-statement p { max-width: 22ch; font-size: clamp(1.75rem, 3.8vw, 3.5rem); font-weight: 500; line-height: 1.16; letter-spacing: -0.02em; }
.st-statement .w { color: rgba(13, 11, 26, 0.16); transition: color 240ms var(--st-ease); }
.st-statement .w.on { color: var(--st-ink); }
.st-statement em .w.on { color: var(--st-brand); }

/* ---------- Process (stacking cards) ---------- */
.st-split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.st-stack { display: flex; flex-direction: column; gap: 24px; padding-bottom: 8vh; }
.st-pcard {
	position: sticky;
	top: calc(96px + var(--i) * 20px);
	min-height: clamp(320px, 48vh, 420px);
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 3.2vw, 40px);
	border-radius: 20px;
	border: 1px solid transparent;
	transform-origin: center top;
	will-change: transform;
	box-shadow: 0 16px 40px -24px rgba(13, 11, 26, 0.28);
}
.st-pcard .num { display: inline-flex; align-items: center; gap: 12px; font-family: var(--st-mono); font-size: 13px; font-variant-numeric: tabular-nums; opacity: 0.72; }
.st-pcard h3 { margin-top: auto; font-size: clamp(2rem, 3.6vw, 3.25rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.st-pcard p { margin-top: 16px; max-width: 42ch; opacity: 0.82; }
.st-pcard ul { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.st-pcard li { padding: 4px 12px; border-radius: 6px; border: 1px solid currentColor; font-size: 13px; font-weight: 500; opacity: 0.64; }
.st-pcard--1 { background: var(--st-brand); color: #fff; }
.st-pcard--1 .st-node { background: #fff; box-shadow: 0 0 0 2px var(--st-brand), 0 0 0 3px #fff; }
.st-pcard--2 { background: var(--st-night); color: var(--st-on-dark); }
.st-pcard--2 .st-node { background: var(--st-brand-light); box-shadow: 0 0 0 2px var(--st-night), 0 0 0 3px var(--st-brand-light); }
.st-pcard--3 { background: var(--st-card); color: var(--st-ink); border-color: var(--st-line); }
.st-pcard--3 .st-node { box-shadow: 0 0 0 2px var(--st-card), 0 0 0 3px var(--st-brand); }
.st-pcard--4 { background: var(--st-paper-2); color: var(--st-ink); border-color: var(--st-line); }
.st-pcard--4 .st-node { box-shadow: 0 0 0 2px var(--st-paper-2), 0 0 0 3px var(--st-brand); }

/* ---------- Numbers ---------- */
.st-numbers { color: var(--st-on-dark); margin-top: -40px; }
.st-numbers::before { content: ""; position: absolute; inset: 0; background: var(--st-brand); z-index: -1; border-radius: 40px 40px 0 0; }
.st-numbers .st-label { color: var(--st-on-dark-2); }
.st-numbers .st-label span { color: var(--st-on-dark); }
.st-numbers .st-split { grid-template-columns: 1.1fr 0.9fr; }
.st-stats { margin-top: clamp(40px, 6vh, 64px); display: grid; grid-template-columns: 1fr 1fr; gap: 40px 32px; }
.st-stat { border-top: 1px solid rgba(255, 255, 255, 0.24); padding-top: 20px; }
.st-stat b { display: block; font-size: clamp(2.5rem, 4.6vw, 4rem); font-weight: 500; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.st-stat span { display: block; margin-top: 12px; font-size: 15px; color: var(--st-on-dark-2); }

/* ---------- Contact ---------- */
.st-contact { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 128px var(--st-pad); color: var(--st-on-dark); margin-top: -40px; }
.st-contact::before { content: ""; position: absolute; inset: 0; background: var(--st-night); z-index: -1; border-radius: 40px 40px 0 0; }
.st-contact .st-wrap { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.st-contact .st-label { color: var(--st-on-dark-2); }
.st-contact .st-label span { color: var(--st-brand-light); }
.st-contact .st-btn { background: var(--st-on-dark); color: var(--st-ink) !important; }
.st-contact .st-btn:hover { background: #fff; }
.st-big { font-size: clamp(2.75rem, 6vw, 5.5rem); line-height: 1.04; }
.st-big em { color: var(--st-brand-light); }
.st-note { margin-top: -8px; font-size: 15px; color: var(--st-on-dark-2); }

/* ---------- Footer ---------- */
.st-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 24px var(--st-pad); background: var(--st-night); color: var(--st-on-dark-2); border-top: 1px solid var(--st-line-dark); font-size: 14px; }
.st-footer .st-brand { color: var(--st-on-dark); font-size: 1rem; gap: 8px; }
.st-footer nav { display: flex; gap: 24px; }
.st-footer nav a { transition: color var(--st-fast) var(--st-ease); }
.st-footer nav a:hover { color: var(--st-on-dark); }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
	.st-split, .st-numbers .st-split { grid-template-columns: 1fr; }
	.st-split__gap { display: none; }
	.st-pcard { top: calc(80px + var(--i) * 12px); }
	.st-hero { padding-top: 96px; }
	.st-hero .st-h1 { max-width: none; }
	.st-stack-row { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 32px; }
	.st-stats { gap: 32px 24px; }
}

/* Narrow screens: leave room above the hero text for the 3D mark (matches scene.js aspect < 0.95) */
@media (max-aspect-ratio: 19/20) {
	.st-scene-ready .st-hero { padding-top: 40svh; }
	.st-scene-ready .st-hero__in { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.st-reveal { opacity: 1; transform: none; transition: none; }
	.st-statement .w { transition: none; }
}
