:root {
  --bg: #ffffff;
  --bg-soft: #f0f0f0;
  --ink: #000000;
  --ink-muted: #666666;
  --ink-faint: #999999;
  --line: rgba(0, 0, 0, 0.14);
  --white: #ffffff;
  --busy: #c8c8c8;
  --sheet: #ffffff;
  --font-display: "Bebas Neue", sans-serif;
  --font-ui: "IBM Plex Sans", sans-serif;
  --font-serif: "IBM Plex Serif", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-sheet: cubic-bezier(0.22, 0.61, 0.36, 1);
  --topbar-h: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sheet-peek: 112px;
  --sheet-lift: 0px;
  --sheet-max: 58dvh;
}

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

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.page-home {
  overflow: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* —— Fixed header —— */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 14px 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.page-home .topbar {
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: transparent;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  margin-left: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.lang-toggle [data-lang-active] {
  opacity: 0.4;
}

html[lang="ru"] .lang-toggle [data-lang-active="ru"],
html[lang="en"] .lang-toggle [data-lang-active="en"] {
  opacity: 1;
}

.lang-sep {
  opacity: 0.35;
}

.auth-chip {
  display: none !important;
}

.auth-chip[hidden] {
  display: none !important;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  max-width: 58%;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  white-space: nowrap;
  opacity: 0.55;
  padding: 8px 6px;
}

.top-nav a.is-active,
.top-nav a:hover {
  opacity: 1;
}

/* —— Home: full hero + overlay bottom sheet —— */
.home-shell {
  position: relative;
  height: 100dvh;
  height: 100svh;
  padding-top: calc(var(--topbar-h) + var(--safe-top));
  overflow: hidden;
}

.hero-panel {
  position: absolute;
  top: calc(var(--topbar-h) + var(--safe-top));
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: #fff;
}

.hero-scene {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* Keep cover above the peek so PRIVATE BARBER stays visible */
  bottom: calc(var(--sheet-peek) + var(--safe-bottom) + var(--sheet-lift, 0px));
  display: grid;
  place-items: center;
  background: #fff;
  transition: filter 0.9s var(--ease-sheet), opacity 0.9s var(--ease-sheet);
  will-change: filter, opacity;
}

.hero-scene.is-dragging {
  transition: none;
}

.hero-static {
  width: 100%;
  height: 100%;
  /* Full-bleed under header: fill edges, crop poster if needed */
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: none;
}

.hero-blur-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0);
  transition: background 0.9s var(--ease-sheet);
}

.hero-blur-veil.is-dragging {
  transition: none;
}

/* Legacy sandwich helpers kept unused — hero is a static poster now */
.hero-meta,
.type-sandwich,
.mega-line,
.hero-portrait-wrap {
  display: none;
}

/* —— Bottom sheet overlay —— */
.booking-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + var(--sheet-lift, 0px));
  z-index: 40;
  height: var(--sheet-max);
  max-height: calc(100dvh - var(--topbar-h) - var(--safe-top) - 12px);
  background: var(--sheet);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translate3d(
    0,
    calc((1 - var(--sheet-p, 0)) * (var(--sheet-max) - var(--sheet-peek))),
    0
  );
  transition: transform 0.85s var(--ease-sheet);
  will-change: transform;
  touch-action: none;
}

/* First paint: fully below viewport, then ease into peek */
.booking-sheet.is-sheet-boot {
  transition: none !important;
  transform: translate3d(0, 105%, 0) !important;
}

.booking-sheet.is-dragging {
  transition: none;
}

.booking-sheet[data-sheet-state="expanded"] {
  touch-action: auto;
}

.sheet-grab {
  flex-shrink: 0;
  padding: 8px 16px 2px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.sheet-grab:active {
  cursor: grabbing;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 0 auto 8px;
}

.sheet-peek-head {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  padding: 0 0 2px;
  min-height: 1.4em;
}

.sheet-title-solo {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  letter-spacing: 0.02em;
  line-height: 0.95;
  font-weight: 400;
  color: var(--ink);
  text-align: left;
  min-width: 0;
}

.sheet-mode-alt {
  appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0 0 0 auto;
  padding: 2px 0 4px;
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
  text-align: right;
}

.sheet-mode-alt:hover,
.sheet-mode-alt:focus-visible {
  color: var(--ink);
  outline: none;
}

.sheet-mode-alt[hidden] {
  display: none !important;
}

.booking-scroll {
  flex: 1;
  min-height: 0;
  /* Date / time: no inner scroll — sheet height fits content */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 2px 14px 14px;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.booking-sheet[data-allow-scroll="true"] .booking-scroll {
  overflow-y: auto;
}

.booking-sheet[data-sheet-state="peek"] .booking-scroll {
  pointer-events: none;
  overflow: hidden;
}

.booking-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 8px 0 10px;
}

.success-note {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.step.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.step.is-done {
  color: var(--ink-muted);
}

.step-num {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 9px;
}

.panel {
  display: none;
}

.panel.is-visible {
  display: block;
  animation: rise 0.4s var(--ease);
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-month {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  letter-spacing: 0.04em;
}

.cal-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 18px;
  line-height: 1;
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(3px, 1.2vw, 6px);
}

.cal-weekdays {
  margin-bottom: 4px;
}

.cal-weekday {
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.day {
  aspect-ratio: 1 / 1;
  width: min(100%, 40px);
  height: auto;
  min-width: 0;
  min-height: 0;
  max-height: none;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(11px, 3.2vw, 13px);
  font-weight: 500;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

@media (max-height: 740px) {
  :root {
    --sheet-peek: 100px;
  }

  .booking-steps {
    margin: 4px 0 6px;
  }

  .day {
    width: min(100%, 34px);
    font-size: 11px;
  }

  .cal-arrow {
    width: 30px;
    height: 30px;
  }

  .sheet-title-solo {
    font-size: 1.7rem;
  }
}

@media (max-height: 640px) {
  :root {
    --sheet-peek: 92px;
    --topbar-h: 40px;
  }

  .hero-static {
    object-position: center top;
  }

  .day {
    width: min(100%, 30px);
    font-size: 10px;
  }
}

.day.is-empty {
  pointer-events: none;
}

.day.is-past,
.day.is-busy {
  color: var(--ink-faint);
  background: var(--busy);
  opacity: 0.55;
  pointer-events: none;
}

.day.is-free {
  background: var(--white);
  border-color: var(--line);
}

.day.is-free:hover {
  transform: scale(1.05);
  border-color: var(--ink);
}

.day.is-selected {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.day.is-today:not(.is-selected) {
  border-color: var(--ink);
}

.cal-note,
.proto-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.4;
}

.back-link {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.last-service {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.last-service-btn {
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-option {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  background: var(--white);
}

.service-option.is-selected {
  border-color: var(--ink);
  background: var(--bg-soft);
}

.service-option img,
.service-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(145deg, #e8e8e8, #b0b0b0);
}

.service-thumb {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: rgba(0, 0, 0, 0.4);
}

.service-option h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
}

.service-option p {
  margin: 0;
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.35;
}

.service-meta {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-align: right;
}

.time-summary {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.time-slot {
  padding: 12px 6px;
  border-radius: var(--radius, 999px);
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
}

.time-slot.is-busy {
  opacity: 0.35;
  pointer-events: none;
  text-decoration: line-through;
}

.time-slot.is-selected {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.cta-primary,
.cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cta-primary {
  background: var(--ink);
  color: #fff;
}

.cta-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cta-ghost {
  margin-top: 10px;
  border: 1px solid var(--line);
}

.tg-notify-optin {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.tg-notify-copy {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #8a8680);
}

.tg-notify-link {
  margin-top: 0;
  text-decoration: none;
}

.tg-notify-after {
  margin: 18px 0 8px;
  padding: 14px 14px 16px;
  text-align: left;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}

.tg-notify-after-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink, #1a1a1a);
}

.tg-notify-after-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  text-decoration: none;
}

.booking-success {
  text-align: center;
  padding: 18px 4px 8px;
  animation: rise 0.45s var(--ease);
}

.success-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.booking-success h3 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.03em;
}

.booking-success p {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
}

.booking-success .cta-primary {
  margin-top: 18px;
}

.my-appointment {
  text-align: center;
  padding: 8px 4px 8px;
  animation: rise 0.45s var(--ease);
}

.my-appt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}

.my-appt-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.my-appt-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.my-appt-btn-notify {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.my-appt-btn-disconnect {
  background: #2aabee;
  color: #fff;
  border-color: #2aabee;
}

.my-appt-tg-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.my-appt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  text-align: left;
}

@media (min-width: 720px) {
  .my-appt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.my-appt-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px 8px;
  background: #fff;
  box-shadow: none;
}

.my-appt-tile-when {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 2px;
}

.my-appt-tile-date {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.my-appt-tile-time {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1;
  flex-shrink: 0;
}

.my-appt-tile-service {
  margin: 0 0 6px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.3;
}

.my-appt-tile-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.my-appt-badge {
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
  border: 1px solid transparent;
  align-self: center;
}

.my-appt-tile-price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1;
  flex-shrink: 0;
  text-align: right;
}

.my-appt-badge.is-confirmed {
  color: #1a5c34;
  background: #eef6f1;
  border-color: #d5e8dc;
}

.my-appt-badge.is-pending {
  color: #6b5420;
  background: #f7f3ea;
  border-color: #ebe2d0;
}

.my-appt-empty {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.my-appointment .cta-primary {
  margin-top: 20px;
}

.booking-sheet.is-my-appointment .booking-steps,
.booking-sheet.is-my-appointment .panel,
.booking-sheet.is-my-appointment .booking-success {
  display: none !important;
}

.booking-sheet.is-my-appointment[data-allow-scroll="true"] .booking-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1 1 auto;
}

.booking-sheet.is-my-appointment .my-appointment {
  min-height: 0;
}

.my-appt-cancel {
  margin-top: 8px;
  width: 100%;
  font-size: 12px;
  padding-top: 7px;
  padding-bottom: 7px;
}

/* —— Inner pages (services / address / portfolio) —— */
.page-inner {
  min-height: 100dvh;
  padding: calc(var(--topbar-h) + var(--safe-top) + 20px) 18px 64px;
  background: #fff;
}

.page-inner .section-head {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.page-inner h1,
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 12vw, 4rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
}

.section-head p:last-child,
.page-lead {
  margin: 10px 0 0;
  max-width: 34ch;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.45;
}

.service-cards {
  display: grid;
  gap: 28px;
}

.service-card {
  display: grid;
  gap: 14px;
}

.service-card-media {
  aspect-ratio: 16 / 11;
  border-radius: 2px;
  overflow: hidden;
  background: linear-gradient(135deg, #d0d0d0 0%, #888 48%, #111 100%);
  position: relative;
}

.service-card-media::after {
  content: attr(data-label);
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}

.service-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.service-card .desc {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
}

.service-card .price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.address-block {
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.address-line {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.address-city {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.howto {
  margin: 22px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.howto li {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.howto li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--ink);
}

.map-link {
  max-width: 220px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.portfolio-item {
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  overflow: hidden;
  background: #c8c8c8;
  position: relative;
}

.portfolio-item:nth-child(3n) {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}

.portfolio-item span {
  display: none;
}

.portfolio-item:nth-child(1) {
  background: linear-gradient(160deg, #d8d8d8, #555);
}
.portfolio-item:nth-child(2) {
  background: linear-gradient(160deg, #bcbcbc, #1e1e1e);
}
.portfolio-item:nth-child(3) {
  background: linear-gradient(120deg, #efefef, #7a7a7a 40%, #111);
}
.portfolio-item:nth-child(4) {
  background: linear-gradient(160deg, #a6a6a6, #333);
}
.portfolio-item:nth-child(5) {
  background: linear-gradient(160deg, #dedede, #4a4a4a);
}
.portfolio-item:nth-child(6) {
  background: linear-gradient(160deg, #c2c2c2, #0f0f0f);
}

.site-footer {
  margin-top: 48px;
  padding: 36px 0 8px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.site-footer p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.site-footer a {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

@keyframes typeDrop {
  from {
    opacity: 0;
    transform: translateY(-18px);
    letter-spacing: 0.08em;
  }
  to {
    opacity: 1;
    transform: none;
    letter-spacing: -0.035em;
  }
}

@keyframes typeRise {
  from {
    opacity: 0;
    transform: translateY(18px);
    letter-spacing: 0.35em;
  }
  to {
    opacity: 1;
    transform: none;
    letter-spacing: 0.18em;
  }
}

@keyframes portraitIn {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 768px) {
  body.page-home {
    background: #111;
  }

  .topbar,
  .home-shell,
  .page-inner {
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
  }

  .topbar {
    left: 50%;
    right: auto;
    width: 430px;
    transform: translateX(-50%);
  }

  .home-shell {
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .page-inner {
    background: #fff;
    min-height: 100dvh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Browser (not Telegram): lift peek above mobile Safari / Chrome toolbar */
body.page-home:not(.tg-webapp) {
  --sheet-peek: 118px;
  --sheet-lift: 18px;
}

@media (max-height: 740px) {
  body.page-home:not(.tg-webapp) {
    --sheet-peek: 108px;
    --sheet-lift: 14px;
  }
}

/* Stage 9.1 — Telegram Mini App: nav BELOW Close/⋯ row (not beside it) */
html.tg-webapp,
body.tg-webapp {
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.tg-webapp {
  /* Floor clears iOS status + TG Close/⋯; JS may raise via --tg-chrome-top */
  --tg-chrome-top: 110px;
  --safe-top: var(--tg-chrome-top);
  --safe-bottom: 8px;
  --sheet-lift: 0px;
  --topbar-h: 40px;
  --sheet-peek: 78px;
  --sheet-max: 58dvh;
}

body.tg-webapp {
  padding-top: 0;
  padding-bottom: 0;
}

html.tg-webapp .topbar,
body.tg-webapp .topbar {
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  transform: none;
  height: auto;
  min-height: calc(var(--tg-chrome-top) + var(--topbar-h));
  /* Empty band for TG chrome, then nav on the next row */
  padding: var(--tg-chrome-top) 16px 8px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: transparent;
  z-index: 70;
}

body.tg-webapp.page-home .topbar {
  background: rgba(255, 255, 255, 0.88);
}

html.tg-webapp .topbar-left,
body.tg-webapp .topbar-left {
  display: none;
}

html.tg-webapp .top-nav,
body.tg-webapp .top-nav {
  width: 100%;
  max-width: none;
  margin-left: 0;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

body.tg-webapp.page-home .home-shell {
  padding-top: calc(var(--tg-chrome-top) + var(--topbar-h));
}

body.tg-webapp.page-home .hero-panel {
  top: calc(var(--tg-chrome-top) + var(--topbar-h));
}

body.tg-webapp.page-home .hero-scene {
  bottom: calc(var(--sheet-peek) + var(--safe-bottom) + var(--sheet-lift, 0px));
}

body.tg-webapp .booking-sheet {
  bottom: calc(var(--safe-bottom) + var(--sheet-lift, 0px));
  max-height: calc(
    100dvh - var(--tg-chrome-top) - var(--topbar-h) - var(--safe-bottom) - 12px
  );
}

html.tg-webapp .page-inner,
body.tg-webapp .page-inner {
  padding: calc(var(--tg-chrome-top) + var(--topbar-h) + 24px) 18px 64px;
}
