:root {
  --navy: #0f2147;
  --navy-deep: #0a1834;
  --blue: #0b4fd6;
  --blue-dark: #083fae;
  --text: #4a556b;
  --muted: #6b7489;
  --line: #e3e8f1;
  --bg-soft: #f4f7fc;
  --icon-bg: #eaf0fa;
  --white: #ffffff;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(15, 33, 71, 0.04), 0 4px 16px rgba(15, 33, 71, 0.05);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--navy); margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; }
h3 { font-family: var(--serif); font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

svg { width: 1em; height: 1em; flex-shrink: 0; }

.container { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 2px 12px rgba(15, 33, 71, 0.05); }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.logo { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--navy); }
.logo-name { font-family: var(--serif); font-size: 1.7rem; letter-spacing: 0.02em; }
.logo-sub {
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  margin-top: 4px;
  color: var(--blue);
  padding-left: 0.42em;
}

.nav { display: flex; align-items: center; gap: 36px; font-size: 0.9rem; color: var(--navy); }
.nav a { position: relative; padding: 4px 0; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.icon-btn { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--navy); font-size: 1.1rem; display: flex; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 4px 0; transition: transform 0.2s, opacity 0.2s; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font: 500 0.95rem var(--sans);
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn svg { font-size: 1.1rem; transition: transform 0.2s; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { border-color: var(--blue); color: var(--navy); background: rgba(255, 255, 255, 0.7); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--icon-bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f5f8fd 0%, #eef3fb 100%);
  min-height: 560px;
  display: flex;
  align-items: center;
}
.hero-media {
  position: absolute;
  inset: 0 0 0 44%;
  background: url("assets/hero.jpg") left center / cover no-repeat;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -1px;
  width: 30%;
  background: linear-gradient(90deg, #f3f7fd 0%, rgba(243, 247, 253, 0.6) 40%, rgba(243, 247, 253, 0) 100%);
}
.hero-content { position: relative; padding: 80px 0; }
.hero-content > * { max-width: min(560px, 42vw); }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); margin-bottom: 20px; }
.hero-tagline { font-size: 1.25rem; color: var(--navy); font-weight: 500; margin-bottom: 14px; }
.hero-lead { font-size: 1.02rem; margin-bottom: 34px; max-width: 520px; }

/* Sections */
.section { padding: 88px 0; }
.section-title { text-align: center; font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 48px; }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow-light { color: #9fbaf5; }

.icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--icon-bg);
  color: var(--navy);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.45rem;
}

/* About */
.about { border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.about h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
.about-copy { display: grid; gap: 18px; font-size: 1.05rem; border-left: 2px solid var(--blue); padding-left: 28px; }

/* Services */
.services { background: var(--bg-soft); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #c9d6ef;
  box-shadow: 0 10px 28px rgba(15, 33, 71, 0.09);
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(11, 79, 214, 0.07), transparent 70%), var(--white);
}
.card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.card .icon-circle { transition: background 0.2s, color 0.2s; }
.card:hover .icon-circle { background: var(--blue); color: var(--white); }
.card h3 { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-arrow { color: var(--blue); font-size: 1.1rem; transition: transform 0.2s; }
.card:hover .card-arrow { transform: translateX(4px); }
.card-body { flex: 1; }
.card p { font-size: 0.93rem; color: var(--muted); }

/* Why */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.feature { display: flex; gap: 16px; padding: 4px 24px; border-left: 1px solid var(--line); }
.feature:first-child { border-left: 0; padding-left: 0; }
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: 0.9rem; color: var(--muted); }

/* Process */
.process { background: var(--bg-soft); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: repeating-linear-gradient(90deg, #b8c7e6 0 6px, transparent 6px 12px);
}
.steps::after {
  content: "";
  position: absolute;
  top: 23px;
  left: 12%;
  height: 2px;
  width: calc(76% * var(--progress, 0));
  background: var(--blue);
  transition: width 0.6s ease;
}
.step { position: relative; text-align: center; padding: 0 8px 12px; cursor: pointer; border-radius: var(--radius); }
.step:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.step h3, .step p { transition: color 0.3s; }
.step.active h3 { color: var(--blue); }
.step.active p { color: var(--text); }
.step-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font: 700 1.1rem var(--serif);
  position: relative;
  z-index: 1;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.step:hover .step-num { transform: scale(1.06); }
.step.done .step-num { background: var(--icon-bg); }
.step.active .step-num {
  background: var(--blue);
  color: var(--white);
  transform: scale(1.12);
  box-shadow: 0 0 0 7px rgba(11, 79, 214, 0.12);
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.92rem; color: var(--muted); }

/* Careers */
.careers {
  background:
    radial-gradient(circle at 85% 20%, rgba(11, 79, 214, 0.35), transparent 50%),
    linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: #c9d3e6;
}
.careers-inner { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; max-width: 960px; }
.careers-icon {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 4rem;
  color: #9fbaf5;
  background: rgba(255, 255, 255, 0.04);
}
.careers h2 { color: var(--white); font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 18px; }
.careers-copy p:not(.eyebrow) { margin-bottom: 14px; font-size: 1.02rem; }
.careers .btn { margin-top: 14px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.contact h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 18px; }
.contact-lead { font-size: 1.1rem; }
.contact-form {
  display: grid;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 500; color: var(--navy); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font: 400 0.95rem var(--sans);
  color: var(--navy);
  padding: 11px 12px;
  border: 1px solid #d3dbe8;
  border-radius: 3px;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form textarea { resize: vertical; }
.contact-form :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 79, 214, 0.12);
}
.contact-form .invalid { border-color: #c62828; }

.service-picker { border: 0; margin: 0; padding: 0; min-width: 0; }
.service-picker[hidden] { display: none; }
.service-picker legend { font-size: 0.85rem; font-weight: 500; color: var(--navy); padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-form .chip { display: inline-flex; position: relative; }
.contact-form .chip input { position: absolute; inset: 0; opacity: 0; margin: 0; padding: 0; cursor: pointer; }
.chip span {
  padding: 7px 14px;
  border: 1px solid #d3dbe8;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover span { border-color: var(--blue); }
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(11, 79, 214, 0.2); }
.contact-form .btn { justify-self: start; }
.form-status { font-size: 0.9rem; min-height: 1.4em; }
.form-status.ok { color: #1b7a3d; }
.form-status.err { color: #c62828; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #93a0ba; padding: 40px 0; font-size: 0.88rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.logo-footer { color: var(--white); }
.logo-footer .logo-name { font-size: 1.35rem; }
.logo-footer .logo-sub { color: #9fbaf5; }
.footer-nav { display: flex; gap: 28px; }
.footer-nav a:hover { color: var(--white); }

/* Scroll progress + back to top */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60;
}
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(10, 24, 52, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  z-index: 40;
}
.to-top svg { transform: rotate(-90deg); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--blue); }

/* Search */
.search-dialog {
  width: min(640px, 100% - 32px);
  margin: 12vh auto auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(10, 24, 52, 0.3);
}
.search-dialog[open] { animation: pop 0.18s ease; }
.search-dialog::backdrop { background: rgba(10, 24, 52, 0.45); backdrop-filter: blur(3px); }
.search-box { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 1.15rem; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 1.05rem var(--sans); color: var(--navy); }
kbd {
  font: 500 0.72rem var(--sans);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--muted);
}
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 55vh; overflow-y: auto; }
.search-results:empty { display: none; }
.result {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.search-results li.active .result { background: var(--bg-soft); }
.result-section { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.result-title { display: block; font-family: var(--serif); font-weight: 700; color: var(--navy); margin: 2px 0; }
.result-snippet { display: block; font-size: 0.85rem; color: var(--muted); }
.search-results mark { background: rgba(11, 79, 214, 0.14); color: inherit; border-radius: 2px; padding: 0 1px; }
.search-empty { padding: 24px 20px; text-align: center; color: var(--muted); }
.search-foot { display: flex; gap: 18px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }

.flash { animation: flash 1.6s ease; border-radius: var(--radius); }

@keyframes flash {
  20% { background-color: rgba(11, 79, 214, 0.1); box-shadow: 0 0 0 6px rgba(11, 79, 214, 0.1); }
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes hero-in { from { opacity: 0; transform: scale(1.04); } }

/* Hero entrance */
.hero-content > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-content > :nth-child(2) { animation-delay: 0.08s; }
.hero-content > :nth-child(3) { animation-delay: 0.16s; }
.hero-content > :nth-child(4) { animation-delay: 0.24s; }
.hero-media { animation: hero-in 1.2s ease both; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-content > *, .hero-media, .search-dialog[open], .flash { animation: none; }
}

/* Responsive */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .feature:nth-child(3) { border-left: 0; padding-left: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps::before, .steps::after { display: none; }
}

@media (max-width: 820px) {
  .nav { gap: 24px; }
}

@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .icon-btn { align-self: flex-start; margin-top: 10px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

@media (max-width: 820px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-media { position: relative; inset: auto; height: 280px; order: 2; }
  .hero-media::before { background: linear-gradient(180deg, #f3f7fd 0%, rgba(243, 247, 253, 0) 30%); }
  .hero-content { padding: 56px 0 40px; }
  .hero-content > * { max-width: none; }
  .hero-media::before { width: 100%; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .careers-inner { grid-template-columns: 1fr; gap: 32px; }
  .careers-icon { width: 96px; height: 96px; font-size: 2.6rem; }
  .section { padding: 64px 0; }
}

@media (max-width: 560px) {
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .feature { border-left: 0; padding: 0; }
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}
