@import url('../assets/fonts/fonts.css');

/* Мини-сайт «Долгов Авто | Москва»: автономная страница-визитка.
   Дизайн-система (цвета, шрифты, форма кнопок) взята с https://link.dolgov-auto.ru/ —
   страница воспринимается как часть той же визуальной системы, но короче: без карты
   и карточек филиалов, только логотип, название, описание и 3 ссылки. */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}

/* ---------- Variables ---------- */
:root {
  /* палитра — как на link.dolgov-auto.ru */
  --bg: #f6f6f6;         /* Steel Gray, фон страницы */
  --dark: #2b2a29;       /* Shadow Core, основной текст */
  --dark-2: #262423;     /* фон кнопок */
  --line: #e2e0df;
  --red: #ef1313;
  --tx: #2b2a29;
  --tx-2: #6b6968;
  --tx-3: #9a9897;

  --f-head: 'Unbounded', 'Arial Black', sans-serif;
  --f-body: 'Onest', 'Segoe UI', Arial, sans-serif;

  --tr: 0.22s ease;

  --content-width: 480px;
  --button-height: 56px;
  --button-radius: 16px;
  --button-gap: 12px;
  --logo-height: 56px;
}

/* ---------- Base ---------- */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Page ---------- */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 20px;
}

/* ---------- Profile ---------- */
.profile {
  text-align: center;
  margin-bottom: 36px;
  animation: fadeUp 0.3s ease both;
}
.logo {
  height: var(--logo-height);
  width: auto;
  margin: 0 auto 18px;
}
.profile h1 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.375rem; /* 22px */
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--tx);
}
.profile__desc {
  margin: 0;
  font-size: 0.95rem; /* ~15px */
  color: var(--tx-2);
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: var(--button-gap);
  animation: fadeUp 0.3s ease 0.05s both;
}

/* ---------- Link button ---------- */
.link-button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  height: var(--button-height);
  padding: 0 18px;
  border-radius: var(--button-radius);
  background: var(--dark-2);
  border: 1px solid var(--dark-2);
  color: #fff;
}
/* цвет иконки/акцента у каждой кнопки - без инлайновых style="", чтобы CSP
   работала без 'unsafe-inline' в style-src */
.link-button--telegram {
  --sc: #229ed9;
}
.link-button--max {
  --sc: #7c4dff;
}
.link-button--website {
  --sc: #4c4a49;
}

.link-button__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sc, var(--red));
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.link-button__icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}
.link-button__text {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1rem; /* 16px */
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Hover / active ---------- */
.link-button {
  transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr);
}
@media (hover: hover) {
  .link-button:hover {
    transform: translateY(-2px);
    border-color: var(--sc, var(--red));
    box-shadow: 0 6px 18px rgba(43, 42, 41, 0.16);
  }
}
.link-button:active {
  transform: scale(0.98);
}
.link-button:focus-visible {
  outline: 2px solid var(--sc, var(--red));
  outline-offset: 2px;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 28px;
  text-align: center;
  /* tx-2, не tx-3 референса: на этом мелком тексте tx-3 не проходит контраст 4.5:1 (WCAG AA) */
  color: var(--tx-2);
  font-size: 0.76rem;
  animation: fadeUp 0.3s ease 0.1s both;
}
.footer p {
  margin: 0;
}
.footer a {
  border-bottom: 1px solid var(--line);
}
.footer a:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .profile,
  .links,
  .footer {
    animation: none;
  }
  .link-button {
    transition: none;
  }
  .link-button:hover {
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  :root {
    --logo-height: 64px;
  }
  .profile h1 {
    font-size: 1.5rem; /* 24px */
  }
  .link-button {
    padding: 0 22px;
  }
}
