@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --graphite: #22272E;
  --graphite-2: #2D343D;
  --line-dark: #3A424C;
  --accent: #6CB4EE;
  --accent-dark: #245A85;
  --text: #22272E;
  --text-soft: #4A525C;
  --on-dark: #FFFFFF;
  --on-dark-soft: #D3D8DE;
  --on-dark-muted: #B8C0C9;
  --bg-soft: #F2F3F5;
  --line: #DADDE1;
  --head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: #FFFFFF;
}
img { max-width: 100%; }
a { color: var(--accent-dark); }
a:hover { color: #1B4567; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--graphite); color: var(--on-dark); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: 40px; }
.lead { color: var(--text-soft); }
.section-dark .lead { color: var(--on-dark-muted); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #FFFFFF; color: var(--text); padding: 12px 16px; z-index: 10; }

/* Header */
.site-header { background: var(--graphite); color: var(--on-dark); position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 var(--line-dark); }
.site-header .bar { display: flex; align-items: center; gap: 12px 32px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo svg { height: 22px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 15px; margin-left: auto; }
.nav a { color: var(--on-dark-soft); text-decoration: none; padding: 9px 13px; border-radius: 999px; white-space: nowrap; transition: background-color .2s, color .2s; }
.nav a:hover { color: #FFFFFF; }
.nav a.active { color: #FFFFFF; background: var(--graphite-2); box-shadow: inset 0 0 0 1px var(--line-dark); }
.actions { display: flex; align-items: center; gap: 14px; flex: none; }
.lang { color: var(--on-dark-soft); text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; padding: 9px 6px; }
.lang:hover { color: #FFFFFF; }
.actions .btn { padding: 11px 18px; }
.actions .short { display: none; }
[id] { scroll-margin-top: 84px; }
.btn { display: inline-block; font-family: var(--body); font-weight: 600; text-decoration: none; border-radius: 6px; padding: 15px 28px; border: 1px solid transparent; cursor: pointer; font-size: 1rem; line-height: 1.2; }
.btn-accent { background: var(--accent); color: var(--graphite); }
.btn-accent:hover { background: #8AC4F2; color: var(--graphite); }
.btn-ghost { border-color: #5F6975; color: #FFFFFF; }
.btn-ghost:hover { border-color: #FFFFFF; color: #FFFFFF; }
.btn-dark { background: var(--graphite); color: #FFFFFF; }
.btn-dark:hover { background: #343B45; color: #FFFFFF; }

/* Hero */
.hero { background: var(--graphite); color: var(--on-dark); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: 50%; width: 340px; height: 340px; transform: translateY(-58%); opacity: 0.16; pointer-events: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 14% no-repeat, linear-gradient(var(--accent), var(--accent)) 0 50% / 100% 14% no-repeat, linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 14% no-repeat; }
.hero .wrap { position: relative; z-index: 1; padding-top: 88px; padding-bottom: 80px; }
.hero-inner { max-width: 820px; display: flex; flex-direction: column; gap: 24px; }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); font-weight: 700; line-height: 1.05; }
.hero-sub { font-size: 1.3rem; color: var(--on-dark-soft); max-width: 640px; }
.hero-sub2 { font-size: 1.05rem; color: var(--on-dark-muted); max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 40px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line-dark); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-family: var(--head); font-weight: 600; font-size: 1.45rem; }
.stat span { color: var(--on-dark-muted); font-size: 15px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 28px; display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; }
.card p { color: var(--text-soft); }
.card-top { border: 0; border-top: 3px solid var(--graphite); border-radius: 0; padding: 24px 28px; }
.note { margin-top: 36px; color: var(--text-soft); max-width: 900px; }
.note strong { color: var(--text); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.steps .num { font-family: var(--head); font-weight: 700; font-size: 2.2rem; color: var(--accent-dark); line-height: 1; }
.steps p { color: var(--text-soft); }

/* Cases */
.case { background: var(--graphite-2); border-radius: 8px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.case p { color: var(--on-dark-muted); }
.case .result { color: #FFFFFF; font-weight: 600; }
.more { margin-top: 32px; }
.more a { color: var(--accent); font-weight: 600; }
.case-full { border-top: 1px solid var(--line); padding: 40px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 48px; }
.case-full:first-of-type { border-top: 0; }
.case-full h2 { font-size: 24px; line-height: 1.25; }
.case-full dl { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.case-full dt { font-weight: 600; font-family: var(--head); }
.case-full dd { margin: 4px 0 0; color: var(--text-soft); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 56px; align-items: center; }
.about-photo { width: 100%; height: auto; display: block; border-radius: 8px; box-shadow: 16px 16px 0 var(--bg-soft); }
.about-text { display: flex; flex-direction: column; gap: 18px; max-width: 700px; }
.about p { color: var(--text-soft); }
.about .who { font-weight: 600; color: var(--text); }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
form.box { background: #FFFFFF; border-radius: 8px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea { font: inherit; padding: 12px 14px; border: 1px solid #8A99AB; border-radius: 6px; min-height: 46px; width: 100%; background: #FFFFFF; color: var(--text); }
.field textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; }
.small { font-size: 14px; color: var(--text-soft); }
.form-msg { display: none; background: #E8F2FB; border-left: 4px solid var(--accent-dark); padding: 12px 16px; font-size: 15px; }
.form-msg.show { display: block; }

/* Footer */
.site-footer { background: var(--graphite); color: var(--on-dark-muted); font-size: 14px; padding: 40px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.site-footer .col { display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--on-dark-soft); }
.site-footer .logo svg { height: 16px; margin-bottom: 6px; }

/* Plain pages */
.page-head { background: var(--graphite); color: #FFFFFF; padding: 56px 0; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-head p { color: var(--on-dark-soft); margin-top: 12px; max-width: 760px; }
.prose { max-width: 820px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 1.4rem; margin-top: 16px; }
.prose p, .prose li { color: var(--text-soft); }

@media (max-width: 1080px) {
  .nav a { padding: 9px 9px; font-size: 14px; }
  .site-header .bar { gap: 12px 16px; }
}

@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .section { padding: 60px 0; }
  .site-header .bar { flex-wrap: wrap; padding-top: 10px; padding-bottom: 0; gap: 8px 12px; }
  .logo svg { height: 18px; }
  .actions { margin-left: auto; gap: 8px; }
  .actions .btn { padding: 9px 14px; font-size: 14px; }
  .actions .full { display: none; }
  .actions .short { display: inline; }
  .nav { order: 3; flex: 0 0 calc(100% + 40px); margin: 0 -20px; padding: 6px 40px 10px 20px; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-top: 1px solid var(--line-dark); scroll-padding: 0 20px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 14px; padding: 8px 14px; background: var(--graphite-2); color: var(--on-dark-soft); flex: none; }
  .nav a.active { background: var(--accent); color: var(--graphite); font-weight: 600; box-shadow: none; }
  [id] { scroll-margin-top: 112px; }
  .hero::after { display: none; }
  .hero .wrap { padding-top: 48px; padding-bottom: 56px; }
  .hero-sub { font-size: 1.15rem; }
  .hero-cta .btn { flex: 1 1 100%; text-align: center; }
  .stats { grid-template-columns: 1fr; gap: 18px; margin-top: 40px; padding-top: 28px; }
  .stat { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
  .stat b { font-size: 1.25rem; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 320px; box-shadow: 12px 12px 0 var(--bg-soft); }
  .case-full { grid-template-columns: 1fr; }
  form.box { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
