:root {
  --cream: #ffffff;
  --ink: #2a2a28;
  --ink-muted: #5c5c56;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --page-width: 44rem;
  --scroll-offset: 5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
}

.page {
  display: grid;
  grid-template-columns: 1fr 12rem;
  align-items: start;
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
}

.content {
  grid-column: 1;
  grid-row: 1;
  padding: 2.5rem 1.5rem 3rem 1.75rem;
}

.section {
  scroll-margin-top: var(--scroll-offset);
  padding-block: 1.5rem;
  border-bottom: 1px solid rgba(42, 42, 40, 0.08);
}

.section:last-child {
  border-bottom: none;
}

.section__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.15rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.section--home .section__title {
  margin-bottom: 1.5rem;
  font-size: clamp(2.25rem, 6vw, 3rem);
  letter-spacing: 0.03em;
}

.section--home p {
  font-size: 1.3125rem;
  line-height: 1.8;
}

.section p {
  margin: 0 0 1rem;
  color: var(--ink-muted);
}

.section p:last-child {
  margin-bottom: 0;
}

.section p strong {
  font-weight: 400;
  color: var(--ink);
}

.section a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 42, 40, 0.2);
  transition: border-color 0.2s ease;
}

.section a:hover {
  border-bottom-color: var(--ink);
}

.section__list--contacts li {
  display: block;
  padding: 0.35rem 0;
}

.section__list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 42, 40, 0.2);
  transition: border-color 0.2s ease;
}

.section__list a:hover {
  border-bottom-color: var(--ink);
}

.section__qr {
  margin-top: 1.25rem;
}

.section__qr img {
  display: block;
  width: 10rem;
  height: auto;
}

.section__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.section__list li {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(42, 42, 40, 0.08);
  color: var(--ink-muted);
}

.section__list li:last-child {
  border-bottom: none;
}

.sidebar {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-height: 100svh;
  padding: 2rem 1.25rem 2rem 0.75rem;
  border-left: 1px solid rgba(42, 42, 40, 0.06);
  overflow-y: auto;
}

.sidebar__header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}

.sidebar__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}

.sidebar__logo-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  text-decoration: none;
}

.sidebar__logo-btn:hover .sidebar__logo {
  opacity: 0.85;
}

.sidebar__logo {
  width: 7rem;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
  margin-top: 1.25rem;
}

.lang-switch__btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0.15rem 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.lang-switch__btn:hover {
  color: var(--ink);
}

.lang-switch__btn.is-active {
  color: var(--ink);
  font-weight: 500;
}

.nav-toggle {
  display: none;
}

.nav {
  margin-top: 1.5rem;
  width: 100%;
}

.nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.nav__link {
  display: block;
  padding: 0.2rem 0;
  max-width: 12rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: right;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--ink);
}

.nav__link.is-active {
  color: var(--ink);
  font-weight: 500;
}

.credit {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 5;
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.credit.is-visible {
  opacity: 0.4;
  pointer-events: auto;
}

.credit.is-visible:hover {
  opacity: 0.65;
}

@media (max-width: 640px) {
  :root {
    --scroll-offset: 4.5rem;
  }

  body {
    font-size: 1.0625rem;
    line-height: 1.75;
  }

  .page {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .content {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: var(--page-width);
    margin-inline: auto;
  }

  .sidebar {
    grid-column: auto;
    grid-row: auto;
    order: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    align-items: stretch;
    align-self: stretch;
    width: 100%;
    max-width: none;
    max-height: none;
    gap: 0;
    margin: 0;
    padding: max(0.85rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right)) 0.85rem
      max(1rem, env(safe-area-inset-left));
    background: var(--cream);
    border-left: none;
    border-bottom: 1px solid rgba(42, 42, 40, 0.06);
    overflow-y: visible;
  }

  .sidebar__header {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .sidebar__actions {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    width: auto;
    flex-shrink: 0;
  }

  .sidebar__logo {
    width: 3.25rem;
  }

  .lang-switch {
    margin-top: 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    appearance: none;
    background: none;
    border: none;
    padding: 0.35rem 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    cursor: pointer;
  }

  .nav-toggle__icon {
    position: relative;
    display: block;
    width: 1.1rem;
    height: 1px;
    background: currentColor;
    transition: background 0.2s ease;
  }

  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transition: transform 0.2s ease, top 0.2s ease;
  }

  .nav-toggle__icon::before {
    top: -0.35rem;
  }

  .nav-toggle__icon::after {
    top: 0.35rem;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon {
    background: transparent;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .nav {
    display: none;
    margin-top: 0;
    padding-top: 0.75rem;
    width: 100%;
  }

  .nav.is-open {
    display: block;
  }

  .nav__list {
    align-items: stretch;
    gap: 0;
    border-top: 1px solid rgba(42, 42, 40, 0.06);
  }

  .nav__link {
    width: 100%;
    max-width: none;
    padding: 0.75rem 0;
    font-size: 1.05rem;
    text-align: left;
    border-bottom: 1px solid rgba(42, 42, 40, 0.06);
  }

  .nav__list li:last-child .nav__link {
    border-bottom: none;
  }

  .content {
    padding: 1.25rem max(1rem, env(safe-area-inset-right)) 2rem
      max(1rem, env(safe-area-inset-left));
  }

  .section {
    padding-block: 1.25rem;
  }

  .section--home .section__title {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
  }

  .section--home p {
    font-size: 1.125rem;
    line-height: 1.75;
  }

  .section__title {
    font-size: clamp(1.5rem, 6vw, 1.85rem);
  }

  .section__qr img {
    width: 8.5rem;
  }
}
