@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #11233d;
  --blue: #2157ca;
  --blue-bright: #4479ff;
  --navy: #071a33;
  --sky: #edf4ff;
  --paper: #f8faff;
  --muted: #5a687e;
  --line: #dbe3ef;
  --motion-enter: 620ms;
  --motion-fast: 150ms;
  --motion-ease-out: cubic-bezier(.22, 1, .36, 1);
  --motion-ease-move: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible,
button:focus-visible { outline: 3px solid #7ba3ff; outline-offset: 3px; }
.wrap { width: min(1220px, calc(100% - 56px)); margin-inline: auto; }
.narrow { max-width: 990px; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 88px;
  border-bottom: 1px solid #dce6f4;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 28px rgba(8, 27, 51, .06);
  backdrop-filter: blur(12px);
  transition: box-shadow 180ms ease, background-color 180ms ease;
}
.has-scrolled .site-header { background: rgba(255, 255, 255, .98); box-shadow: 0 10px 30px rgba(20, 30, 50, .1); }
.nav-shell { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; width: 88px; height: 74px; align-items: center; flex: 0 0 auto; }
.brand img { width: 100%; height: 100%; object-fit: contain; }
.nav-shell nav { display: flex; gap: 33px; color: #344761; font-size: 15px; font-weight: 700; }
.nav-shell nav a { position: relative; text-decoration: none; transition: color var(--motion-fast) ease; }
.nav-shell nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform var(--motion-fast) ease;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 21px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-bright), #2751d8);
  color: #fff;
  box-shadow: 0 14px 28px rgba(39, 81, 216, .26);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.nav-cta { min-height: 44px; padding: 10px 16px; font-size: 13px; }
.mobile-nav-toggle { display: none; }

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 108px 0 104px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(86, 128, 255, .44), transparent 22%),
    radial-gradient(circle at 68% 76%, rgba(0, 207, 180, .14), transparent 25%),
    linear-gradient(126deg, #071a33 5%, #0c2851 61%, #173e71 100%);
}
.page-hero::before,
.page-hero::after { content: ""; position: absolute; z-index: -1; border: 1px solid rgba(162, 191, 255, .2); border-radius: 50%; }
.page-hero::before { width: 620px; height: 620px; left: -330px; top: -300px; }
.page-hero::after { width: 460px; height: 460px; right: -150px; bottom: -280px; }
.eyebrow {
  margin: 0;
  color: var(--blue);
  font: 700 13px "DM Mono", monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.page-hero .eyebrow { color: #a9c2ff; }
.page-hero h1 {
  max-width: 970px;
  margin: 19px 0 25px;
  font-size: clamp(48px, 6.25vw, 78px);
  line-height: 1.03;
  letter-spacing: -.062em;
}
.intro { max-width: 820px; margin: 0 0 32px; color: #d4e1f7; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.67; }
.hero-button span,
.button.light span { transition: transform 180ms ease; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 92px; padding: 104px 0 96px; }
.content-section { padding: 0 0 58px; margin: 0 0 58px; border-bottom: 1px solid var(--line); }
.content-section:last-child { margin-bottom: 0; border: 0; }
.content-section h2 { margin: 0 0 24px; font-size: clamp(30px, 3.5vw, 44px); line-height: 1.14; letter-spacing: -.04em; }
.content-section p,
.content-section li { color: #46566c; font-size: 17px; }
.content-section p { margin: 0; }
.content-section li + li { margin-top: 10px; }
.content-section ul,
.content-section ol { padding-left: 25px; margin-block: 0; }
.content-section li::marker { color: var(--blue); font-weight: 800; }
.article-layout aside {
  position: sticky;
  top: 118px;
  align-self: start;
  overflow: hidden;
  padding: 30px;
  border: 1px solid #d5e3fb;
  border-radius: 18px;
  background: linear-gradient(145deg, #f7faff, #e9f1ff);
  box-shadow: 0 18px 38px rgba(21, 47, 87, .08);
}
.article-layout aside::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--blue); }
.article-layout aside strong { display: block; font-size: 20px; line-height: 1.3; }
.article-layout aside p { margin: 12px 0 18px; color: #53647a; font-size: 15px; }
.article-layout aside a { color: var(--blue); font-size: 14px; font-weight: 800; }
.article-layout aside a span { display: inline-block; transition: transform 180ms ease; }

.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.mini-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.mini-grid h3 { margin: 0 0 8px; font-size: 17px; }
.mini-grid p { margin: 0; font-size: 14px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.portfolio-grid a {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #edf4ff);
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.portfolio-grid strong { font-size: 20px; line-height: 1.3; }
.portfolio-grid span { margin-top: 5px; color: var(--muted); font-size: 14px; }

.related { padding-bottom: 104px; }
.related > .eyebrow { margin-bottom: 18px; }
.related > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.related a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 15px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.related a span { color: var(--blue); transition: transform 180ms ease; }

.cta { position: relative; overflow: hidden; padding: 112px 0; text-align: center; color: #fff; background: radial-gradient(circle at 10% 20%, rgba(105, 156, 255, .36), transparent 24%), linear-gradient(135deg, #0e3265, #3567f2); }
.cta::after { content: ""; position: absolute; width: 420px; height: 420px; right: -220px; bottom: -300px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.cta .eyebrow { color: #c4dbff; }
.cta h2 { max-width: 790px; margin: 13px auto 17px; font-size: clamp(36px, 5vw, 56px); line-height: 1.1; letter-spacing: -.045em; }
.cta p:not(.eyebrow) { margin: 0 auto 27px; color: #dce9ff; font-size: 18px; }
.button.light { background: #fff; color: #12315d; box-shadow: 0 15px 30px rgba(4, 24, 58, .22); }

footer { padding: 58px 0 20px; background: #f3f6fb; }
footer > .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 34px; }
footer > .wrap > div:first-child { max-width: 330px; }
footer > .wrap > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 22px; padding-top: 24px; }
footer a { font-size: 13px; font-weight: 700; text-decoration: none; }
footer p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.copyright { padding-top: 18px; margin: 34px 0 0; border-top: 1px solid var(--line); text-align: center; font-size: 12px; }

.motion-ready .motion-reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity var(--motion-enter) var(--motion-ease-out), transform var(--motion-enter) var(--motion-ease-out);
  transition-delay: calc(var(--motion-order, 0) * 55ms);
}
.motion-ready .motion-reveal.motion-visible { opacity: 1; transform: translate3d(0, 0, 0); }

@media (hover: hover) and (pointer: fine) {
  .nav-shell nav a:hover { color: var(--blue); }
  .nav-shell nav a:hover::after { transform: scaleX(1); }
  .button:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(39, 81, 216, .32); filter: brightness(1.04); }
  .hero-button:hover span,
  .button.light:hover span,
  .article-layout aside a:hover span,
  .related a:hover span { transform: translateX(4px); }
  .portfolio-grid a:hover,
  .related a:hover { transform: translateY(-4px); border-color: #a9bfee; box-shadow: 0 16px 30px rgba(21, 47, 87, .1); }
  .related a:hover { color: var(--blue); }
  footer a:hover { color: var(--blue); }
}
.button:active { transform: scale(.98); }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 28px; padding: 78px 0; }
  .article-layout aside { position: static; }
  .related > div,
  .mini-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .wrap { width: min(100% - 36px, 620px); }
  .site-header { height: 76px; }
  .brand { width: 64px; height: 62px; }
  .nav-shell { position: relative; }
  .nav-cta { display: none; }
  .mobile-nav-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid #d8e2f1;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
  }
  .mobile-nav-toggle span { width: 19px; height: 2px; display: block; border-radius: 2px; background: currentColor; transition: transform 200ms var(--motion-ease-move), opacity 150ms ease; }
  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-shell nav {
    position: absolute;
    top: calc(100% + 1px);
    right: -18px;
    left: -18px;
    z-index: 30;
    display: grid;
    gap: 0;
    padding: 10px 18px 18px;
    border-bottom: 1px solid #dbe4f1;
    background: #fff;
    box-shadow: 0 18px 28px rgba(15, 35, 68, .13);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.98);
    transform-origin: top;
    transition: opacity 180ms var(--motion-ease-out), transform 180ms var(--motion-ease-out), visibility 180ms;
  }
  .nav-shell nav.mobile-nav-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
  .nav-shell nav a { min-height: 49px; display: flex; align-items: center; border-bottom: 1px solid #edf1f6; }
  .nav-shell nav a:last-child { border-bottom: 0; }
  .nav-shell nav a::after { display: none; }
  .page-hero { padding: 80px 0 76px; }
  .page-hero h1 { font-size: clamp(43px, 12vw, 58px); }
  .intro { font-size: 17px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .related { padding-bottom: 82px; }
  .cta { padding: 88px 0; }
  .cta p:not(.eyebrow) { font-size: 17px; }
  footer > .wrap { display: block; }
  footer > .wrap > div:last-child { justify-content: flex-start; padding-top: 28px; }
}

@media (max-width: 390px) {
  .wrap { width: min(100% - 28px, 620px); }
  .page-hero h1 { font-size: 40px; }
  .content-section h2 { font-size: 31px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation: none; scroll-behavior: auto; transition: none; }
  .motion-ready .motion-reveal,
  .motion-ready .motion-reveal.motion-visible { opacity: 1; transform: none; transition: none; }
}
