/* ============================================================
   UI-KIT · COMPONENTS
   Залежить від tokens.css (підключай першим).
   <link rel="stylesheet" href="tokens.css">
   <link rel="stylesheet" href="ui-kit.css">
   Шрифти (обери під тему):
     Inter:    family=Inter:ital,wght@0,400..900;1,400;1,700
     soft:     family=Raleway:wght@400..800&family=Nunito:wght@400..700
   ============================================================ */

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--c-ink);
  background: var(--c-cream);
  line-height: var(--lh-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.h1 {
  font-family: var(--font-heading, var(--font-sans));
  font-size: var(--fs-h1);
  font-weight: var(--fw-extra);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--c-ink);
}
.h-hero {
  font-family: var(--font-heading, var(--font-sans));
  font-size: var(--fs-hero);
  font-weight: var(--fw-black);
  line-height: 1;
  letter-spacing: -3px;
  color: var(--c-ink);
}
.h2 {
  font-family: var(--font-heading, var(--font-sans));
  font-size: var(--fs-h2);
  font-weight: var(--fw-extra);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--c-ink);
}
.h3 { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-snug); }
.lead { font-size: var(--fs-md); color: var(--c-muted); line-height: var(--lh-loose); max-width: 560px; }
.accent  { color: var(--c-green); }
.accent-italic { font-style: italic; color: var(--c-green); }
.muted   { color: var(--c-muted); }
.faint   { color: var(--c-faint); }

/* Eyebrow / label-tag — uppercase міні-лейбл над заголовком */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-green);
  margin-bottom: var(--sp-3);
}
.eyebrow.with-rule::before {
  content: ''; width: 22px; height: 2px;
  background: var(--c-green); border-radius: 2px;
}
.eyebrow.on-dark { color: rgba(232,196,106,0.65); }   /* золотий на темному */

/* Pill-лейбл (booking style) */
.tag {
  display: inline-block;
  background: var(--c-green-light);
  color: var(--c-green-dark);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
}
.tag.on-dark { background: rgba(255,255,255,0.15); color: #fff; }

/* ============================================================
   LAYOUT
   ============================================================ */
.section { padding: var(--sp-22) var(--sp-12); }
.section.bg-tint   { background: var(--c-bg); }
.section.bg-cream  { background: var(--c-cream); }
.section.bg-green  { background: var(--c-green); color: #fff; }
.section.bg-deep   { background: var(--c-green-deep); color: #fff; }
.container        { max-width: var(--container); margin: 0 auto; }
.container.narrow { max-width: var(--container-narrow); }

@media (max-width: 860px)  { .section { padding: 60px 24px; } }
@media (max-width: 600px)  { .section { padding: 50px 20px; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  padding: 16px 32px;
  border: none;
  border-radius: var(--r-btn, var(--r-md));
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-base), transform var(--t-fast),
              box-shadow var(--t-base), filter var(--t-base);
}
.btn svg { flex-shrink: 0; transition: transform var(--t-base); }

/* primary — зелена */
.btn-primary { background: var(--c-green); color: #fff; box-shadow: var(--sh-xs); }
.btn-primary:hover { background: var(--c-green-hover); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.btn-primary:hover svg { transform: translate(2px, -2px); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { background: rgba(65,175,100,0.4); cursor: not-allowed; transform: none; box-shadow: none; }

/* ink — темна (performance hero) */
.btn-ink { background: var(--c-ink); color: #fff; box-shadow: var(--sh-ink); }
.btn-ink:hover { background: #1A1209; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(12,9,3,0.22); }
.btn-ink:active { transform: translateY(0); }

/* ghost — контурна */
.btn-ghost { background: transparent; color: var(--c-green-dark); border: 1.5px solid var(--c-border); }
.btn-ghost:hover { background: var(--c-cream); border-color: var(--c-muted); }

/* danger */
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; }

/* розміри / модифікатори */
.btn-sm   { padding: 10px 18px; font-size: var(--fs-base); }
.btn-lg   { padding: 18px 36px; }
.btn-block{ width: 100%; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-border-green);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
  will-change: transform;
}
.card:hover {
  border-color: rgba(65,175,100,0.4);
  transform: translateY(-3px);
  box-shadow: var(--sh-card);
}
.card.lift:hover { transform: translateY(-8px); box-shadow: var(--sh-lift); }
.card.flat { box-shadow: none; }
.card.on-dark {
  background: rgba(255,255,255,0.06);
  border-color: rgba(232,196,106,0.14);
  color: #fff;
}
.card.on-dark:hover { background: rgba(255,255,255,0.09); border-color: rgba(232,196,106,0.28); }

.card-icon {
  width: 44px; height: 44px;
  background: var(--c-green-light);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  transition: transform var(--t-slow) var(--ease-spring);
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--c-green); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card-icon { transform: scale(1.12) rotate(-6deg); }
.card-icon.round { border-radius: 50%; width: 52px; height: 52px; font-size: 24px; }

.card-title { font-weight: var(--fw-bold); font-size: var(--fs-base); color: var(--c-ink); margin-bottom: 7px; line-height: var(--lh-snug); }
.card-text  { font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.65; }

/* сітки карток */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid.cols-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: 3px 9px;
  border-radius: var(--r-pill);
}
.badge.green { background: var(--c-green-light); color: var(--c-green-dark); }
.badge.gold  { background: var(--c-gold-soft);   color: #8A6D1E; }
.badge.gray  { background: #EEF0EF;              color: var(--c-muted); }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: block; margin-bottom: 16px; }
.field > label,
.field-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 7px;
}
.field-label .req { color: var(--c-warn); margin-left: 2px; }

.input, select.input, textarea.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--c-border-green);
  border-radius: var(--r);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--c-ink);
  background: var(--c-cream);
  outline: none;
  appearance: none;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}
textarea.input { height: auto; min-height: 90px; padding: 12px 16px; resize: vertical; }
.input::placeholder { color: var(--c-faint); }
.input:focus { border-color: var(--c-green); box-shadow: 0 0 0 3px rgba(65,175,100,0.12); background: #fff; }
.input.error { border-color: var(--c-danger); box-shadow: 0 0 0 3px rgba(239,68,68,0.08); }

.error-msg { display: none; font-size: 12px; color: var(--c-danger); margin-top: 5px; }
.field.has-error .error-msg { display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

/* картка-форма */
.form-card {
  background: var(--c-white);
  border: 1px solid var(--c-border-green);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: var(--sh-soft);
}
@media (max-width: 600px) { .form-card { padding: 24px 18px; } }

/* radio-кнопки-картки */
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card label {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px;
  border: 1.5px solid var(--c-border-green);
  border-radius: var(--r);
  background: var(--c-cream);
  font-size: var(--fs-base); font-weight: var(--fw-medium); color: var(--c-ink);
  cursor: pointer; user-select: none;
  transition: border-color var(--t-base), background var(--t-base);
}
.radio-card label:hover,
.radio-card input:checked + label { border-color: var(--c-green); background: var(--c-green-light); }
.rdot { width: 18px; height: 18px; border: 2px solid rgba(65,175,100,0.35); border-radius: 50%; position: relative; flex-shrink: 0; transition: all var(--t-base); }
.rdot::after { content: ''; position: absolute; inset: 0; margin: auto; width: 7px; height: 7px; background: #fff; border-radius: 50%; opacity: 0; transition: opacity var(--t-base); }
.radio-card input:checked + label .rdot { background: var(--c-green); border-color: var(--c-green); }
.radio-card input:checked + label .rdot::after { opacity: 1; }

/* inline pill-radio (booking) */
.radio-pill { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-base); font-weight: var(--fw-medium); cursor: pointer; background: #fff; border: 1.5px solid var(--c-border); border-radius: var(--r); padding: 9px 16px; transition: border-color var(--t-fast), background var(--t-fast); user-select: none; }
.radio-pill:has(input:checked) { border-color: var(--c-green); background: var(--c-green-light); color: var(--c-green-dark); }
.radio-pill input { display: none; }

input[type=checkbox], input[type=radio] { accent-color: var(--c-green); }

/* ============================================================
   CHECK-LIST (з кружечком-галкою)
   ============================================================ */
.check-list { list-style: none; display: grid; gap: 13px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-base); line-height: 1.65; color: var(--c-text); }
.check-list .check {
  flex-shrink: 0; width: 20px; height: 20px;
  background: var(--c-green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.check-list .check svg { width: 10px; height: 10px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   NAV / SIDEBAR / TABLE  (admin)
   ============================================================ */
.navbar {
  display: flex; align-items: center;
  padding: 20px 48px;
  position: sticky; top: 0; z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
}

/* ---- Logo ------------------------------------------------- */
/* Варіант А: готовий SVG-файл */
.logo-img { height: 40px; width: auto; display: block; }

/* Варіант Б: лого з HTML (плитка-марка + вордмарк, рендериться шрифтом теми) */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 11px;                 /* squircle-плитка */
  background: var(--c-green);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-base) var(--ease-spring);
}
.logo-mark svg { width: 22px; height: 22px; stroke: var(--c-green-light); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.logo:hover .logo-mark { transform: translate(1px, -1px) rotate(6deg); }
.logo-word { font-family: var(--font-heading, var(--font-sans)); font-weight: var(--fw-extra); font-size: 15px; color: var(--c-ink); line-height: 1.2; letter-spacing: -0.3px; }
.logo-word span { display: block; font-weight: var(--fw-regular); font-size: 12px; color: var(--c-muted); letter-spacing: 0; }
/* на темному фоні */
.logo.on-dark .logo-word { color: #fff; }
.logo.on-dark .logo-word span { color: rgba(255,255,255,0.65); }

.sidebar { width: 240px; flex-shrink: 0; background: var(--c-green-forest); color: #CFE3D6; padding: 22px 14px; display: flex; flex-direction: column; }
.sidebar .brand { font-weight: var(--fw-extra); color: #fff; font-size: 17px; padding: 6px 12px 22px; letter-spacing: -0.3px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r); color: #CFE3D6; text-decoration: none; cursor: pointer; font-weight: var(--fw-semi); font-size: var(--fs-base); margin-bottom: 3px; border: none; background: none; width: 100%; text-align: left; transition: background var(--t-fast), color var(--t-fast); }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: var(--c-green); color: #fff; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.5px; color: var(--c-muted); font-weight: var(--fw-bold); }
tr:last-child td { border-bottom: none; }
.table-wrap { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow-x: auto; }

/* ============================================================
   MODAL / DIALOG
   ============================================================ */
.overlay { position: fixed; inset: 0; background: rgba(12,9,3,0.45); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 999; }
.overlay.show { display: flex; animation: fadeIn 0.25s ease; }
.modal { background: #fff; border-radius: var(--r-lg); padding: 26px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; box-shadow: var(--sh-modal); animation: popIn 0.3s var(--ease-pop); }
.modal.wide { max-width: 640px; }
.modal h3 { font-size: 17px; font-weight: var(--fw-extra); margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* тонкий скролбар */
.modal { scrollbar-width: thin; scrollbar-color: rgba(12,9,3,0.18) transparent; }
.modal::-webkit-scrollbar { width: 7px; }
.modal::-webkit-scrollbar-thumb { background: rgba(12,9,3,0.16); border-radius: 7px; }

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.success-box { text-align: center; padding: 48px 40px; max-width: 400px; }
.success-icon { width: 60px; height: 60px; background: var(--c-green-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; font-size: 28px; }
.success-icon svg { width: 26px; height: 26px; stroke: var(--c-green); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.success-box h3 { font-family: var(--font-heading, var(--font-sans)); font-size: var(--fs-xl); font-weight: var(--fw-extra); color: var(--c-ink); margin-bottom: 10px; }
.success-box p { font-size: var(--fs-base); color: var(--c-muted); line-height: 1.7; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 200; width: calc(100% - 32px); max-width: 860px;
  display: flex; align-items: center; gap: 22px;
  background: var(--c-white); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 18px 22px;
  box-shadow: 0 18px 50px rgba(12,9,3,0.16);
  animation: fadeInUp 0.4s ease both;
}
.cookie-bar[hidden] { display: none; }
.cookie-text { flex: 1; font-size: var(--fs-base); line-height: 1.55; color: #4B5563; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
@media (max-width: 640px) { .cookie-bar { flex-direction: column; align-items: stretch; gap: 14px; bottom: 12px; } .cookie-actions .btn { flex: 1; } }

/* ============================================================
   PHOTO FRAME (zoom-on-hover)
   ============================================================ */
.photo { border-radius: var(--r-2xl); overflow: hidden; background: var(--c-green-light); position: relative; transition: transform var(--t-slow) ease, box-shadow var(--t-slow) ease; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-photo) var(--ease-out), filter var(--t-photo) ease; will-change: transform; }
.photo:hover { transform: translateY(-6px); box-shadow: 0 22px 45px rgba(0,0,0,0.18); }
.photo:hover img { transform: scale(1.06); filter: brightness(1.04) saturate(1.05); }

/* ============================================================
   ANIMATIONS / UTILITIES
   ============================================================ */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn    { 0% { opacity: 0; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
@keyframes floatY   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin     { to { transform: rotate(360deg); } }

/* hero-вхід зі сходинками */
.fade-in    { animation: fadeUp 0.7s ease both; }
.stagger > * { animation: fadeInUp 0.7s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.15s; }
.stagger > *:nth-child(3) { animation-delay: 0.25s; }
.stagger > *:nth-child(4) { animation-delay: 0.35s; }
.stagger > *:nth-child(5) { animation-delay: 0.45s; }

.float { animation: floatY 6s ease-in-out infinite; }
.float:hover { animation-play-state: paused; }

/* scroll-reveal — додай .is-visible через IntersectionObserver */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s var(--ease-out); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* spinner для кнопок */
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
