/* ============================================================
   Immunity Systems — clean rebuild
   Single stylesheet, dark cyber-security theme
   ============================================================ */

:root {
  --bg:        #020101;
  --bg-section:#070B16;
  --bg-alt:    #0c111e;
  --fg:        #ffffff;
  --muted:     rgba(255, 255, 255, 0.66);
  --line:      rgba(255, 255, 255, 0.58);
  --accent:    #ffffff;
  --maxw:      1140px;
  --radius:    8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Exo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #fff; text-decoration: none; transition: opacity .25s ease; }
a:hover { opacity: .75; }
/* content links stay distinguishable with an underline */
.prose a, .site-footer a, .contact-card a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.5); }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 .6em; }

p { margin: 0 0 1rem; }

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

.accent { color: var(--accent); }

/* ---------- Site header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 24px; max-width: var(--maxw); margin: 0 auto;
}
.nav__logo img { height: 40px; width: auto; }
.nav__menu {
  list-style: none; display: flex; flex-wrap: nowrap;
  gap: 6px; margin: 0; padding: 0; align-items: stretch;
}
.nav__menu a {
  display: block; color: #fff; font-weight: 600; font-size: 15px;
  letter-spacing: .02em; padding: 8px 14px;
  border-top: 2px solid transparent; white-space: nowrap;
  transition: border-color .4s ease, color .25s ease;
}
.nav__menu a:hover,
.nav__menu a[aria-current="page"] { border-top-color: #fff; }
.nav__lang { display: flex; gap: 8px; font-size: 13px; }
.nav__lang a { color: var(--muted); }
.nav__lang a.is-active { color: #fff; border-bottom: 2px solid #fff; }

.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; padding: 0;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: ""; display: block; width: 24px; height: 2px; background: #fff;
  position: relative; margin: 0 auto; transition: .3s;
}
.nav__toggle span::before { position: absolute; top: -7px; }
.nav__toggle span::after  { position: absolute; top: 7px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 78vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 80px 24px;
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(2,1,1,.45), rgba(2,1,1,.85));
  z-index: -1;
}
.hero__logo { max-width: 540px; width: 80%; margin: 0 auto 28px; }
.hero__tagline { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 0 auto 28px; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; background: var(--bg-section); }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; margin-bottom: 44px; }
.section__head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); text-transform: uppercase; }
.section__head .divider {
  width: 70px; height: 3px; background: var(--accent);
  border-radius: 3px; margin: 16px auto 0;
}
.lead { color: var(--muted); max-width: 760px; margin: 0 auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 40px;
  font-weight: 700; letter-spacing: .03em;
  background: transparent; color: #fff;
  border: 2px solid #fff; transition: .25s;
}
.btn:hover { background: #fff; color: #0a0f1c; }

/* ---------- Card grid (services / nav cards) ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius); padding: 30px 26px;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.05); }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.card__img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 18px; }
a.card { color: inherit; display: block; }
a.card:hover h3 { color: var(--accent); }

/* ---------- Counters ---------- */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.counter__num { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; line-height: 1; color: #fff; }
.counter__num .star { color: var(--accent); }
.counter__label { color: var(--muted); margin-top: 10px; font-size: .98rem; }

/* ---------- Cert logos ---------- */
.certs {
  display: flex; flex-wrap: wrap; gap: 28px;
  align-items: center; justify-content: center;
  background: #fff; border-radius: var(--radius); padding: 34px 28px;
}
.certs img { height: 78px; width: auto; object-fit: contain; }

/* ---------- Article / prose ---------- */
.prose { max-width: 860px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; color: var(--muted); }
.prose li { margin-bottom: .5rem; }
.prose .muted, .prose p { color: var(--muted); }
.prose strong { color: #fff; }

/* ---------- Page hero (sub-pages) ---------- */
.page-hero { padding: 70px 0 0; text-align: center; background: var(--bg-section); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); text-transform: uppercase; }
.page-hero .divider { width: 70px; height: 3px; background: var(--accent); margin: 18px auto 0; border-radius: 3px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.contact-card {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding: 28px;
}
.contact-card h3 { font-size: 1.1rem; color: var(--accent); }
.contact-card p { color: var(--muted); margin-bottom: .4rem; }

/* ---------- EU grant box ---------- */
.grant-logos {
  display: block; margin: 0 auto 26px; max-width: 880px;
  background: #fff; border-radius: var(--radius); padding: 26px 34px;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.grant-logos img { width: 100%; height: auto; }
@media (max-width: 560px) { .grant-logos { padding: 18px 20px; } }
.funding-box {
  margin: 22px auto 0; max-width: 520px; padding: 26px 30px; text-align: left;
  border: 1px solid rgba(255,204,0,.5); border-left: 5px solid #FFCC00;
  border-radius: var(--radius); background: rgba(255,255,255,.04);
}
.funding-box .label { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; color: var(--muted); }
.funding-box .amount { margin: 0; font-size: 34px; font-weight: 700; line-height: 1.1; color: #fff; }

/* ---------- Product cards ---------- */
.products { display: grid; gap: 28px; max-width: 940px; margin: 40px auto 0; }
.product {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 34px 34px 30px;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.product:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.product__head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.product__head h2 { margin: 0; font-size: 1.55rem; }
.product__icon {
  width: 54px; height: 54px; flex: 0 0 auto; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
}
.product__icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.product__tag {
  margin-left: auto; font-size: .7rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; padding: 5px 13px; border-radius: 40px;
  border: 1px solid rgba(255,255,255,.28); color: var(--muted); white-space: nowrap;
}
.product p { color: var(--muted); }
.product p:last-child { margin-bottom: 0; }
.product ul { padding-left: 1.2rem; color: var(--muted); margin: 0 0 1rem; }
.product li { margin-bottom: .45rem; }
.product__link { font-weight: 600; }

/* coming-soon variant */
.product--soon { border-style: dashed; border-color: rgba(255,204,0,.45); background: linear-gradient(135deg, rgba(255,204,0,.05), rgba(255,255,255,.01)); }
.product--soon:hover { border-color: rgba(255,204,0,.75); }
.product--soon .product__icon { border-color: rgba(255,204,0,.5); }
.product--soon .product__icon svg { stroke: #FFCC00; }
.product--soon .product__tag { border-color: rgba(255,204,0,.6); color: #FFCC00; }

@media (max-width: 680px) {
  .product { padding: 26px 22px; }
  .product__tag { margin-left: 0; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-section); padding: 60px 0 0; border-top: 1px solid rgba(255,255,255,.07); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.site-footer img.f-logo { width: 230px; margin-bottom: 18px; }
.site-footer p { color: var(--muted); }
.site-footer h3 { font-size: 1.1rem; }
.social { display: flex; gap: 12px; margin-top: 18px; }
.social a {
  width: 40px; height: 40px; border-radius: 10%;
  display: grid; place-items: center; background: #69727d; color: #fff;
}
.social a:hover { background: #fff; }
.social a:hover svg { fill: #0a0f1c; }
.social svg { width: 20px; height: 20px; fill: #fff; }
.footer-bottom {
  margin-top: 46px; padding: 20px 0; text-align: center;
  border-top: 1px solid rgba(255,255,255,.07); color: var(--muted); font-size: .9rem;
}

/* ---------- Boot loader (hacker terminal) ---------- */
.boot {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: #02040a; overflow: hidden;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  transition: opacity .6s ease, visibility .6s ease;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__inner { width: min(580px, 88vw); position: relative; z-index: 2; }
.boot__logo {
  width: 290px; max-width: 72%; margin: 0 auto 30px; display: block;
  animation: bootGlitch 3.2s steps(1) infinite;
}
.boot__term {
  margin: 0 0 20px; color: #38ff9e; font-size: 13px; line-height: 1.75;
  white-space: pre-wrap; min-height: 10.5em;
  text-shadow: 0 0 8px rgba(56, 255, 158, .45);
}
.boot__term .ok    { color: #aaffcf; }
.boot__term .warn  { color: #ffd23d; }
.boot__term .dim   { color: rgba(56, 255, 158, .45); }
.boot__cursor { display: inline-block; width: 9px; height: 1em; vertical-align: -2px; background: #38ff9e; box-shadow: 0 0 8px #38ff9e; animation: bootCursor 1s steps(1) infinite; }
.boot__bar { height: 3px; background: rgba(56, 255, 158, .14); border-radius: 3px; overflow: hidden; }
.boot__bar span { display: block; height: 100%; width: 0; background: #38ff9e; box-shadow: 0 0 12px #38ff9e; transition: width .25s linear; }
.boot__status { margin-top: 11px; color: rgba(56, 255, 158, .72); font-size: 12px; letter-spacing: .04em; }
.boot__scan {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
  background: linear-gradient(rgba(56,255,158,0) 0, rgba(56,255,158,.06) 50%, rgba(56,255,158,0) 100%);
  background-size: 100% 7px; animation: bootScan 7s linear infinite;
}
@keyframes bootScan { from { background-position: 0 0; } to { background-position: 0 100%; } }
@keyframes bootCursor { 50% { opacity: 0; } }
@keyframes bootGlitch {
  0%, 90%, 100% { filter: none; transform: none; }
  91% { filter: drop-shadow(2px 0 #ff2d6b) drop-shadow(-2px 0 #2de2ff); transform: translateX(-2px); }
  94% { filter: drop-shadow(-3px 0 #ff2d6b) drop-shadow(3px 0 #2de2ff); transform: translateX(2px); }
  96% { filter: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .boot__logo, .boot__scan { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .counters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #070B16;
    border-bottom: 1px solid rgba(255,255,255,.1);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav__menu.is-open { max-height: 520px; }
  .nav__menu a { padding: 14px 24px; border-top: 0; border-bottom: 1px solid rgba(255,255,255,.06); text-align: center; }
  .nav__menu a:hover, .nav__menu a[aria-current="page"] { background: rgba(255,255,255,.08); border-top: 0; }
  .nav__lang { display: none; }
}
@media (max-width: 680px) {
  .grid--3, .grid--2, .grid--4, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .counters { grid-template-columns: 1fr 1fr; }
}
