/* ---------- Tokens ---------- */
:root {
	--bg: #060a14;
	--surface: #0c1424;
	--line: #1a2742;
	--primary: #3fa9ff;
	--secondary: #7df9ff;
	--glitch: #ff2bd6; /* glitch layers only, never UI */
	--text: #dfe8ff;
	--muted: #7f8fb3;

	--font-display: "Rajdhani", "Arial Narrow", sans-serif;
	--font-body: "Inter", system-ui, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;

	--max: 1120px;
	--pad: clamp(1.25rem, 4vw, 3rem);
	color-scheme: dark;
}

/* ---------- Fonts ---------- */
@font-face { font-family: "Rajdhani"; font-weight: 500; font-display: swap; src: url("/fonts/rajdhani-500.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("/fonts/rajdhani-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-400-ext.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-600-ext.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-mono-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-mono-400-ext.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url("/fonts/jetbrains-mono-700.woff2") format("woff2"); }

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
picture img { height: auto; }
a { color: var(--secondary); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }

h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: 0.01em;
	margin: 0 0 0.6em;
	color: #fff;
	text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 8vw, 6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
p { margin: 0 0 1em; max-width: 60ch; }

.mono { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; }
.muted { color: var(--muted); }
.eyebrow { color: var(--primary); text-transform: uppercase; margin-bottom: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.5rem 1rem; background: var(--primary); color: var(--bg); }
.skip-link:focus { top: 1rem; }

/* ---------- Shell ---------- */
.grid-bg {
	position: fixed; inset: 0; z-index: -2; pointer-events: none;
	background-image:
		linear-gradient(rgba(63, 169, 255, 0.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(63, 169, 255, 0.07) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
	animation: grid-drift 24s linear infinite;
}
@keyframes grid-drift { to { background-position: 48px 48px; } }

.site-header {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 0.9rem var(--pad);
	background: rgba(6, 10, 20, 0.82);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; text-decoration: none; }
.brand__name {
	font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
	letter-spacing: 0.08em; text-transform: uppercase;
}
.site-nav { display: flex; gap: clamp(0.75rem, 3vw, 2rem); }
.site-nav a {
	font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--muted); text-decoration: none; padding: 0.4rem 0; border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--secondary); }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--primary); }
.brand__name, .site-nav a { white-space: nowrap; }
@media (max-width: 600px) { .brand__name { display: none; } .site-nav a { font-size: 0.72rem; } }

main { display: block; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.site-footer { border-top: 1px solid var(--line); margin-top: 6rem; padding: 2rem var(--pad) 3rem; }
.site-footer__inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
.site-footer p { margin: 0; max-width: none; color: var(--muted); }
.site-footer a { color: var(--muted); }

/* Swup page transition */
.transition-main { transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease; }
html.is-changing .transition-main { opacity: 0; transform: translateX(6px) skewX(-2deg); filter: hue-rotate(40deg); }

/* ---------- Components ---------- */
.section { padding: clamp(3rem, 8vw, 6rem) 0 0; }
.section__head { margin-bottom: 2.5rem; }

.btn {
	display: inline-block; padding: 0.85rem 1.6rem;
	font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
	border: 1px solid var(--primary); color: var(--secondary); background: transparent;
	cursor: pointer; transition: box-shadow 0.2s, background 0.2s, color 0.2s;
	clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.btn:hover { box-shadow: 0 0 18px rgba(63, 169, 255, 0.45), inset 0 0 12px rgba(63, 169, 255, 0.15); color: #fff; }
.btn--primary { background: rgba(63, 169, 255, 0.12); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.hero { padding: clamp(4rem, 12vw, 9rem) 0 2rem; }
.hero__sub { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--text); max-width: 46ch; }

.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); }
@media (max-width: 640px) { .services { grid-template-columns: 1fr; } }
.service { background: var(--surface); padding: 2rem 1.75rem 1.5rem; position: relative; }
.service::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--primary); opacity: 0; transition: opacity 0.2s; }
.service:hover::before { opacity: 1; }
.service__index { color: var(--primary); display: block; margin-bottom: 1rem; }
.service p { color: var(--muted); margin: 0; }

.product-teaser { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding: 2.5rem; border: 1px solid var(--line); background: linear-gradient(135deg, var(--surface), transparent); }
.product-teaser__logo img { width: clamp(120px, 20vw, 220px); height: auto; filter: drop-shadow(0 0 24px rgba(125, 249, 255, 0.35)); }
@media (max-width: 640px) { .product-teaser { grid-template-columns: 1fr; } .product-teaser__logo { order: -1; } }

.section--contact { text-align: left; }

.product-blocks { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.block h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.block p { color: var(--muted); }

/* Contact form */
.contact { max-width: 640px; }
.contact h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.form { display: grid; gap: 1.25rem; margin-top: 2rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.field input, .field textarea {
	width: 100%; padding: 0.8rem 0.9rem; font: inherit; color: var(--text);
	background: var(--surface); border: 1px solid var(--line); border-radius: 0;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 1px var(--primary), 0 0 16px rgba(63, 169, 255, 0.3); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 1rem 1.25rem; border: 1px solid; font-family: var(--font-mono); font-size: 0.85rem; }
.notice--ok { border-color: var(--secondary); color: var(--secondary); }
.notice--err { border-color: var(--glitch); color: #ffb3ee; }
.privacy { margin-top: 2.5rem; font-size: 0.75rem; line-height: 1.7; max-width: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-play-state: paused !important; transition-duration: 0.01ms !important; }
	html { scroll-behavior: auto; }
	.preloader { display: none !important; }
}
