/* ──────────────────────────────────────────────────────────────────────────
   KEVIAN Solutions · Brand System (Web)
   Strict implementation of Branding Manual 2026.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  /* ── Core palette ── */
  --navy:        #0A2540;
  --navy-2:      #143356;
  --navy-3:      #1E4670;
  --teal:        #00BFA6;
  --teal-2:      #00D9BC;
  --teal-soft:   rgba(0, 191, 166, 0.08);
  --teal-line:   rgba(0, 191, 166, 0.22);
  --blanc:       #F4F4F4;
  --blanc-2:     #FAFAFA;
  --white:       #FFFFFF;

  /* ── Alt / accents ── */
  --noir:        #000000;
  --neon:        #00FF85;
  --or:          oklch(74% 0.11 78);

  /* ── Neutral system ── */
  --ink:         #0A2540;          /* alias of navy for body text */
  --mid:         #6A7A8A;
  --mid-2:       #8A98A8;
  --rule:        #E0E4E8;
  --rule-2:      #EDEFF2;
  --rule-dark:   rgba(255, 255, 255, 0.08);

  /* ── Semantic ── */
  --danger:      #DC3232;
  --warning:     #E89B2C;

  /* ── Type ── */
  --head:        "Montserrat", sans-serif;
  --body:        "Inter", sans-serif;
  --accent:      "Space Grotesk", sans-serif;
  --mono:        "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* ── Layout ── */
  --max:         1240px;
  --max-narrow:  960px;
  --max-prose:   720px;
  --gutter:      clamp(20px, 4vw, 48px);

  /* ── Motion ── */
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::before, *::after { box-sizing: border-box; }

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

body {
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Typography primitives ── */
.eyebrow {
  font-family: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--teal);
  display: inline-block;
}
.eyebrow.no-line::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--head);
  color: var(--navy);
  letter-spacing: -0.02em;
}

.h-display {
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--navy);
}
.h-display em { font-style: normal; color: var(--teal); }

.h-section {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--navy);
}
.h-section em { font-style: normal; color: var(--teal); }

.kicker {
  font-family: var(--head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--mid);
  max-width: 60ch;
}

.body-lg { font-size: 17px; line-height: 1.65; color: var(--mid); }
.body-md { font-size: 15px; line-height: 1.65; color: var(--mid); }
.body-sm { font-size: 13px; line-height: 1.55; color: var(--mid); }

.mono { font-family: var(--accent); letter-spacing: 0.02em; }

/* ── Layout primitives ── */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { width: 100%; max-width: var(--max-narrow); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-prose { width: 100%; max-width: var(--max-prose); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--rule); }
section.no-rule { border-top: none; }
section.tight { padding: clamp(56px, 7vw, 88px) 0; }
section.dark { background: var(--navy); color: rgba(255, 255, 255, 0.78); border-color: rgba(255,255,255,0.08); }
section.dark h1, section.dark h2, section.dark h3, section.dark h4 { color: #fff; }
section.dark .eyebrow { color: var(--teal); }
section.dark .lead, section.dark .body-lg, section.dark .body-md { color: rgba(255, 255, 255, 0.62); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  font-family: var(--head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: var(--teal-2); }
.btn-dark {
  background: var(--navy);
  color: #fff;
}
.btn-dark:hover { background: var(--navy-2); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--navy); }
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}
.btn-ghost-light:hover { border-color: rgba(255,255,255,0.5); }
.btn-link {
  color: var(--navy);
  font-family: var(--head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--teal);
  cursor: pointer;
}
.btn-arrow::after {
  content: "→";
  font-family: var(--body);
  transition: transform 0.18s var(--ease);
}
.btn-arrow:hover::after { transform: translateX(4px); }
.btn[disabled] { opacity: 0.55; cursor: wait; transform: none; }

/* ── Form primitives ── */
.input {
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
  font-size: 15px;
  font-family: var(--body);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  width: 100%;
}
.input::placeholder { color: var(--mid-2); }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.18); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ── Logo mark ── */
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 191, 166, 0.18));
}
.logo-mark svg { width: 18px; height: 18px; position: relative; z-index: 1; }

.logo-wordmark {
  font-family: var(--head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
}
.logo-wordmark .accent { color: var(--teal); }

/* ── Pills, badges, chips ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-family: var(--head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
  background: #fff;
}
.pill.teal {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  color: var(--navy);
}
.pill.dark {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: #fff;
}
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.2);
}
.pill .dot.live { animation: pulseDot 2s ease infinite; }
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.2); }
  50%      { box-shadow: 0 0 0 7px rgba(0, 191, 166, 0.06); }
}

/* ── Reveal-on-scroll utility (set by JS) ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ── Site header (shared between landing + subpages) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-header .nav-links a {
  font-family: var(--head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 8px 14px;
  border-radius: 4px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.site-header .nav-links a:hover { color: var(--navy); background: var(--blanc); }
.site-header .nav-right { display: flex; align-items: center; gap: 12px; }

@media (max-width: 1080px) {
  .site-header .nav-right .btn { display: none; }
}
@media (max-width: 880px) {
  .site-header .nav-links { display: none; }
}

/* ── Lang switch ── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.lang-switch button {
  padding: 8px 10px;
  font-family: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  background: transparent;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.lang-switch button + button { border-left: 1px solid var(--rule); }
.lang-switch button:hover { color: var(--navy); }
.lang-switch button.active { background: var(--navy); color: #fff; }

/* ── Site footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.62);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer .foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
}
.site-footer h4 {
  font-family: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.site-footer a {
  font-family: var(--body);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.18s var(--ease);
}
.site-footer a:hover { color: var(--teal); }
.site-footer .foot-brand {
  display: flex; flex-direction: column; gap: 18px;
}
.site-footer .foot-brand .logo-wordmark { color: #fff; }
.site-footer .foot-tag {
  font-family: var(--body);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.65;
  max-width: 36ch;
}
.site-footer .foot-bottom {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--accent);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}
.site-footer .foot-bottom a { font-family: var(--accent); font-size: 11px; letter-spacing: 0.14em; }

@media (max-width: 880px) {
  .site-footer .foot-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer .foot-grid { grid-template-columns: 1fr; gap: 36px; }
}
