/* Enjoy-Digital, v3: square, plain, content first. Plain CSS, no build step. */

@font-face { font-family: "Gravur"; src: url("fonts/gravuconlig-webfont.woff2") format("woff2"), url("fonts/gravuconlig-webfont.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gravur"; src: url("fonts/gravuconbol-webfont.woff2") format("woff2"), url("fonts/gravuconbol-webfont.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
	--black: #0a0a0a;
	--text: #222;
	--grey: #666;
	--light: #999;
	--rule: #e3e3e3;
	--foot: #ebebeb;
	--blue: #136f9c;       /* brand blue, darkened for text on white (5.5:1) */
	--hero: #010101;       /* matches the tone-mapped WebGL clear colour */
	--cyan: #2eaadc;       /* brand blue */
	--sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
	--mono: ui-monospace, "SF Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
	--display: "Gravur", "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; border-radius: 0; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 12px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }

/* Header (Amarisoft-style bar) */
.top { position: absolute; z-index: 10; inset: 0 0 auto; display: flex; align-items: center; gap: 28px; padding: 10px 30px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.brand img { width: 110px; }
.nav { display: flex; gap: 26px; margin-left: auto; margin-right: auto; }
.nav a, .nav-contact { font-family: var(--mono); font-size: 14px; color: #ddd; }
.nav a::before { content: "/"; color: #555; margin-right: 2px; }
.nav a:hover { color: var(--cyan); text-decoration: none; }
.nav-contact { color: #fff; border: 1px solid var(--cyan); padding: 6px 14px; }
.nav-contact:hover { background: var(--cyan); text-decoration: none; }

/* Hero */
.hero { position: relative; background: var(--hero); color: #fff; min-height: clamp(600px, 92vh, 860px); min-height: clamp(600px, 92svh, 860px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hero-3d { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-3d.ready { opacity: 1; }
.hero-3d canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-text { position: relative; z-index: 2; width: min(1140px, 100% - 32px); margin: 0 auto; padding: 120px 0 40px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(1,1,1,0.94) 0%, rgba(1,1,1,0.8) 45%, rgba(1,1,1,0.1) 72%, transparent 100%); pointer-events: none; }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--cyan) !important; margin: 0 0 18px !important; letter-spacing: 0.04em; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(42px, 6vw, 78px); line-height: 0.98; letter-spacing: 0.005em; }
.hero h1 span { color: var(--cyan); }
.hero-text .kicker { max-width: none; }
.hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 140px; z-index: 1; background: linear-gradient(rgba(1,1,1,0.9), transparent); pointer-events: none; }
.hero-cap { position: absolute; z-index: 2; right: 30px; bottom: 14px; margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; color: #8a8a8a; transition: opacity 0.3s; }
.hero-pause { font-family: var(--mono); font-size: 11px; color: #bbb; background: transparent; border: 1px solid #444; padding: 2px 8px; cursor: pointer; }
.hero-pause:hover { border-color: var(--cyan); color: var(--cyan); }
.skip { position: absolute; left: -9999px; top: 0; z-index: 20; background: var(--cyan); color: #000; padding: 8px 14px; }
.skip:focus { left: 8px; top: 8px; }
main :focus-visible, .foot :focus-visible { outline-color: var(--blue); }
.hero-text p { max-width: 540px; margin-top: 26px; color: #bbb; font-size: 17px; }
.tiles { position: relative; z-index: 2; width: min(1140px, 100% - 32px); margin: 30px auto 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.tile { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; background: rgba(10, 10, 10, 0.7); transition: border-color 0.2s, background 0.2s; }
.tile:hover { text-decoration: none; border-color: var(--cyan); background: rgba(46, 170, 220, 0.08); }
.tile-t { font-size: 19px; line-height: 1.2; }
.tile-t small { display: block; white-space: nowrap; font-size: 13px; color: #999; font-family: var(--mono); margin-top: 3px; }
.tile i { margin-left: auto; font-size: 20px; font-style: normal; color: var(--cyan); transition: transform 0.2s; }
.tile:hover i { transform: translateX(4px); }
/* Tile icons: line drawings in the brand blue, LiteX logo as is. */
.ico { flex: none; width: 88px; height: 52px; border: 1px solid #333; background: #0f1215; }
.ico-img { object-fit: cover; background: #000; }
.ico .pcb { fill: #121a20; stroke: #2a3a44; stroke-width: 1; }
.ico .chip { fill: #1a1d20; stroke: #8fdcf7; stroke-width: 1; }
.ico .pins, .ico .fing { stroke: #9aa3a8; stroke-width: 1; fill: none; }
.ico .trace { stroke: var(--cyan); stroke-width: 1; fill: none; stroke-linejoin: round; }
.ico .conn { fill: #3a4247; stroke: #9aa3a8; stroke-width: 0.8; }
.ico .gold { fill: #c9a24e; }
.ico .fing { stroke: #0f1215; }
.ico .ufl { fill: #b8bdc1; stroke: #0f1215; stroke-width: 1; }
.ico .wave { stroke: #8fdcf7; stroke-width: 1.2; fill: none; stroke-linecap: round; }
.ico .dot { fill: #8fdcf7; }
.tile:hover .ico { border-color: var(--cyan); }
.tile:hover .ico .trace { stroke: #8fdcf7; }

/* Body (VideoLAN-style) */
.tagline { text-align: center; color: var(--grey); font-size: 18px; padding: 40px 0 10px; }
h2 { color: var(--blue); font-size: 30px; line-height: 1.2; margin-bottom: 14px; }
h2.light { font-family: var(--display); font-size: 46px; color: var(--blue); line-height: 1; margin-bottom: 16px; }
.caps { text-transform: uppercase; color: var(--grey); font-size: 15px; letter-spacing: 0.02em; margin-bottom: 14px; }
.caps-link { text-transform: uppercase; font-size: 13px; }
.small { font-size: 13.5px; color: #444; }
.meta { font-size: 12px; color: #767676; margin-bottom: 6px; }
.block { padding: 40px 0; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; padding: 30px 0; }
.feature-img { border: 1px solid var(--rule); padding: 10px; background: #fff; }
.feature-text p { font-size: 15.5px; color: #333; }
.buttons { display: flex; gap: 10px; margin: 20px 0 8px; }
.button { display: inline-block; background: var(--blue); color: #fff; padding: 10px 26px; font-size: 18px; border: 1px solid var(--blue); }
.button:hover { text-decoration: none; background: #0e5578; border-color: #0e5578; }
.button-plain { background: #fff; color: var(--blue); }
.button-plain:hover { background: #f2f8fb; }
.button-big { font-size: 20px; padding: 14px 30px; }

.cols { display: grid; grid-template-columns: 1.15fr 1fr 0.85fr; gap: 40px; }
.items { margin: 0 0 14px; }
.items dt { font-size: 17px; color: var(--blue); margin-top: 10px; }
.items dd { margin: 2px 0 0; font-size: 13.5px; color: #444; }
.links { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.links li { margin: 0 0 8px; font-size: 16px; }


.clients { mix-blend-mode: multiply; filter: grayscale(1) brightness(1.06) contrast(1.25); margin-top: 6px; }

.contact { background: var(--black); color: #fff; margin-top: 0; }
.contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 54px 0; }
.contact h2 { color: #fff; font-family: var(--display); font-weight: 700; font-size: 36px; }
.contact p { color: #aaa; margin: 0; }
.contact .button { background: var(--cyan); border-color: var(--cyan); color: #0a0a0a; }
.contact .button:hover { background: #fff; border-color: #fff; }

/* AI section */
.ai { background: #f4f6f8; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 50px 0; margin: 10px 0 0; }
.ai .kicker { color: var(--blue) !important; }
.ai-lead { font-size: 18px; color: #333; max-width: 780px; margin-bottom: 26px; }
.ai-top { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; margin-bottom: 30px; }
.ai-top .ai-lead { margin-bottom: 0; }
.desk { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .ai-top { grid-template-columns: 1fr; gap: 24px; } .desk { max-width: 620px; } }
.ai-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #cfd6dc; background: #fff; }
.ai-grid > div { padding: 22px 20px; border-right: 1px solid #cfd6dc; }
.ai-grid > div:last-child { border-right: 0; }
.ai-n { font-family: var(--mono); font-size: 12px; color: var(--blue); }
.ai-grid h3 { font-size: 17px; color: var(--blue); margin: 6px 0 8px; }
.ai-grid p { font-size: 13.5px; color: #444; margin: 0; }
@media (max-width: 960px) { .ai-grid { grid-template-columns: 1fr 1fr; } .ai-grid > div { border-bottom: 1px solid #cfd6dc; } }
@media (max-width: 560px) { .ai-grid { grid-template-columns: 1fr; } .ai-grid > div { border-right: 0; } }

/* Footer (VideoLAN-style link columns) */
.foot { background: var(--foot); padding: 40px 0 24px; font-size: 13px; color: #444; }
.foot-cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 24px; }
.foot-cols img { width: 130px; margin-bottom: 12px; }
.foot h4 { text-transform: uppercase; font-weight: 700; font-size: 13px; color: #333; margin-bottom: 10px; }
.foot-cols a { display: block; color: #333; margin-bottom: 4px; }
.foot-cols p a { display: inline; }
.foot .legal { margin-top: 26px; padding-top: 14px; border-top: 1px solid #d6d6d6; color: var(--grey); font-size: 12px; }

/* Legal page */
.page-head { background: var(--black); color: #fff; padding: 120px 0 44px; }
.page-head h1 { font-family: var(--display); font-weight: 700; font-size: 52px; }
.legal-body { padding: 40px 0 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 50px; }
.legal-body section { border-top: 1px solid var(--rule); padding-top: 16px; }
.legal-body h2 { font-size: 22px; }

@media (max-width: 960px) {
	.top { padding: 10px 16px; }
	.top { flex-wrap: wrap; row-gap: 6px; }
	.nav { order: 3; width: 100%; margin: 0; gap: 16px; overflow-x: auto; white-space: nowrap; padding-bottom: 4px; scrollbar-width: none; }
	.nav a { font-size: 13px; }
	.hero-cap { right: 16px; font-size: 11px; }
	.nav-contact { margin-left: auto; }
	.tiles, .feature, .cols, .legal-body { grid-template-columns: 1fr; }
	.tiles { gap: 12px; }
	.contact-inner { flex-direction: column; align-items: flex-start; }
	.foot-cols { grid-template-columns: 1fr 1fr; }
	.foot-cols > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
	.hero::before { display: none; }
	.hero-3d { position: relative; inset: auto; order: 3; height: clamp(240px, 46vw, 360px); margin: 0 0 6px; }
	.hero-3d canvas { -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
	.hero-text { padding-bottom: 10px; }
	.tiles { order: 4; }
}
@media (max-width: 560px) {
	.links { grid-template-columns: 1fr 1fr 1fr; }
	.links li { font-size: 15px; }
	.kicker { font-size: 11px; }
	.tiles { order: 4; }
	.tile { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* Recent work: image cards; client systems: large gallery; clients: full-width logos */
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 6px; }
.work-card { display: flex; flex-direction: column; border: 1px solid var(--rule); background: #fff; color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.work-card:hover { text-decoration: none; border-color: var(--blue); transform: translateY(-2px); }
.work-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--rule); transition: filter 0.25s; }
.work-card:hover img { filter: brightness(1.06) contrast(1.04); }
.work-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 18px; }
.work-body .meta { margin: 0; }
.work-body b { font-size: 17px; color: var(--blue); }
.work-body .d { font-size: 13.5px; color: #444; line-height: 1.5; }
.work-card.feat { grid-column: span 2; flex-direction: row; }
.work-card.feat img { width: calc(50% - 9px); aspect-ratio: auto; height: 100%; min-height: 220px; border-bottom: 0; border-right: 1px solid var(--rule); }
.work-card.feat .work-body { flex: 1; justify-content: center; padding: 18px 20px; }
.work-card.feat b { font-size: 21px; }
.work-card.feat .d { font-size: 15px; }
#systems { border-top: 1px solid var(--rule); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--rule); }
.gallery figcaption { font-size: 13.5px; color: var(--grey); margin-top: 8px; }
.clients-block { border-top: 1px solid var(--rule); text-align: center; }
.clients-block h2 { text-align: left; }
.clients-block .clients { width: 100%; max-width: 1100px; margin: 26px auto 10px; }
@media (max-width: 960px) {
	.work-grid { grid-template-columns: 1fr 1fr; }
	.gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.work-grid { grid-template-columns: 1fr; }
	.gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
	.gallery figcaption { font-size: 11.5px; }
	.work-card.feat { grid-column: auto; flex-direction: column; }
	.work-card.feat img { width: 100%; aspect-ratio: 16 / 10; height: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--rule); }
	.head-row { flex-direction: column; gap: 4px; }
}

/* No WebGL: a quiet glow instead of an empty hero. */
.hero-3d.no-webgl { opacity: 1; background: radial-gradient(60% 60% at 70% 50%, rgba(46,170,220,0.12), transparent 70%); }

/* Short pages: footer at the bottom, no empty band above the legal line. */
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body > main { flex: 1; }
.foot .legal:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
