:root {
  --ink: #191817;
  --paper: #f7f5f1;
  --line: #d8d1c7;
  --accent: #003968;
  --accent-hi: #8fb6db;
  --accent-dk: #002a4d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px "Manrope", sans-serif;
}

body.locked {
  overflow: hidden;
}

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

button {
  color: inherit;
  font: inherit;
}

/* ─────────── Utility bar ─────────── */

.utility {
  height: 48px;
  padding: 0 max(5.8vw, 24px);
  border-bottom: 1px solid #ddd8d2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 34px;
  background: #f0eeea;
  font-size: 13px;
}

.utility a:first-child {
  margin-right: auto;
}

.utility a,
.utility > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.utility img {
  width: 18px;
  height: 18px;
  display: block;
}

.utility .telegram-icon img {
  width: 20px;
  height: 20px;
}

.utility .telegram-icon {
  transition: transform .2s;
}

.utility .telegram-icon:hover {
  transform: translateY(-2px);
}

/* ─────────── Header ─────────── */

.header {
  height: 116px;
  padding: 0 max(5.8vw, 24px);
  display: flex;
  align-items: center;
  gap: 48px;
  background: #fff;
  position: relative;
  z-index: 30;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 19px;
  letter-spacing: .25em;
  line-height: 1.4;
  font-weight: 500;
  margin-right: auto;
}

.logo-monogram {
  width: 58px;
  height: 70px;
  display: grid;
  place-items: center;
}

.logo-monogram img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  gap: 42px;
  font: 14px "Prata", serif;
  text-transform: uppercase;
}

.nav a {
  position: relative;
}

.nav a:after {
  content: "";
  position: absolute;
  height: 1px;
  background: var(--accent);
  left: 0;
  right: 100%;
  bottom: -8px;
  transition: .3s;
}

.nav a:hover:after {
  right: 0;
}

.contact-button,
.outline-button {
  border: 1px solid;
  padding: 14px 24px;
  font: 13px "Prata", serif;
  text-transform: uppercase;
  transition: .25s;
}

.contact-button:hover {
  color: #fff;
  background: var(--accent);
}

.burger,
.mobile-menu {
  display: none;
}

/* ─────────── Hero ─────────── */

.hero {
  min-height: 650px;
  height: calc(100vh - 164px);
  max-height: 790px;
  position: relative;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-position: center 28%;
  -webkit-background-size: cover;
  background-size: cover;
  background-color: #0b0b0a;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .9s ease;
  will-change: opacity;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  z-index: 0;
}

.hero-bg.active {
  opacity: 1;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0, 30, 55, .93),
    rgba(0, 30, 55, .67) 35%,
    rgba(0, 30, 55, .07) 72%
  );
}

.hero-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 9.4%;
  transform: translateY(-50%);
  width: 480px;
}

.eyebrow {
  font-size: 11px !important;
  letter-spacing: .23em;
  color: var(--accent-hi);
  margin-bottom: 25px !important;
}

.hero h1 {
  font: clamp(48px, 5.2vw, 76px) / 1.05 "Prata", serif;
  font-weight: 400;
  margin: 0 0 22px;
}

.hero-copy > p {
  font-size: 16px;
  line-height: 1.65;
  max-width: 420px;
  margin: 0 0 34px;
  color: #eee;
}

.outline-button {
  display: inline-block;
  border-color: var(--accent-hi);
  padding: 17px 28px;
}

.outline-button:hover {
  background: var(--accent);
  color: #fff;
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  border: 0;
  background: transparent;
  color: #fff;
  font: 58px/1 serif;
  cursor: pointer;
  opacity: .8;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

.dots {
  position: absolute;
  z-index: 3;
  bottom: 27px;
  left: 50%;
  display: flex;
  gap: 11px;
}

.dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  cursor: pointer;
}

.dots button.active {
  background: #fff;
}

/* ─────────── Section / heading ─────────── */

.section {
  max-width: 1440px;
  margin: auto;
  padding: 90px max(5.8vw, 24px);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 38px;
}

.section-heading span {
  color: var(--accent);
  font-size: 11px;
}

.section-heading h2 {
  font: 29px "Prata", serif;
  font-weight: 400;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-heading i {
  height: 1px;
  width: 100px;
  background: var(--accent);
}

/* ─────────── Brands grid ─────────── */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.brand-card {
  min-height: 205px;
  background: #fff;
  border: 1px solid #ded9d1;
  padding: 25px 14px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: .35s;
}

.brand-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: .4s;
}

.brand-card:hover {
  color: #fff;
  transform: translateY(-7px);
  box-shadow: 0 18px 40px rgba(0, 57, 104, .18);
}

.brand-card:hover:before {
  transform: none;
}

.brand-mark {
  position: relative;
  font: clamp(20px, 2.2vw, 32px) "Prata", serif;
  margin-bottom: 36px;
}

.brand-name {
  position: relative;
  font-size: 13px;
}

.card-action {
  position: absolute;
  bottom: 16px;
  opacity: 0;
  font-size: 10px;
  color: #fff;
}

.brand-card:hover .card-action {
  opacity: 1;
}

/* ─────────── About ─────────── */

.about {
  display: grid;
  grid-template-columns: .8fr 1.3fr;
  gap: 80px;
  background: #eeebe5;
  max-width: none;
}

.about-copy > p {
  max-width: 520px;
  line-height: 1.8;
  color: #52504c;
}

.about-copy .lead {
  font: 25px "Prata", serif;
  color: var(--ink);
}

.about-image {
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .8s;
}

.about-image:hover img {
  transform: scale(1.025);
}

.about-image span {
  position: absolute;
  right: 0;
  bottom: 0px;
  background: var(--paper);
  padding: 20px 24px;
  font: 12px/1.5 "Prata", serif;
  letter-spacing: .18em;
}

/* ─────────── Contacts / map ─────────── */

.contacts {
  display: grid;
  grid-template-columns: .58fr 1.42fr;
  gap: 60px;
}

.contact-copy address {
  font-style: normal;
  display: grid;
  gap: 10px;
}

.contact-copy address p {
  display: flex;
  gap: 18px;
  line-height: 1.55;
  align-items: flex-start;
}

.contact-copy b {
  font-size: 22px;
  font-weight: 400;
  min-width: 24px;
}

.contact-copy address p > a,
.contact-copy address p > span:last-child {
  padding-top: 2px;
}

.contact-icon {
  width: 25px;
  height: 25px;
  min-width: 25px;
  display: grid;
  place-items: center;
}

.contact-icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.contact-icon.telegram img {
  width: 20px;
  height: 20px;
}

.map {
  height: 430px;
  background: #e7e1d8;
  filter: grayscale(1) sepia(.1);
  overflow: hidden;
}

.map > * {
  width: 100% !important;
  height: 100% !important;
}

/* ─────────── Footer ─────────── */

footer {
  padding: 45px max(5.8vw, 24px);
  background: var(--accent);
  color: #eee;
  display: flex;
  align-items: center;
  gap: 45px;
  font-size: 12px;
}

.footer-logo {
  font-size: 14px;
}

.footer-logo .logo-monogram {
  width: 40px;
  height: 48px;
}

footer p:last-child {
  margin-left: auto;
  color: #eee;
}

/* ─────────── Modal (desktop) ─────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #0b0b0ad9;
  padding: 28px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(7px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: #f7f5f1;
  width: min(980px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  position: relative;
  box-shadow: 0 30px 100px #0008;
  overflow: auto;
}

.modal-close {
  position: absolute;
  z-index: 5;
  right: 14px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  background: #f7f5f1;
  font-size: 28px;
  cursor: pointer;
}

.mobile-modal-close {
  display: none;
}

.modal-gallery {
  min-height: 580px;
  position: relative;
  overflow: hidden;
  background: #25231f;
}

.modal-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: .55s;
}

.modal-images img.active {
  opacity: 1;
  transform: scale(1);
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 72px;
  border: 0;
  background: transparent;
  color: #fff;
  font: 58px/1 "Times New Roman", serif;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
  opacity: .88;
  transition: opacity .2s, transform .2s;
}

.gallery-arrow.left {
  left: 18px;
}

.gallery-arrow.right {
  right: 18px;
}

.gallery-arrow:hover {
  opacity: 1;
  transform: scale(1.12);
}

.gallery-arrow:active {
  transform: scale(.94);
}

.gallery-count {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #171717;
  color: #fff;
  padding: 9px 14px;
  font-size: 11px;
}

.modal-copy {
  padding: 90px 52px 55px;
  align-self: center;
}

.modal-kicker {
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--accent);
}

.modal-copy h2 {
  font: 38px "Prata", serif;
  font-weight: 400;
  margin: 25px 0;
}

.modal-copy > p:not(.modal-kicker) {
  line-height: 1.8;
  color: #55514c;
}

.modal-copy a {
  display: inline-block;
  margin-top: 25px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

/* ─────────── Keyframes ─────────── */

@keyframes mobileModalReveal {
  from {
    opacity: 0;
    transform: translateY(45px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mobileBackdropReveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ─────────── Media: 900px ─────────── */

@media (max-width: 900px) {
  .utility {
    display: none;
  }

  .header {
    height: 86px;
    padding: 0 20px;
  }

  .logo {
    font-size: 13px;
    gap: 10px;
  }

  .logo-monogram {
    width: 42px;
    height: 50px;
  }

  .nav,
  .contact-button {
    display: none;
  }

  .burger {
    display: flex;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 45;
    cursor: pointer;
  }

  .burger i {
    width: 25px;
    height: 1px;
    background: var(--ink);
    transition: .3s;
  }

  .burger.open i:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .burger.open i:nth-child(2) {
    opacity: 0;
  }

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

  .mobile-menu {
    display: flex;
    position: fixed;
    z-index: 29;
    inset: 86px 0 0;
    background: #f7f5f1;
    padding: 55px 30px 40px;
    flex-direction: column;
    transform: translateX(100%);
    transition: .4s;
  }

  .mobile-menu.open {
    transform: none;
  }

  .mobile-menu nav {
    display: flex;
    flex-direction: column;
  }

  .mobile-menu nav a {
    font: 30px "Prata", serif;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .mobile-contact {
    margin-top: 38px;
    padding: 17px 20px;
    text-align: center;
    background: var(--accent);
    color: #fff;
    text-transform: uppercase;
    font-size: 12px;
  }

  .mobile-menu p {
    margin-top: auto;
    line-height: 1.8;
    color: #777;
  }

  /* Hero */
  .hero {
    height: calc(100svh - 86px);
    min-height: 580px;
  }

  .hero-bg {
    background-position: 62% center;
  }

  .hero-shade {
    background: linear-gradient(90deg, rgba(0, 25, 45, .85), rgba(0, 25, 45, .25));
  }

  .hero-copy {
    left: 25px;
    right: 25px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: auto;
  }

  .hero h1 {
    font-size: 45px;
  }

  .hero-copy > p {
    font-size: 14px;
    max-width: 310px;
  }

  .hero-arrow {
    display: none;
  }

  .dots {
    left: 25px;
    bottom: 28px;
  }

  /* Sections */
  .section {
    padding: 68px 20px;
  }

  .section-heading {
    gap: 12px;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .section-heading i {
    width: 55px;
  }

  /* Brands */
  .brand-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-right: -20px;
    padding: 0 20px 10px 0;
    gap: 12px;
    overscroll-behavior-inline: contain;
  }

  .brand-grid::-webkit-scrollbar {
    display: none;
  }

  .brand-card {
    min-width: 72vw;
    scroll-snap-align: start;
    min-height: 190px;
  }

  .brand-mark {
    font-size: 29px;
  }

  /* About */
  .about {
    display: flex;
    flex-direction: column;
    gap: 35px;
    padding: 68px 20px;
  }

  .about-image {
    min-height: 0;
  }

  .about-image img {
    height: auto;
    display: block;
  }

  /* Contacts */
  .contacts {
    display: flex;
    flex-direction: column;
    gap: 35px;
  }

  .map {
    height: 360px;
    margin: 0 -20px;
    width: calc(100% + 40px);
  }

  /* Footer */
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  footer p:last-child {
    margin: 0;
  }

  /* Modal (mobile, bottom-sheet) */
  .modal-backdrop {
    padding: 56px 0 0;
    align-items: stretch;
    background: rgba(11, 11, 10, .72);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: mobileBackdropReveal .3s ease both;
  }

  .modal {
    width: 100%;
    height: calc(100svh - 56px);
    max-height: calc(100svh - 56px);
    margin: 0;
    align-self: stretch;
    grid-template-columns: 1fr;
    border-radius: 18px 18px 0 0;
    overflow-y: auto;
    animation: mobileModalReveal .42s cubic-bezier(.2, .8, .2, 1) both;
    box-shadow: 0 -16px 50px rgba(0, 0, 0, .25);
  }

  .modal > .modal-close {
    display: none;
  }

  .modal-gallery {
    min-height: 54svh;
    border-radius: 18px 18px 0 0;
  }

  .modal-copy {
    padding: 36px 25px 42px;
  }

  .modal-copy h2 {
    font-size: 31px;
  }

  .gallery-arrow {
    width: 44px;
    height: 64px;
    font-size: 52px;
  }

  .gallery-arrow.left {
    left: 9px;
  }

  .gallery-arrow.right {
    right: 9px;
  }

  .gallery-count {
    bottom: 16px;
    right: 16px;
    border-radius: 20px;
    background: rgba(20, 19, 17, .58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .mobile-modal-close {
    display: grid;
    place-items: center;
    position: fixed;
    z-index: 120;
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: 36px/1 "Manrope", sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .72);
    cursor: pointer;
    transition: transform .2s;
  }

  .mobile-modal-close:hover {
    transform: rotate(90deg);
  }

  .mobile-modal-close:active {
    transform: scale(.9);
  }
}

/* ─────────── Media: 420px ─────────── */

@media (max-width: 420px) {
  .hero h1 {
    font-size: 39px;
  }

  .brand-card {
    min-width: 78vw;
  }

  .section-heading h2 {
    font-size: 19px;
  }

  .modal-gallery {
    min-height: 46svh;
  }
  
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ─────────── Scroll reveal ─────────── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1),
              transform .7s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Линия в заголовке «прорастает» слева направо */
.section-heading i {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1) .15s;
}

.reveal.is-visible .section-heading i,
.section-heading.is-visible i {
  transform: scaleX(1);
}

/* Каскад для карточек брендов */
.reveal-stagger .brand-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease,
              transform .6s cubic-bezier(.2, .7, .2, 1),
              box-shadow .35s,
              color .35s;
  transition-delay: calc(var(--i, 0) * 80ms);
}

.reveal-stagger.is-visible .brand-card {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger .brand-card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .section-heading i {
    transform: scaleX(1);
    transition: none;
  }
}