/* ---------- Base / tokens ---------- */
:root {
  --black: #0a0a0a;
  --gray-900: #171717;
  --gray-700: #4a4a4a;
  --gray-500: #7a7a7a;
  --gray-300: #d4d4d4;
  --gray-100: #f4f4f4;
  --white: #ffffff;
  --red: #ed1d25;
  --red-dim: rgba(237, 29, 37, .08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Background decoration ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 90%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}

.bg-glow--red {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -160px;
  background: radial-gradient(circle, var(--red) 0%, transparent 70%);
  opacity: .08;
  animation: drift-a 22s ease-in-out infinite;
}

.bg-glow--gray {
  width: 560px;
  height: 560px;
  bottom: -220px;
  left: -200px;
  background: radial-gradient(circle, var(--gray-500) 0%, transparent 70%);
  opacity: .1;
  animation: drift-b 26s ease-in-out infinite;
}

.bg-line {
  position: absolute;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 24px;
}

.bg-line--1 {
  width: 260px;
  height: 260px;
  top: 8%;
  left: 6%;
  transform: rotate(12deg);
  animation: float 18s ease-in-out infinite;
}

.bg-line--2 {
  width: 180px;
  height: 180px;
  bottom: 12%;
  right: 8%;
  border-color: var(--red-dim);
  transform: rotate(-8deg);
  animation: float 20s ease-in-out infinite reverse;
}

.bg-line--3 {
  width: 340px;
  height: 340px;
  top: 55%;
  left: -60px;
  border-radius: 50%;
  transform: rotate(0deg);
  animation: float 24s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-30px, 30px); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(30px, -20px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-16px) rotate(var(--r, 0deg)); }
}

/* ---------- Layout ---------- */
.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  max-width: 680px;
  margin: 0 auto;
}

.logo {
  width: clamp(160px, 30vw, 220px);
  height: auto;
  margin-bottom: 2.5rem;
}

.title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.9rem, 4.4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--black);
}

.lead {
  margin: 0 0 2.75rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.4;
  color: var(--gray-700);
}

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.9rem;
  border-radius: 999px;
  font-size: .975rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .35s var(--ease), color .35s var(--ease);
  will-change: transform;
}

.btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 24px -8px rgba(237, 29, 37, .45);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(237, 29, 37, .55);
  background: #d81920;
}

.btn--secondary {
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--gray-300);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  transform: translateY(-2px);
  border-color: var(--black);
  background: var(--gray-100);
}

.btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- Divider ---------- */
.divider {
  width: 48px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  margin-bottom: 2.5rem;
  opacity: .8;
}

/* ---------- Address ---------- */
.address {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  max-width: 420px;
  margin: 0 auto 2.5rem;
  font-size: .925rem;
  line-height: 1.5;
  color: var(--gray-700);
  text-align: center;
}

/* ---------- Contact list ---------- */
.contacts {
  list-style: none;
  margin: 0 auto 3.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: center;
  gap: 1.1rem 1.75rem;
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.contacts__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-size: .925rem;
  color: var(--gray-700);
  line-height: 1.5;
  text-align: center;
}

.contacts__item a {
  color: var(--gray-900);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}

.contacts__item a:hover,
.contacts__item a:focus-visible {
  color: var(--red);
  border-color: currentColor;
}

.contacts__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--red);
}

.contacts__icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---------- Footer ---------- */
.footer {
  font-size: .8rem;
  color: var(--gray-500);
  letter-spacing: .01em;
}

/* ---------- Fade-in choreography ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  animation: fade-up .8s var(--ease) forwards;
}

.fade-in--1 { animation-delay: .05s; }
.fade-in--2 { animation-delay: .2s; }
.fade-in--3 { animation-delay: .35s; }
.fade-in--4 { animation-delay: .5s; }
.fade-in--5 { animation-delay: .65s; }
.fade-in--6 { animation-delay: .8s; }
.fade-in--7 { animation-delay: .95s; }

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .wrap { padding: 3.5rem 1.25rem 2.5rem; }

  .actions { flex-direction: column; width: 100%; }
  .btn { width: 100%; justify-content: center; }

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

@media (min-width: 561px) and (max-width: 900px) {
  .wrap { padding: 4.5rem 2rem 3rem; }
}
