/* КЭМ — мебель на заказ. Кремовая шкала, один тёмный акцент, золото только на чёрном */
:root {
  --bg: #f2eee4;
  --surface: #f8f5ee;
  --raised: #e8e3d8;
  --line: rgba(30, 27, 23, 0.1);
  --line-strong: rgba(30, 27, 23, 0.22);
  --text: #1e1b17;
  --text-2: #514742;
  --muted: #675e56;
  --accent: #1e1b17;
  --accent-hover: #2e2a24;
  --on-accent: #f2eee4;
  --dark: #24201b;
  --on-dark: #f2eee4;
  --on-dark-2: #bdb4a8;
  --line-dark: rgba(242, 238, 228, 0.14);
  --gold: #d4af37;
  --open: #2f7a4b;

  --serif: "EB Garamond", "PT Serif", Georgia, serif;
  --sans: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: 20px;
  --header-h: 64px;
  --section: 64px;
}

@media (min-width: 960px) {
  :root {
    --pad: 32px;
    --header-h: 72px;
    --section: 112px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px;
}

@media (min-width: 960px) {
  body {
    font-size: 17px;
    padding-bottom: 0;
  }
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.on-dark :focus-visible {
  outline-color: var(--on-dark);
}

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.icon {
  display: block;
  flex-shrink: 0;
}

/* ---------- type ---------- */
.h2 {
  font: 500 clamp(32px, 2.4vw + 14px, 46px) / 1.08 var(--serif);
  letter-spacing: 0;
  color: var(--text);
}

.h2,
.hero h1,
.svc-row h3 {
  text-wrap: balance;
}

@media (min-width: 1100px) {
  .h2 {
    letter-spacing: -0.01em;
  }
}

.lead {
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.55;
  max-width: 36rem;
}

.tag {
  font: 400 14px/1.45 var(--mono);
  color: var(--muted);
  margin-top: 12px;
  transition: color 160ms var(--ease);
}

.sec {
  padding-block: var(--section);
}

.sec-raised {
  background: var(--raised);
}

.sec-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 960px) {
  .sec-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 48px;
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}

.text-link:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: 500 16px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--raised);
}

.sec-raised .btn-secondary:hover {
  background: var(--surface);
}

.btn-sm {
  min-height: 44px;
  padding: 0 16px;
}

.btn-square {
  width: 48px;
  padding: 0;
  flex-shrink: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: var(--surface);
}

.header-in {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
  min-height: 44px;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-name {
  font: 500 24px/1 var(--serif);
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.2;
}

.nav {
  display: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 16px;
  transition: color 160ms var(--ease);
}

.nav a:hover {
  color: var(--text);
}

.lang {
  display: flex;
  gap: 4px;
}

.lang button {
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 500 15px/1 var(--sans);
  cursor: pointer;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}

.lang button:hover {
  color: var(--text);
}

.lang button[aria-pressed="true"] {
  color: var(--text);
  background: var(--raised);
}

.site-header.is-scrolled .lang-desktop button[aria-pressed="true"] {
  background: var(--raised);
}

.lang-desktop,
.header-cta {
  display: none;
}

.menu-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.menu {
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.menu[hidden] {
  display: none;
}

.menu-in {
  padding-block: 8px 24px;
  display: grid;
  gap: 16px;
}

.menu nav {
  display: grid;
}

.menu nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 18px;
}

.menu .lang {
  margin-left: -8px;
}

.menu .lang button {
  font-size: 16px;
}

.menu-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-size: 18px;
  color: var(--text);
}

.menu-phone .icon {
  color: var(--muted);
}

@media (min-width: 960px) {
  .lang-desktop,
  .header-cta {
    display: flex;
  }
}

@media (min-width: 1260px) {
  .nav {
    display: flex;
    gap: 24px;
  }
  .menu-btn,
  .menu {
    display: none !important;
  }
  .brand {
    margin-right: 0;
  }
  .nav {
    margin-right: auto;
    margin-left: 16px;
  }
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
}

.hero-media {
  order: -1;
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--raised);
  overflow: hidden;
}

.hero-media > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

.hero-text {
  position: relative;
  z-index: 1;
  padding: 24px var(--pad) 40px;
}

.hero h1 {
  font: 500 clamp(34px, 8.4vw + 4px, 42px) / 1.04 var(--serif);
  color: var(--text);
  max-width: 14em;
}

.hero .lead {
  margin-top: 16px;
}

.hero-actions {
  display: none;
}

.hours {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  margin-top: 20px;
  color: var(--text-2);
  font-size: 16px;
}

.hours > .icon {
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.status[hidden] {
  display: none;
}

.status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.status.is-open .dot {
  background: var(--open);
}

.hero-facts {
  margin-top: 24px;
  display: grid;
  gap: 0;
}

.hero-facts li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.4;
}

.hero-facts .icon {
  color: var(--muted);
  margin-top: 1px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-text,
  .hero-media {
    animation: rise 500ms var(--ease) both;
  }
  .hero-media {
    animation-delay: 60ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 640px) and (max-width: 959px) {
  .hero-media {
    aspect-ratio: 4 / 5;
    max-height: 72svh;
  }
}

@media (min-width: 960px) {
  .hero {
    --hero-h: min(760px, calc(100svh - 136px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 64px;
    max-width: 1280px;
    margin-inline: auto;
    padding: 24px var(--pad) 40px;
  }
  .hero-media {
    order: 0;
    position: relative;
    inset: auto;
    aspect-ratio: 4 / 5;
    height: var(--hero-h);
    width: calc(var(--hero-h) * 0.8);
    min-height: 480px;
    min-width: 384px;
  }
  .hero-media::after {
    display: none;
  }
  .hero-text {
    padding: 0;
    max-width: 600px;
  }
  .hero h1 {
    font-size: clamp(44px, 4.2vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.015em;
  }
  .hero .lead {
    margin-top: 24px;
    font-size: 19px;
  }
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
  }
  .hero-facts {
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    margin-top: 32px;
  }
}

/* ---------- works ---------- */
.works-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 640px) {
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
  }
}

@media (min-width: 960px) {
  .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px 32px;
  }
}

.work-media,
.work-open {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--raised);
}

.work-open {
  padding: 0;
  border: 0;
  cursor: zoom-in;
}

.work-media img,
.work-media video,
.work-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-media video,
.svc-media video {
  pointer-events: none;
}

.work:hover .tag {
  color: var(--text);
}

.works-more {
  display: none;
}

@media (max-width: 639px) {
  html.js .works:not(.is-open) .work:nth-child(n + 7) {
    display: none;
  }
  html.js .works:not(.is-open) .works-more {
    display: flex;
    width: 100%;
    margin-top: 32px;
  }
}

/* ---------- services ---------- */
.svc {
  display: grid;
  gap: 40px;
}

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

.svc-row {
  display: grid;
  gap: 8px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

.svc-row h3 {
  font: 500 26px/1.15 var(--serif);
}

.svc-row p {
  color: var(--text-2);
}

.svc-media {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg);
  max-width: 480px;
}

.svc-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 960px) {
  .svc {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
    align-items: start;
  }
  .svc-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    padding-block: 28px;
  }
  .svc-aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
  .svc-media {
    max-width: none;
  }
}

/* ---------- process (dark) ---------- */
.process {
  background: var(--dark);
  color: var(--on-dark);
}

.process .h2 {
  color: var(--on-dark);
}

.steps {
  display: grid;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 16px;
  padding-block: 24px;
  border-top: 1px solid var(--line-dark);
}

.step-num {
  font: 500 40px/1 var(--serif);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.step h3 {
  font: 500 19px/1.3 var(--sans);
  color: var(--on-dark);
}

.step p {
  margin-top: 8px;
  color: var(--on-dark-2);
  font-size: 16px;
  line-height: 1.55;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 32px;
  }
  .step {
    grid-template-columns: 1fr;
    row-gap: 20px;
    align-content: start;
  }
}

@media (min-width: 1100px) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .step-num {
    font-size: 48px;
  }
}

/* ---------- materials ---------- */
.mat {
  display: grid;
  gap: 32px;
}

.mat-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--raised);
}

.mat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mat-list {
  display: grid;
  gap: 0;
  margin-top: 32px;
}

.mat-list div {
  padding-block: 16px;
  border-top: 1px solid var(--line);
}

.mat-list dt {
  font-weight: 500;
}

.mat-list dd {
  margin-top: 4px;
  color: var(--text-2);
}

@media (min-width: 960px) {
  .mat {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
    align-items: center;
  }
  .mat-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }
}

/* ---------- reviews ---------- */
.reviews-grid {
  display: grid;
  gap: 0;
}

.review {
  padding-block: 24px;
  border-top: 1px solid var(--line);
}

.review blockquote p {
  color: var(--text-2);
}

.review blockquote p + p {
  margin-top: 12px;
}

.review-feature blockquote p {
  font: 400 23px/1.4 var(--serif);
  color: var(--text);
}

.r-meta {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}

.r-author {
  color: var(--text);
  font-weight: 500;
}

@media (min-width: 640px) {
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }
  .review-feature {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .reviews-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 40px;
  }
  .review-feature {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding-right: 16px;
  }
  .review-feature blockquote p {
    font-size: 25px;
  }
}

/* ---------- calc ---------- */
.calc {
  display: grid;
  gap: 40px;
}

.calc .lead {
  margin-top: 16px;
}

.calc-builder {
  display: none;
  margin-top: 32px;
}

html.js .calc-builder {
  display: grid;
  gap: 28px;
}

html.js .calc-fallback {
  display: none;
}

.calc-fallback {
  margin-top: 32px;
}

.q {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.q legend,
.q-label {
  display: block;
  padding: 0;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 17px;
}

.q-opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 15px;
  margin-left: 8px;
}

.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt {
  position: relative;
  display: inline-flex;
}

.opt input,
.check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.opt span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.opt span:hover {
  border-color: var(--text-2);
}

.opt input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.opt input:focus-visible + span,
.check input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.field {
  width: 100%;
  max-width: 420px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 400 16px/1.4 var(--sans);
}

.field::placeholder {
  color: var(--muted);
}

.field:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.check {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.check span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.check span::before {
  content: "";
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface) center / 14px no-repeat;
  transition: background-color 160ms var(--ease);
}

.check input:checked + span::before {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2eee4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.calc-send {
  justify-self: start;
}

.calc-media {
  display: none;
}

.calc-media figure > div {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--raised);
}

.calc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% 50%;
}

@media (min-width: 960px) {
  .calc {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
    align-items: center;
  }
  .calc-media {
    display: block;
  }
}

/* ---------- faq ---------- */
.faq {
  display: grid;
  gap: 24px;
}

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

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

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-block: 16px;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  transition: color 160ms var(--ease);
}

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

.faq-list summary .icon {
  color: var(--muted);
  transition: transform 180ms var(--ease);
}

.faq-list details[open] summary .icon {
  transform: rotate(180deg);
}

.faq-list details p {
  padding-bottom: 24px;
  max-width: 60ch;
  color: var(--text-2);
}

@media (min-width: 960px) {
  .faq {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 64px;
  }
}

/* ---------- instagram ---------- */
.ig-head-title {
  font-size: clamp(28px, 6.4vw + 6px, 46px);
  overflow-wrap: anywhere;
}

.ig-head-title a {
  text-decoration: none;
}

.ig-head-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.ig-sub {
  margin-top: 8px;
  color: var(--text-2);
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ig-grid a {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--raised);
}

.ig-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 160ms var(--ease);
}

.ig-grid a:hover img {
  opacity: 0.86;
}

@media (min-width: 960px) {
  .ig-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
  }
}

/* ---------- contacts ---------- */
.contacts {
  display: grid;
  gap: 40px;
}

.contacts .lead {
  margin-top: 16px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.contact-list {
  margin-top: 32px;
  display: grid;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}

.ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
}

.c-label {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.c-value {
  display: inline-block;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  text-decoration: none;
}

a.c-value:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.c-sub {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.45;
}

.contacts .status {
  margin-top: 4px;
  font-size: 15px;
}

.map {
  display: grid;
  gap: 12px;
  align-content: start;
}

.map-frame {
  position: relative;
  height: 320px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map .btn {
  justify-self: start;
}

@media (min-width: 960px) {
  .contacts {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
  }
  .map-frame {
    height: 100%;
    min-height: 520px;
  }
  .map {
    grid-template-rows: 1fr auto;
  }
}

/* ---------- footer ---------- */
.footer {
  background: var(--dark);
  color: var(--on-dark-2);
  padding-block: 48px;
  font-size: 15px;
}

.footer-in {
  display: grid;
  gap: 24px;
}

.footer .brand {
  margin: 0;
  color: var(--on-dark);
}

.footer .brand img {
  width: 48px;
  height: 48px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--on-dark);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-links .icon {
  color: var(--on-dark-2);
}

.footer-note {
  max-width: 60ch;
}

@media (min-width: 960px) {
  .footer-in {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    column-gap: 64px;
  }
  .footer-links {
    justify-content: flex-end;
  }
  .footer-note {
    grid-column: 1 / -1;
    max-width: none;
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line-dark);
  }
}

.footer-note p + p {
  margin-top: 8px;
}

@media (min-width: 960px) {
  .footer-note p + p {
    margin-top: 0;
  }
}

/* ---------- sticky bar (phone) ---------- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.bar .btn-primary {
  flex: 1;
  padding: 0 12px;
}

@media (max-width: 359px) {
  .bar .btn-primary .icon {
    display: none;
  }
}

@media (min-width: 960px) {
  .bar {
    display: none;
  }
}

/* ---------- lightbox ---------- */
.lb {
  padding: 0;
  margin: 0;
  border: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: transparent;
  color: var(--on-dark);
}

.lb::backdrop {
  background: rgba(18, 16, 13, 0.94);
}

.lb[open] {
  display: grid;
}

.lb-in {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  padding: 12px var(--pad) calc(16px + env(safe-area-inset-bottom));
}

.lb-top,
.lb-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lb-count {
  font: 400 14px/1 var(--mono);
  color: var(--on-dark-2);
  font-variant-numeric: tabular-nums;
}

.lb-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding-block: 12px;
}

.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lb-cap {
  font: 400 14px/1.45 var(--mono);
  color: var(--on-dark-2);
}

.lb-nav {
  display: flex;
  gap: 8px;
}

.lb-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(242, 238, 228, 0.06);
  color: var(--on-dark);
  cursor: pointer;
  transition: background-color 160ms var(--ease);
}

.lb-btn:hover {
  background: rgba(242, 238, 228, 0.14);
}

.lb-btn:focus-visible {
  outline-color: var(--on-dark);
}

.flip {
  transform: scaleX(-1);
}

html.lb-lock {
  overflow: hidden;
}

/* ---------- reveal ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 450ms var(--ease), transform 450ms var(--ease);
  transition-delay: calc(var(--d, 0) * 50ms);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}

.menu-btn .i-close {
  display: none;
}

.menu-btn[aria-expanded="true"] .i-open {
  display: none;
}

.menu-btn[aria-expanded="true"] .i-close {
  display: block;
}
