/* ==========================================================================
   AVESALON BARBER SHOP — style.css
   Базовий шар: reset, дизайн-токени, типографіка, сітка, header, footer.
   Mobile-first. Усі кольори/розміри — через CSS custom properties.
   ========================================================================== */

/* ---------- 1. Дизайн-токени ---------------------------------------------- */
:root {
  /* Кольори: темна база + метал/золото з логотипу */
  --c-bg:          #0b0b0c;
  --c-bg-deep:     #070708;
  --c-surface:     #141416;
  --c-surface-2:   #1c1c1f;
  --c-teal:        #0e2f2b;  /* темно-смарагдове поле з логотипу */

  --c-ink:         #ecebe7;  /* кремовий текст з логотипу */
  --c-ink-dim:     #9c9a94;
  --c-ink-mute:    #6d6b66;

  --c-gold:        #c9a349;  /* основний акцент — золото логотипу */
  --c-gold-soft:   #e3c982;
  --c-gold-deep:   #8a6f2c;
  --c-silver:      #c0c0c0;

  --c-line:        #2a2a2e;
  --c-line-soft:   #1f1f23;
  --c-success:     #4ecca3;
  --c-danger:      #e2564d;

  /* Типографіка */
  --font-head: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --fs-h1: clamp(2rem, 7vw, 3rem);      /* 32 → 48px */
  --fs-h2: clamp(1.5rem, 4.5vw, 2.25rem); /* 24 → 36px */
  --fs-h3: clamp(1.25rem, 3vw, 1.75rem);  /* 20 → 28px */
  --fs-body: clamp(0.875rem, 1.6vw, 1rem);/* 14 → 16px */
  --fs-sm: 0.8125rem;
  --fs-xs: 0.6875rem;

  /* Відступи: базовий модуль 8px */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-12: 96px;

  /* Форма */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-full: 999px;

  /* Тіні */
  --sh-1: 0 4px 12px rgba(0, 0, 0, .5);
  --sh-2: 0 12px 32px rgba(0, 0, 0, .55);
  --sh-metal: 0 8px 24px rgba(201, 163, 73, .12);

  /* Рух */
  --t-fast: 200ms ease-out;
  --t-base: 300ms ease-in-out;
  --t-slide: 400ms cubic-bezier(.25, .46, .45, .94);

  /* Розкладка */
  --container: 1200px;
  --header-h: 64px;
}

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

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

body {
  margin: 0;
  background-color: var(--c-bg);
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(201, 163, 73, .07), transparent 60%),
    radial-gradient(700px 420px at 92% 4%, rgba(14, 47, 43, .55), transparent 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 var(--sp-2);
  letter-spacing: .01em;
}

h1 { font-size: var(--fs-h1); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0 0 var(--sp-2); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--c-gold-soft);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--c-gold); }

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

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--c-gold);
  color: #10100e;
}

/* ---------- 3. Утиліти ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-2);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: -100px;
  z-index: 200;
  background: var(--c-gold);
  color: #10100e;
  font-weight: 600;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  transition: top var(--t-fast);
}
.skip-link:focus { top: var(--sp-1); color: #10100e; }

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

/* ---------- 4. Секції та заголовки ---------------------------------------- */
.section {
  padding-block: var(--sp-6);
}
.section--tight { padding-block: var(--sp-4); }

.section--alt {
  background: linear-gradient(180deg, transparent, rgba(20, 20, 22, .85) 12%, rgba(20, 20, 22, .85) 88%, transparent);
  border-block: 1px solid var(--c-line-soft);
}

.section__head {
  max-width: 720px;
  margin: 0 auto var(--sp-4);
  text-align: center;
}

.section__head p {
  color: var(--c-ink-dim);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-head);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-2);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold-deep), transparent);
}

.lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--c-ink-dim);
}

/* Золота лінія-роздільник */
.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--c-line), var(--c-gold-deep), var(--c-line), transparent);
  margin-block: var(--sp-6);
}

/* ---------- 5. Смуга барбер-стовпа ---------------------------------------- */
.pole-strip {
  height: 3px;
  background-image: repeating-linear-gradient(
    115deg,
    #b23a34 0 10px,
    #e8e6e0 10px 20px,
    #2f4f7a 20px 30px,
    #e8e6e0 30px 40px
  );
  background-size: 80px 100%;
  opacity: .62;
}

/* ---------- 6. Header ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 12, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-line-soft);
  transition: background var(--t-base), box-shadow var(--t-base);
}

.site-header.is-scrolled {
  background: rgba(8, 8, 9, .95);
  box-shadow: var(--sh-1);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-ink);
  margin-right: auto;
}
.brand:hover { color: var(--c-ink); }

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  border: 1px solid var(--c-gold-deep);
  box-shadow: var(--sh-metal);
  transition: transform var(--t-base);
}
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__text strong {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.brand__text em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--c-gold);
}

/* Навігація — на мобільних це висувна панель */
.nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: var(--c-bg-deep);
  border-bottom: 1px solid var(--c-line);
  padding: var(--sp-2) var(--sp-2) var(--sp-3);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__link {
  display: block;
  padding: 12px var(--sp-1);
  color: var(--c-ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--c-line-soft);
  transition: color var(--t-fast), padding-left var(--t-fast);
}
.nav__link:hover { color: var(--c-gold); padding-left: var(--sp-2); }
.nav__link[aria-current="page"] { color: var(--c-gold); }

.nav__cta { margin-top: var(--sp-2); }
.nav__cta .btn { width: 100%; }

/* Гамбургер */
.nav-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.nav-toggle:hover { border-color: var(--c-gold-deep); }

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header__cta { display: none; }

/* ---------- 7. Hero ------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-6) var(--sp-8);
  border-bottom: 1px solid var(--c-line-soft);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--c-bg));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}

.hero__logo {
  width: min(220px, 58vw);
  margin-inline: auto;
  border-radius: var(--r-full);
  border: 1px solid var(--c-gold-deep);
  box-shadow: var(--sh-2), var(--sh-metal);
}

.hero h1 {
  margin-bottom: var(--sp-2);
}

.hero h1 span {
  display: block;
  background: linear-gradient(100deg, var(--c-gold-soft), var(--c-gold) 45%, var(--c-gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-line);
  color: var(--c-ink-dim);
  font-size: var(--fs-sm);
}

.hero__fact strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--c-ink);
}

/* Колаж фото у hero */
.hero__collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}

.hero__collage img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-2);
  filter: grayscale(.25) contrast(1.05);
  transition: filter var(--t-base), transform var(--t-base);
}
.hero__collage img:hover { filter: none; transform: translateY(-4px); }
.hero__collage img:nth-child(2) { margin-top: var(--sp-4); }

/* ---------- 8. Сітки ------------------------------------------------------ */
.grid {
  display: grid;
  gap: var(--sp-2);
}
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }

.split {
  display: grid;
  gap: var(--sp-4);
  align-items: center;
}

/* ---------- 9. Footer ----------------------------------------------------- */
.site-footer {
  background: var(--c-bg-deep);
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--c-gold-deep), var(--c-gold), var(--c-gold-deep), transparent) 1;
  padding-top: var(--sp-6);
  margin-top: var(--sp-8);
}

.footer__grid {
  display: grid;
  gap: var(--sp-4);
}

.footer__col h3 {
  font-size: .95rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-2);
}

.footer__col p,
.footer__col li {
  color: var(--c-ink-dim);
  font-size: var(--fs-sm);
}

.footer__list li {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 6px 0;
  border-bottom: 1px dashed var(--c-line-soft);
}
.footer__list li:last-child { border-bottom: 0; }
.footer__list b { color: var(--c-ink); font-weight: 500; }

.footer__contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: var(--c-ink);
}
.footer__contact-link:hover { color: var(--c-gold); }

.socials {
  display: flex;
  gap: var(--sp-1);
  margin-top: var(--sp-2);
}

.socials a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.socials a:hover {
  border-color: var(--c-gold);
  background: rgba(201, 163, 73, .1);
  transform: translateY(-2px);
}

.footer__bottom {
  margin-top: var(--sp-4);
  padding-block: var(--sp-2);
  border-top: 1px solid var(--c-line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  justify-content: space-between;
  color: var(--c-ink-mute);
  font-size: var(--fs-xs);
}

/* ---------- 10. Кнопка «вгору» -------------------------------------------- */
.to-top {
  position: fixed;
  right: var(--sp-2);
  bottom: var(--sp-2);
  z-index: 90;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base), border-color var(--t-fast);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--c-gold); }
