/* ========= БАЗА ========= */
:root {
  --bg-main: #2f3134;
  --bg-hero-top: #d4cbc5;
  --text-main: #f8f5f0;
  --text-muted: #a7a6a4;
  --accent: #f3d38a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --transition-fast: 0.25s ease;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", "Times New Roman", serif;
  --max-width: 1120px;

  --bg-section-gray: #2f3134;
}

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

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font-family: inherit;
}

.page {
  min-height: 100vh;
  background: var(--bg-main);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========= СТІКІ-ХЕДЕР (ТЕМНИЙ, ЯК БУВ) ========= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(24, 25, 27, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 20px;
}

.topbar-logo {
  display: flex;
  align-items: center;
}

.topbar-logo .logo-svg {
  width: 62px;
  height: auto;
  display: block;
}

.topbar-nav {
  display: flex;
  gap: 22px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.topbar-nav a {
  opacity: 0.75;
  position: relative;
  padding-bottom: 4px;
  transition: opacity var(--transition-fast),
    transform var(--transition-fast);
}

.topbar-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition-fast);
}

.topbar-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.topbar-nav a:hover::after {
  width: 100%;
}

.topbar-cta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(243, 211, 138, 0.8);
  background: rgba(243, 211, 138, 0.1);
  color: var(--accent);
  transition: background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.topbar-cta:hover {
  background: rgba(243, 211, 138, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

/* ========= ЛІВА ПАНЕЛЬ ========= */

.side-bar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 56px;
  height: calc(100% - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0 40px;
  pointer-events: none;
  z-index: 10;
}

.side-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11px;
}

.side-social a {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f7f3ec;
  opacity: 0.8;
  pointer-events: auto;
  transition: opacity var(--transition-fast),
    transform var(--transition-fast),
    background var(--transition-fast);
}

.side-social a:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

/* ========= HERO (1 ЕКРАН) ========= */

.hero-header {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  padding-top: 0;
  padding-bottom: 40px;
  color: #2a2927;
  background: var(--bg-hero-top);
}

.hero-container {
  margin-left: 56px;   /* під панель соцмереж */
  flex: 1;
  display: flex;
  max-width: none;
  padding-right: 0;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
  width: 100%;
}

.hero-left {
  padding: 40px 28px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-right {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  min-height: 100vh;   /* фото тягнеться по висоті екрану */
  object-fit: cover;
}

/* градієнт вниз по фото */
.hero-right::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(
    180deg,
    rgba(47, 49, 52, 0) 0%,
    rgba(47, 49, 52, 0.9) 100%
  );
  pointer-events: none;
}

/* ім’я + заголовок */

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  margin-top: 14px;
}

.hero-name-line {
  display: inline-block;
  width: 72px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: #a28856;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 50px;
  line-height: 1.2;
  margin: 0 0 28px;
}

.hero-details {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.hero-details-icon {
  font-size: 20px;
}

/* ========= СЕКЦІЇ ========= */

main {
  padding: 0;
}

.section {
  padding: 72px 0;
  color: var(--text-main);
}

.section.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;   /* центрування по вертикалі */
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 64px;
}

.section-grid.reverse {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.section-text-side {
  position: relative;
}

.section-number {
  font-size: 100px;
  font-weight: 600;
  opacity: 0.06;
  line-height: 1;
  margin-bottom: 0;
}

.section-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-top: -28px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 30px;
  margin: 0 0 18px;
}

.section-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 520px;
}

.section-text p {
  margin: 0 0 12px;
}

.section-link {
  margin-top: 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--accent);
  transition: color var(--transition-fast),
    transform var(--transition-fast);
}

.section-link span {
  font-size: 14px;
  transform: translateY(1px);
  transition: transform var(--transition-fast);
}

.section-link:hover {
  transform: translateX(2px);
}

.section-link:hover span {
  transform: translate(4px, 1px);
}

.section-image-wrapper {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.75);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.section-image-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.9);
}

.section-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========= ФОНИ ДЛЯ ЕКРАНІВ ========= */

/* перехід із hero у сірий трохи вище */
#about {
  background: linear-gradient(
    180deg,
    var(--bg-hero-top) 0%,
    var(--bg-section-gray) 20%,
    var(--bg-section-gray) 100%
  );
}

#directions {
  background: linear-gradient(
    180deg,
    var(--bg-section-gray) 0%,
    var(--bg-main) 45%,
    var(--bg-main) 100%
  );
}

#principles,
#requests {
  background: var(--bg-main);
}

/* ========= АНІМАЦІЇ ПРИ СКРОЛІ ========= */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ========= ДЕТАЛЬНІ СТОРІНКИ ========= */

.detail-body {
  background: var(--bg-main);
}

.detail-page {
  background: radial-gradient(circle at top, #3b3d40 0, #2f3134 55%, #262729 100%);
  min-height: 100vh;
  color: var(--text-main);
}

.detail-header {
  padding: 20px 0 10px;
}

.detail-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.detail-logo::before {
  content: "K.S.";
  font-weight: 500;
}

.detail-nav a {
  opacity: 0.7;
  margin-left: 18px;
}

.detail-nav a:hover {
  opacity: 1;
}

.detail-main {
  padding: 30px 0 70px;
}

.detail-card {
  max-width: 780px;
  background: rgba(33, 34, 36, 0.92);
  border-radius: 32px;
  padding: 40px 40px 46px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5);
}

.detail-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 12px;
}

.detail-title {
  font-family: var(--font-serif);
  font-size: 30px;
  margin: 0 0 18px;
}

.detail-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.detail-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-main);
}

.detail-content p {
  margin: 0 0 12px;
}

.detail-content ul,
.detail-content ol {
  margin: 6px 0 16px;
  padding-left: 20px;
}

.detail-content li + li {
  margin-top: 4px;
}

.detail-back {
  margin-top: 24px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.detail-back span {
  font-size: 14px;
}

/* ========= FOOTER ========= */

footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 40px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-main);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr;
  gap: 40px;
}

.footer-title {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--accent);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  opacity: 0.75;
  transition: opacity var(--transition-fast),
    transform var(--transition-fast);
}

.footer-links a:hover {
  opacity: 1;
  transform: translateX(2px);
}

.footer-bottom {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 16px;
  font-size: 11px;
}

/* ========= АДАПТИВ ========= */

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

  .topbar-inner {
    padding-inline: 16px;
  }

  .topbar-nav {
    gap: 14px;
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .hero-container {
    margin-left: 0;
    padding-right: 20px;
    max-width: var(--max-width);
  }

  .hero-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-header {
    padding-bottom: 20px;
  }

  .hero-left {
    padding: 80px 20px 30px;
  }

  .hero-right {
    margin-top: 12px;
  }

  .hero-photo {
    max-height: 420px;
    min-height: 0;
  }

  .section {
    padding: 40px 0;
  }

  .section.screen {
    min-height: 80vh;
  }

  .section-grid,
  .section-grid.reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Мобільний порядок: спочатку фото, потім текст для всіх секцій */
  .section-image-wrapper {
    order: 1;
  }

  .section-text-side {
    order: 2;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-card {
    padding: 28px 22px 34px;
    border-radius: 24px;
  }

  /* Кнопка "Записатися" як плаваюча внизу справа */
  .topbar-cta {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 60;
    padding: 10px 20px;
    background: var(--accent);
    color: #2a2927;
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  }
}
.floating-cta {
  display: none;
  position: fixed;
  right: 16px;
  /* було bottom: 16px; */
  bottom: calc(64px + env(safe-area-inset-bottom));
  z-index: 60;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #2a2927;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}


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

  .topbar-inner {
    padding-inline: 16px;
  }

  .topbar-nav {
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .hero-container {
    margin-left: 0;
    padding-right: 20px;
    max-width: var(--max-width);
  }

  .hero-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-header {
    padding-bottom: 20px;
  }

  .hero-left {
    padding: 80px 20px 30px;
  }

  .hero-right {
    margin-top: 12px;
  }

  .hero-photo {
    max-height: 420px;
    min-height: 0;
  }

  .section {
    padding: 40px 0;
  }

  .section.screen {
    min-height: 80vh;
  }

  .section-grid,
  .section-grid.reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* спочатку фото, потім текст */
  .section-image-wrapper {
    order: 1;
  }

  .section-text-side {
    order: 2;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-card {
    padding: 28px 22px 34px;
    border-radius: 24px;
  }

  /* на мобільному: кнопку в хедері ховаємо */
  .topbar-cta {
    display: none;
  }

  /* і показуємо плаваючу */
   .floating-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

