:root {
  --bg: #f3efe6;
  --bg-soft: #ebe3d6;
  --surface: rgba(255, 252, 246, 0.88);
  --surface-strong: rgba(255, 250, 242, 0.98);
  --surface-light: rgba(255, 255, 255, 0.58);
  --text: #1f1a14;
  --text-soft: #5f5649;
  --muted: #7d715f;
  --line: rgba(89, 69, 39, 0.12);
  --gold: #b98a4d;
  --gold-soft: rgba(185, 138, 77, 0.14);
  --gold-strong: #8a6433;
  --shadow: 0 30px 70px rgba(83, 62, 33, 0.12);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --header-offset: 24px;
  --header-height: 96px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-offset) + var(--header-height));
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  background:
    radial-gradient(
      circle at top left,
      rgba(185, 138, 77, 0.14),
      transparent 24%
    ),
    radial-gradient(
      circle at 85% 8%,
      rgba(215, 197, 167, 0.52),
      transparent 18%
    ),
    linear-gradient(180deg, #faf6ef 0%, var(--bg) 42%, #efe7da 100%);
}

body::before {
  content: '';
  position: fixed;
  background-image:
    linear-gradient(rgba(82, 60, 32, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 60, 32, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  inset: 0;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 80%);
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 30vw;
  height: 30vw;
  border-radius: 50%;
  opacity: 0.4;
  filter: blur(100px);
  pointer-events: none;
}

.ambient-left {
  top: 120px;
  left: -10vw;
  background: rgba(185, 138, 77, 0.14);
}

.ambient-right {
  top: 480px;
  right: -12vw;
  background: rgba(216, 195, 164, 0.36);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(var(--header-offset) + var(--header-height)) 0 56px;
}

.site-header {
  position: fixed;
  top: var(--header-offset);
  left: 50%;
  z-index: 30;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 32px));
  padding: 16px 20px;
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 0px;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-avatar {
  display: inline-flex;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(138, 100, 51, 0.16);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(83, 62, 33, 0.12);
}

.brand-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 18%;
  transform: scale(1.08);
}

.brand-mark {
  display: inline-grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  color: var(--gold-strong);
  font-weight: 800;
  letter-spacing: 0.12em;
  background: linear-gradient(
    135deg,
    rgba(185, 138, 77, 0.16),
    rgba(255, 255, 255, 0.5)
  );
  border: 1px solid rgba(138, 100, 51, 0.18);
  border-radius: 16px;
  place-items: center;
}

.brand-block {
  display: grid;
  gap: 0px;
  margin-left: 15px;
}

.brand-block strong {
  font-size: 0.98rem;
}

.brand-block span {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.site-nav a,
.button {
  white-space: nowrap;
}

.site-nav a {
  padding: 10px 16px;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: 999px;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: rgba(185, 138, 77, 0.08);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 46px;
  height: 46px;
  padding: 0;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(138, 100, 51, 0.14);
  border-radius: 14px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

main {
  display: grid;
  gap: 24px;
  margin-top: 0;
  padding-top: 0;
}

.hero,
.section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(255, 252, 246, 0.95),
    rgba(250, 245, 237, 0.98)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero {
  padding: 34px;
}

.hero::before,
.section::before {
  content: '';
  position: absolute;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.46),
    transparent 30%,
    transparent 65%,
    rgba(185, 138, 77, 0.05)
  );
  pointer-events: none;
  inset: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-strong);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  font-family: 'Cormorant Garamond', serif;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3.6rem, 6vw, 6.3rem);
}

h2 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
}

.section-heading h2 {
  max-width: 22ch;
  line-height: 1.04;
}

h3 {
  font-size: 1.8rem;
  line-height: 1.02;
}

p,
li {
  line-height: 1.72;
}

.hero p,
.content-card p,
.list-block p,
.ethics-note p,
.advantage-card p,
.service-card li,
.result-box li,
.hero-metrics span {
  color: var(--text-soft);
}

.hero-lead {
  max-width: 58ch;
  color: var(--text);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  color: #fffaf3;
  background: linear-gradient(135deg, #8a6433, #b98a4d);
  box-shadow: 0 18px 36px rgba(185, 138, 77, 0.22);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(138, 100, 51, 0.16);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.hero-metrics article,
.hero-card,
.advantage-card,
.content-card,
.service-card,
.list-block,
.result-box,
.ethics-note,
.contact-panel {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.76),
    rgba(255, 250, 243, 0.88)
  );
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.hero-metrics article {
  padding: 18px;
  border-radius: var(--radius-md);
}

.hero-metrics strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.96rem;
}

.hero-visual {
  display: grid;
  gap: 18px;
}

.portrait-frame {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at top left,
      rgba(185, 138, 77, 0.16),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      rgba(247, 241, 231, 0.94),
      rgba(233, 223, 207, 0.98)
    );
  border: 1px solid rgba(138, 100, 51, 0.14);
  border-radius: 30px;
}

.portrait-frame::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(138, 100, 51, 0.12);
  border-radius: 22px;
  pointer-events: none;
  inset: 16px;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% top;
  transform: scale(1.02);
  filter: saturate(0.96) contrast(1.02);
}

.portrait-frame-mobile {
  display: none;
}

.hero-card,
.advantage-card,
.content-card,
.service-card,
.list-block,
.result-box,
.ethics-note,
.contact-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.card-label,
.contact-item span,
.contact-panel span {
  display: block;
  color: var(--gold-strong);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-item + .contact-item {
  margin-top: 18px;
}

.contact-item p {
  margin: 8px 0 0;
  color: var(--text);
}

a {
  color: inherit;
}

.section {
  padding: 34px;
}

.prestige-band {
  color: #fff8ee;
  background:
    radial-gradient(
      circle at top left,
      rgba(56, 35, 18, 0.36),
      transparent 28%
    ),
    linear-gradient(140deg, rgba(92, 60, 31, 0.98), rgba(139, 94, 52, 0.92)),
    var(--surface);
}

.prestige-band::before {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.08),
    transparent 34%,
    transparent 70%,
    rgba(255, 255, 255, 0.04)
  );
}

.prestige-band .eyebrow {
  color: rgba(255, 248, 238, 0.76);
}

.prestige-band h2,
.prestige-band h3,
.prestige-band .contact-panel strong,
.prestige-band .hero-metrics strong {
  color: #fff8ee;
}

.prestige-band p,
.prestige-band li,
.prestige-band .advantage-card p,
.prestige-band .service-card li,
.prestige-band .list-block p,
.prestige-band .result-box li {
  color: rgba(255, 248, 238, 0.8);
}

.prestige-band .advantage-card,
.prestige-band .service-card,
.prestige-band .list-block,
.prestige-band .result-box {
  background: rgba(255, 248, 238, 0.09);
  border-color: rgba(255, 248, 238, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.justice-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72),
    rgba(255, 250, 243, 0.9)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.justice-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 30% 50%;
  transform: translateX(-0px) scale(0.95);
}

.about-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 24px;
  align-items: stretch;
}

.about-stack {
  display: grid;
  gap: 18px;
}

.about-justice-card {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

.about-justice-card img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.section-heading {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin-bottom: 24px;
}

.advantage-grid,
.service-columns,
.practice-bottom,
.contacts-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.advantage-grid,
.service-columns,
.contacts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-grid {
  grid-template-columns: 0.8fr 1.2fr;
}

.details-layout,
.practice-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.content-card p + p,
.ethics-note p + p {
  margin-top: 14px;
}

.service-card ul,
.list-block ul,
.result-box ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.contacts-section {
  padding-bottom: 38px;
}

.contact-panel {
  display: block;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.contact-panel:hover,
.contact-panel:focus-visible {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(250, 243, 232, 0.92)
  );
  border-color: rgba(138, 100, 51, 0.24);
  transform: translateY(-2px);
}

.contact-panel strong {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 1.16rem;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .site-header {
    border-radius: 28px;
  }

  .hero-grid,
  .advantage-grid,
  .service-columns,
  .practice-bottom,
  .contacts-grid,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .portrait-frame {
    min-height: 560px;
  }

  .about-justice-card img {
    min-height: 320px;
  }

  h1,
  h2 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 16px, 1240px);
    padding-top: 112px;
  }

  .site-header {
    position: fixed;
    top: var(--header-offset);
    left: 50%;
    right: auto;
    gap: 12px;
    align-items: center;
    width: min(100% - 16px, 1240px);
    padding: 12px 14px;
    border-radius: 24px;
    transform: translateX(-50%);
  }

  .brand {
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-avatar {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .brand-block {
    margin-left: 12px;
  }

  .brand-block strong {
    font-size: 0.94rem;
  }

  .brand-block span {
    font-size: 0.74rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: rgba(255, 250, 242, 0.98);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.98rem;
  }

  .hero,
  .section {
    padding: 22px;
    border-radius: 24px;
  }

  .hero {
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(2.15rem, 10.6vw, 3.2rem);
    line-height: 0.94;
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  h3 {
    font-size: 1.6rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .portrait-frame {
    min-height: 430px;
  }

  .hero-visual > .portrait-frame {
    display: none;
  }

  .portrait-frame-mobile {
    display: block;
    min-height: 0;
    height: 300px;
    margin: 10px 0 16px;
  }

  /* Mobile photo tuning: affects only tablets/phones, not desktop */
  .portrait-frame-mobile img {
    height: 100%;
    object-fit: cover;
    object-position: 50% 6%;
    transform: scale(1);
  }

  .about-justice-card {
    display: none;
  }

  .hero-card,
  .advantage-card,
  .content-card,
  .service-card,
  .list-block,
  .result-box,
  .ethics-note,
  .contact-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .contact-panel strong {
    font-size: 1.03rem;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 15px;
  }

  .page-shell {
    width: calc(100% - 12px);
    padding-top: 106px;
  }

  .brand-mark {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .brand-block strong {
    font-size: 0.92rem;
  }

  .brand-block span {
    font-size: 0.76rem;
  }

  .site-nav a {
    padding: 10px 14px;
    font-size: 0.94rem;
  }

  .hero,
  .section {
    padding: 18px;
  }

  .portrait-frame {
    min-height: 360px;
  }

  .portrait-frame-mobile {
    min-height: 0;
    height: 240px;
    margin: 8px 0 14px;
  }

  /* iPhone-size photo tuning */
  .portrait-frame-mobile img {
    height: 100%;
    object-fit: cover;
    object-position: 50% 8%;
    transform: scale(1);
  }

  h1 {
    font-size: clamp(1.95rem, 10vw, 2.75rem);
    line-height: 0.96;
  }

  .hero-metrics article {
    padding: 16px;
  }
}
