/* About: text, full-height photograph, and a dedicated pagination rail. */
.sv-about-page #about {
  display: grid;
  /* Keep the 1:1.5 photo ratio where it fits, with room for its offset and menu gap. */
  grid-template-columns: 46.6% min(calc(100vh / 1.5), calc(53.4% - var(--sv-about-controls-space))) minmax(var(--sv-about-controls-space), 1fr);
  grid-template-columns: 46.6% min(calc(100dvh / 1.5), calc(53.4% - var(--sv-about-controls-space))) minmax(var(--sv-about-controls-space), 1fr);
  grid-template-areas: "heading photo rail" "copy photo rail" "social photo rail";
  grid-template-rows: auto 1fr auto;
}
.sv-about-page .sv-about__heading {
  grid-area: heading;
  min-width: 0;
  padding-top: var(--sv-content-top);
  padding-right: 40px;
}
.sv-about-page .sv-about__left {
  min-width: 0;
  grid-area: copy;
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr;
  padding-block: 40px;
  padding-right: 40px;
}
.sv-about-page .sv-about__title {
  margin: 0;
  color: #38302d;
  font-family: "Tinos", serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: .14em;
}
.sv-about-page .sv-about__text {
  align-self: center;
  max-width: 500px;
  font-family: "Noto Serif KR", serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 2.1;
  letter-spacing: .04em;
  color: #271e1b;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.sv-about-page .sv-about__text p { margin: 0 0 30px; }
.sv-about-page .sv-about__text p:last-child { margin-bottom: 0; }
.sv-about-page .sv-about__contact {
  grid-area: social;
  min-width: 0;
  padding: 0 40px calc(var(--sv-frame-bottom) + 40px) var(--sv-content-left);
}
.sv-about__email,
.sv-about__contact--email-only { display: none; }
/* The title, paragraphs and links reserve their final layout space.
   Clip each text-only inner span so its transform cannot enlarge page overflow. */
.sv-about-page .sv-about__heading,
.sv-about-page .sv-about__left,
.sv-about-page .sv-about__title,
.sv-about-page .sv-about__text,
.sv-about-page .sv-about__text p,
.sv-about-page .sv-about__contact {
  animation: none;
  transform: none;
}
.sv-about-page .sv-about__title,
.sv-about-page .sv-about__text p,
.sv-about-page .sv-about__contact .sv-social-links a {
  overflow: clip;
}
.sv-about-page .sv-about__text-motion,
.sv-about-page .sv-about__contact .sv-social-links__label {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
@keyframes sv-about-text-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .sv-about-enter-pending .sv-about__text-motion,
  .sv-about-enter-pending .sv-about__contact .sv-social-links__label { opacity: 0; }
  .sv-about-enter-ready .sv-about__text-motion,
  .sv-about-enter-ready .sv-about__contact .sv-social-links__label {
    animation: sv-about-text-rise 1s ease-out normal both;
  }
  .sv-about-enter-ready .sv-about__text .sv-about__text-motion { animation-delay: .09s; }
  .sv-about-enter-ready .sv-about__contact .sv-social-links__label { animation-delay: .18s; }
}
/* Sequential JPEGs otherwise paint from top to bottom while downloading.
   Reveal a fully decoded image in one frame, without any entrance effect. */
.sv-about-images-managed .sv-about-swiper img:not(.is-decoded) {
  visibility: hidden;
}
/* The photo and its ancestors never enter, slide, zoom, or fade as a block.
   Only Swiper's own slide opacity is allowed to transition. */
body.sv-about-page,
.sv-about-page .sv-about-main,
.sv-about-page #about,
.sv-about-page .sv-about__right,
.sv-about-page .sv-about-swiper,
.sv-about-page .sv-about-swiper .swiper-wrapper,
.sv-about-page .sv-about-swiper .swiper-slide img,
.sv-about-page .sv-about__rail {
  animation: none;
  transition: none;
}
.sv-about-page .sv-about__right,
.sv-about-page .sv-about-swiper .swiper-slide img { transform: none; }
.sv-about-page .sv-about-swiper .swiper-slide {
  animation: none;
  transition-property: opacity;
}
.sv-about-page .sv-about-swiper:not(.swiper-initialized) .swiper-slide {
  transition: none;
}
.sv-about-page .sv-about__right {
  grid-area: photo;
  position: sticky;
  top: 0;
  align-self: start;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
}
.sv-about-swiper { touch-action: pan-y pinch-zoom; }
.sv-about-swiper,
.sv-about-swiper .swiper-wrapper,
.sv-about-swiper .swiper-slide {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.sv-about-swiper .swiper-slide {
  position: relative;
  overflow: hidden;
}
.sv-about-swiper .swiper-slide img {
  /* Fill the viewport-height slide without letting intrinsic image size affect layout. */
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  /* Preserve proportions on every screen; crop excess around the center. */
  object-fit: cover;
  object-position: center;
}
.sv-about__rail {
  grid-area: rail;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sv-about__pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.sv-about__pagination .swiper-pagination-bullet {
  display: grid;
  place-items: center;
  width: 28px;
  height: 18px;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  transition: background .3s ease, border-color .3s ease;
}
.sv-about__pagination .swiper-pagination-bullet::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid rgba(56, 48, 45, .6);
  border-radius: 50%;
  transition: background .3s ease, border-color .3s ease;
}
.sv-about__pagination .swiper-pagination-bullet-active::before {
  background: #38302d;
  border-color: #38302d;
}
.sv-about__pagination .swiper-pagination-bullet:focus-visible {
  outline: 1px solid #38302d;
  outline-offset: 4px;
}
.sv-menu-open .sv-about__rail { visibility: hidden; }
@media (min-width: 1001px) {
  .sv-about-page #about { padding: 0; }
  .sv-about-page .sv-about__right {
    width: 100%;
    margin-left: var(--sv-about-photo-offset);
  }
  .sv-about-page .sv-about__pagination {
    position: absolute;
    top: 50%;
    bottom: auto;
    left: auto;
    width: auto;
    right: var(--sv-menu-center-right);
    transform: translate(50%, -50%);
  }
}
/* Mobile follows reading order: heading, photo, dots, description, contact. */
@media (max-width: 1000px) {
  .sv-about-page .sv-about__title .sv-about__text-motion {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .sv-about-page #about {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "photo" "rail" "copy" "social";
    grid-template-rows: repeat(5, auto);
    align-content: start;
  }
  .sv-about-page .sv-about__heading,
  .sv-about-page .sv-about__left,
  .sv-about-page .sv-about__contact { padding: 0; }
  .sv-about-page .sv-about__right {
    position: relative;
    height: auto;
    aspect-ratio: 3 / 2;
    margin-top: var(--sv-title-space-after);
  }
  .sv-about-page .sv-about__rail {
    position: static;
    height: auto;
    min-width: 0;
    margin-top: 8px;
  }
  .sv-about__pagination {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  /* Reserve the dots before Swiper inserts them, avoiding a load-time reflow. */
  .sv-about-page .sv-about__rail:has(.sv-about__pagination) { min-height: 32px; }
  /* 8px dots in 16px buttons leave an 8px visible gap; reset Swiper's margins. */
  .sv-about-page .sv-about__pagination .swiper-pagination-bullet { width: 16px; height: 32px; margin: 0; }
  .sv-about-page .sv-about__left { margin-top: 64px; }
  .sv-about-page .sv-about__text { max-width: 100%; }
  .sv-about-page .sv-about__contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 64px;
  }
  .sv-about__email { display: flex; }
  .sv-about__contact .sv-social-links { max-width: 100%; }
  .sv-about__contact .sv-social-links a { overflow-wrap: anywhere; }
}
@media (max-width: 500px) {
  .sv-about-page .sv-about__left { margin-top: 40px; }
  .sv-about-page .sv-about__contact { margin-top: 48px; }
  .sv-about-page .sv-about__text { line-height: 2; letter-spacing: .02em; }
  .sv-about-page .sv-about__text p { margin-bottom: 24px; }
  .sv-about-page .sv-about__text p:last-child { margin-bottom: 0; }
}
/* Fit the same reading order on shorter desktop screens without shrinking the font. */
@media (max-height: 800px) and (min-width: 1001px) {
  .sv-about-page .sv-about__left { padding-block: 12px; }
  .sv-about-page .sv-about__text { line-height: 1.9; }
  .sv-about-page .sv-about__text p { margin-bottom: 20px; }
  .sv-about-page .sv-about__text p:last-child { margin-bottom: 0; }
  .sv-about-page .sv-about__contact { padding-bottom: calc(var(--sv-frame-bottom) + 20px); }
}
