:root {
  /* ШРИФТЫ: меняйте только значения после двоеточия. */
  --font-text: Arial, Helvetica, sans-serif;
  --font-headings: Georgia, "Times New Roman", serif;

  --ink: #172522;
  --ink-soft: #48534f;
  --paper: #f4f0e8;
  --paper-light: #fbf9f4;
  --accent: #a95f3d;
  --accent-light: #d98a63;
  --line: rgba(23, 37, 34, 0.16);
  --light-line: rgba(251, 249, 244, 0.2);
  /* ФОН ФОТОГРАФИИ: эти два цвета можно менять отдельно. */
  --portrait-bg-light: #f1eadf;
  --portrait-bg-dark: #d1c5b3;
  --page-padding: clamp(20px, 7vw, 112px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
}

/* Фемида остаётся на месте при прокрутке. Цвет меняется под секцию. */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 88px;
  right: clamp(16px, 4vw, 72px);
  bottom: 0;
  z-index: 2;
  width: min(46vw, 680px);
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
  transition: opacity 180ms ease;
}

body::before {
  opacity: 1;
  background-image: url("images/themis-watermark-dark-v2.png");
}

body::after {
  opacity: 0;
  background-image: url("images/themis-watermark-light-v2.png");
}

body.watermark-light::before {
  opacity: 0;
}

body.watermark-light::after {
  opacity: 1;
}

.hero > *,
.services-section > *,
.about-section > *,
.principles-section > *,
.process-section > *,
.contact-section > *,
footer > * {
  position: relative;
  z-index: 3;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

h1,
h2,
h3,
p,
dd {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--font-headings);
  font-weight: 400;
}

section {
  scroll-margin-top: 98px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  background: var(--paper-light);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 88px;
  padding: 16px clamp(20px, 6vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 232, 0.95);
  backdrop-filter: blur(14px);
}

.brand {
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  overflow: hidden;
  font-family: var(--font-headings);
  font-size: 22px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  padding: 3px;
  display: block;
  object-fit: contain;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-family: var(--font-headings);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
}

.brand-copy small,
.footer-brand small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.site-nav a,
.text-link {
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}

.site-nav a:hover,
.text-link:hover {
  border-color: currentColor;
}

.menu-button {
  display: none;
}

.header-cta,
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.header-cta {
  transition: background 180ms ease, color 180ms ease;
}

.header-cta:hover {
  background: var(--ink);
  color: var(--paper-light);
}

.hero {
  min-height: calc(100svh - 88px);
  padding: clamp(44px, 6vh, 72px) var(--page-padding);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  background:
    linear-gradient(90deg, transparent 0 66%, rgba(23, 37, 34, 0.035) 66% 100%),
    var(--paper);
}

.hero-copy {
  max-width: 800px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(50px, 5.2vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.25vw, 20px);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.button-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-light);
  transition: background 180ms ease, border-color 180ms ease;
}

.button-primary:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.text-link {
  font-size: 14px;
  font-weight: 700;
}

.text-link [data-phone] {
  margin-left: 4px;
  font-family: var(--font-headings);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
}

.privacy-note {
  max-width: 610px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.portrait-card {
  width: min(100%, 440px);
  justify-self: end;
  border: 1px solid var(--line);
  background: var(--paper-light);
}

.portrait-media {
  height: clamp(380px, calc(100svh - 250px), 550px);
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.72), transparent 47%),
    linear-gradient(145deg, var(--portrait-bg-light), var(--portrait-bg-dark));
}

.portrait-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 18px rgba(23, 37, 34, 0.16));
}

.portrait-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background:
    radial-gradient(circle at 50% 32%, rgba(169, 95, 61, 0.12), transparent 25%),
    linear-gradient(145deg, #d5d5c9, #e8e4da);
  color: var(--ink-soft);
  text-align: center;
}

.portrait-placeholder > span {
  font-family: var(--font-headings);
  font-size: clamp(60px, 8vw, 104px);
  line-height: 1;
  opacity: 0.38;
}

.portrait-placeholder p {
  max-width: 200px;
  margin: 0;
  font-size: 13px;
}

.portrait-caption {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink-soft);
  font-size: 12px;
}

.services-section {
  padding: clamp(64px, 8vh, 96px) var(--page-padding);
  background: var(--ink);
  color: var(--paper-light);
}

.section-heading {
  max-width: 880px;
}

.section-heading h2,
.about-copy h2,
.principles-section h2,
.contact-copy h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.section-heading > p:last-child {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--ink-soft);
}

.section-heading-light > p:last-child {
  color: rgba(251, 249, 244, 0.66);
}

.services-grid {
  margin-top: clamp(40px, 6vh, 56px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--light-line);
}

.service-card {
  min-height: 220px;
  padding: 28px 30px 36px;
}

.service-card:not(:last-child) {
  border-right: 1px solid var(--light-line);
}

.service-card:first-child {
  padding-left: 0;
}

.service-card > span,
.process-list li > span {
  color: var(--accent-light);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.service-card h3 {
  margin: 36px 0 17px;
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1.12;
}

.process-list h3 {
  margin: 52px 0 17px;
  font-size: 25px;
  line-height: 1.2;
}

.service-card p {
  margin: 0;
  color: rgba(251, 249, 244, 0.66);
  font-size: 14px;
}

.section-cta {
  min-height: 48px;
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid rgba(251, 249, 244, 0.7);
  font-size: 14px;
  font-weight: 700;
}

.about-principles-screen {
  min-height: calc(100svh - 88px);
  display: grid;
  grid-template-rows: auto 1fr;
}

.about-section {
  padding: clamp(40px, 5vh, 56px) var(--page-padding) clamp(32px, 4vh, 48px);
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1.65fr);
  gap: clamp(48px, 8vw, 130px);
  background: var(--paper-light);
}

.section-label {
  display: flex;
  flex-direction: column;
}

.section-label > span {
  width: 1px;
  min-height: 120px;
  margin-top: 24px;
  background: var(--line);
}

.about-copy {
  max-width: 1060px;
}

.about-copy h2 {
  max-width: 960px;
}

.about-columns {
  max-width: 820px;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  color: var(--ink-soft);
}

.about-columns p {
  margin: 0;
}

.credentials {
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

.credentials > div {
  padding: 24px 24px 0 0;
}

.credentials dt {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.credentials dd {
  margin: 0;
  font-family: var(--font-headings);
  font-size: 19px;
}

.principles-section {
  padding: clamp(32px, 4vh, 48px) var(--page-padding) clamp(40px, 5vh, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: clamp(56px, 10vw, 160px);
  align-items: center;
  background: #dcd7cc;
}

.about-principles-screen .about-copy h2,
.about-principles-screen .principles-section h2 {
  font-size: clamp(36px, 4vw, 58px);
}

.principles-section h2 {
  max-width: 720px;
  overflow-wrap: normal;
  word-break: normal;
}

.principles-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.principles-list li {
  min-height: 56px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.principles-list li > span:first-child {
  color: var(--accent);
  font-size: 11px;
}

.process-section {
  padding: clamp(64px, 8vh, 96px) var(--page-padding);
}

.process-list {
  margin: clamp(40px, 6vh, 56px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  border-top: 1px solid var(--line);
}

.process-list li {
  padding: 28px 30px 40px;
  border-right: 1px solid var(--line);
}

.process-list li:first-child {
  padding-left: 0;
}

.process-list li:last-child {
  border-right: 0;
}

.process-list li > span {
  color: var(--accent);
}

.process-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.faq-section {
  padding: clamp(64px, 8vh, 96px) var(--page-padding);
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(64px, 10vw, 160px);
  background: var(--paper-light);
}

.faq-list {
  border-top: 1px solid var(--ink);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  min-height: 78px;
  padding: 24px 48px 24px 0;
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-headings);
  font-size: 20px;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  translate: 0 -50%;
  color: var(--accent);
  font-family: var(--font-text);
  font-size: 24px;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  max-width: 620px;
  margin: -4px 0 0;
  padding: 0 48px 28px 0;
  color: var(--ink-soft);
}

.contact-section {
  padding: clamp(64px, 8vh, 96px) var(--page-padding);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: clamp(64px, 10vw, 170px);
  background: var(--accent);
  color: #fffaf4;
}

.contact-copy .eyebrow {
  color: #ffe0cf;
}

.contact-copy p:last-child {
  max-width: 650px;
  margin: 30px 0 0;
  color: rgba(255, 250, 244, 0.78);
}

.contact-list {
  margin: 0;
  border-top: 1px solid rgba(255, 250, 244, 0.45);
  font-style: normal;
}

.contact-list > a,
.contact-list > div {
  min-height: 66px;
  padding: 17px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid rgba(255, 250, 244, 0.28);
}

.contact-list > a:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-list span {
  color: rgba(255, 250, 244, 0.68);
  font-size: 12px;
}

.contact-list strong {
  font-family: var(--font-headings);
  font-size: 17px;
  font-weight: 400;
  text-align: right;
}

footer {
  padding: 48px var(--page-padding) 54px;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(240px, 0.7fr) minmax(360px, 1.5fr);
  gap: clamp(32px, 4vw, 56px);
  background: var(--ink);
  color: var(--paper-light);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand .brand-mark {
  border: 0;
}

.footer-brand .footer-monogram {
  padding: 0;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand p,
footer > p {
  margin: 0;
}

.footer-brand p {
  font-family: var(--font-headings);
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
}

.footer-brand small {
  display: inline-block;
  color: rgba(251, 249, 244, 0.58);
  font-family: var(--font-text);
  white-space: nowrap;
}

footer > p {
  color: rgba(251, 249, 244, 0.58);
  font-size: 11px;
}

[data-footer-details] {
  display: block;
  margin-top: 4px;
  white-space: pre-line;
}

.mobile-contact {
  display: none;
}

@media (max-width: 1120px) {
  .site-nav {
    gap: 18px;
  }

  .process-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-list li:nth-child(2) {
    border-right: 0;
  }

  .process-list li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .process-list li:nth-child(3) {
    padding-left: 0;
  }

  .principles-section {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }

  footer > p:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .site-nav {
    display: none;
  }

  .js .menu-button {
    min-height: 44px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
  }

  .menu-button-lines,
  .menu-button-lines::before,
  .menu-button-lines::after {
    width: 18px;
    height: 1px;
    display: block;
    background: currentColor;
  }

  .menu-button-lines {
    position: relative;
  }

  .menu-button-lines::before,
  .menu-button-lines::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .menu-button-lines::before {
    top: -5px;
  }

  .menu-button-lines::after {
    top: 5px;
  }

  .js .site-nav {
    position: absolute;
    right: 20px;
    top: calc(100% + 8px);
    left: 20px;
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--line);
    background: var(--paper-light);
    box-shadow: 0 18px 50px rgba(23, 37, 34, 0.14);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    min-height: 48px;
    padding: 10px 4px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    background: var(--paper);
  }

  .portrait-card {
    width: min(100%, 520px);
    justify-self: start;
  }

  .about-section,
  .principles-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .section-label > span {
    display: none;
  }

  .case-template {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 680px) {
  body::before,
  body::after {
    top: 74px;
    right: -22vw;
    width: min(92vw, 500px);
  }

  .about-principles-screen {
    min-height: auto;
    display: block;
  }

  .about-principles-screen .about-section,
  .about-principles-screen .principles-section {
    padding: 56px 20px;
  }

  .site-header {
    min-height: 74px;
    padding: 12px 20px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    max-width: 105px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-copy small,
  .header-cta,
  .menu-button-label {
    display: none;
  }

  .js .menu-button {
    width: 44px;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding: 48px 20px;
    gap: 40px;
  }

  h1 {
    font-size: clamp(42px, 12vw, 58px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button-primary {
    width: 100%;
  }

  .text-link {
    align-self: flex-start;
  }

  .portrait-media {
    height: clamp(320px, 58svh, 440px);
    min-height: 0;
  }

  .portrait-caption {
    flex-direction: column;
    gap: 2px;
  }

  .services-section,
  .about-section,
  .principles-section,
  .process-section,
  .contact-section {
    padding: 64px 20px 72px;
  }

  .services-grid,
  .process-list,
  .about-columns,
  .credentials {
    grid-template-columns: 1fr;
  }

  .service-card,
  .process-list li,
  .process-list li:first-child,
  .process-list li:nth-child(3) {
    min-height: auto;
    padding: 28px 0 36px;
    border-right: 0;
    border-bottom: 1px solid var(--light-line);
  }

  .process-list li,
  .process-list li:first-child,
  .process-list li:nth-child(3) {
    border-bottom-color: var(--line);
  }

  .service-card:last-child,
  .process-list li:last-child {
    border-bottom: 0;
  }

  .service-card h3,
  .process-list h3 {
    margin-top: 28px;
  }

  .about-columns {
    margin-top: 36px;
    gap: 28px;
  }

  .credentials {
    margin-top: 48px;
  }

  .credentials > div {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
  }

  .principles-section,
  .contact-section {
    gap: 48px;
  }

  .contact-list > a,
  .contact-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .contact-list strong {
    text-align: left;
  }

  footer {
    padding: 44px 20px;
    grid-template-columns: 1fr;
    gap: 32px;
  }

  footer > p:last-child {
    grid-column: auto;
  }

  body {
    padding-bottom: 64px;
  }

  .mobile-contact {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    min-height: 62px;
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--light-line);
    background: var(--ink);
    color: var(--paper-light);
  }

  .mobile-contact a {
    min-height: 62px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-contact a + a {
    border-left: 1px solid var(--light-line);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
