/* INFORMATION SECURITY Ltd site. Single dark look by choice: deep ultramarine ground from the mantle, grey-green stone from the wall. */
:root {
  --ground: #18245E;      /* deep ultramarine */
  --ground-2: #121B4A;    /* alternate sections */
  --ground-3: #1F2D6E;    /* cards */
  --line: #2C3A7D;
  --paper: #E6E8F6;       /* body text */
  --muted: #AEB5DA;
  --stone: #B3B19F;       /* headings accent */
  --mantle: #93A3E8;      /* links, buttons */
  --mantle-ink: #0E1433;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--paper); font: 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--mantle); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--mantle); outline-offset: 3px; }
.in { max-width: 1120px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); }
.narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bar { position: sticky; top: 0; z-index: 5; background: rgba(18, 27, 74, .94); border-bottom: 1px solid var(--line); }
.bar .in { display: flex; align-items: center; gap: 12px 24px; min-height: 64px; flex-wrap: wrap; padding-block: 10px; }
.brand img { display: block; height: 20px; width: auto; }
.bar nav { margin-left: auto; }
.bar ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; flex-wrap: wrap; }
.bar nav a { color: var(--paper); text-decoration: none; font-size: 15px; }
.bar nav a:hover { color: var(--mantle); }
.lang { font: 600 13px var(--mono); letter-spacing: .06em; color: var(--paper); text-decoration: none;
  border: 1px solid var(--line); padding: 5px 9px; }
.lang:hover { border-color: var(--mantle); color: var(--mantle); }
@media (max-width: 720px) { .bar nav { order: 3; width: 100%; margin: 0 0 10px; } .lang { margin-left: auto; } }

section { padding-block: 80px; }
section.alt { background: var(--ground-2); }
h2 { font-size: 30px; line-height: 1.2; margin: 0 0 22px; color: var(--stone); font-weight: 600; letter-spacing: .01em; }
h3 { font-size: 19px; margin: 0 0 10px; font-weight: 600; }
/* Left-aligned; justified text left wide gaps with long Bulgarian words. */
p { margin: 0 0 14px; max-width: 66ch; }

.hero { padding-block: 96px 88px; }
.hero .mark { display: block; width: 100%; }
.hero .in { text-align: center; }
.hero .since { font: 600 15px var(--mono); letter-spacing: .03em; color: var(--stone); margin: 0 auto 22px; max-width: none; text-wrap: balance; }
.hero .lead { font-size: 26px; line-height: 1.3; margin-bottom: 12px; text-wrap: balance; }
.hero .lead, .hero .sub { margin-inline: auto; }
.hero .sub { color: var(--muted); font-size: 18px; text-wrap: balance; }
.btn { display: inline-block; margin-top: 18px; background: var(--mantle); color: var(--mantle-ink); font-weight: 600;
  padding: 13px 22px; text-decoration: none; border: 0; font-size: 16px; cursor: pointer; }
.btn:hover, button:hover { background: var(--paper); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--ground-3); border: 1px solid var(--line); padding: 24px; }
.card p { color: var(--muted); font-size: 16px; margin: 0; }
.lead-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (max-width: 760px) { .lead-cards { grid-template-columns: minmax(0, 1fr); } }
.lead-card { border-left: 3px solid var(--stone); }
/* Text inside a box uses the full width of the box. */
.card p, .points li, .plate p, .in > p:not(.sub):not(.since):not(.lead) { max-width: none; }
.more { display: inline-block; margin-top: 12px; font-size: 15px; }
.intro { font-size: 18px; margin-bottom: 36px; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.points li { border-left: 3px solid var(--stone); padding: 10px 16px; background: var(--ground-3); color: var(--muted); font-size: 16px; }
.points b { color: var(--paper); font-weight: 600; }
.oss { margin: 24px 0 0; padding: 14px 18px; border-left: 3px solid var(--stone); background: var(--ground-3); max-width: none; font-size: 16px; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 820px) { .two { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; }
.steps li::before { content: counter(s); grid-row: span 2; font: 600 15px var(--mono); color: var(--mantle-ink);
  background: var(--stone); width: 32px; height: 32px; display: grid; place-items: center; }
.steps span { color: var(--muted); font-size: 16px; }
.creds { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.creds li { border-left: 3px solid var(--stone); padding: 10px 16px; background: var(--ground-3); }
.note { color: var(--muted); font-size: 16px; }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 26px; max-width: 860px; }
@media (max-width: 640px) { .form { grid-template-columns: minmax(0, 1fr); } }
.row { display: grid; gap: 6px; min-width: 0; }
.row.wide { grid-column: 1 / -1; }
label { font-size: 15px; }
abbr { color: var(--stone); text-decoration: none; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--paper); background: var(--ground);
  border: 1px solid var(--line); padding: 11px 12px; width: 100%; }
input::placeholder, textarea::placeholder { color: #7F88B6; }
textarea { resize: vertical; }
small { color: var(--muted); font-size: 14px; }
.check { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; }
.check input { width: 20px; height: 20px; margin-top: 3px; }
button { font: inherit; font-weight: 600; background: var(--mantle); color: var(--mantle-ink); border: 0; padding: 13px 26px; cursor: pointer; justify-self: start; }
.hp { position: absolute; left: -9999px; }

.page { padding-block: 64px 96px; }
.page h1 { font-size: 32px; color: var(--stone); margin: 0 0 20px; line-height: 1.2; }
.page h2 { font-size: 21px; margin: 32px 0 10px; color: var(--paper); }
.updated { color: var(--muted); font-size: 15px; }
.page ul { padding-left: 22px; max-width: 66ch; } .page li { margin-bottom: 8px; }

/* Threat panel: a dark instrument plate with live figures from CISA (refreshed by threats.js). */
.plate { background: #0B1030; border: 1px solid var(--line); padding: 22px 24px 18px; margin-top: 26px; }
.plate-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font: 600 14px var(--mono); letter-spacing: .04em;
  color: var(--stone); text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.plate-head .upd { margin-left: auto; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.live { width: 9px; height: 9px; border-radius: 50%; background: #D0161D; box-shadow: 0 0 8px rgba(208, 22, 29, .8); animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 22px; }
.tiles.yearly { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
@media (max-width: 760px) { .tiles, .tiles.yearly { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plate .tiles { grid-template-columns: minmax(0, 1fr); } }
.tile { border-left: 3px solid var(--stone); background: var(--ground-3); padding: 12px 16px; min-width: 0; }
.plate .tile { background: #121944; }
.tile b { display: block; font: 600 28px/1.2 var(--mono); color: var(--paper); }
.yearly .tile b { font: 600 21px/1.3 var(--body); }
@media (max-width: 760px) { .tile b { font-size: 22px; } .yearly .tile b { font-size: 18px; } }
.tile span { color: var(--muted); font-size: 15px; }
.plate h3 { font-size: 16px; color: var(--stone); margin: 18px 0 8px; }
.kev { list-style: none; margin: 0; padding: 0; }
.kev li { border-top: 1px solid #1E2862; padding: 10px 0; min-width: 0; }
.kev li div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 15px; }
.kev .d { font: 14px var(--mono); color: var(--muted); }
.kev .cve { font: 600 14px var(--mono); color: var(--mantle); }
.kev .prod { color: var(--paper); font-weight: 600; }
.plate .tag { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #F2D6D6; background: #6E1014; padding: 1px 7px; }
.kev p { margin: 3px 0 0; color: var(--muted); font-size: 15px; max-width: none; overflow-wrap: anywhere; }
.src { font-size: 14px; color: var(--muted); margin: 12px 0 0; max-width: none; }
.ic3-h { margin-top: 40px; color: var(--stone); }
.plate + .plate { margin-top: 22px; }
.plate .intro-p { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.plate .tag.state { color: var(--mantle-ink); background: var(--stone); }
.world { display: block; width: 100%; height: auto; margin-top: 8px; }
.world path { fill: #1A2457; stroke: #0B1030; stroke-width: .6; }
.world path.on.lvl1 { fill: #2C3A7D; } .world path.on.lvl2 { fill: #3E4F9C; }
.world path.on.lvl3 { fill: #5A6BB8; } .world path.on.lvl4 { fill: #7D8DD2; }
.world path.on:hover { fill: var(--stone); }
.world .marks circle { fill: rgba(208, 22, 29, .55); stroke: #F2D6D6; stroke-width: .8; }
.world .marks circle:hover { fill: rgba(208, 22, 29, .9); }
.countries { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.countries li { display: flex; gap: 6px; align-items: baseline; background: #121944; border-left: 2px solid var(--stone); padding: 3px 8px; font-size: 14px; }
.countries b { font: 600 13px var(--mono); color: var(--paper); }
.map-note { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.two-up { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 820px) { .two-up { grid-template-columns: minmax(0, 1fr); } }
.bars { display: block; width: 100%; height: 130px; margin-top: 6px; }
.bars rect { fill: var(--mantle); }
.bars rect:hover { fill: var(--paper); }
.axis { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--muted); margin-top: 4px; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; font-size: 15px; }
.rank .g { color: var(--paper); text-transform: capitalize; overflow-wrap: anywhere; }
.rank b { font: 600 14px var(--mono); color: var(--paper); }
.rank .meter { grid-column: 1 / -1; width: 100%; height: 6px; margin-top: 3px; background: #121944; }
.rank .meter rect { fill: #B0141A; }
.actors { list-style: none; margin: 0; padding: 0; }
.actors li { border-top: 1px solid #1E2862; padding: 10px 0; }
.actors li div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 15px; }
.actors .aka { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.kev a { color: var(--paper); }

footer { border-top: 1px solid var(--line); padding-block: 26px; font-size: 14px; color: var(--muted); }
footer .in { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
footer a { margin-left: auto; }

/* ---- Effects. Each one is switched on by a class on <html> (FX in build.py); all stop under reduced motion. ---- */

/* fx-light: soft light drifting across the hero, like light moving over the mantle's cloth. */
.fx-light .hero { position: relative; isolation: isolate; overflow: hidden; }
.fx-light .hero::before { content: ""; position: absolute; inset: -35%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 32% at 32% 42%, rgba(68, 89, 182, .55), transparent 70%),
    radial-gradient(30% 28% at 72% 62%, rgba(147, 163, 232, .20), transparent 70%),
    radial-gradient(45% 40% at 60% 20%, rgba(18, 27, 74, .70), transparent 70%);
  animation: fx-drift 26s ease-in-out infinite alternate; }
@keyframes fx-drift { from { transform: translate3d(-7%, -4%, 0) rotate(-3deg); } to { transform: translate3d(7%, 5%, 0) rotate(6deg); } }

/* fx-grain: fine stone grain over the whole page. */
.fx-grain body::after { content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* fx-sweep: a raking light passes over the wordmark, as when a surface is examined under oblique light.
   The mask leaves out the red F, so the light does not touch it. */
.mark-wrap { display: block; position: relative; width: min(820px, 100%); margin: 0 auto 34px; }
.mark-wrap .mark { margin: 0; }
.fx-sweep .mark-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 42%, rgba(240, 238, 225, .85) 50%, transparent 58%) no-repeat;
  background-size: 300% 100%; background-position: 150% 0;
  -webkit-mask: url("/assets/wordmark-latin-mask.svg") center / 100% 100% no-repeat; mask: url("/assets/wordmark-latin-mask.svg") center / 100% 100% no-repeat;
  animation: fx-sweep 11s 0.8s ease-in-out infinite; }
html[lang="bg"].fx-sweep .mark-wrap::after { -webkit-mask-image: url("/assets/wordmark-cyrillic-mask.svg"); mask-image: url("/assets/wordmark-cyrillic-mask.svg"); }
@keyframes fx-sweep { 0% { background-position: 150% 0; } 30%, 100% { background-position: -50% 0; } }

/* fx-reveal: sections below the first screen rise into place as they scroll in (fx.js marks them). */
.fx-reveal .fx-pending { opacity: 0; transform: translateY(16px); }
.fx-reveal .fx-in.fx-in { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }

/* fx-hover: service cards answer the pointer; a stone line draws along the top edge. */
.fx-hover .card { position: relative; transition: transform .25s ease, border-color .25s ease, background-color .25s ease; }
.fx-hover .card::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--stone);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.fx-hover .card:hover { transform: translateY(-3px); border-color: var(--mantle); background-color: #24337A; }
.fx-hover .card:hover::before { transform: scaleX(1); }
.fx-hover .btn, .fx-hover button { transition: background-color .2s ease, transform .2s ease; }
.fx-hover .btn:hover, .fx-hover button:hover { transform: translateY(-1px); }

/* fx-crt: on hover a service card turns into an old CRT screen: a coarse pixel grid, phosphor stripes, glowing text and a faint flicker. */
.fx-crt .card { position: relative; }
.fx-crt .card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s ease;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(5, 8, 24, .55) 100%),
    repeating-linear-gradient(0deg, rgba(5, 8, 24, .55) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(5, 8, 24, .45) 0 1px, rgba(208, 22, 29, .07) 1px 2px, rgba(120, 200, 140, .06) 2px 3px, rgba(147, 163, 232, .08) 3px 4px); }
.fx-crt .card:hover::after { opacity: 1; animation: fx-flicker 3.2s steps(1) infinite; }
.fx-crt .card:hover h3, .fx-crt .card:hover p { color: #E9F0DA;
  text-shadow: 0 0 6px rgba(200, 230, 190, .45), 1px 0 0 rgba(208, 22, 29, .55), -1px 0 0 rgba(147, 163, 232, .55); }
.fx-crt .card:hover { background-color: #0F1638; }
@keyframes fx-flicker { 0%, 100% { opacity: 1; } 8% { opacity: .82; } 9% { opacity: 1; } 52% { opacity: .9; } 53% { opacity: 1; } }

/* fx-bar: the header settles into a solid bar with a shadow once the page scrolls. */
.fx-bar .bar { transition: background-color .3s ease, box-shadow .3s ease; }
.fx-bar .bar.scrolled { background: rgba(14, 20, 56, .98); box-shadow: 0 8px 28px rgba(0, 0, 0, .35); }

@media (prefers-reduced-motion: reduce) {
  .fx-light .hero::before, .fx-sweep .mark-wrap::after { animation: none; }
  .fx-sweep .mark-wrap::after { display: none; }
  .fx-crt .card:hover::after { animation: none; }
  .live { animation: none; }
  .fx-reveal .fx-pending { opacity: 1; transform: none; }
  .fx-hover .card, .fx-hover .card::before, .fx-reveal .fx-in { transition: none; }
}
