/* ========================================
   About Page Styles (page-about.php)
======================================== */

/* ----------------------------------------
   Page-level Variables (bg-lines)
---------------------------------------- */
body.page-about {
  /* Offsets track the header change (#166): the old in-flow header was
     ~60px (sm) / ~76px (md+); the fixed header pads 60px / 100px (lg), so
     content shifted -16px on md and +24px on lg. Verified against Figma. */
  --bg-lines-top: 980px;
  --bg-lines-width: 100vw;

  @media screen and (min-width: 768px) {
    --bg-lines-top: 994px;
  }

  @media screen and (min-width: 1024px) {
    --bg-lines-top: 1034px;
  }
}

/* ----------------------------------------
   Key Visual
---------------------------------------- */
.about-page__kv {
  img {
    display: block;
    width: 100%;
    height: auto;
  }
}

/* ----------------------------------------
   About Section Overrides
   (template-parts/about.php is shared with the front page;
    Figma diffs are scoped here so the front page stays intact)
---------------------------------------- */
.about-page .about {
  --max-width: calc(820px + 2 * var(--content-padding));
  margin-top: 55px;
  padding: 0 0 94px;
  background-image: none;

  @media screen and (min-width: 768px) {
    margin-top: 70px;
    padding: 0 0 100px;
  }
}

.about-page .about__title {
  font-weight: var(--font-weight-medium);
  padding-top: 0;
  margin-bottom: 30px;

  @media screen and (min-width: 768px) {
    font-size: 48px;
    font-weight: var(--font-weight-regular);
    margin-bottom: 46px;
  }
}

/* Full-width warm band behind the logo card (Figma: Rectangle 182
   spans the whole viewport; the .container sits inside the band) */
.about-page .about__logo-band {
  margin-top: 93px;
  padding: 52px 0 47px;
  background-color: var(--color-background-warm);

  @media screen and (min-width: 768px) {
    margin-top: 100px;
    padding: 84px 0 83px;
  }
}

.about-page .about__text {
  font-weight: var(--font-weight-medium);

  p {
    margin-bottom: 26px;
  }

  @media screen and (min-width: 768px) {
    text-align: center;
    line-height: 2.1;

    p {
      margin-bottom: 40px;
    }
  }
}

.about-page .about__logo-card {
  /* SP: content sits directly on the warm band.
     PC: white rounded card on the band (Figma: Frame 124) */
  background-color: transparent;
  padding: 0;

  @media screen and (min-width: 768px) {
    background-color: var(--color-background);
    border-radius: 10px;
    padding: 71px 85px 65px;
  }
}

.about-page .about__logo-shape {
  max-width: 220px;

  @media screen and (min-width: 768px) {
    max-width: 350px;
  }
}

.about-page .about__description {
  font-size: 16px;
  margin-top: 43px;

  @media screen and (min-width: 768px) {
    font-size: 18px;
    margin-top: 67px;
  }
}

/* ----------------------------------------
   Production Team Overrides
   (mid-page section here, unlike the front page where it is the
    last section sitting on the alt background)
---------------------------------------- */
.about-page .production-team {
  background-color: transparent;
  padding-bottom: 0;
}

/* ----------------------------------------
   Contact Section
---------------------------------------- */
.about-page__contact {
  padding: 120px 0 144px;
  /* Keep the #contact anchor target clear of the fixed header (#166) */
  scroll-margin-top: var(--header-height);

  @media screen and (min-width: 768px) {
    padding: 102px 0 116px;
  }
}

.about-page__contact-title {
  font-size: 32px;
  font-weight: var(--font-weight-regular);
  line-height: 1.75;

  @media screen and (min-width: 768px) {
    font-size: 48px;
    line-height: 1.6;
    text-align: center;
  }
}

.about-page__contact-description {
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  line-height: 2;
  margin-top: 13px;

  @media screen and (min-width: 768px) {
    font-size: 18px;
    line-height: 1.45;
    margin-top: 48px;
    text-align: center;
  }
}

.about-page__contact-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 350px;
  min-height: 48px;
  margin-top: 20px;
  background-color: var(--color-background);
  border: 1px solid var(--color-text-secondary);
  border-radius: 80px;
  font-size: 18px;
  font-weight: var(--font-weight-medium);
  line-height: 1.75;
  color: var(--color-text);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;

  @media (hover: hover) {
    &:hover {
      background-color: var(--color-background-hover);
    }
  }

  @media screen and (min-width: 768px) {
    max-width: 450px;
    min-height: 50px;
    margin-top: 60px;
    margin-inline: auto;
    font-size: 20px;
  }
}

/* ----------------------------------------
   Illustrated Map
---------------------------------------- */
.about-map {
  /* The preceding .about section supplies the space above this heading. */
  padding-bottom: 100px;
  text-align: center;
}

.about-map__title {
  margin: 0 0 32px;
  font-size: 24px;
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
}

.about-map__trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 350px;
  min-height: 48px;
  margin-inline: auto;
  padding: 8px 58px;
  border: 1px solid var(--color-text-secondary);
  border-radius: 80px;
  appearance: none;
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
  font-size: 18px;
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  cursor: pointer;

  @media (hover: hover) {
    &:hover {
      background: var(--color-background-hover);
    }
  }

  @media screen and (min-width: 768px) {
    max-width: 495px;
    min-height: 55px;
    font-size: 20px;
  }
}

.about-map__mountain,
.about-map__ship {
  position: absolute;
  top: 50%;
  height: auto;
  transform: translateY(-50%);
  pointer-events: none;
}

.about-map__mountain {
  left: max(12px, calc(50% - 112px));
  width: 44px;

  @media screen and (min-width: 768px) {
    left: 41px;
  }
}

.about-map__ship {
  right: max(12px, calc(50% - 106px));
  width: 48px;

  @media screen and (min-width: 768px) {
    right: 35px;
  }
}

.about-map__dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 20px 10px;
  border: 0;
  background: transparent;
  overflow: hidden;
  color: var(--color-text);

  &[open] {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &::backdrop {
    background: rgb(0 0 0 / 60%);
  }
}

.about-map__panel {
  position: relative;
  width: 355px;
  max-width: 100%;
  min-height: min(400px, calc(100dvh - 40px));
  max-height: 100%;
  padding: 75px 10px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-background);

  @media screen and (min-width: 768px) {
    width: 800px;
    min-height: min(600px, calc(100dvh - 40px));
    padding: 66px clamp(20px, 6vw, 88px) 24px;
  }
}

.about-map__dialog-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.about-map__close {
  position: absolute;
  top: 2px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;

  @media screen and (min-width: 768px) {
    top: 6px;
    right: 12px;
  }
}

.about-map__figure {
  width: 100%;
  max-width: 624px;
  margin: 0 auto;
}

.about-map__image {
  display: block;
  width: 100%;
  height: auto;
}

.about-map__credit {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
  overflow-wrap: anywhere;
}

.about-map__larger {
  display: inline-block;
  margin-top: 12px;
  color: inherit;
  font-size: 14px;
  line-height: 1.6;
  text-underline-offset: 3px;
}

.about-map__new-tab {
  display: inline-block;
  font-size: 12px;
}

.about-map__trigger,
.about-map__close,
.about-map__larger {
  &:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
  }
}
