@font-face {
  font-family: "PT Serif";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pt-serif-latin-regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "PT Serif";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/pt-serif-latin-bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "PT Serif";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pt-serif-cyrillic-regular.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "PT Serif";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/pt-serif-cyrillic-bold.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --paper: #fbefd5;
  --light-paper: #fff5e0;
  --ink: #0a233e;
  --muted: #3e4a53;
  --red: #b62617;
  --red-hover: #971d11;
  --gold: #f4c76b;
  --rule: #3f5061;
  --serif: "PT Serif", Georgia, serif;
  --wrap: min(1400px, calc(100% - clamp(32px, 5vw, 72px)));
}

* { box-sizing: border-box; }

html { scroll-padding-top: 88px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.55 var(--serif);
}

img { display: block; max-width: 100%; height: auto; }
button { color: inherit; font: inherit; }
a { color: inherit; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.5vw, 3.65rem); letter-spacing: -.04em; }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.65rem); letter-spacing: -.025em; }
p + p { margin-top: .65rem; }

.wrap { width: var(--wrap); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .5rem;
  left: 1rem;
  padding: .55rem .9rem;
  background: var(--light-paper);
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.header {
  position: sticky;
  z-index: 10;
  top: 0;
  background: var(--paper);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: .55rem 0;
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(.55rem, 1.2vw, 1rem);
  flex-shrink: 0;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  border-right: 1px solid var(--ink);
  padding-right: clamp(.55rem, 1.2vw, 1rem);
  white-space: nowrap;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  letter-spacing: -.065em;
  line-height: 1.1;
}

.brand-mark span { color: var(--red); margin-inline: .05em .11em; }
.brand-name { white-space: nowrap; line-height: 1.18; }
.brand-name small { display: block; margin-top: .14rem; font-weight: 400; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(.52rem, 1.4vw, 1.2rem);
  font-weight: 700;
}

.nav a, .nav-dropdown > summary { text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav-dropdown > summary:hover { text-decoration: underline; }

.nav-dropdown { position: relative; }
.nav-dropdown > summary { cursor: pointer; }
.nav-dropdown__menu {
  position: absolute;
  inset: calc(100% + .4rem) -.75rem auto auto;
  display: grid;
  width: min(25rem, calc(100vw - 2rem));
  padding: .45rem;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--light-paper);
  box-shadow: 3px 4px 0 rgb(10 35 62 / 15%);
}

.nav-dropdown__menu a {
  display: block;
  padding: .5rem .65rem;
  white-space: normal;
  line-height: 1.3;
}

.nav-dropdown__menu a:hover { background: var(--paper); }
.nav-dropdown__all { color: var(--red); }

.menu-toggle { display: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  width: fit-content;
  min-height: 44px;
  padding: .65em .95em;
  border: 1px solid var(--red);
  border-radius: 5px;
  background: var(--red);
  color: #fff8e8;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.button:hover { background: var(--red-hover); }
.nav .button:hover { text-decoration: none; }
.text-link { display: inline-block; font-weight: 700; }

/* Keep external-link arrows legible with any local font fallback. */
.button > span, .text-link > span {
  position: relative;
  display: inline-block;
  width: .52rem;
  height: .52rem;
  margin-inline: .1rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  vertical-align: .15rem;
  font-size: 0;
}

.button > span::after, .text-link > span::after {
  position: absolute;
  content: "";
  right: -1px;
  top: -1px;
  width: .7rem;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: right center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.72fr);
  align-items: center;
  gap: clamp(16px, 2vw, 36px);
  padding-block: clamp(22px, 3vw, 40px);
}

.hero h1 {
  font-size: clamp(2.4rem, 4.52vw, 4.65rem);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.055em;
  text-wrap: initial;
}

.hero h1 em, h2 em { color: var(--red); font-style: normal; }
.hero-lead { margin-top: .85rem; font-size: clamp(1.05rem, 1.7vw, 1.48rem); line-height: 1.3; }

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem 1.1rem;
  margin-top: 1rem;
  font-size: clamp(.97rem, 1.5vw, 1.22rem);
}

.hero-grid > img { width: 100%; }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  padding-block: .85rem;
  border-block: 2px solid var(--ink);
}

.metric {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 1.35vw, 1.25rem);
  min-width: 0;
  padding-inline: clamp(.65rem, 1.5vw, 1.4rem);
}

.metric + .metric { border-left: 1px solid var(--rule); }
.metric strong { color: var(--red); font-size: clamp(1.8rem, 4vw, 3.85rem); line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.metric span { max-width: 19ch; font-size: clamp(.88rem, 1.4vw, 1.12rem); line-height: 1.25; }

.services-overview, .tax-tool-banner, .case-band, .section, .research, .contact { padding-block: clamp(24px, 4vw, 48px); }

.services-overview__grid, .case-list, .report-grid, .process-grid, .research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 22px);
  margin-top: clamp(.85rem, 2vw, 1.45rem);
}

.services-overview__card, .case, .report-card, .process-step, .research-card {
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: rgb(255 248 231 / 55%);
}

.services-overview__card > img, .case > img, .process-step > img, .report-card img {
  width: 100%;
  aspect-ratio: 1.74;
  object-fit: cover;
  border-bottom: 1px solid var(--rule);
}

.card-copy { padding: .8rem clamp(.65rem, 1.2vw, 1rem) .95rem; }
.card-copy p { margin-top: .45rem; line-height: 1.4; }

.services-overview__card ul { margin: .55rem 0 0; padding-left: 1.05rem; line-height: 1.38; }
.services-overview__card li + li { margin-top: .35rem; }
.services-overview__card li::marker { color: var(--red); }

.tax-tool-banner { padding-top: 0; }

.tax-tool-banner__inner, .ai-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  border-block: 2px solid var(--ink);
}

.tax-tool-banner__inner { padding-block: 1.4rem; }
.tax-tool-banner__inner > img, .ai-strip > img { width: 100%; }
.tax-tool-banner__copy { margin-top: .6rem; line-height: 1.4; }
.tax-tool-banner__actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; margin-top: .9rem; }
.tax-tool-banner__price { font-size: .88rem; color: var(--muted); }

.case-band { padding-top: 0; }
.case-intro > p, .section-head > p { max-width: 70ch; margin-top: .5rem; color: var(--muted); }
.case details { margin-top: .65rem; }
.case summary { width: fit-content; cursor: pointer; font-weight: 700; }
.case details[open] { padding-top: .45rem; border-top: 1px solid var(--rule); }
.case details h3 { font-size: 1.04rem; margin-top: .45rem; }
.case-tag { display: block; margin-top: .5rem; color: var(--muted); font-size: .85rem; }
.case-result { display: block; margin-top: .45rem; font-weight: 700; line-height: 1.4; }

.section { padding-top: 0; }
.section > .wrap { border-top: 2px solid var(--ink); padding-top: clamp(18px, 3vw, 34px); }
.report-card { text-align: center; }
.report-card strong { display: block; padding: .55rem .65rem 0; font-size: clamp(1.14rem, 1.8vw, 1.55rem); }
.report-card p { margin: 0; padding: .15rem .65rem .7rem; line-height: 1.35; }
.report-card img { aspect-ratio: 2.18; }

.report-image-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.report-image-trigger::after {
  content: "⤢";
  position: absolute;
  top: .45rem;
  right: .45rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font: 22px/1 sans-serif;
}

.report-image-trigger:focus-visible { outline-offset: -5px; }

.report-section .report-note,
.report-section .section-note,
.report-grid + p { margin-top: .9rem; color: var(--muted); font-size: .9rem; }

.image-lightbox {
  width: min(1100px, calc(100% - 22px));
  max-width: none;
  max-height: calc(100vh - 22px);
  padding: .6rem;
  border: 2px solid var(--ink);
  border-radius: 7px;
  color: var(--ink);
  background: var(--light-paper);
  overflow: auto;
}

.image-lightbox::backdrop { background: rgb(5 19 35 / 84%); }
.image-lightbox__figure { margin: 0; }
.image-lightbox__image { width: 100%; }
.image-lightbox__caption { padding: .45rem 2.5rem .2rem .35rem; }
.image-lightbox__close {
  position: sticky;
  z-index: 1;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  margin-bottom: -42px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  line-height: 1;
  font-size: 1.55rem;
  cursor: pointer;
}

.process-step { text-align: center; }
.process-step img { aspect-ratio: 1.41; }
.ai-strip { margin-top: clamp(20px, 4vw, 40px); background: #f9dfa0; padding-inline-start: clamp(12px, 2.5vw, 26px); }
.ai-strip h3 { font-size: clamp(1.55rem, 3vw, 2.5rem); }
.ai-strip p { margin-block: .5rem .65rem; }

.research { padding-top: 0; }
.research-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .35rem 1rem; }
.research-head .text-link { color: var(--red); }
.research-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.research-card { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; text-decoration: none; }
.research-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1.24; border-right: 1px solid var(--rule); }
.research-card strong { padding: .55rem .65rem; font-size: clamp(1.05rem, 2vw, 1.65rem); line-height: 1.1; overflow-wrap: anywhere; }
.research-card:hover strong { text-decoration: underline; }
.research-card:focus-visible { outline-offset: 2px; }

.contact { padding-top: 0; }
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 25%);
  align-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #102942;
  color: var(--light-paper);
}

.contact-panel > div { padding: clamp(16px, 3vw, 36px); }
.contact-panel h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); }
.contact-panel p { margin-top: .55rem; }
.contact-panel .button { margin-top: .85rem; }
.contact-panel .button:focus-visible { outline-color: var(--gold); }
.contact-panel img { width: 100%; align-self: end; }

.footer { padding-bottom: 1.6rem; }
.footer-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.footer-note { margin-top: .35rem; color: var(--muted); font-size: .91rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.site-footer-wrap { width: var(--wrap); margin-inline: auto; }
.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1.15rem;
  margin-top: 1rem;
  padding-top: .7rem;
  border-top: 1px solid var(--rule);
  font-size: .84rem;
}

.site-legal-details { flex-basis: 100%; }
.site-legal-details, .site-copyright { color: var(--muted); }

@media (max-width: 1100px) {
  .brand-name { font-size: .9rem; }
  .nav { font-size: .9rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
}

@media (max-width: 950px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid var(--ink);
    border-radius: 4px;
    padding: .35rem .75rem;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    position: absolute;
    inset: 100% 0 auto;
    max-height: min(72vh, 44rem);
    overflow: auto;
    padding: .65rem;
    border: 1px solid var(--ink);
    border-radius: 0 0 5px 5px;
    background: var(--light-paper);
    box-shadow: 3px 4px 0 rgb(10 35 62 / 15%);
    font-size: 1rem;
  }

  .nav.open { display: flex; }
  .nav > a:not(.button), .nav-dropdown > summary { padding: .45rem .5rem; }
  .nav .button { margin: .25rem .5rem; }
  .nav-dropdown__menu { position: static; width: 100%; box-shadow: none; margin-bottom: .25rem; }
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.65rem, 9vw, 4.15rem); }
  .hero-grid > img { max-height: 345px; object-fit: contain; object-position: left; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .metric:first-child { padding-left: 0; }
  .metric:last-child { padding-right: 0; }
  .metric strong { font-size: clamp(1.38rem, 5vw, 2.15rem); }
  .metric span { font-size: .84rem; }
  .services-overview__grid, .case-list, .report-grid, .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tax-tool-banner__inner, .ai-strip { grid-template-columns: 1fr; }
  .tax-tool-banner__inner > img { max-height: 230px; object-fit: contain; }
  .ai-strip { padding: .9rem .9rem 0; }
  .ai-strip > img { max-height: 145px; object-fit: contain; object-position: bottom right; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card { grid-template-columns: minmax(0, 32%) minmax(0, 1fr); }
  .research-card img { max-height: 136px; aspect-ratio: 1.62; }
  .research-card strong { padding-inline: .85rem; }
  .contact-panel { grid-template-columns: minmax(0, 1fr) minmax(110px, 29%); }
  .footer-top { flex-direction: column; }
}

@media (max-width: 420px) {
  .contact-panel { grid-template-columns: 1fr; }
  .contact-panel img { width: 48%; justify-self: end; }
  .card-copy { padding-inline: .58rem; }
  .services-overview__card ul, .case p, .process-step p, .report-card p { font-size: .94rem; }
}
