/* ===== MADAR — colors and sizes in one place ===== */
:root {
  --night: #04070A;      /* page background, same as the logo background */
  --deep: #0B120D;       /* slightly lighter panels */
  --line: #1D2A1F;       /* thin borders */
  --mist: #E6EDE0;       /* main text */
  --moss: #93A28A;       /* secondary text */
  --lime: #C6F432;       /* brand color */
  --gold: #E3B04B;       /* warm accent from the logo */
  --radius: 14px;
  --gutter: clamp(16px, 5vw, 56px);
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--mist);
  font-family: "Readex Pro", system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px;
  background: var(--lime); color: var(--night); padding: 8px 14px; border-radius: 8px;
  font-weight: 500; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* ===== Top bar ===== */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 24px;
  max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--night) 88%, transparent);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 1.2rem; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--moss); font-size: .95rem; }
.nav a:hover { color: var(--mist); }
.lang {
  font: inherit; font-size: .9rem; color: var(--mist);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
}
.lang:hover { border-color: var(--lime); }

/* ===== Hero ===== */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(32px, 7vw, 96px) var(--gutter) clamp(48px, 8vw, 112px);
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px;
}
.hero h1 {
  font-weight: 700;
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0 0 22px;
  max-width: 15ch;
  text-wrap: balance;
}
html[lang="en"] .hero h1 { line-height: 1.08; letter-spacing: -.025em; max-width: 16ch; }
.lead { color: var(--moss); font-size: 1.15rem; max-width: 46ch; margin: 0 0 32px; }

.hero-mark { position: relative; aspect-ratio: 1; }
.hero-mark img {
  width: 100%; height: 100%; object-fit: contain;
  /* fade the square edges of the logo picture into the page */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.orbit { position: absolute; inset: -12%; width: 124%; height: 124%; overflow: visible; }
.orbit path { fill: none; stroke: var(--line); stroke-width: 1; }
.orbit .sat { fill: var(--lime); filter: drop-shadow(0 0 6px var(--lime)); }

/* ===== Buttons ===== */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px;
  padding: 0 22px; border-radius: 999px;
  font-weight: 500; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s;
}
.btn.primary { background: var(--lime); color: var(--night); }
.btn.primary:hover { background: #d8ff5c; }
.btn.ghost { border: 1px solid var(--line); color: var(--mist); }
.btn.ghost:hover { border-color: var(--mist); }

/* ===== Sections ===== */
.block, .contact {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
  border-top: 1px solid var(--line);
}
h2 { font-weight: 500; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.3; margin: 0 0 36px; }
h3 { font-weight: 500; font-size: 1.2rem; line-height: 1.4; margin: 0 0 8px; color: var(--mist); }
.note { color: var(--moss); margin: -20px 0 28px; max-width: 60ch; }

/* Services: plain list split by lines, not boxed cards */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.services li { padding: 0 28px; border-inline-start: 1px solid var(--line); }
.services li:first-child { padding-inline-start: 0; border-inline-start: 0; }
.services p { margin: 0; color: var(--moss); max-width: 34ch; }

/* Steps: a real sequence, so numbers are meaningful */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: 640px; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 52px 1fr; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  font-weight: 700; font-size: 1.4rem; color: var(--lime);
}
.steps p { margin: 0; font-size: 1.1rem; }

/* Demo links */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.demo {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 170px; padding: 22px;
  background: var(--deep); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color .2s;
}
.demo:hover { border-color: var(--gold); }
.demo-name { font-size: 1.35rem; font-weight: 500; }
.demo-open { color: var(--gold); font-size: .95rem; }

/* Contact */
.contact h2 { margin-bottom: 12px; }
.contact > p { color: var(--moss); margin: 0 0 28px; max-width: 52ch; }
.contact .phone { margin-top: 20px; }
.contact .phone a { color: var(--moss); text-decoration: none; }
.contact .phone a:hover { color: var(--mist); }

.foot { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; color: var(--moss); font-size: .9rem; border-top: 1px solid var(--line); }
.foot p { margin: 0; }

/* ===== Mobile ===== */
@media (max-width: 820px) {
  .nav { display: none; }
  .lang { margin-inline-start: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-mark { order: -1; width: min(72vw, 320px); margin: 0 auto; }
  .services, .work { grid-template-columns: 1fr; }
  .services li { padding: 22px 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .services li:first-child { padding-top: 0; border-top: 0; }
  .demo { min-height: 120px; }
}

/* 404 page */
.notfound { border-top: 0; min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.notfound img { width: 120px; margin-bottom: 24px; }
.notfound h1 { font-weight: 500; font-size: 2rem; margin: 0 0 12px; }
.notfound p { color: var(--moss); margin: 0 0 28px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit .sat { display: none; }
}
