/* Spinium — base + components */
:root {
  --c-blue: #0072CE;
  --c-blue-deep: #003D7A;
  --c-ink: #0a1a2f;
  --c-muted: #5b6b80;
  --c-bg: #ffffff;
  --c-surface: #f5f7fb;
  --c-border: #e3e8f0;
  --c-accent: #0072CE;
  --c-on-accent: #ffffff;

  --maxw: 1100px;
  --pad: clamp(1rem, 3vw, 2rem);
  --radius: 10px;
  --shadow-1: 0 1px 2px rgba(10,26,47,.06), 0 4px 16px rgba(10,26,47,.05);
  --shadow-2: 0 4px 24px rgba(10,26,47,.10);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-ink: #e8eef7;
    --c-muted: #98a6bc;
    --c-bg: #0b1320;
    --c-surface: #11192a;
    --c-border: #1f2a40;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
    --shadow-2: 0 4px 24px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-blue); color: #fff; padding: .5rem .75rem; border-radius: 6px;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .6rem var(--pad);
  display: flex; align-items: center; gap: 1rem;
}
.brand img { height: 40px; width: auto; }
@media (prefers-color-scheme: dark) {
  .brand img { filter: invert(.92) hue-rotate(180deg); }
}

.tabs {
  display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap;
}
.tab {
  appearance: none; border: 0; background: transparent;
  font: inherit; color: var(--c-muted);
  padding: .55rem .9rem; border-radius: 8px; cursor: pointer;
  position: relative; transition: color .15s, background .15s;
}
.tab:hover { color: var(--c-ink); background: var(--c-surface); }
.tab[aria-selected="true"] { color: var(--c-ink); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: 2px;
  height: 2px; background: var(--c-blue); border-radius: 2px;
}
.tab:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; }

.lang {
  display: flex; gap: 2px;
  border: 1px solid var(--c-border); border-radius: 999px; padding: 2px;
}
.lang-btn {
  appearance: none; border: 0; background: transparent;
  font: inherit; font-size: .78rem; letter-spacing: .06em; font-weight: 600;
  color: var(--c-muted); padding: .35rem .6rem; border-radius: 999px;
  cursor: pointer;
}
.lang-btn:hover { color: var(--c-ink); }
.lang-btn[aria-pressed="true"] {
  background: var(--c-blue); color: #fff;
}

.menu-toggle { display: none; }

@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: .5rem; }
  .brand { flex: 1; }
  .menu-toggle {
    display: inline-flex; flex-direction: column; gap: 4px; justify-content: center;
    width: 40px; height: 40px; padding: 0; border: 1px solid var(--c-border);
    background: transparent; border-radius: 8px; cursor: pointer;
  }
  .menu-toggle span {
    display: block; height: 2px; width: 18px; margin: 0 auto; background: var(--c-ink);
  }
  .tabs {
    order: 10; flex-basis: 100%; flex-direction: column; align-items: stretch;
    display: none;
  }
  .tabs.open { display: flex; }
  .tab[aria-selected="true"]::after { left: .9rem; right: auto; width: 18px; }
  .lang { order: 5; }
}

/* ---------- Panels / sections ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 2rem var(--pad) 4rem; }
.panel {
  animation: fade .35s ease both;
}
.panel[hidden] { display: none; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--c-ink);
  letter-spacing: -.01em;
  line-height: 1.15;
  margin: 0 0 .6rem;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: .5rem; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--c-muted); max-width: 60ch; }
.intro { color: var(--c-muted); max-width: 65ch; }

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 1.5rem; max-width: 760px; }
.hero-stripe {
  display: flex; gap: 0; width: 84px; margin-bottom: 1.5rem; border-radius: 3px; overflow: hidden;
  box-shadow: var(--shadow-1);
}
.hero-stripe span { display: block; height: 6px; flex: 1; }
.hero-stripe span:nth-child(1) { background: #0072CE; }
.hero-stripe span:nth-child(2) { background: #000; }
.hero-stripe span:nth-child(3) { background: #fff; outline: 1px solid var(--c-border); outline-offset: -1px; }

.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.05rem; border-radius: 999px;
  background: var(--c-blue); color: #fff !important; font-weight: 600;
  border: 1px solid var(--c-blue);
  transition: transform .12s ease, background .15s, box-shadow .15s;
}
.btn:hover { background: var(--c-blue-deep); text-decoration: none; box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--c-ink) !important; border-color: var(--c-border); }
.btn.ghost:hover { border-color: var(--c-blue); color: var(--c-blue) !important; background: transparent; }

.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; margin-top: 2.5rem;
}
.kpi {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 1rem 1.1rem; background: var(--c-surface);
}
.kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem; color: var(--c-blue); font-weight: 600;
}
.kpi span { color: var(--c-muted); font-size: .95rem; }

/* ---------- Services grid ---------- */
.grid {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.grid li {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 1.2rem; background: var(--c-bg);
  transition: transform .15s ease, box-shadow .2s ease, border-color .15s;
}
.grid li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--c-blue) 35%, var(--c-border));
}
.grid h3 { color: var(--c-blue); }
.grid p { color: var(--c-muted); margin: 0; }

/* ---------- About / facts ---------- */
.facts {
  display: grid; grid-template-columns: max-content 1fr;
  gap: .4rem 1.5rem;
  border-top: 1px solid var(--c-border);
  padding-top: 1rem; margin-top: 1rem;
  max-width: 640px;
}
.facts dt { color: var(--c-muted); }
.facts dd { margin: 0; }

/* ---------- Contact ---------- */
.contact-line { color: var(--c-muted); }
.contact-line a { font-weight: 600; }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  margin-top: 2rem;
}
.foot-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.25rem var(--pad);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  color: var(--c-muted); font-size: .9rem;
}
.foot-stripe { display: flex; width: 36px; border-radius: 2px; overflow: hidden; }
.foot-stripe span { display: block; height: 4px; flex: 1; }
.foot-stripe span:nth-child(1) { background: #0072CE; }
.foot-stripe span:nth-child(2) { background: #000; }
.foot-stripe span:nth-child(3) { background: #fff; outline: 1px solid var(--c-border); outline-offset: -1px; }
.foot p { margin: 0; }
.silent, .silent:hover, .silent:visited, .silent:focus {
  color: inherit;
  text-decoration: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
