/* Veyonix Technologies: site styles
   Black, white, grey and silver. Follows the visitor's light or dark setting.
   The header, hero, project showcase and footer are always dark so the official
   logo (which has a black background) sits on its own colour. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-2: #f4f4f5;
  --surface: #ffffff;
  --ink: #0b0b0c;
  --ink-2: #3f3f46;
  --muted: #6b6b75;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --silver: #a1a1aa;
  --accent: #2f6fed;
  --accent-ink: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --error: #b42318;

  /* Always-dark areas */
  --night: #000000;
  --night-2: #0c0c0e;
  --night-3: #16161a;
  --night-line: #26262c;
  --night-ink: #f4f4f5;
  --night-ink-2: #b9b9c2;
  --night-muted: #85858f;
  --glow-a: #22c4ee;
  --glow-b: #7b3fe4;

  --radius: 8px;
  --container: 1200px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --bg-2: #111113;
    --surface: #141417;
    --ink: #f4f4f5;
    --ink-2: #c8c8cf;
    --muted: #8f8f99;
    --line: #26262c;
    --line-strong: #34343b;
    --silver: #71717a;
    --accent: #6c9bff;
    --accent-ink: #0a0a0b;
    --ok: #4ade80;
    --warn: #fbbf24;
    --error: #f97066;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-2); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 300; background: #fff; color: #000; padding: 8px 14px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.label {
  display: block; font-family: var(--mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem;
}

/* ---------- Dark zones ---------- */
.dark {
  --ink: var(--night-ink); --ink-2: var(--night-ink-2); --muted: var(--night-muted);
  --line: var(--night-line); --line-strong: #3a3a42; --surface: var(--night-3); --bg-2: var(--night-2);
  --accent: #7aa5ff; --accent-ink: #000;
  background: var(--night); color: var(--night-ink); color-scheme: dark;
}

/* Comic-style halftone dots and a faint circuit grid */
.bg-tech { position: relative; isolation: isolate; overflow: hidden; }
.bg-tech::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-tech::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.4px);
  background-size: 12px 12px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 85% 30%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 70% at 85% 30%, #000 0%, transparent 70%);
}
.bg-pcb::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1.5'%3E%3Cpath d='M0 40h40l20 20h40M100 60v40l20 20h40M20 160v-40l20-20h20M160 20h-30l-10 10v30M60 0v20l-20 20'/%3E%3Ccircle cx='100' cy='60' r='3'/%3E%3Ccircle cx='60' cy='100' r='3'/%3E%3Ccircle cx='130' cy='30' r='3'/%3E%3Crect x='70' y='120' width='26' height='18' rx='2'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* Floating code and hardware symbols */
.floaters { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.floaters span {
  position: absolute; font-family: var(--mono); font-size: .9rem; color: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: 4px 9px; white-space: nowrap;
  background: rgba(255,255,255,.02);
}
@media (prefers-reduced-motion: no-preference) {
  .floaters span { animation: drift 14s ease-in-out infinite; }
  .floaters span:nth-child(2n) { animation-duration: 18s; animation-delay: -4s; }
  .floaters span:nth-child(3n) { animation-duration: 22s; animation-delay: -9s; }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -14px, 0); }
}
@media (max-width: 760px) { .floaters span:nth-child(n+5) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.25rem; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 500; font-size: .95rem; text-decoration: none; cursor: pointer; line-height: 1.3;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); }
.dark .btn-primary { background: #fff; color: #000; }
.dark .btn-primary:hover { background: #d4d4d8; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-sm { padding: .5rem .85rem; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link { color: var(--accent); font-weight: 500; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--night); border-bottom: 1px solid var(--night-line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 40px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .5rem .75rem; border-radius: 6px;
  font-size: .93rem; color: var(--night-ink-2); text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: var(--night-3); }
.nav-links a.active { color: #fff; box-shadow: inset 0 -2px 0 #fff; border-radius: 0; }
.nav-end { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 6px; color: #fff;
  border: 1px solid var(--night-line); background: transparent; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-menu { display: none; }
.nav-open .nav-toggle .i-close { display: block; }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--night); border-bottom: 1px solid var(--night-line); padding: 8px 16px 16px;
  }
  .nav-open .nav-links { display: flex; }
  .nav-links a { padding: .85rem .5rem; border-bottom: 1px solid var(--night-line); border-radius: 0; }
  .nav-links a.active { box-shadow: none; color: #fff; font-weight: 500; }
  .nav-links li:last-child a { border-bottom: 0; }
}
@media (max-width: 480px) { .nav-end .btn { display: none; } .brand img { height: 34px; } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-2); }
.section + .section:not(.alt):not(.dark) { border-top: 1px solid var(--line); }
@media (max-width: 700px) { .section { padding: 64px 0; } }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { font-size: 1.06rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-logo { width: min(360px, 80%); height: auto; margin-bottom: 28px; }
.hero h1 { max-width: 640px; }
.hero-lead { font-size: 1.12rem; max-width: 590px; margin-bottom: 2rem; }
.hero-meta { margin-top: 28px; font-family: var(--mono); font-size: .8rem; color: var(--night-muted); display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hero-meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--night-ink-2); margin-right: 8px; vertical-align: middle; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 56px 0 64px; } }

/* Hero visual: a code panel above a circuit board */
.hero-visual { position: relative; perspective: 1200px; }
.stack { position: relative; transform: rotateX(8deg) rotateY(-12deg); transform-style: preserve-3d; }
@media (prefers-reduced-motion: no-preference) {
  .stack { transition: transform .6s ease; }
  .hero-visual:hover .stack { transform: rotateX(4deg) rotateY(-6deg); }
}
.panel {
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
}
.code-panel { overflow: hidden; }
.code-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--night-line); }
.code-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a42; }
.code-bar b { margin-left: auto; font-family: var(--mono); font-size: .72rem; font-weight: 400; color: var(--night-muted); }
.code-panel pre { margin: 0; padding: 18px 20px; font-family: var(--mono); font-size: clamp(.72rem, 1.3vw, .84rem); line-height: 1.8; color: var(--night-ink-2); overflow: hidden; }
.code-panel .k { color: #fff; font-weight: 500; }
.code-panel .s { color: #9db8ff; }
.code-panel .c { color: #6b6b75; }
.board-panel { margin: -28px 0 0 56px; padding: 18px; transform: translateZ(40px); }
.board-panel svg { width: 100%; height: auto; }
@media (max-width: 960px) { .stack { transform: none; } .board-panel { margin-left: 24px; } }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: 80px 0 72px; border-bottom: 1px solid var(--night-line); }
.page-head h1 { max-width: 820px; font-size: clamp(2rem, 4vw, 3rem); }
.page-head p { font-size: 1.1rem; max-width: 680px; margin-bottom: 0; }
.page-head .btn-row { margin-top: 28px; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Grids and cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; font-size: .96rem; }
.card .num { display: block; font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: 14px; }
.card .text-link { display: inline-block; margin-top: 16px; }

.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.areas li { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 500; font-size: .95rem; }
.areas { padding: 0; margin: 0; }
.areas li span { font-family: var(--mono); font-size: .72rem; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.side { border: 1px solid var(--line); border-radius: 12px; padding: 30px; background: var(--surface); }
.side ul { margin: 16px 0 0; padding-left: 1.1em; color: var(--ink-2); display: grid; gap: 6px; }
.side .text-link { display: inline-block; margin-top: 18px; }
.side.inverse { background: var(--ink); border-color: var(--ink); }
.side.inverse h3, .side.inverse p { color: var(--bg); }

.service-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .service-cols { grid-template-columns: 1fr; } }
.service-col { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.service-col header { padding: 22px 26px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.service-col header h3 { margin: 0; }
.service-col ul { list-style: none; margin: 0; padding: 8px 0; }
.service-col li { padding: 10px 26px; display: flex; gap: 14px; font-size: .97rem; }
.service-col li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .6em; border-radius: 50%; background: var(--silver); }

/* Logo plate for light areas */
.logo-plate { background: #000; border-radius: 12px; padding: 28px; display: grid; place-items: center; border: 1px solid var(--line); }
.logo-plate img { width: 100%; max-width: 420px; height: auto; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.step { padding: 26px; }
.step + .step { border-left: 1px solid var(--line); }
.step .num { display: block; font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: 12px; }
.step h3 { font-size: 1.05rem; }
.step p { font-size: .94rem; margin: 0; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { border-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step + .step { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- Projects showcase ---------- */

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; perspective: 1400px; }
@media (max-width: 1000px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } }

.project {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; transform-style: preserve-3d;
}
@media (prefers-reduced-motion: no-preference) {
  .project { transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; }
  .project:hover, .project:focus-within { transform: translateY(-6px) rotateX(3deg); }
}
.project:hover, .project:focus-within { border-color: var(--line-strong); box-shadow: 0 24px 50px -28px rgba(0,0,0,.6); }
.project-media { position: relative; aspect-ratio: 16 / 10; background: #0b0b0e; border-bottom: 1px solid var(--line); overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .project-media img { transition: transform .5s ease; }
  .project:hover .project-media img { transform: scale(1.04); }
}
.project-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.project-cat { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.project h3 { font-size: 1.12rem; }
.project-body p { flex: 1; font-size: .95rem; }
.project-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--silver); }
.status.developed::before { background: #22c55e; }
.status.in-development::before { background: #f59e0b; }
@media (prefers-reduced-motion: no-preference) {
  .status.in-development::before { animation: pulse 2s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: .35; } }
.status.prototype::before { background: #60a5fa; }
.project-media .status { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.72); color: #fff; border-color: rgba(255,255,255,.18); backdrop-filter: blur(4px); }

.empty { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 36px; text-align: center; color: var(--muted); }

.feature-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
@media (max-width: 600px) { .feature-list { grid-template-columns: 1fr; } }
.feature-list li { position: relative; padding-left: 22px; font-size: .95rem; color: var(--ink-2); }
.feature-list li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 5px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tags span { font-size: .78rem; color: var(--ink-2); border: 1px solid var(--line); padding: .15rem .55rem; border-radius: 4px; }

/* ---------- Tech list ---------- */
.tech { display: flex; flex-wrap: wrap; gap: 8px; }
.tech span { padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: .9rem; color: var(--ink-2); }

/* ---------- Team ---------- */
.member-photo {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden; margin-bottom: 18px;
  background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 600; font-size: 1.6rem;
  border: 1px solid var(--line);
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member h3 { margin-bottom: 2px; }
.member .role { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.member p { font-size: .93rem; }
.member-links { display: flex; gap: 14px; margin-top: 14px; font-size: .9rem; }

/* ---------- Audience cards ---------- */
.path { display: flex; flex-direction: column; }
.path p { flex: 1; }
.path .btn { margin-top: 20px; align-self: flex-start; }

/* ---------- CTA ---------- */
.cta { padding: 64px 0; border-top: 1px solid var(--night-line); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta h2 { margin-bottom: .3em; }
.cta p { margin: 0; max-width: 580px; }

/* ---------- Forms ---------- */
.form { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 32px; background: var(--surface); }
@media (max-width: 600px) { .form { padding: 22px 18px; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label, .field .field-label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 6px; }
.req { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: .72rem .85rem; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--bg); font-size: 1rem;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field .error { display: none; font-size: .82rem; color: var(--error); margin-top: 5px; }
.field.invalid .error { display: block; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label { display: block; margin: 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; font-weight: 500; font-size: .94rem; }
.choice label span { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); }
.choice input:checked + label { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-note { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.form-status { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 6px; font-size: .94rem; }
.form-status.ok { display: block; border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.form-status.err { display: block; border: 1px solid color-mix(in srgb, var(--error) 45%, transparent); color: var(--error); background: color-mix(in srgb, var(--error) 8%, transparent); }

/* Custom loading animation shown while a form is sending */
.form-loading {
  position: absolute; inset: 0; z-index: 5; border-radius: inherit; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(2px);
  font-size: .95rem; color: var(--ink-2);
}
.form.is-sending .form-loading { display: flex; }
.loader { display: flex; gap: 6px; align-items: flex-end; height: 34px; }
.loader i { width: 6px; height: 12px; border-radius: 2px; background: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .loader i { animation: bars 1s ease-in-out infinite; }
  .loader i:nth-child(2) { animation-delay: .12s; }
  .loader i:nth-child(3) { animation-delay: .24s; }
  .loader i:nth-child(4) { animation-delay: .36s; }
  .loader i:nth-child(5) { animation-delay: .48s; }
}
@keyframes bars { 0%, 100% { height: 10px; opacity: .4; } 50% { height: 34px; opacity: 1; } }

.success-panel { text-align: center; padding: 24px 8px; }
.success-panel .tick { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ok); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.success-panel .tick svg { width: 26px; height: 26px; }

/* Contact details */
.details { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.details li { padding: 18px 22px; }
.details li + li { border-top: 1px solid var(--line); }
.details .k { display: block; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
.details a { color: var(--ink); text-decoration: none; word-break: break-word; }
.details a:hover { text-decoration: underline; }


/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 0 20px; background: var(--surface); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 16px; margin: 0; }

/* Legal pages */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.legal .updated { font-size: .9rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--night-ink-2); padding: 64px 0 0; font-size: .94rem; border-top: 1px solid var(--night-line); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.footer-logo { width: 200px; height: auto; }
.site-footer p { color: var(--night-muted); margin-top: 16px; max-width: 320px; }
.site-footer h4 { color: #fff; font-size: .78rem; font-weight: 500; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--night-line); padding: 20px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--night-muted); }
.footer-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Two-column page layouts that collapse to one column on small screens */
.split-main-left { grid-template-columns: 1.6fr 1fr; }
.split-main-right { grid-template-columns: 1fr 1.5fr; }
@media (max-width: 900px) { .split-main-left, .split-main-right { grid-template-columns: 1fr; } }
.split > * { min-width: 0; }

/* ---------- What we do ---------- */
.do-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.do-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; transition: border-color .2s, transform .2s; }
.do-card svg { width: 34px; height: 34px; color: var(--ink); margin-bottom: 18px; }
.do-card h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.do-card p { font-size: .93rem; margin: 0; }
.do-card:hover { border-color: var(--line-strong); }
@media (prefers-reduced-motion: no-preference) { .do-card:hover { transform: translateY(-3px); } }

.tech-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tech-groups h3 { font-size: .95rem; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
@media (max-width: 760px) { .tech-groups { grid-template-columns: 1fr; } }

/* ---------- Statistics ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat { padding: 26px 24px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 6px; }
.stat.stat-text strong { font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.25; padding-top: .35em; }
.stat span { font-size: .9rem; color: var(--muted); }
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Project cards (link to the details page) ---------- */
a.project-media { display: block; }
.project h3 a { text-decoration: none; color: inherit; }
.project h3 a:hover { text-decoration: underline; }
.project-cat { display: block; margin-bottom: 10px; }
.project-body .project-actions { margin-top: 6px; }
.hero-photo { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--night-line); }

/* ---------- Project details page ---------- */
.pp-tech { font-family: var(--mono); font-size: .82rem; color: var(--muted) !important; margin-top: 10px !important; }
.page-head [data-pp="status"] { margin-bottom: 14px; }
.pp-preview { margin: 0 0 56px; }
.pp-preview-frame { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #0b0b0e; aspect-ratio: 16 / 9; }
.pp-preview-frame img { width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .pp-preview-frame img { transition: transform .6s ease; }
  .pp-preview-frame:hover img { transform: scale(1.02); }
}
.pp-preview figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.pp-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 56px; align-items: start; }
.pp-main > section + section { margin-top: 40px; }
.pp-main h2 { font-size: 1.35rem; margin-bottom: .7em; }
.pp-aside { display: grid; gap: 20px; position: sticky; top: 96px; }
.pp-facts { margin: 0; }
.pp-facts > div { padding: 16px 20px; }
.pp-facts > div + div { border-top: 1px solid var(--line); }
.pp-facts dd { margin: 0; color: var(--ink); }
.pp-facts dd a { color: var(--accent); }
@media (max-width: 900px) { .pp-layout { grid-template-columns: 1fr; gap: 36px; } .pp-aside { position: static; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.shot { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; aspect-ratio: 16 / 10; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot:hover { border-color: var(--ink-2); }

.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.92); }
.viewer[open] { display: grid; place-items: center; }
.viewer::backdrop { background: rgba(0,0,0,.6); }
.viewer img { max-width: calc(100vw - 120px); max-height: calc(100vh - 100px); object-fit: contain; border-radius: 8px; }
.viewer-btn { position: fixed; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.viewer-btn svg { width: 20px; height: 20px; }
.viewer-close { top: 16px; right: 16px; }
.viewer-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 16px; top: 50%; transform: translateY(-50%); }
.viewer-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #d4d4d8; font-family: var(--mono); font-size: .85rem; }
@media (max-width: 600px) { .viewer img { max-width: calc(100vw - 24px); } }

/* ---------- Contact actions ---------- */
.contact-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 960px) { .contact-actions { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .contact-actions { grid-template-columns: 1fr; } }
.contact-action { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.contact-action:hover { border-color: var(--ink); }
.contact-action svg { width: 28px; height: 28px; flex: none; }
.contact-action strong { display: block; font-size: 1rem; }
.contact-action span span { font-size: .86rem; color: var(--muted); word-break: break-word; }

/* ---------- Chat assistant ---------- */
.chat-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 150; width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid #3a3a42; background: #000; color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.6);
}
.chat-launcher svg { width: 26px; height: 26px; }
.chat-launcher:hover { border-color: #a1a1aa; }
@media (prefers-reduced-motion: no-preference) { .chat-launcher { transition: transform .2s; } .chat-launcher:hover { transform: translateY(-2px); } }
.chat-open .chat-launcher { display: none; }

.chat-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 160; width: min(390px, calc(100vw - 40px)); height: min(600px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: #0c0c0e; color: #f4f4f5; border: 1px solid #2a2a31; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); color-scheme: dark;
}
.chat-panel[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .chat-panel:not([hidden]) { animation: rise .2s ease; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #22222a; background: #000; }
.chat-head img { width: 32px; height: 32px; border-radius: 8px; }
.chat-head div { flex: 1; min-width: 0; }
.chat-head strong { display: block; font-size: .9rem; letter-spacing: .04em; }
.chat-head span { font-size: .78rem; color: #8f8f99; }
.chat-close { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #2a2a31; background: transparent; color: #f4f4f5; cursor: pointer; display: grid; place-items: center; }
.chat-close svg { width: 16px; height: 16px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: .92rem; line-height: 1.5; }
.chat-msg p { margin: 0; color: inherit; white-space: pre-line; }
.from-bot { align-self: flex-start; background: #17171c; border: 1px solid #24242b; border-bottom-left-radius: 4px; }
.from-user { align-self: flex-end; background: #f4f4f5; color: #0b0b0c; border-bottom-right-radius: 4px; }
.chat-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.chat-action { display: block; text-align: center; padding: 8px 10px; border-radius: 8px; border: 1px solid #3a3a42; color: #fff; text-decoration: none; font-size: .86rem; font-weight: 500; }
.chat-action:hover { background: #fff; color: #000; border-color: #fff; }
.typing { display: flex; gap: 5px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8f8f99; }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: blink 1.2s ease-in-out infinite; }
  .typing i:nth-child(2) { animation-delay: .15s; }
  .typing i:nth-child(3) { animation-delay: .3s; }
}
@keyframes blink { 50% { opacity: .25; } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.chat-suggest:empty { display: none; }
.chat-suggest button { font-size: .8rem; padding: 6px 10px; border-radius: 999px; border: 1px solid #3a3a42; background: transparent; color: #d4d4d8; cursor: pointer; }
.chat-suggest button:hover { border-color: #fff; color: #fff; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #22222a; }
.chat-form input { flex: 1; min-width: 0; padding: .65rem .8rem; border-radius: 8px; border: 1px solid #2f2f37; background: #141417; color: #f4f4f5; font-size: 16px; }
.chat-form input:focus { outline: none; border-color: #a1a1aa; }
.chat-send { width: 42px; border-radius: 8px; border: 0; background: #fff; color: #000; cursor: pointer; display: grid; place-items: center; }
.chat-send svg { width: 18px; height: 18px; }
.chat-note { margin: 0; padding: 0 14px 10px; font-size: .72rem; color: #71717a; text-align: center; }
@media (max-width: 520px) {
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; max-height: 100vh; border-radius: 0; border: 0; }
  .chat-launcher { right: 16px; bottom: 16px; }
}

/* ---------- Mobile menu extras ---------- */
.nav-mobile-only { display: none; }
@media (max-width: 1180px) {
  .nav-mobile-only { display: block; }
  .nav-links { max-height: calc(100vh - 72px); overflow-y: auto; }
}

/* ---------- Comfortable tap targets on phones ---------- */
@media (max-width: 700px) {
  .text-link { display: inline-block; padding: 10px 0; }
  .site-footer ul { gap: 0; }
  .site-footer ul a, .footer-bottom a { display: inline-block; padding: 10px 0; }
  .footer-bottom nav { gap: 4px 18px; }
  .crumbs a { display: inline-block; padding: 8px 0; }
  .details a { display: inline-block; padding: 6px 0; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.project h3 a { display: block; padding: 6px 0; }

/* Team portraits */
.member-photo { width: 120px; height: 120px; }
.member-links { flex-wrap: wrap; gap: 4px 16px; }
