:root {
  --font-serif: "Libre Baskerville", "Times New Roman", serif;
  --font-sans: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-base: 0.75rem;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.32);

  --duration-fast: 160ms;
  --duration-normal: 220ms;

  --max-width: 72rem;

  --header-height: clamp(56px, 5vw + 44px, 72px);
  --header-padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* ─── Light theme ─── */
[data-theme="light"] {
  --color-bg-page: #f4eee8;
  --color-bg-elevated: #fff8f1;
  --color-bg-hero: #3d0c02;
  --color-bg-accent-soft: rgba(218, 165, 32, 0.12);
  --color-bg-footer: #1a0502;

  --color-border-subtle: rgba(61, 12, 2, 0.25);
  --color-border-strong: rgba(218, 165, 32, 0.6);

  --color-text-main: #291511;
  --color-text-muted: #6b554d;
  --color-text-soft: rgba(249, 240, 232, 0.92);
  --color-text-strong: #f9f1e7;
  --color-text-on-accent: #1a0a06;

  --color-primary: #3d0c02;
  --color-primary-soft: rgba(61, 12, 2, 0.9);
  --color-accent: #daa520;
  --color-accent-soft: rgba(218, 165, 32, 0.22);

  --color-btn-bg: #daa520;
  --color-btn-bg-hover: #e9ba3b;
  --color-btn-text: #1a0a06;
  --color-btn-ghost-border: rgba(218, 165, 32, 0.7);
  --color-btn-ghost-text: #3d0c02;

  --color-input-bg: #fdf7ef;
  --color-input-border: rgba(61, 12, 2, 0.3);
  --color-input-border-focus: #daa520;
  --color-input-text: #291511;
  --color-input-placeholder: #8c7469;

  --color-error: #b3261e;
  --color-cookie-bg: #2b170f;
  --color-cookie-text: #f9f1e7;
}

/* ─── Dark theme ─── */
[data-theme="dark"] {
  --color-bg-page: #120605;
  --color-bg-elevated: #24100d;
  --color-bg-hero: #1b0503;
  --color-bg-accent-soft: rgba(218, 165, 32, 0.13);
  --color-bg-footer: #050101;

  --color-border-subtle: rgba(255, 226, 187, 0.19);
  --color-border-strong: rgba(218, 165, 32, 0.75);

  --color-text-main: #f9f1e7;
  --color-text-muted: #d9c2b2;
  --color-text-soft: rgba(250, 235, 215, 0.9);
  --color-text-strong: #ffffff;
  --color-text-on-accent: #0b0501;

  --color-primary: #f2e1c5;
  --color-primary-soft: rgba(242, 225, 197, 0.88);
  --color-accent: #e2b63b;
  --color-accent-soft: rgba(226, 182, 59, 0.26);

  --color-btn-bg: #e2b63b;
  --color-btn-bg-hover: #f0c954;
  --color-btn-text: #0b0501;
  --color-btn-ghost-border: rgba(242, 225, 197, 0.7);
  --color-btn-ghost-text: #f9f1e7;

  --color-input-bg: #1a0a07;
  --color-input-border: rgba(250, 235, 215, 0.4);
  --color-input-border-focus: #e2b63b;
  --color-input-text: #f9f1e7;
  --color-input-placeholder: #b89c8b;

  --color-error: #ffb3a8;
  --color-cookie-bg: #1a0a07;
  --color-cookie-text: #f9f1e7;
}

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

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-page);
  color: var(--color-text-main);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  margin: 0;
  color: var(--color-primary);
}

p { margin: 0; }

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

body, p, li, dd, dt {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(3rem, 8vw, 5rem);
}

.section-header {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.section-header--center {
  text-align: center;
}

.section-eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: clamp(0.4rem, 1.2vw, 0.6rem);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: clamp(0.75rem, 1.4vw, 1.1rem);
}

.section-intro {
  max-width: 40rem;
  color: var(--color-text-muted);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
}

.section-header--center .section-intro {
  margin-inline: auto;
}

/* ═══════════════════════════════════════
   HEADER — повністю перероблений
═══════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background: rgba(14, 4, 3, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(218, 165, 32, 0.18);
}

/*
  header-inner:
  - НЕ overflow:hidden — інакше drawer обрізається
  - flex-wrap: nowrap — всі елементи в один рядок
  - justify-content: space-between
  - логотип і праві кнопки — flex-shrink:0
  - nav посередині — flex:1, але теж nowrap
*/
.header-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--header-padding-inline);
  height: 100%;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(0.6rem, 1.6vw, 1.4rem);
}

/* ── Logo ── */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1vw, 0.65rem);
  color: #f9f1e7;
  flex-shrink: 0;
  text-decoration: none;
  /* мінімальна ширина щоб назва не ламалась */
  min-width: 0;
}

.logo-icon {
  width: clamp(1.75rem, 2.8vw, 2.2rem);
  height: clamp(1.75rem, 2.8vw, 2.2rem);
  flex-shrink: 0;
}

.logo-circle {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
}

.logo-hand-main,
.logo-hand-sub {
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-linecap: round;
}

.logo-pivot {
  fill: var(--color-accent);
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-title {
  font-family: var(--font-sans);
  font-size: clamp(0.78rem, 1.3vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #f9f1e7;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: clamp(0.55rem, 0.8vw, 0.68rem);
  color: rgba(218, 165, 32, 0.85);
  white-space: nowrap;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

/* ── Spacer — розштовхує nav і праву групу ── */
.header-spacer {
  flex: 1;
}

/* ── Primary nav — середня зона ── */
.primary-nav {
  /* прихована за замовчуванням, показується від ≥1024 */
  display: none;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.6rem);
  flex-shrink: 0;
}

.nav-link {
  font-size: clamp(0.72rem, 1vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(249, 240, 232, 0.78);
  white-space: nowrap;
  position: relative;
  padding-block: 0.25rem;
  transition: color var(--duration-fast) ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  transition: width var(--duration-normal) ease;
}

.nav-link:hover {
  color: rgba(249, 240, 232, 1);
}

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

/* ── Права група (theme + CTA + burger) ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1vw, 0.75rem);
  flex-shrink: 0;
  margin-left: auto; /* притискає до правого краю */
}

/* ── Theme toggle ── */
.theme-toggle {
  width: clamp(2rem, 3.4vw, 2.4rem);
  height: clamp(2rem, 3.4vw, 2.4rem);
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 50%;
  border: 1px solid rgba(218, 165, 32, 0.45);
  background:
    radial-gradient(circle at 35% 30%, rgba(243, 226, 194, 0.9) 0%, transparent 50%),
    radial-gradient(circle at 65% 70%, rgba(61, 12, 2, 0.8) 0%, transparent 55%),
    #1a0705;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color var(--duration-fast) ease;
}

.theme-toggle:hover {
  border-color: rgba(218, 165, 32, 0.85);
}

/* Іконка — половина кола (день/ніч) */
.theme-toggle-icon {
  display: block;
  width: clamp(0.85rem, 1.6vw, 1.05rem);
  height: clamp(0.85rem, 1.6vw, 1.05rem);
  border-radius: 50%;
  background: conic-gradient(
    from 90deg,
    #f9f1e7 0deg 180deg,
    #3d0c02 180deg 360deg
  );
  flex-shrink: 0;
}

/* ── CTA кнопка в хедері ──
   Тільки ≥768 показується, схована на мобільному */
.site-header .hdr-cta {
  display: none !important; /* mobile: завжди схована */
  flex-shrink: 0;
  white-space: nowrap;
  /* compact розміри для хедера */
  padding-inline: clamp(0.85rem, 1.6vw, 1.25rem);
  padding-block: clamp(0.4rem, 0.9vw, 0.55rem);
  font-size: clamp(0.68rem, 1vw, 0.8rem);
}

/* ── Burger — три лінії, класичний вигляд ── */
.burger {
  /* touch target 44×44 мінімум */
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-base);
  background-color: transparent;
  border: 1px solid rgba(218, 165, 32, 0.35);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color var(--duration-fast) ease,
              background-color var(--duration-fast) ease;
}

.burger:hover {
  border-color: rgba(218, 165, 32, 0.8);
  background-color: rgba(218, 165, 32, 0.07);
}

/* три чіткі лінії */
.burger-line {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background-color: #f9f1e7;
  transition: transform var(--duration-fast) ease,
              opacity var(--duration-fast) ease,
              width var(--duration-fast) ease;
  flex-shrink: 0;
}

/* середня лінія коротша — характерний вигляд */
.burger-line:nth-child(2) {
  width: 14px;
  align-self: flex-start;
  margin-left: 12px;
}

/* стан open — перетворюється на X */
.burger.is-open .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open .burger-line:nth-child(2) {
  opacity: 0;
  width: 0;
}

.burger.is-open .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 20px;
}

/* ── Mobile drawer ── */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: linear-gradient(160deg, #2a0a03 0%, #0d0201 100%);
  border-bottom: 1px solid rgba(218, 165, 32, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-110%);
  transition: transform var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 39; /* нижче ніж header (40) */
  /* НЕ display:none — щоб transition працював */
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav {
  padding-inline: var(--header-padding-inline);
  padding-block: clamp(1.2rem, 3vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(249, 240, 232, 0.85);
  padding-block: 0.75rem;
  border-bottom: 1px solid rgba(218, 165, 32, 0.1);
  transition: color var(--duration-fast) ease;
}

.mobile-link:hover {
  color: var(--color-accent);
}

.mobile-link:last-of-type {
  border-bottom: none;
}

.mobile-cta {
  margin-top: 1rem;
  align-self: flex-start;
}

/* ── Breakpoints для хедера ──
   Логіка:
   < 768   → logo + [spacer] + theme + burger  (nav прихована, CTA прихована)
   768–1023 → logo + [spacer] + theme + CTA + burger  (nav прихована)
   ≥ 1024  → logo + nav + [spacer] + theme + CTA  (burger прихований)
*/

/* ≥ 768: показати CTA, залишити burger */
@media (min-width: 768px) {
  .site-header .hdr-cta {
    display: inline-flex !important;
  }
}

/* ≥ 1024: показати nav, сховати burger */
@media (min-width: 1024px) {
  .primary-nav {
    display: flex;
  }

  .burger {
    display: none;
  }

  /* Більші розміри CTA на десктопі */
  .site-header .hdr-cta {
    padding-inline: clamp(1rem, 1.8vw, 1.4rem);
    padding-block: clamp(0.45rem, 1vw, 0.6rem);
    font-size: clamp(0.75rem, 1.05vw, 0.88rem);
  }
}

/* ═══════════════════════════════════════
   HERO — повністю перероблений
═══════════════════════════════════════ */

.hero {
  position: relative;
  color: var(--color-text-strong);
  background-color: var(--color-bg-hero);
  /* mobile: блочний — текст під картинкою */
  display: flex;
  flex-direction: column;
}

.hero-media {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.hero-image {
  width: 100%;
  /* mobile: 4:3, tablet: автоматично розтягується */
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* overlay строго ≤ 0.15 */
  background: linear-gradient(
    135deg,
    rgba(218, 165, 32, 0.08) 0%,
    rgba(0, 0, 0, 0.1) 100%
  );
  opacity: 0.15;
  pointer-events: none;
}

/* Контентна частина */
.hero-content {
  position: relative;
  padding-block: clamp(2rem, 6vw, 3.5rem);
}

.hero-kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: clamp(0.68rem, 1.2vw, 0.78rem);
  color: rgba(218, 165, 32, 0.9);
  margin-bottom: clamp(0.5rem, 1.2vw, 0.8rem);
}

.hero-title {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  color: #ffffff;
  margin-bottom: clamp(0.75rem, 1.6vw, 1rem);
  line-height: 1.2;
}

.hero-text {
  max-width: 34rem;
  color: rgba(250, 235, 215, 0.88);
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  margin-bottom: clamp(1.2rem, 2.4vw, 1.6rem);
}

/* Actions: кнопка + нотатка */
.hero-actions {
  display: flex;
  flex-direction: column;   /* mobile: вертикально */
  align-items: flex-start;
  gap: clamp(0.75rem, 1.6vw, 1rem);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

/* Нотатка "Первичный осмотр · 30 минут" */
.hero-note {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: clamp(0.78rem, 1.2vw, 0.88rem);
  color: rgba(250, 235, 215, 0.75);
  /* НЕ inline-flex — не стискувати */
  min-width: 0;
}

.hero-note-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(0.65rem, 1vw, 0.72rem);
  color: rgba(218, 165, 32, 0.8);
}

.hero-note-value {
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  color: rgba(250, 235, 215, 0.85);
}

/* Мета-інфо внизу hero */
.hero-meta {
  display: grid;
  grid-template-columns: 1fr; /* mobile: 1 колонка */
  gap: clamp(0.6rem, 1.4vw, 0.85rem);
  border-top: 1px solid rgba(249, 240, 232, 0.14);
  padding-top: clamp(1rem, 2.2vw, 1.3rem);
  margin-top: 0;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.meta-item dt {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: clamp(0.6rem, 0.9vw, 0.68rem);
  color: rgba(218, 165, 32, 0.65);
}

.meta-item dd {
  margin: 0;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  color: rgba(249, 240, 232, 0.9);
  overflow-wrap: break-word;
  word-break: break-word;
}

.meta-item dd a {
  color: var(--color-accent);
}

.meta-item dd a:hover {
  text-decoration: underline;
}

/* ── Hero адаптив ── */

/* ≥ 768: 2-колонкова сітка, контент зліва, фото справа */
@media (min-width: 768px) {
  .hero {
    flex-direction: row;
    align-items: stretch;
    min-height: clamp(420px, 60vh, 640px);
  }

  .hero-media {
    order: 2;
    flex: 0 0 48%;
    max-width: 48%;
  }

  .hero-image {
    width: 100%;
    height: 100%;
    aspect-ratio: unset; /* висота від flex-контейнера */
  }

  .hero-content {
    order: 1;
    flex: 1 1 52%;
    padding-block: clamp(2.5rem, 6vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  /* роздільник між кнопкою і нотаткою */
  .hero-note {
    padding-left: clamp(0.75rem, 1.4vw, 1rem);
    border-left: 1px solid rgba(249, 240, 232, 0.3);
    margin-left: 0.25rem;
  }

  .hero-meta {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
}

/* ≥ 1024: більше простору */
@media (min-width: 1024px) {
  .hero-media {
    flex: 0 0 46%;
    max-width: 46%;
  }

  .hero-content {
    flex: 1 1 54%;
  }
}

/* ≥ 1280 */
@media (min-width: 1280px) {
  .hero {
    min-height: clamp(480px, 65vh, 720px);
  }
}

/* ─── Btn (глобальний) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding-inline: clamp(1.1rem, 2.2vw, 1.6rem);
  padding-block: clamp(0.5rem, 1.1vw, 0.65rem);
  font-family: var(--font-sans);
  font-size: clamp(0.78rem, 1.1vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-color: var(--color-btn-bg);
  color: var(--color-btn-text);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.btn:hover {
  background-color: var(--color-btn-bg-hover);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-btn-ghost-text);
  border-color: var(--color-btn-ghost-border);
}

.btn--ghost:hover {
  background-color: var(--color-accent-soft);
  transform: none;
  box-shadow: none;
}

.btn--full {
  width: 100%;
}

/* ─── Atelier ─── */
.atelier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.2rem, 3vw, 1.8rem);
  margin-top: clamp(1.5rem, 4vw, 2.2rem);
}

@media (min-width: 768px) {
  .atelier-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.atelier-block {
  padding: clamp(1.3rem, 3.2vw, 1.9rem);
  border-radius: var(--radius-base);
  background: radial-gradient(circle at top left, var(--color-bg-accent-soft) 0, var(--color-bg-elevated) 52%);
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.atelier-title {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin-bottom: 0.7rem;
}

.atelier-text + .atelier-text {
  margin-top: 0.4rem;
}

/* ─── Images grid ─── */
.section--images {
  padding-top: 0;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.6rem);
  margin-top: clamp(1.8rem, 4vw, 2.3rem);
}

@media (min-width: 768px) {
  .image-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.image-card {
  border-radius: var(--radius-base);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-bg-elevated);
  box-shadow: var(--shadow-soft);
}

.image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.image-caption {
  padding: clamp(0.9rem, 2.2vw, 1.2rem);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ─── Services ─── */
.section--services {
  background:
    radial-gradient(circle at 10% 0, rgba(218, 165, 32, 0.12) 0, transparent 52%),
    radial-gradient(circle at 100% 120%, rgba(61, 12, 2, 0.6) 0, transparent 68%);
}

.service-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.8rem, 2vw, 1.2rem);
  margin-top: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 4vw, 2.6rem);
}

@media (min-width: 768px) {
  .service-summary {
    grid-template-columns: repeat(4, 1fr);
  }
}

.summary-item {
  padding: clamp(0.9rem, 2.4vw, 1.3rem);
  border-radius: var(--radius-base);
  background-color: rgba(249, 240, 232, 0.9);
  border: 1px solid var(--color-border-subtle);
}

[data-theme="dark"] .summary-item {
  background-color: rgba(24, 10, 7, 0.98);
}

.summary-title {
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
}

.summary-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.4rem, 3vw, 1.9rem);
}

@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  border-radius: var(--radius-base);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle);
  padding: clamp(1.4rem, 3.2vw, 1.9rem);
  box-shadow: var(--shadow-card);
}

.service-card-header {
  margin-bottom: 0.85rem;
}

.service-card-title {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  margin-bottom: 0.25rem;
}

.service-card-tag {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.service-card-text {
  font-size: 0.95rem;
  color: var(--color-text-main);
  margin-bottom: 0.7rem;
}

.service-list {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.service-list li + li {
  margin-top: 0.2rem;
}

.service-note {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ─── Timeline ─── */
.section--chronology {
  background-color: var(--color-bg-elevated);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-top: clamp(1.7rem, 3.4vw, 2.2rem);
  border-left: 1px solid var(--color-border-subtle);
  padding-left: 1.4rem;
}

.timeline-item + .timeline-item {
  margin-top: 1.3rem;
}

.timeline-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ─── Map ─── */
.section--map {
  background-color: transparent;
}

.map-placeholder {
  border-radius: var(--radius-base);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-bg-elevated);
  box-shadow: var(--shadow-soft);
}

.map-placeholder img {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.map-note {
  padding: clamp(0.8rem, 2vw, 1rem);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ─── Contact ─── */
.section--contact {
  background:
    radial-gradient(circle at 0 20%, rgba(218, 165, 32, 0.19) 0, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(61, 12, 2, 0.85) 0, transparent 65%);
  overflow: hidden; /* ← страхує від виходу дочірніх елементів */
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.6rem, 3.8vw, 2.4rem);
  width: 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.contact-panel {
  min-width: 0;      /* ← прибираємо max-width: 30rem — він ламав grid */
  width: 100%;
}

.contact-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-top: 1.3rem;
  width: 100%;
}

@media (min-width: 480px) {
  .contact-details {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-item {
  padding: clamp(0.6rem, 2vw, 0.75rem);
  border-radius: 0.6rem;
  background-color: rgba(249, 240, 232, 0.86);
  border: 1px solid var(--color-border-subtle);
  min-width: 0;
  overflow: hidden;   /* ← email/телефон не виходять за картку */
}

[data-theme="dark"] .contact-item {
  background-color: rgba(20, 7, 5, 0.98);
}

.contact-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.contact-value {
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
  overflow-wrap: break-word;
  word-break: break-word;  /* ← email не розриває layout */
}

/* ─── Form panel ─── */
.contact-form-panel {
  border-radius: var(--radius-base);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-card);
  padding: clamp(1rem, 4vw, 1.9rem);  /* ← менший padding на мобільному */
  min-width: 0;
  width: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;   /* mobile: завжди 1 колонка */
  gap: 1rem;
  width: 100%;
}

@media (min-width: 600px) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  width: 100%;
}

.form-field--full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-main);
}

label span[aria-hidden="true"] {
  color: var(--color-accent);
  margin-left: 0.2rem;
}

input,
textarea {
  width: 100%;
  max-width: 100%;       /* ← ніколи не виходить за батька */
  border-radius: 0.5rem;
  border: 1px solid var(--color-input-border);
  background-color: var(--color-input-bg);
  color: var(--color-input-text);
  padding-inline: clamp(0.65rem, 2vw, 0.95rem);
  padding-block: clamp(0.5rem, 1.4vw, 0.75rem);
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.6vw, 0.9rem);
  transition: border-color var(--duration-fast) ease;
  /* щоб padding не додавався до width */
  box-sizing: border-box;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-input-placeholder);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-input-border-focus);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.18);
}

textarea {
  resize: vertical;
  min-height: 7rem;
}

.checkbox-label {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.checkbox-label input {
  width: auto;
  max-width: none;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.field-error {
  min-height: 1.1rem;
  font-size: 0.8rem;
  color: var(--color-error);
}

.form-footnote {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ─── Footer ─── */
.site-footer {
  background-color: var(--color-bg-footer);
  color: var(--color-text-soft);
  padding-block: clamp(2rem, 4vw, 2.6rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.footer-column {
  font-size: 0.85rem;
  min-width: 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.footer-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(218, 165, 32, 0.7);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: rgba(218, 165, 32, 0.9);
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1rem;
}

.footer-subtitle {
  font-size: 0.78rem;
  color: rgba(249, 240, 232, 0.7);
}

.footer-text {
  color: rgba(249, 240, 232, 0.78);
  max-width: 26rem;
  margin-bottom: 0.5rem;
}

.footer-meta {
  font-size: 0.8rem;
  color: rgba(249, 240, 232, 0.6);
}

.footer-heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.5rem;
  color: rgba(218, 165, 32, 0.85);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link {
  display: inline-block;
  padding-block: 0.2rem;
  color: rgba(249, 240, 232, 0.75);
  transition: color var(--duration-fast) ease;
}

.footer-link:hover {
  color: var(--color-accent);
}

/* ─── Legal pages ─── */
.page-legal .section-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.legal-main {
  padding-block: clamp(3rem, 6vw, 4rem);
}

.legal-block {
  margin-top: 1.6rem;
}

.legal-heading {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.legal-text {
  font-size: 0.95rem;
  color: var(--color-text-main);
}

.legal-list {
  list-style: disc;
  padding-left: 1.1rem;
  margin-top: 0.4rem;
  color: var(--color-text-muted);
}

.legal-list li + li {
  margin-top: 0.25rem;
}

/* ─── Cookie banner ─── */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  background-color: var(--color-cookie-bg);
  color: var(--color-cookie-text);
  border-top: 1px solid var(--color-border-strong);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform var(--duration-normal) ease;
  z-index: 50;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-block: clamp(0.9rem, 2vw, 1.1rem);
}

@media (min-width: 768px) {
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-text-block {
  font-size: 0.85rem;
  min-width: 0;
}

.cookie-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cookie-text {
  color: rgba(249, 240, 232, 0.82);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}