/*
 * A — contact, the schematic map, the phone contact bar and the footer.
 * The map and the bar are shared markup painted with currentColor and tokens only; in A the bar
 * is the page inverted (ink on paper becomes paper on ink) and red stays out of both.
 */

.contact {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 3.5rem;
  margin-top: 3rem;
}

.contact > * {
  grid-column: 1 / -1;
  min-width: 0;
}

.contact h3 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.contact__actions > li {
  border-bottom: 1px solid var(--hair);
}

.contact__action {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 16px var(--pad) 18px;
  text-decoration: none;
}

.contact__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg-mute);
}

.contact__value {
  font-family: var(--font-en);
  font-weight: 800;
  font-stretch: 100%;
  font-size: clamp(1.75rem, calc(var(--col) * 0.42), 3rem);
  line-height: 1;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.contact__action:hover .contact__value {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
}

.contact__hint {
  padding: 0 var(--pad) 16px;
  margin-top: -6px;
  font-size: 0.875rem;
  color: var(--fg-mute);
}

.contact__hint a {
  color: var(--fg);
  font-weight: 600;
}

.contact__address {
  padding: 1rem var(--pad) 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.contact__place > p {
  padding: 0.25rem var(--pad) 0;
  color: var(--fg-mute);
}

/* ---------------------------------------------------------------- map */

.contact__map {
  margin-top: 1.5rem;
  border-block: 1px solid var(--rule);
}

.map {
  display: block;
  width: 100%;
  height: auto;
  color: var(--fg);
}

.map__road {
  stroke: var(--road);
  stroke-width: 26;
}

.map__road--minor {
  stroke-width: 14;
}

.map__walk {
  stroke-width: 2.5;
  stroke-dasharray: 0.5 7;
  stroke-linecap: round;
}

.map__station circle {
  fill: var(--bg);
  stroke-width: 2.5;
}

.map__line-no {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 14px;
  fill: currentColor;
}

.map__label {
  font-family: var(--font-ko);
  font-size: 15px;
  font-weight: 700;
  fill: currentColor;
}

.map__label--strong {
  font-size: 17px;
  font-weight: 800;
}

.map__label--small {
  font-size: 12px;
  font-weight: 500;
  fill: var(--fg-mute);
}

.map__label--road {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  fill: var(--fg-mute);
}

.map__scale path {
  stroke-width: 1.5;
}

.contact__walk {
  padding: 0.75rem var(--pad);
  border-top: 1px solid var(--hair);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact__maps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 1rem var(--pad) 0;
  font-weight: 600;
}

.contact__maps a {
  display: inline-block;
  padding: 4px 0;
}

@media (min-width: 768px) {
  .contact {
    margin-top: 4rem;
  }

  .contact__talk {
    grid-column: 1 / 7;
  }

  .contact__place {
    grid-column: 7 / -1;
  }
}

/* ---------------------------------------------------------------- contact bar */

/* Phones and tablets: three quick links pinned to the bottom, above the home indicator. */
.contact-bar {
  --focus: var(--bg);
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--fg);
  color: var(--bg);
}

.contact-bar__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-bar__list > li + li {
  border-left: 1px solid color-mix(in srgb, var(--bg) 22%, transparent);
}

.contact-bar__link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--bar);
  padding: 7px 14px;
  line-height: 1.25;
  text-decoration: none;
}

.contact-bar__link:focus-visible {
  outline-offset: -4px;
}

.contact-bar__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--bg) 72%, var(--fg));
}

.contact-bar__value {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (min-width: 1200px) {
  .contact-bar {
    display: none;
  }
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  row-gap: 1.25rem;
  padding: 3.5rem var(--m) calc(var(--bar) + env(safe-area-inset-bottom, 0px) + 2.5rem);
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}

.site-footer > * {
  grid-column: 1 / -1;
  padding-inline: var(--pad);
}

.site-footer__motto {
  --dot-w: 0.193em;
  --dot-h: 0.187em;
  --dot-x: -0.2em;
  padding-bottom: 1.5rem;
  padding-left: calc(var(--pad) - 0.03em);
  font-family: var(--font-en);
  font-weight: 800;
  font-stretch: 100%;
  font-size: calc(var(--col) * 0.67);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.site-footer__name {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-footer__name span {
  margin-left: 0.35em;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0;
  color: var(--fg-mute);
}

.site-footer__contact {
  line-height: 1.7;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer__links a {
  display: inline-block;
  padding: 4px 0;
}

.site-footer__copy {
  color: var(--fg-mute);
}

@media (min-width: 768px) {
  .site-footer {
    padding-top: 5rem;
  }

  .site-footer__motto {
    --dot-w: 0.216em;
    --dot-h: 0.195em;
    --dot-x: -0.22em;
    padding-bottom: 2.5rem;
    font-stretch: 112.5%;
    font-size: calc(var(--col) * 0.6);
    white-space: nowrap;
  }

  .site-footer__name {
    grid-column: 1 / 5;
  }

  .site-footer__contact {
    grid-column: 5 / 9;
  }

  .site-footer__links {
    grid-column: 9 / -1;
    align-self: start;
  }

  .site-footer__copy {
    margin-top: 2rem;
  }
}

@media (min-width: 1200px) {
  .site-footer {
    padding-bottom: 3.5rem;
  }
}
