/* =========================================================
   Konilabs — Design system & layout
   Mobile-first, vanilla CSS. No dependencies.
   ========================================================= */

:root {
  /* Palette */
  --bg: #FFFFFF;
  --bg-alt: #F7F9FC;
  --ink: #1A2233;
  --muted: #6B7689;
  --primary: #1E4FFF;
  --primary-ink: #173FCC;
  --deep: #0B2A6B;
  --border: #E4E9F2;

  /* Surfaces & effects */
  --shadow-sm: 0 1px 2px rgba(16, 33, 71, .04), 0 4px 12px rgba(16, 33, 71, .05);
  --shadow-md: 0 6px 24px rgba(16, 33, 71, .08), 0 2px 6px rgba(16, 33, 71, .05);
  --radius: 8px;
  --radius-lg: 16px;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1140px;
  --gutter: 20px;
  --header-h: 72px;

  /* Motion */
  --ease: cubic-bezier(.16, .84, .44, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-ink); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* Account for sticky header on anchor jumps */
:target { scroll-margin-top: calc(var(--header-h) + 16px); }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible {
  outline: 3px solid rgba(30, 79, 255, .45);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .98rem;
  border: 1.5px solid transparent;
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-ink); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-ink); background: rgba(30, 79, 255, .04); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  transition: height .25s var(--ease);
}
.site-header.scrolled .header-inner { height: 60px; }
.brand { display: inline-flex; align-items: center; margin-right: auto; }
.brand img { height: 26px; width: auto; }

.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: .96rem;
  padding: 6px 0;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width .2s var(--ease);
}
.main-nav a:hover { color: var(--primary); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Language switch */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; }
.lang-btn {
  background: none;
  border: 0;
  padding: 4px 4px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
  transition: color .15s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed="true"] { color: var(--primary); }
.lang-sep { color: var(--border); font-size: .85rem; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 10px;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 84px);
  background:
    radial-gradient(1100px 460px at 78% -8%, rgba(30, 79, 255, .10), transparent 60%),
    radial-gradient(800px 360px at 5% 8%, rgba(11, 42, 107, .06), transparent 55%),
    var(--bg);
}
.hero-inner { max-width: 760px; }
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-weight: 800;
  margin: 14px 0 18px;
}
.hero .lead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 620px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 0; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.trust-strip li {
  position: relative;
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink);
  padding-left: 20px;
}
.trust-strip li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.lead { color: var(--muted); }

/* ---------- Services cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d4dcec; }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(30, 79, 255, .08);
  color: var(--primary);
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; }

/* ---------- Approach timeline ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.step {
  position: relative;
  padding-top: 28px;
}
.step::before {
  content: "";
  position: absolute;
  top: 9px; left: 0;
  width: 100%; height: 2px;
  background: var(--border);
}
.step::after {
  content: "";
  position: absolute;
  top: 4px; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 79, 255, .14);
}
.step-num {
  display: block;
  font-size: .85rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Why / features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}
.feature { display: flex; gap: 18px; align-items: flex-start; }
.feature-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(11, 42, 107, .07);
  color: var(--deep);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 5px; }
.feature p { color: var(--muted); font-size: .96rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-intro h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin: 8px 0 14px; }
.contact-meta { margin-top: 32px; display: grid; gap: 18px; }
.contact-meta li { display: flex; flex-direction: column; gap: 2px; }
.contact-meta-label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--muted);
}
.contact-meta a { font-size: 1.05rem; font-weight: 600; }

.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 7px;
}
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 79, 255, .15);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #d4344e;
}
.field-error {
  display: block;
  min-height: 1em;
  margin-top: 5px;
  font-size: .82rem;
  color: #c32440;
}
.form-status {
  margin-top: 14px;
  font-size: .92rem;
  font-weight: 600;
  min-height: 1.2em;
}
.form-status.success { color: #0f7a3d; }
.form-status.error { color: #c32440; }

/* ---------- Footer ---------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 52px 0 26px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-brand img { height: 26px; margin-bottom: 12px; }
.footer-baseline { color: var(--muted); font-size: .95rem; }
.footer-nav ul { display: grid; gap: 10px; }
.footer-nav a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.footer-nav a:hover { color: var(--primary); }
.footer-side { display: grid; gap: 16px; justify-items: start; }
.footer-email { font-weight: 600; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.footer-bottom p { color: var(--muted); font-size: .88rem; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-side { grid-column: 1 / -1; }
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }

  .header-cta { display: none; }
  .main-nav .lang-mobile { display: block; }

  /* Mobile nav drawer */
  .burger { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .3s var(--ease), visibility .3s var(--ease);
  }
  .main-nav.open { max-height: 80vh; visibility: visible; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
  }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .main-nav li:last-child { border-bottom: 0; }
  .main-nav a { display: block; padding: 15px 2px; font-size: 1.05rem; }
  .main-nav a::after { display: none; }
}

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 22px 0 22px 28px; }
  .step::before { top: 0; left: 5px; width: 2px; height: 100%; }
  .step:last-child::before { height: 22px; }
  .step::after { top: 4px; left: 0; }
  .hero-cta .btn { flex: 1 1 auto; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
