/* ==========================================================================
   Citadex Systems — corporate site styles
   Single stylesheet, no build step, no external dependencies except webfont.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #060a12;
  --bg-alt: #0a1120;
  --surface: #0e1626;
  --surface-2: #131e33;
  --border: rgba(148, 173, 216, 0.14);
  --border-strong: rgba(148, 173, 216, 0.26);

  --text: #e9eefb;
  --text-dim: #a8b6d1;
  --text-mute: #7d8daa;

  --accent: #4f8cff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(79, 140, 255, 0.12);

  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1180px;

  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.85);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 650;
}

h1 {
  font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.5rem);
}
h2 {
  font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.35rem);
}
h3 {
  font-size: 1.16rem;
}

p {
  margin: 0 0 1.1em;
  color: var(--text-dim);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

/* keep in-page anchors clear of the sticky header */
[id] {
  scroll-margin-top: 92px;
}

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

.section {
  padding: clamp(58px, 7vw, 104px) 0;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 46px;
}

.section-head p {
  font-size: 1.03rem;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}

.lead {
  font-size: clamp(1.03rem, 0.97rem + 0.3vw, 1.18rem);
  color: var(--text-dim);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  z-index: 200;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #3b6fe0);
  color: #fff;
  box-shadow: 0 12px 30px -14px rgba(79, 140, 255, 0.9);
}

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 10, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.06rem;
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand__name {
  color: var(--text);
}
.brand__name span {
  color: var(--accent-2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.16s ease, background 0.16s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.header-cta {
  display: inline-flex;
}

/* ---------- Language switch ---------- */
.lang-switch {
  position: relative;
  flex: none;
}

.lang-switch__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.lang-switch__toggle:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.lang-switch__globe {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--accent-2);
}

.lang-switch__chevron {
  flex: none;
  color: var(--text-mute);
  transition: transform 0.16s ease;
}

.lang-switch.is-open .lang-switch__chevron {
  transform: rotate(180deg);
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 152px;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.lang-switch.is-open .lang-switch__menu {
  display: flex;
}

.lang-switch__menu a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: background 0.14s ease, color 0.14s ease;
}

.lang-switch__menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.lang-switch__menu a.is-active {
  color: var(--accent-2);
  background: var(--accent-soft);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(64px, 8vw, 118px) 0 clamp(56px, 6vw, 92px);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      900px 520px at 18% 4%,
      rgba(79, 140, 255, 0.2),
      transparent 70%
    ),
    radial-gradient(720px 440px at 80% 0%, rgba(34, 211, 238, 0.13), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      to right,
      rgba(148, 173, 216, 0.06) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(148, 173, 216, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__inner {
  max-width: 800px;
}

.hero h1 {
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  font-size: clamp(1.04rem, 0.95rem + 0.45vw, 1.25rem);
  color: var(--text-dim);
  max-width: 660px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 26px;
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16);
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  position: relative;
  padding: clamp(52px, 6vw, 86px) 0 clamp(40px, 4vw, 60px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      820px 420px at 15% 0%,
      rgba(79, 140, 255, 0.17),
      transparent 70%
    ),
    radial-gradient(620px 360px at 85% 10%, rgba(34, 211, 238, 0.09), transparent 72%);
  pointer-events: none;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header p {
  max-width: 680px;
  margin-bottom: 0;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 16px;
}
.breadcrumb a:hover {
  color: var(--accent-2);
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(
    180deg,
    var(--surface) 0%,
    rgba(14, 22, 38, 0.6) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 140, 255, 0.28);
  color: var(--accent-2);
  margin-bottom: 18px;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-2);
}

.card__link:hover {
  gap: 11px;
}

/* ---------- Product visual cards (Solutions page) ---------- */
.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card__art {
  margin: -28px -26px 20px;
  padding: 18px 18px 6px;
  background: linear-gradient(160deg, rgba(79, 140, 255, 0.12), rgba(34, 211, 238, 0.04));
  border-bottom: 1px solid var(--border);
}

.product-card__art svg {
  width: 100%;
  height: auto;
  display: block;
}

.product-card__art--photo {
  padding: 0;
  aspect-ratio: 8 / 5;
  overflow: hidden;
}

.product-card__art--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Clients ---------- */
.clients {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.client-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.client-card:hover {
  border-color: var(--border-strong);
}

.client-card img {
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ---------- Feature list ---------- */
.ticks {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.ticks li {
  position: relative;
  padding-left: 28px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

/* ---------- Vendor strip ---------- */
.vendors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.vendors li {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-top: 20px;
  max-width: 760px;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.stat {
  border-left: 2px solid rgba(79, 140, 255, 0.5);
  padding-left: 18px;
}

.stat__value {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.1;
  overflow-wrap: break-word;
  hyphens: auto;
}

.stat__label {
  font-size: 0.87rem;
  color: var(--text-mute);
}

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
}

.panel h3 {
  margin-bottom: 16px;
}

/* ---------- Detail blocks (services page) ---------- */
.detail {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.detail:first-of-type {
  border-top: none;
  padding-top: 8px;
}

.detail__index {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.detail h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}

/* ---------- Long-form prose (legal pages) ---------- */
.prose {
  max-width: 820px;
}

.prose h2 {
  font-size: clamp(1.22rem, 1.05rem + 0.7vw, 1.5rem);
  margin-top: 2.4em;
  padding-top: 0.2em;
}

.prose h2:first-child {
  margin-top: 0;
}

/* ---------- Definition rows (contact / legal) ---------- */
.rows {
  display: grid;
  gap: 0;
}

.row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.row:last-child {
  border-bottom: none;
}

.row dt {
  color: var(--text-mute);
}

.row dd {
  margin: 0;
  color: var(--text);
}

.row dd a:hover {
  color: var(--accent-2);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(34px, 4.5vw, 58px);
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.16), rgba(34, 211, 238, 0.07)),
    var(--surface);
}

.cta-band h2 {
  margin-bottom: 12px;
}

.cta-band p {
  max-width: 560px;
  margin-bottom: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 58px 0 30px;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.site-footer h4 {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 16px;
  font-weight: 600;
}

.site-footer p {
  font-size: 0.9rem;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--text-dim);
}

.footer-links a:hover {
  color: var(--accent-2);
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  color: var(--text-mute);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .clients {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-cta {
    display: none;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 24px 22px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
    font-size: 1rem;
  }
}

@media (max-width: 400px) {
  .brand__name {
    font-size: 0.92rem;
  }
  .lang-switch__toggle {
    padding: 6px 9px;
    font-size: 0.72rem;
  }
}

@media (max-width: 620px) {
  .grid--4,
  .grid--3,
  .grid--2,
  .stats,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .clients {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-row {
    flex-direction: column;
  }
}

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