/*
 * 2026 renewal — layered on top of the legacy theme CSS (loaded last).
 * Keeps the original look (red #cb161d, charcoal, photography, layout) and
 * fixes legibility, contrast, interaction states and alignment.
 */
:root {
  --alps-red: #cb161d;
  --alps-red-dark: #a50f15;
  --alps-red-on-dark: #ff4f56;
  --alps-font: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ── Typography ─────────────────────────────────────────────────────────── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body,
body :where(h1, h2, h3, h4, h5, h6, p, a, li, dt, dd, span, strong, label, input, textarea, button) {
  font-family: var(--alps-font) !important;
}

/* ── Focus states (keyboard users had none) ─────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--alps-red);
  outline-offset: 3px;
}

/* ── Header: sticky, compacts on scroll, animated tab underline ─────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    height 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
header.is-scrolled {
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.06);
}
@media (min-width: 1441px) {
  header.is-scrolled {
    height: 88px;
  }
}
@media (min-width: 769px) and (max-width: 1440px) {
  header.is-scrolled {
    height: max(6.2vw, 72px);
  }
}
@media (min-width: 769px) {
  header > nav > ul > li > a {
    position: relative;
    padding: 6px 0;
    transition: color 0.2s var(--ease);
  }
  header > nav > ul > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--alps-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease);
  }
  header > nav > ul > li > a:hover::after,
  header > nav > ul > li[on] > a::after {
    transform: scaleX(1);
  }
  header > nav > div.header-language > a {
    transition: color 0.2s var(--ease);
  }
  header > nav > div.header-language > a:hover {
    color: var(--alps-red);
  }
}
header > nav > div.header-language > span {
  color: #c8c8c8;
}

/* ── Home hero: readable copy over the photograph ───────────────────────── */
section.main-title {
  position: relative;
}
section.main-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 10, 12, 0.62) 0%, rgba(10, 10, 12, 0.35) 45%, rgba(10, 10, 12, 0) 75%);
  pointer-events: none;
}
section.main-title > div {
  position: relative;
}
section.main-title > div > h3 {
  color: #f2f2f2;
  letter-spacing: -0.01em;
}
section.main-title > div > h3 > strong {
  color: var(--alps-red-on-dark);
}
section.main-title > div > p {
  color: #e6e6e6;
  font-weight: 400;
  line-height: 1.7;
}
section.main-title > div > p > strong {
  color: var(--alps-red-on-dark);
  font-weight: 600;
}

/* Sub-page title bands: same treatment, lighter */
section:is(.about-title, .business-title, .people-title, .contact-title) {
  position: relative;
}
section:is(.about-title, .business-title, .people-title, .contact-title)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}
section:is(.about-title, .business-title, .people-title, .contact-title) > div {
  position: relative;
}

/* ── Home: dark info column ─────────────────────────────────────────────── */
section.main-info > div.info-about > div > div.about-notice > ul > li > a,
section.main-info > div.info-about > div > div.about-business > ul > li > a {
  font-weight: 400;
  color: #dcdcdc;
  transition:
    color 0.2s var(--ease),
    padding 0.2s var(--ease);
}
section.main-info > div.info-about > div > div.about-notice > ul > li > a:hover,
section.main-info > div.info-about > div > div.about-business > ul > li > a:hover {
  color: #fff;
  padding-left: 6px;
}
section.main-info > div.info-about > div > div.about-mission > p {
  color: #d6d6d6;
  font-weight: 400;
  line-height: 1.7;
}
section.main-contact > div.contact-info > div.info-description > div > p {
  color: #dcdcdc;
  font-weight: 400;
  text-align: left;
  line-height: 1.7;
}

/* The legacy "more" link is gone (#33): the slider shows every member. Keep bottom room. */
@media (min-width: 769px) {
  section.main-info > div.info-people {
    padding-bottom: 56px;
  }
}

/* Pretendard sets tighter than Noto Sans KR; restore breathing room in lists */
section.main-info > div.info-people > div.people-content > ul > li > dl > dd,
section.business-content dd {
  line-height: 1.6;
}

/* Photos: fill the circle instead of showing the top strip of portrait shots */
section.main-info > div.info-people > div.people-content > ul > li > div > img,
section.people-content > div > ul > li > div > div.image-box > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* Red buttons */
section.main-contact > div.contact-info > div.info-description > div > a {
  transition: background-color 0.2s var(--ease);
}
section.main-contact > div.contact-info > div.info-description > div > a:hover {
  background-color: var(--alps-red-dark);
}

/* Prev/next link bands: subtle zoom on hover */
section:is(.about-link, .business-link, .people-link, .contact-link) > div {
  overflow: hidden;
}
section:is(.about-link, .business-link, .people-link, .contact-link) > div > a {
  transition: transform 0.6s var(--ease);
}
@media (min-width: 769px) {
  section:is(.about-link, .business-link, .people-link, .contact-link) > div > a:hover > span {
    transform: translateX(4px);
  }
  section:is(.about-link, .business-link, .people-link, .contact-link) > div > a > span {
    transition: transform 0.25s var(--ease);
  }
}

/* ── Notice article ─────────────────────────────────────────────────────── */
article.view-wrap div.view-content img {
  max-width: 100%;
  height: auto;
}
article.view-wrap div.view-content {
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ── Contact form ───────────────────────────────────────────────────────── */
/* Locked step 2 was dark-red-on-red (invisible); show it dimmed instead. */
section.contact-content
  > div.content-form
  > form
  > div.form-top
  > div
  > div.form-top-right[prohibited]
  > :is(h5, label, div.form-term > label, div.form-term > label > a) {
  color: rgba(255, 255, 255, 0.5);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}
section.contact-content > div.content-form > form > div.form-top > div > div.form-top-right[prohibited] > textarea {
  border-color: rgba(255, 255, 255, 0.3);
}
/* Let people read the privacy notice before step 2 unlocks. */
section.contact-content > div.content-form > form > div.form-top > div > div.form-top-right[prohibited] div.form-term a {
  pointer-events: auto;
  cursor: pointer;
}
section.contact-content > div.content-form > form > div.form-top > div > div.form-top-right > p.step-hint {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}
section.contact-content > div.content-form > form > div.form-top > div > div.form-top-right:not([prohibited]) > p.step-hint {
  display: none;
}
section.contact-content > div.content-form input,
section.contact-content > div.content-form textarea {
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
section.contact-content > div.content-form input:focus,
section.contact-content > div.content-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
section.contact-content > div.content-form [aria-invalid="true"] {
  box-shadow: 0 0 0 3px #ffd34d;
}
section.contact-content > div.content-form > form > div.form-bottom {
  flex-direction: column;
  align-items: center;
}
section.contact-content > div.content-form > form > div.form-bottom > button[type="submit"] {
  background-color: var(--alps-red);
  border-color: var(--alps-red);
  color: #fff;
  transition: background-color 0.2s var(--ease);
}
section.contact-content > div.content-form > form > div.form-bottom > button[type="submit"]:hover {
  background-color: var(--alps-red-dark);
}
section.contact-content > div.content-form > form > div.form-bottom > button[type="submit"][prohibited] {
  background-color: #eecfd0;
  border-color: #eecfd0;
  color: #fff;
}
/* The status line sits where the button's bottom margin was. */
section.contact-content > div.content-form > form > div.form-bottom > p.form-status {
  margin: -8.5vw auto 8vw;
  max-width: 90%;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  min-height: 1.6em;
}
@media (min-width: 1441px) {
  section.contact-content > div.content-form > form > div.form-bottom > p.form-status {
    margin: -124px auto 120px;
  }
}
section.contact-content > div.content-form > form > div.form-bottom > p.form-status[data-tone="error"] {
  color: var(--alps-red);
  font-weight: 600;
}
section.contact-content > div.content-form > form > div.form-bottom > p.form-status[data-tone="success"] {
  color: #17663a;
  font-weight: 600;
}

/* Privacy policy dialog (the link was a dead javascript:void(0)) */
dialog.privacy-dialog {
  margin: auto; /* legacy base.css zeroes every margin, which un-centers modals */
  width: min(560px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  color: #222;
}
dialog.privacy-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
dialog.privacy-dialog > div {
  padding: 28px 28px 8px;
  overflow: auto;
  max-height: calc(min(80vh, 720px) - 72px);
  line-height: 1.7;
  font-size: 15px;
}
dialog.privacy-dialog h2 {
  font-size: 20px;
  margin-bottom: 12px;
}
dialog.privacy-dialog h3 {
  font-size: 15px;
  margin: 16px 0 4px;
}
dialog.privacy-dialog form {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 20px;
}
dialog.privacy-dialog button {
  font: inherit;
  padding: 9px 22px;
  border: 0;
  border-radius: 6px;
  background: var(--alps-red);
  color: #fff;
  cursor: pointer;
}

/* ── Footer: align with the header grid, tappable phone, copyright ──────── */
@media (min-width: 1441px) {
  footer > div {
    max-width: 1116px;
  }
}
footer > div > section.right > p > a {
  color: inherit;
  text-decoration: none;
}
footer > div > section.right > p > a:hover {
  color: var(--alps-red);
}
footer > div > section.right > p.copyright {
  margin-top: 8px;
  color: #aaa;
  font-size: 0.8rem;
}

/* ── Language switcher (globe + current code → list of every language) ───── */
header > nav > div.header-language {
  position: relative;
}
details.lang-switch > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e3e3e3;
  border-radius: 999px;
  color: #222;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}
details.lang-switch > summary::-webkit-details-marker {
  display: none;
}
details.lang-switch > summary:hover,
details.lang-switch[open] > summary {
  border-color: var(--alps-red);
  color: var(--alps-red);
}
details.lang-switch svg {
  fill: currentColor;
}
details.lang-switch svg.lang-globe {
  width: 18px;
  height: 18px;
}
details.lang-switch svg.lang-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease);
}
details.lang-switch[open] svg.lang-chevron {
  transform: rotate(180deg);
}
details.lang-switch > ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 200;
  min-width: 168px;
  padding: 6px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
details.lang-switch > ul > li > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: 6px;
  color: #333;
  font-size: 15px;
  font-weight: 500;
}
details.lang-switch > ul > li > a:hover {
  background: #f6f6f6;
  color: var(--alps-red);
}
details.lang-switch > ul > li > a[aria-current]::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--alps-red);
}
details.lang-switch > ul > li > a[aria-current] {
  color: var(--alps-red);
  font-weight: 700;
}
@media (max-width: 768px) {
  details.lang-switch > summary {
    padding: 5px 8px;
    font-size: 13px;
    gap: 4px;
  }
  details.lang-switch svg.lang-globe {
    width: 16px;
    height: 16px;
  }
  details.lang-switch > ul {
    min-width: 150px;
  }
}

/* Long German compounds: hyphenate instead of overflowing fixed-width boxes. */
html[lang="de"] .content-wrap,
html[lang="de"] footer {
  hyphens: auto;
  overflow-wrap: break-word;
}

/* Japanese has no spaces: the legacy `word-break: keep-all` (meant for Korean) would never wrap. */
html[lang="ja"] body,
html[lang="ja"] body * {
  word-break: normal;
  line-break: strict;
  overflow-wrap: anywhere;
}

/* ── Home: member slider (#28) ─────────────────────────────────────────────
 * The legacy list showed three people stacked. Now every member is listed;
 * a grid with three rows per column makes each column one "page", and
 * horizontal scroll-snap moves between pages (touch swipe for free). */
/* Legacy fixed the row height for three people; let it grow for the slider controls. */
@media (min-width: 1441px) {
  section.main-info {
    height: auto;
    min-height: 745px;
  }
}
@media (min-width: 769px) and (max-width: 1440px) {
  section.main-info {
    height: auto;
    min-height: 51.737vw;
  }
}
@media (min-width: 769px) {
  /* Both halves must stretch to the taller one (legacy height:100% blocks that). */
  section.main-info > div.info-about,
  section.main-info > div.info-people {
    height: auto;
    align-self: stretch;
  }
}
section.main-info > div.info-people > div.people-content {
  flex-direction: column;
  align-items: center;
}
section.main-info > div.info-people > div.people-content > ul.people-slider {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  grid-auto-columns: 100%;
  row-gap: 30px;
  width: 380px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  outline-offset: 6px;
}
section.main-info > div.info-people > div.people-content > ul.people-slider::-webkit-scrollbar {
  display: none;
}
section.main-info > div.info-people > div.people-content > ul.people-slider > li {
  margin-bottom: 0;
  align-items: flex-start;
}
section.main-info > div.info-people > div.people-content > ul.people-slider > li:nth-child(3n + 1) {
  scroll-snap-align: start;
}
@media (min-width: 769px) and (max-width: 1440px) {
  section.main-info > div.info-people > div.people-content > ul.people-slider {
    width: max(27vw, 330px);
    row-gap: 2.0833vw;
  }
}
@media (max-width: 768px) {
  /* One row, three photos per view. */
  section.main-info > div.info-people > div.people-content > ul.people-slider {
    width: 100%;
    grid-template-rows: auto;
    grid-auto-columns: calc(100% / 3);
    row-gap: 0;
  }
  section.main-info > div.info-people > div.people-content > ul.people-slider > li {
    align-items: center;
  }
  section.main-info > div.info-people {
    height: auto;
    padding-bottom: 10vw;
  }
}

section.main-info div.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}
section.main-info div.slider-controls[hidden] {
  display: none;
}
section.main-info div.slider-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}
section.main-info div.slider-controls > button > svg {
  width: 20px;
  height: 20px;
  fill: #333;
}
section.main-info div.slider-controls > button:hover {
  border-color: var(--alps-red);
}
section.main-info div.slider-controls > button:hover > svg {
  fill: var(--alps-red);
}
section.main-info div.slider-dots {
  display: flex;
  gap: 8px;
}
section.main-info div.slider-dots > button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d5d5d5;
  cursor: pointer;
  transition:
    width 0.25s var(--ease),
    background-color 0.25s var(--ease);
}
section.main-info div.slider-dots > button[aria-current] {
  width: 22px;
  border-radius: 4px;
  background: var(--alps-red);
}

/* ── Privacy policy page (#37) ─────────────────────────────────────────── */
section.policy-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  color: #333;
  font-size: 15px;
  line-height: 1.75;
}
section.policy-page h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}
section.policy-page h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 32px 0 8px;
  color: #222;
}
section.policy-page p {
  margin: 0 0 8px;
}
section.policy-page ul {
  margin: 4px 0 10px;
  padding-left: 20px;
}
section.policy-page li {
  list-style-type: disc;
  margin-bottom: 4px;
}
section.policy-page .policy-note {
  padding: 10px 14px;
  border-left: 3px solid var(--alps-red);
  background: #f7f7f7;
  color: #555;
  font-size: 14px;
  margin-bottom: 20px;
}
section.policy-page .policy-effective {
  margin-top: 36px;
  color: #666;
}
footer > div > section.right > p.policy-link > a {
  color: #333;
}
footer > div > section.right > p.policy-link > a:hover {
  color: var(--alps-red);
}
dialog.privacy-dialog a.privacy-full {
  color: var(--alps-red);
  font-size: 14px;
  margin-right: auto;
  align-self: center;
}
@media (max-width: 768px) {
  section.policy-page {
    padding: 40px 18px 64px;
  }
  section.policy-page h2 {
    font-size: 22px;
  }
}
