/* ==========================================================================
   Кофейный сад — одностраничный сайт
   Чистый CSS, mobile-first. Без сторонних библиотек.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-cyrillic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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: 'Cormorant Garamond';
  src: url('../fonts/cormorant-cyrillic-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-latin-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  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: 'Onest';
  src: url('../fonts/onest-cyrillic.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  src: url('../fonts/onest-latin.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  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;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #F5EFE5;
  --paper-deep: #E9DFCD;
  --ink: #241B12;
  --ink-70: #5A4B3C;
  --ink-45: #8C7B68;
  --coffee: #96552F;
  --olive: #55634A;
  --olive-deep: #333D2B;
  --line: rgba(36, 27, 18, .16);
  --line-soft: rgba(36, 27, 18, .09);

  --font-display: 'Cormorant Garamond', 'Times New Roman', Times, serif;
  --font-text: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1180px;
  --gutter: 20px;
  --header-h: 62px;

  --ease: cubic-bezier(.22, .68, .3, 1);
}

@media (min-width: 900px) {
  :root { --gutter: 40px; --header-h: 82px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

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

button { font: inherit; color: inherit; }

::selection { background: rgba(150, 85, 47, .18); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: .8rem;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Type ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-45);
}
.kicker::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--coffee);
  flex: none;
}

.section-title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 7.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.012em;
}

.lead {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 400;
}

p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .35s var(--ease);
}
.btn:hover svg { transform: translateX(4px); }

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}
.btn--solid:hover { background: var(--olive); }

.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--outline-light {
  border-color: rgba(245, 239, 229, .4);
  color: var(--paper);
}
.btn--outline-light:hover { background: rgba(245, 239, 229, .12); border-color: rgba(245, 239, 229, .7); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.link-arrow::after {
  content: '→';
  font-size: 1rem;
  line-height: 1;
  transition: transform .3s var(--ease);
}
.link-arrow:hover { border-color: var(--coffee); color: var(--coffee); }
.link-arrow:hover::after { transform: translateX(4px); }

.phone-link {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.phone-link:hover { color: var(--coffee); border-color: var(--coffee); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  background: rgba(245, 239, 229, .92);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }

.header-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
}
.header-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--coffee);
  transition: width .1s linear;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.brand-mark {
  width: 27px;
  height: 27px;
  flex: none;
  color: var(--olive);
}
.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.16rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
.brand-sub {
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-45);
  white-space: nowrap;
}

.header-nav { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.icon-btn--call { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.icon-btn--call:hover { background: var(--olive); border-color: var(--olive); }

/* ---------- Hero ---------- */
.hero { position: relative; }

.hero-media {
  position: relative;
  height: 62vh;
  min-height: 380px;
  overflow: hidden;
  background: var(--paper-deep);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  transform: scale(1.04);
  animation: heroDrift 26s ease-out forwards;
}
@keyframes heroDrift {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 20, 13, .28) 0%, rgba(28, 20, 13, 0) 38%, var(--paper) 97%);
}

.hero-body { position: relative; z-index: 2; margin-top: -34px; }
.hero-inner { padding-bottom: 64px; }

.hero-title {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.05rem, 9.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -.018em;
  hyphens: auto;
  overflow-wrap: break-word;
}
.hero-lead {
  max-width: 34em;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--ink-70);
  font-weight: 300;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 32px;
}

.hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 46px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-facts div { display: flex; flex-direction: column; gap: 3px; }
.hero-facts dt {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-45);
}
.hero-facts dd { margin: 0; font-size: .95rem; line-height: 1.5; }

.status { display: inline-flex; align-items: center; }
.status::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--ink-45);
}
.status[data-state="open"]::before { background: #5F7A4B; box-shadow: 0 0 0 3px rgba(95, 122, 75, .18); }
.status[data-state="closed"]::before { background: var(--coffee); box-shadow: 0 0 0 3px rgba(150, 85, 47, .16); }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section--about { padding-top: 56px; }
.section--gallery { padding-top: 20px; }

.about-grid { display: grid; gap: 40px; }

.about-text p { color: var(--ink-70); }
.about-text .lead { color: var(--ink); }
.about-text .lead::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.9rem;
  line-height: .78;
  padding: 6px 12px 0 0;
  color: var(--coffee);
}

.about-notes {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.about-notes li {
  padding-left: 14px;
  border-left: 1px solid var(--coffee);
  font-size: .92rem;
  color: var(--ink-70);
}

.about-detail {
  margin: 46px 0 0 auto;
  max-width: 62%;
}
.about-detail img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.about-detail figcaption {
  margin-top: 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-45);
}

.about-photo { margin: 0; }
.about-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.about-photo figcaption {
  margin-top: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-45);
  line-height: 1.5;
}

/* ---------- Gallery ---------- */
.gallery-head { margin-bottom: 28px; }
.gallery-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-45);
}

.gallery {
  list-style: none;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 8px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.gallery-item {
  flex: 0 0 72%;
  scroll-snap-align: center;
  margin: 0;
}
.gallery-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.gallery-open:hover img { transform: scale(1.04); }
.gallery-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 16px 14px;
  background: linear-gradient(180deg, rgba(24, 17, 11, 0), rgba(24, 17, 11, .62));
  color: #F7F2E9;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: left;
}

/* ---------- Menu ---------- */
.menu-head { margin-bottom: 34px; }
.menu-intro {
  max-width: 40em;
  color: var(--ink-70);
}

.tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  padding: 12px 0 14px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-45);
  transition: color .3s var(--ease);
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--coffee);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: panelIn .5s var(--ease) both; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.menu-sheet { margin: 0; display: grid; gap: 18px; justify-items: center; }
.menu-sheet-open {
  display: block;
  width: 100%;
  max-width: 520px;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  box-shadow: 0 26px 54px -34px rgba(36, 27, 18, .5), 0 1px 3px rgba(36, 27, 18, .12);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.menu-sheet-open:hover { transform: translateY(-4px); box-shadow: 0 34px 64px -34px rgba(36, 27, 18, .55), 0 1px 3px rgba(36, 27, 18, .14); }
.menu-sheet-open img { width: 100%; height: auto; }
.menu-sheet figcaption {
  max-width: 34em;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink-45);
}
.menu-foot {
  margin-top: 34px;
  text-align: center;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--ink-45);
}

/* ---------- Contacts ---------- */
.section--contacts { background: var(--paper-deep); }
.contacts-grid { display: grid; gap: 40px; }

.contacts-list { margin: 30px 0 0; display: grid; gap: 0; }
.contacts-list div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 16px 0;
  border-top: 1px solid rgba(36, 27, 18, .12);
}
.contacts-list dt {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-45);
}
.contacts-list dd { margin: 0; font-size: 1rem; line-height: 1.6; }

.contacts-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.contacts-social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 32px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(36, 27, 18, .12);
}
.contacts-social a { display: inline-flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--ink-70); transition: color .3s var(--ease); }
.contacts-social svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.contacts-social a:hover { color: var(--coffee); }

.map-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(36, 27, 18, .16);
  background: var(--paper);
  overflow: hidden;
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.map-frame.is-interactive iframe {
  pointer-events: auto;
}
.map-overlay-hint {
  position: absolute;
  inset: 0;
  background: rgba(36, 27, 18, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
  pointer-events: none;
  opacity: 1;
  z-index: 10;
}
.map-frame.is-interactive .map-overlay-hint {
  opacity: 0;
  pointer-events: none;
}
.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 65%),
    repeating-linear-gradient(90deg, rgba(36, 27, 18, .05) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(36, 27, 18, .05) 0 1px, transparent 1px 46px),
    var(--paper);
}
.map-title { margin: 0; font-family: var(--font-display); font-size: 1.6rem; }
.map-address { margin: 0 0 10px; font-size: .9rem; color: var(--ink-45); }
.map-load {
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.map-load:hover { background: var(--ink); color: var(--paper); }
.map-link { font-size: .85rem; text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--olive-deep);
  color: rgba(245, 239, 229, .82);
  padding: 58px 0 26px;
}
.footer-top {
  display: grid;
  gap: 34px;
  padding-bottom: 42px;
}
.footer-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--paper);
}
.footer-slogan {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.06rem;
  color: rgba(245, 239, 229, .6);
}
.footer-label {
  margin: 0 0 8px;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(245, 239, 229, .48);
}
.footer-col p { font-size: .92rem; line-height: 1.65; }
.footer-social { list-style: none; display: flex; gap: 20px; margin: 14px 0 0; padding: 0; }
.footer-social a { font-size: .86rem; color: rgba(245, 239, 229, .75); border-bottom: 1px solid rgba(245, 239, 229, .25); padding-bottom: 2px; transition: color .3s var(--ease), border-color .3s var(--ease); }
.footer-social a:hover { color: var(--paper); border-color: var(--paper); }
.footer-col--cta { align-self: start; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid rgba(245, 239, 229, .16);
  font-size: .78rem;
  color: rgba(245, 239, 229, .55);
}
.footer-bottom p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 10, .95);
}
.lightbox-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 28px 24px 72px;
  touch-action: none;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .28s var(--ease);
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-img.is-zoomed { transition: none; }
.lightbox-bar {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: rgba(245, 239, 229, .72);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 239, 229, .28);
  border-radius: 2px;
  background: rgba(20, 15, 10, .35);
  color: var(--paper);
  cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(245, 239, 229, .16); border-color: rgba(245, 239, 229, .6); }
.lightbox-close svg,
.lightbox-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav--prev { left: 14px; }
.lightbox-nav--next { right: 14px; }

/* ---------- Reveal ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
  .hero-facts { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .about-notes { grid-template-columns: 1fr 1fr; gap: 16px 30px; }
  .contacts-list div { grid-template-columns: 130px 1fr; gap: 16px; align-items: baseline; }
  .map-frame { aspect-ratio: 16 / 11; }
}

@media (min-width: 900px) {
  :root { --header-h: 86px; }

  .header-nav { display: flex; gap: 30px; }
  .header-nav a {
    position: relative;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-70);
    padding: 6px 0;
    transition: color .3s var(--ease);
  }
  .header-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--coffee);
    transition: width .35s var(--ease);
  }
  .header-nav a:hover { color: var(--ink); }
  .header-nav a:hover::after,
  .header-nav a.is-active::after { width: 100%; }
  .header-nav a.is-active { color: var(--ink); }

  .section { padding: 118px 0; }
  .section--about { padding-top: 104px; }
  .section--gallery { padding-top: 40px; }

  /* Hero: текст слева, фотография справа */
  .hero {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    align-items: stretch;
  }
  .hero-media {
    height: 100%;
    min-height: calc(100svh - var(--header-h));
    order: 2;
  }
  .hero-media img { object-position: 50% 42%; }
  .hero-media::after {
    background:
      linear-gradient(90deg, var(--paper) 0%, rgba(245, 239, 229, 0) 16%),
      linear-gradient(180deg, rgba(28, 20, 13, .3) 0%, rgba(28, 20, 13, 0) 42%);
  }
  .hero-body {
    order: 1;
    margin-top: 0;
    align-self: center;
    padding: 40px 0 40px;
  }
  .hero-inner {
    padding-inline: var(--gutter);
    max-width: none;
    margin: 0;
    padding-bottom: 0;
    padding-right: 40px;
  }
  .hero-title { font-size: clamp(3rem, 4.6vw, 4.6rem); }
  .hero-lead { font-size: 1.1rem; }
  .hero-facts { margin-top: 54px; }

  .about-grid {
    grid-template-columns: 1.06fr .94fr;
    gap: 76px;
    align-items: start;
  }
  .about-photo { position: sticky; top: calc(var(--header-h) + 40px); }
  .about-photo img { aspect-ratio: 4 / 5; }
  .about-detail { max-width: 250px; margin-top: 54px; }

  /* Галерея: сетка вместо ленты */
  .gallery {
    display: grid;
    grid-template-columns: 1.22fr 1fr;
    grid-template-areas:
      "a b"
      "a c"
      "d d";
    gap: 18px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .gallery-item { flex: none; }
  .gallery-item:nth-child(1) { grid-area: a; }
  .gallery-item:nth-child(2) { grid-area: b; aspect-ratio: 4 / 3; }
  .gallery-item:nth-child(3) { grid-area: c; aspect-ratio: 4 / 3; }
  .gallery-item:nth-child(4) { grid-area: d; aspect-ratio: 16 / 9; }
  .gallery-open { aspect-ratio: auto; height: 100%; }
  .gallery-item:nth-child(1) .gallery-open { aspect-ratio: 4 / 5; }
  .gallery-item:nth-child(4) .gallery-open { aspect-ratio: 16 / 9; }

  .menu-head {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 60px;
    align-items: end;
  }
  .menu-head .section-title { margin-bottom: 0; }
  .menu-intro { padding-bottom: 6px; }
  .menu-sheet-open { max-width: 620px; }

  .contacts-grid {
    grid-template-columns: 1fr 1.02fr;
    gap: 72px;
    align-items: start;
  }
  .contacts-map { position: sticky; top: calc(var(--header-h) + 40px); }

  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr 1.1fr auto;
    gap: 44px;
    align-items: start;
  }
  .site-footer { padding: 76px 0 30px; }
}

@media (min-width: 1200px) {
  .hero-title { font-size: 5rem; }
  .gallery { gap: 22px; }
}

/* ---------- Reduced motion / print ---------- */

/* ---------- Coffee up button ---------- */
  .coffee-up-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(36, 27, 18, 0.12);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(36, 27, 18, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    padding: 0;
    font-size: 0.85rem;
    font-weight: 500;
  }

  .coffee-up-btn svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: currentColor;
  }

  .coffee-up-btn span {
    font-size: 0.68rem;
    line-height: 1.2;
    font-weight: 500;
  }

  .coffee-up-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 27, 18, 0.16);
  }

  .coffee-up-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  @media (prefers-reduced-motion: reduce) {
    .coffee-up-btn {
      transition: none;
    }
    .coffee-up-btn:hover {
      transform: none;
    }
  }
