/* YSL landing — чёрный / белый / серый. Первый экран: только логотип. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,400&family=Inter:wght@400;500;600&display=swap');

:root {
  --black: #000000;
  --surface: #050505;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --white: #fafafa;
  --muted: #8c8c8c;
  --dim: #5a5a5a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --max: 1080px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-size: 15px;
}

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

.visually {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--white);
  color: var(--black);
  font-size: 0.85rem;
}
.skip:focus {
  left: 0.75rem;
}

/* ========== Первый экран: только чёрный и логотип ========== */
.opening {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.opening__inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem 1.5rem 4rem;
}

.opening__logo {
  width: min(72vw, 320px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0;
  animation: logoIn 1.1s var(--ease) 0.15s forwards;
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Стрелка вниз — нейтральная, линия */
.opening__down {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--dim);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.opening__down:hover,
.opening__down:focus {
  color: var(--muted);
  outline: none;
}

.opening__down-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(180deg, var(--line2), transparent);
  border-radius: 1px;
}

/* ========== Основной блок: шик, но монохром ========== */
.page {
  background: var(--black);
  border-top: 1px solid var(--line);
}

.bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.bar.scrolled {
  border-bottom-color: var(--line2);
}

.bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  flex-shrink: 0;
}

.bar__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  opacity: 0.95;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.bar__brand:hover .bar__name,
.bar__brand:focus .bar__name {
  opacity: 1;
}

.bar__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: opacity 0.2s;
}
.bar__brand:hover .bar__logo,
.bar__brand:focus .bar__logo {
  opacity: 1;
}
.bar__brand:focus {
  outline: 1px solid var(--line2);
  outline-offset: 4px;
}
.bar__brand:focus:not(:focus-visible) {
  outline: none;
}

.bar__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 1.25rem;
}

.bar__nav a:not(.bar__btn) {
  color: var(--dim);
  font-weight: 500;
  transition: color 0.2s;
}
.bar__nav a:not(.bar__btn):hover {
  color: var(--white);
}

.bar__btn {
  border: 1px solid var(--line2);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.bar__btn:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.block {
  padding: 3.5rem 0 4rem;
  border-bottom: 1px solid var(--line);
}
.block:last-of-type {
  border-bottom: none;
}

.label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--dim);
  margin-bottom: 0.75rem;
}

.title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--white);
  font-style: normal;
}

.lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 34rem;
  line-height: 1.65;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* Сетка услуг: тонкие грани */
.list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

@media (max-width: 700px) {
  .list {
    grid-template-columns: 1fr;
  }
}

.cell {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--black);
  transition: background 0.25s var(--ease);
  opacity: 0;
  transform: translateY(8px);
}

@media (min-width: 701px) {
  .cell:nth-child(2n) {
    border-right: none;
  }
  .cell:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}

@media (max-width: 700px) {
  .cell {
    border-right: none;
  }
  .cell:last-child {
    border-bottom: none;
  }
}

.cell.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), background 0.2s;
  transition-delay: calc(0.04s * var(--i, 0));
}

.cell:hover {
  background: var(--surface);
}

.cell__i {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #3d3d3d;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.cell h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--white);
  letter-spacing: 0.01em;
}

.cell p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* assign --i in HTML - we can add style per card or use nth-child in JS - simpler use nth in CSS for delay */
.list .cell:nth-child(1) { --i: 1; }
.list .cell:nth-child(2) { --i: 2; }
.list .cell:nth-child(3) { --i: 3; }
.list .cell:nth-child(4) { --i: 4; }
.list .cell:nth-child(5) { --i: 5; }
.list .cell:nth-child(6) { --i: 6; }

/* Тарифы */
.row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

@media (max-width: 800px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.tile {
  padding: 2rem 1.75rem 2.25rem;
  border-right: 1px solid var(--line);
  background: var(--black);
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: background 0.2s;
}

.tile:last-child {
  border-right: none;
}
@media (max-width: 800px) {
  .tile {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .tile:last-child {
    border-bottom: none;
  }
}

.tile.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.tile h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.tile__tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 1.5rem;
}

.tile__label {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.tile ul {
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}
.tile li {
  position: relative;
  padding: 0.4rem 0 0.4rem 0;
  border-top: 1px solid var(--line);
}
.tile li:first-of-type {
  border-top: none;
  padding-top: 0;
}

/* Акцент — только плотнее линия и фон, без цвета */
.tile--focus {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line2);
}

.cta {
  text-align: center;
  margin-top: 2.75rem;
}

.link-btn {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  border-bottom: 1px solid var(--line2);
  padding-bottom: 0.2rem;
  transition: color 0.2s, border-color 0.2s, letter-spacing 0.2s;
}
.link-btn:hover {
  border-color: var(--white);
  letter-spacing: 0.18em;
}

/* Футер */
.end {
  padding: 3.5rem 0 0;
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--black) 0%, #030303 100%);
}

.end__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 2rem;
  max-width: var(--max);
  margin: 0 auto 2.5rem;
  padding-top: 0.5rem;
}

@media (max-width: 640px) {
  .end__top {
    grid-template-columns: 1fr;
  }
}

.end__mail {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  color: var(--white);
  border-bottom: 1px solid var(--line2);
  display: inline-block;
  line-height: 1.2;
  padding-bottom: 0.1rem;
  margin-top: 0.25rem;
  transition: border-color 0.2s;
}
.end__mail:hover {
  border-color: var(--white);
}

.end__sub {
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

.end__rekv {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  margin-top: 0.35rem;
}
.end__rekv-line {
  display: block;
}
.end__rekv .end__rekv-line:first-of-type {
  color: var(--white);
  font-weight: 500;
  font-family: var(--sans);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.end__copy {
  text-align: center;
  font-size: 0.7rem;
  color: var(--dim);
  letter-spacing: 0.06em;
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid var(--line);
  max-width: var(--max);
  margin: 0 auto;
}
.end__copy a {
  color: var(--muted);
  transition: color 0.2s;
}
.end__copy a:hover {
  color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .opening__logo {
    opacity: 1;
    transform: none;
  }
}
