* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
}

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

.page-contact {
  color: var(--theme-color-heading);
  background: var(--theme-color-surface);
}

.page-contact main {
  padding-top: var(--theme-header-height);
}

.page-hero {
  position: relative;
  padding: 92px 24px 104px;
  overflow: hidden;
  background: var(--theme-gradient-panel);
}

.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
}

.page-hero::before {
  width: 380px;
  height: 380px;
  top: -190px;
  right: -90px;
  background: rgb(14 165 233 / 18%);
}

.page-hero::after {
  width: 300px;
  height: 300px;
  bottom: -190px;
  left: -80px;
  background: rgb(20 184 166 / 15%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: auto;
  animation: contact-hero-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: var(--theme-heading-aaa);
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.page-hero h1 em {
  color: var(--theme-color-primary);
  font-style: normal;
}

.hero-lead {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--theme-color-muted);
  font-size: var(--theme-text-lg);
  line-height: 1.85;
}

.contact-layout {
  width: min(1120px, calc(100% - 48px));
  margin: -46px auto 100px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 22px;
}

.contact-details,
.contact-map-card {
  padding: 38px;
  border: 1px solid var(--theme-color-border);
  border-radius: 20px;
  background: var(--theme-color-surface);
  box-shadow: var(--theme-shadow-panel);
}

.contact-details {
  animation: contact-card-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) 140ms both;
}

.contact-map-card {
  display: flex;
  flex-direction: column;
  animation: contact-card-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) 260ms both;
}

.contact-details h2,
.contact-map-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.contact-map-card > p {
  margin: 0 0 28px;
  color: var(--theme-color-muted);
  font-size: var(--theme-text-sm);
  line-height: 1.8;
}

.contact-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  list-style: none;
}

.contact-list li {
  padding: 10px;
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 20px;
  border-radius: 13px;
  background: var(--theme-color-surface-soft);
}

.contact-list > li > img {
  width: 50px;
  height: 50px;
  display: block;
  border-radius: 11px;
  object-fit: contain;
}

.contact-list span {
  display: block;
  margin-bottom: 3px;
  color: var(--theme-color-muted);
  font-size: var(--theme-text-md);
}

.contact-list a {
  font-size: var(--theme-text-lg);
  font-weight: var(--theme-weight-medium);
  line-height: 1.65;
  transition: color 180ms ease;
}

.contact-list a:hover {
  color: var(--theme-color-primary);
}

.contact-map-frame {
  min-height: 330px;
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--theme-color-border);
  border-radius: 15px;
  background: var(--theme-color-surface-soft);
}

.contact-map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 330px;
  display: block;
  border: 0;
}

.map-directions {
  min-height: 48px;
  margin-top: 16px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  gap: 12px;
  border-radius: 11px;
  color: var(--theme-color-surface);
  background: var(--theme-gradient-primary);
  box-shadow: var(--theme-shadow-primary);
  font-size: var(--theme-text-md);
  font-weight: var(--theme-weight-bold);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.map-directions:hover {
  transform: translateY(-2px);
}

@keyframes contact-hero-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes contact-card-enter {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .contact-layout {
    width: min(680px, calc(100% - 40px));
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-contact main {
    padding-top: var(--theme-header-mobile-height);
  }

  .page-hero {
    padding: 64px 20px 84px;
  }

  .page-hero h1 {
    font-size: 40px;
  }

  .hero-lead {
    font-size: var(--theme-text-base);
  }

  .contact-layout {
    width: calc(100% - 32px);
    margin-top: -34px;
    margin-bottom: 72px;
  }

  .contact-details,
  .contact-map-card {
    padding: 25px 20px;
  }

  .contact-list li {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-inner,
  .contact-details,
  .contact-map-card {
    animation: none;
  }

  .contact-list a,
  .map-directions {
    transition: none;
  }
}
