/*
Theme Name: Souverain
Theme URI: https://souverain.pro
Author: Souverain
Description: Product site theme for Souverain, the sovereign European messenger. Blue-to-gray palette, no external requests.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
License: Proprietary
Text Domain: souverain
*/

:root {
  --blue: #2E4BA0;
  --blue-deep: #1C3070;
  --blue-ink: #14224F;
  --steel: #8CA6DB;
  --steel-soft: #A8B8D9;
  --slate: #6B7A99;
  --slate-dark: #3F4A63;
  --ink: #1E2538;
  --ink-soft: #4B5568;
  --gray-1: #F5F7FB;
  --gray-2: #E8ECF3;
  --gray-3: #D3D9E4;
  --white: #FFFFFF;
  --ok: #2F7D5B;
  --warn: #B7791F;
  --no: #A03A3A;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(20, 34, 79, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--white);
  line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--blue-ink); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--gray-2);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--blue-ink); font-weight: 800; letter-spacing: .14em; font-size: 15px; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--gray-3); border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--blue-ink); }
.nav-toggle svg { width: 22px; height: 22px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.site-nav li a { color: var(--slate-dark); font-weight: 600; font-size: 15px; }
.site-nav li a:hover { color: var(--blue); text-decoration: none; }
.lang { position: relative; margin: 0; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--gray-1); font-size: 13px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.lang[open] summary { background: var(--blue); color: #fff; }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--gray-2); border-radius: 14px; box-shadow: var(--shadow); width: 440px; max-width: calc(100vw - 32px); display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; max-height: 70vh; overflow: auto; }
.lang li a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.lang li a code { font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); width: 22px; }
.lang li a:hover { background: var(--gray-1); text-decoration: none; }
.lang li.current-lang a { background: var(--blue); color: #fff; }
.lang li.current-lang a code { color: rgba(255,255,255,.75); }
@media (max-width: 840px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: #fff; border-bottom: 1px solid var(--gray-2); padding: 16px 20px 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .lang ul { position: static; width: 100%; box-shadow: none; grid-template-columns: repeat(2, 1fr); max-height: none; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 12px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 16px; line-height: 1; border: 1px solid transparent; cursor: pointer; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 22px rgba(46,75,160,.28); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-light { background: #fff; color: var(--blue-ink); border-color: var(--gray-3); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--gray-1); }
.section-dark { background: linear-gradient(160deg, var(--blue-ink) 0%, var(--blue-deep) 55%, var(--blue) 100%); color: rgba(255,255,255,.88); }
.section-dark h2, .section-dark h3 { color: #fff; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.section-dark .eyebrow { color: var(--steel); }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 720px; }
.section-dark .lede { color: rgba(255,255,255,.8); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--blue-ink) 0%, var(--blue-deep) 50%, var(--blue) 100%); color: #fff; padding: 84px 0 96px; }
.hero::before { content: ""; position: absolute; inset: auto -20% -40% auto; width: 60%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(140,166,219,.35), transparent 70%); pointer-events: none; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 span { color: var(--steel); }
.hero .lede { color: rgba(255,255,255,.82); font-size: 20px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero .tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); margin-bottom: 20px; }
.hero .tag::before { content: ""; width: 26px; height: 2px; background: var(--steel); }
.hero .platforms { margin-top: 26px; font-size: 14px; color: rgba(255,255,255,.65); }
.hero .platforms b { color: rgba(255,255,255,.9); font-weight: 600; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding: 56px 0 64px; } }

/* phone mock */
.phone { width: 330px; max-width: 100%; margin: 0 auto; background: #0F1A3D; border-radius: 40px; padding: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.12); }
.phone .screen { background: var(--gray-1); border-radius: 28px; padding: 18px 16px 22px; color: var(--ink); }
.phone .screen-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.phone .screen-head strong { font-size: 16px; color: var(--blue-ink); }
.phone .screen-head small { color: var(--slate); font-size: 12px; font-weight: 600; }
.contact { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(20,34,79,.06); }
.contact .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--slate); flex: none; }
.contact .who { flex: 1; min-width: 0; }
.contact .who b { display: block; font-size: 14px; color: var(--ink); }
.contact .who span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--slate); }
.contact .who span i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.contact code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--slate-dark); background: var(--gray-1); padding: 3px 7px; border-radius: 6px; }
.sys-gov { background: #2E4BA0; } .sys-board { background: #5B6B8C; } .sys-rail { background: #3C7C8C; } .sys-retail { background: #8A6B3C; }
.phone .note { margin: 14px 4px 0; font-size: 12px; color: var(--slate); line-height: 1.45; }

/* ---------- feature grid ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--gray-2); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 0 rgba(20,34,79,.03); }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gray-1); color: var(--blue); display: grid; place-items: center; margin-bottom: 16px; }
.card .icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.section-dark .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.section-dark .card p { color: rgba(255,255,255,.75); }
.section-dark .card .icon { background: rgba(255,255,255,.1); color: var(--steel); }

/* ---------- systems ---------- */
.systems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .systems { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .systems { grid-template-columns: 1fr; } }
.system { border-radius: var(--radius); padding: 22px; color: #fff; min-height: 240px; display: flex; flex-direction: column; }
.system .kind { font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; opacity: .8; margin-bottom: 10px; }
.system h3 { color: #fff; font-size: 18px; margin-bottom: 2px; }
.system .who { font-size: 13px; opacity: .8; margin-bottom: 14px; }
.system ul { list-style: none; margin: auto 0 0; padding: 0; font-size: 13px; line-height: 1.5; }
.system ul li::before { content: "— "; opacity: .6; }
.system .example { font-size: 11px; opacity: .6; margin-top: 12px; font-style: italic; }
.diagram { margin-top: 40px; background: #fff; border: 1px solid var(--gray-2); border-radius: var(--radius); padding: 30px 24px; }
.diagram .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; text-align: center; }
@media (max-width: 600px) { .diagram .row { grid-template-columns: repeat(2, 1fr); } }
.diagram .node { border-radius: var(--radius-sm); padding: 14px 10px; font-size: 13px; font-weight: 700; color: #fff; }
.diagram .node small { display: block; font-weight: 500; opacity: .8; font-size: 12px; }
.diagram .tls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 6px 0; }
@media (max-width: 600px) { .diagram .tls { display: none; } }
.diagram .tls span { display: block; text-align: center; font-size: 11px; color: var(--slate); letter-spacing: .1em; }
.diagram .tls span::before { content: ""; display: block; width: 2px; height: 34px; margin: 0 auto 4px; background: repeating-linear-gradient(to bottom, var(--steel) 0 4px, transparent 4px 8px); }
.diagram .app { margin: 6px auto 0; max-width: 420px; background: var(--blue-ink); color: #fff; border-radius: var(--radius-sm); padding: 16px; text-align: center; font-weight: 700; }
.diagram .app small { display: block; font-weight: 500; color: var(--steel); font-size: 13px; }
.diagram .caption { text-align: center; margin: 18px 0 0; font-size: 14px; color: var(--ink-soft); }
.diagram .nolink { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--no); margin-top: 16px; }

/* ---------- why ---------- */
.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }
.why .item { padding: 26px 26px 26px 30px; border-left: 3px solid var(--steel); background: rgba(255,255,255,.05); border-radius: 0 var(--radius) var(--radius) 0; }
.why .item h3 { margin-bottom: 8px; }
.why .item p { margin: 0; color: rgba(255,255,255,.78); }

/* ---------- benchmark ---------- */
.bench-wrap { overflow-x: auto; border: 1px solid var(--gray-2); border-radius: var(--radius); background: #fff; }
table.bench { width: 100%; border-collapse: collapse; min-width: 860px; font-size: 14px; }
table.bench th, table.bench td { padding: 13px 14px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--gray-2); }
table.bench thead th { background: var(--blue-ink); color: #fff; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
table.bench thead th:nth-child(2) { background: var(--blue); }
table.bench td:first-child { font-weight: 700; color: var(--blue-ink); width: 20%; }
table.bench td:nth-child(2) { background: rgba(46,75,160,.06); }
table.bench tr.group td { background: var(--gray-1); color: var(--slate-dark); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; padding: 10px 14px; }
.m { display: inline-block; width: 20px; font-weight: 800; }
.m-ok { color: var(--ok); } .m-no { color: var(--no); } .m-mid { color: var(--warn); }
.bench-notes { font-size: 13px; color: var(--slate); margin-top: 16px; }
.bench-notes p { margin: 0 0 6px; }

/* ---------- cta band ---------- */
.band { background: linear-gradient(135deg, var(--blue-deep), var(--blue)); color: #fff; border-radius: 26px; padding: 52px 40px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; }
@media (max-width: 800px) { .band { grid-template-columns: 1fr; padding: 40px 26px; } }
.band h2 { color: #fff; margin-bottom: 10px; }
.band p { color: rgba(255,255,255,.82); margin: 0; }
.band .actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.band .contact-line { font-size: 15px; color: rgba(255,255,255,.85); }
.band .contact-line a { color: #fff; font-weight: 700; }

/* ---------- inner pages ---------- */
.page-head { background: var(--gray-1); padding: 56px 0 40px; border-bottom: 1px solid var(--gray-2); }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); margin: 0; }
.page-head .updated { color: var(--slate); font-size: 14px; margin: 8px 0 0; }
.prose { max-width: 760px; padding: 48px 20px 80px; margin: 0 auto; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose h3 { font-size: 18px; margin-top: 1.4em; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose .box { background: var(--gray-1); border: 1px solid var(--gray-2); border-radius: var(--radius-sm); padding: 18px 20px; margin: 22px 0; }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 28px 0; }
@media (max-width: 600px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-cards .card a { font-size: 18px; font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: var(--blue-ink); color: rgba(255,255,255,.7); padding: 44px 0 36px; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.site-footer .brand { color: #fff; }
.site-footer .brand img { width: 30px; height: 30px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer .tagline { width: 100%; color: var(--steel); font-size: 13px; }
