/* ============================================================
   Reset & variables
   ============================================================ */
:root {
  --ink:      #1a1a1a;
  --gray:     #9a9590;
  --line:     #e8e6e2;
  --ph-bg:    #d9d6d0;
  --dark-bg:  #1a1a1a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-wordmark {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.nav-logo-img {
  width: 80px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 0.5;
}

/* ── Hamburger button ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile nav panel ── */
.nav-mobile {
  display: none;
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  z-index: 99;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  padding: 8px 0 20px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile a {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.2s ease;
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  opacity: 0.5;
}

/* ============================================================
   Hero — AI tile background
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('images/desktop.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  filter: brightness(1.15) contrast(1.05) saturate(0.9) hue-rotate(-3deg);
}

/* ── Логотип по центру ── */
.hero-logo-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  opacity: 0;
  animation: hero-logo-in 0.8s ease 0.15s forwards;
}

@keyframes hero-logo-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Чёрный логотип на светлом фоне — без filter */
.hero-logo {
  width: 420px;
  max-width: 68vw;
  display: block;
}

/* ── Кнопка ── */
.hero-cta-wrap {
  position: absolute;
  bottom: clamp(2.5rem, 6vh, 4.5rem);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 0.05em;
  padding: 0.85rem 2.4rem;
  border: none;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn-cta:hover {
  background: #000;
}

.icon-scissors,
.icon-comb {
  display: block;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.btn-cta:hover .icon-scissors {
  transform: rotate(15deg);
}

.btn-cta:hover .icon-comb {
  transform: translateY(2px);
}

/* ============================================================
   Shared section styles
   ============================================================ */
.section {
  padding: 100px 0;
  background: #fff;
}

.section-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 63px;
  letter-spacing: 0.05em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 16px;
}

.section-meta {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: #6a6a6a;
  margin-bottom: 56px;
}

.contacts .section-meta {
  color: rgba(255, 255, 255, 0.4);
}

#services, #masters, #gallery-roll, #contacts {
  scroll-margin-top: 80px;
}

/* ============================================================
   Services
   ============================================================ */
.service-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.service-row:first-child {
  border-top: 1px solid var(--line);
}

.service-name {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 1rem;
  white-space: nowrap;
}

.service-dots {
  flex: 1;
  border-bottom: 1px dotted #ccc;
  min-width: 20px;
}

.service-price {
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--gray);
  white-space: nowrap;
}

.services-subtitle {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 20px;
}

.services-list + .services-subtitle {
  margin-top: 56px;
}


/* ============================================================
   Masters
   ============================================================ */
.masters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 640px;
  margin: 0 auto;
}

.master-photo-wrap {
  aspect-ratio: 3 / 4;
  width: 100%;
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--ph-bg);
}

.master-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.master-name-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.master-name {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 36px;
  letter-spacing: 0.05em;
  line-height: 1;
}

.master-id {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: #6a6a6a;
}

.master-role {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: #6a6a6a;
}

/* ============================================================
   Photo roll
   ============================================================ */
.roll-wrap {
  position: relative;
  margin: 0 auto 40px;
}

.roll-track {
  display: flex;
  align-items: stretch;
  gap: 12px;
  height: 400px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.roll-track::-webkit-scrollbar {
  display: none;
}

.roll-track.is-dragging {
  cursor: grabbing;
}

.roll-card {
  flex: 0 0 auto;
  height: 100%;
  scroll-snap-align: start;
  background: var(--ph-bg);
  overflow: hidden;
}

.roll-img {
  height: 100%;
  width: auto;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.roll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.roll-arrow:hover {
  opacity: 0.6;
}

.roll-prev {
  left: 16px;
}

.roll-next {
  right: 16px;
}

.roll-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ============================================================
   Contacts
   ============================================================ */
.contacts {
  background: var(--dark-bg);
}

.contacts .section-title {
  color: #fff;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contacts-list {
  list-style: none;
}

.contacts-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contacts-list li:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-label {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.45);
}

.contact-value {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.contact-link {
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: #fff;
}

.map-wrap {
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Social buttons in contacts ── */
.contact-social-btns {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  flex-wrap: wrap;
}

.contact-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 0.55rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.contact-social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--dark-bg);
  padding: 60px 48px 40px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-logo {
  display: block;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 24px;
  filter: invert(1);
}

.footer-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.15em;
}

/* ============================================================
   Responsive — 768px
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .nav {
    padding: 16px 24px;
  }

  .nav-links {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .nav-mobile {
    display: flex;
  }

  /* Мобильный фон плитки */
  .hero::before {
    background-image: url('images/mobile.webp');
  }



  .section {
    padding: 72px 0;
  }

  .section-title {
    font-size: 42px;
    margin-bottom: 36px;
  }

  .masters-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    gap: 48px;
  }

  .roll-track {
    height: 280px;
    gap: 8px;
  }

  .roll-arrow {
    width: 44px;
    height: 44px;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contacts-list li {
    grid-template-columns: 90px 1fr;
    gap: 12px;
  }

  .map-wrap {
    aspect-ratio: 16 / 9;
  }

  .footer {
    padding: 48px 24px 32px;
  }

  .footer-logo {
    max-width: 320px;
  }
}

/* ============================================================
   Responsive — 480px
   ============================================================ */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section-title {
    font-size: 32px;
  }

  .roll-arrow {
    width: 44px;
    height: 44px;
  }

  .service-row {
    gap: 6px;
  }

  .service-name {
    font-size: 0.72rem;
  }

  .service-dots {
    min-width: 10px;
  }

  .service-price {
    font-size: 0.66rem;
  }

  .hero-logo {
    width: 260px;
    max-width: 74vw;
    display: block;
    margin: 0 auto;
  }

  .hero-cta-wrap {
    bottom: clamp(5rem, 18vh, 8rem);
  }
}
