@charset "UTF-8";

/* =============================================================
   Pauls International — styles.css (개선판)
   - 기존 구조/클래스명/브랜드 컬러 유지
   - IE11용 -ms-grid 프리픽스 제거 (IE 지원 2022년 종료)
   - 미디어쿼리 추가 + vw 전용 타이포그래피를 clamp()로 교체
   - 단위 누락, 잘못된 값 등 원본 버그 수정
   - 폰트는 index.html <link>에서 로드 (CSS @import 제거: 렌더링 차단 감소)
   ============================================================= */

:root {
  --orange: #f39800;
  --ink: #111;
  --gray: #b3b3b3;
  --line: #c4c4c4;
  --header-h: 88px;
  --pad-x: 5vw;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Rokkitt", Georgia, serif;
}

@media (min-width: 900px) {
  :root {
    --header-h: 136px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* 고정 헤더에 앵커 타겟이 가려지지 않도록 */
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

body {
  font-family: var(--serif);
  color: var(--ink);
  /* 원본의 스크롤바 숨김(-ms-overflow-style / ::-webkit-scrollbar)은 제거했습니다.
     스크롤 가능하다는 단서를 없애서 접근성·사용성에 손해였습니다. */
  overflow-x: hidden; /* 100vw + 스크롤바로 인한 가로 스크롤 방지 */
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

/* 키보드 사용자용 포커스 표시 */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: #fff;
  color: var(--ink);
  padding: 12px 20px;
  font-family: var(--sans);
  border: 2px solid var(--orange);
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------------------------------------------- Header / Nav */

header {
  position: fixed;
  inset: 0 0 auto 0; /* width:100vw 대신 — 스크롤바 폭만큼 넘치던 문제 해결 */
  height: var(--header-h);
  background: #fff;
  z-index: 30;
}

header nav {
  height: 100%;
  font-family: var(--sans);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--pad-x);
}

header nav .logo {
  display: inline-flex;
  flex: 0 0 auto;
}

header nav .logo img {
  width: 96px;
  height: auto;
}

@media (min-width: 900px) {
  header nav .logo img {
    width: 120px;
  }
}

header nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav ul li a {
  display: inline-block;
  padding: 8px 0;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
}

header nav ul li a:hover,
header nav ul li a:focus-visible {
  color: var(--orange);
}

/* 햄버거 버튼 (원본에는 없던 모바일 대응) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 719px) {
  .nav-toggle {
    display: flex;
  }

  header nav ul {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    display: none;
  }

  header nav ul.is-open {
    display: flex;
  }

  header nav ul li a {
    display: block;
    padding: 18px var(--pad-x);
    border-bottom: 1px solid #eee;
  }
}

/* ---------------------------------------------- Top button */

.top_button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: var(--orange);
  background: #fff;
  border: 2px solid var(--orange);
  border-radius: 50%;
  cursor: pointer;
  z-index: 25;
}

.top_button svg {
  width: 100%;
  height: 100%;
  display: block;
}

.top_button:hover {
  color: var(--ink);
  border-color: var(--ink);
}

@media (min-width: 900px) {
  .top_button {
    right: 3em;
    bottom: 5em;
  }
}

/* ---------------------------------------------- Typography */

h1,
h2 {
  margin: 0 0 20px;
  line-height: 1.1;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 72px);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(2rem, 6vw, 72px);
  letter-spacing: 0.005em;
}

h3 {
  font-family: var(--sans);
  font-weight: 700;
  /* 원본 1.5vw는 모바일에서 약 5px로 읽을 수 없었습니다 */
  font-size: clamp(1.05rem, 1.5vw, 20px);
  margin: 0;
}

.section-sub {
  font-size: clamp(1.25rem, 4vw, 40px);
  line-height: 1.2;
  margin: 0 0 1em;
}

/* ---------------------------------------------- Layout */

main {
  padding-top: calc(var(--header-h) + 5vh);
}

main > *:not(.hero) {
  padding: 0 var(--pad-x);
}

.above-hero h1 {
  width: 100%;
  max-width: 14ch;
}

.above-hero .font-highlight {
  display: block;
  color: var(--orange);
  font-size: clamp(1.5rem, 4vw, 36px);
  margin-bottom: 0.8em;
}

.above-hero__lead {
  font-size: clamp(1.5rem, 4vw, 48px);
  line-height: 1.15;
  max-width: 24ch;
  margin: 0;
}

.hero {
  padding: 0;
  padding-top: 8vh;
  width: 100%;
}

.hero__img img {
  width: 100%;
  display: block;
}

/* 섹션 상단 여백: 원본 24vh는 모바일에서 과했습니다 */
.history h2,
.fabrics h2,
.worldwide h2 {
  margin-top: clamp(4rem, 16vh, 20rem);
}

/* ---------------------------------------------- History */

.history h2,
.history .section-sub,
.worldwide h2 {
  text-align: right;
}

.history .wrapper__article {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5em;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .history .wrapper__article {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .history .wrapper__article {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    /* 점선은 4열로 펼쳐질 때만 의미가 있어 여기서만 그립니다 */
    /* 원본의 dashed 점선 모양을 유지한다 */
    background-image: repeating-linear-gradient(
      to right,
      var(--line) 0 9px,
      transparent 9px 17px
    );
    background-repeat: no-repeat;
    background-size: 100% 2px;
    background-position: 0 11.5em;
  }
}

.history .article {
  display: flex;
  flex-direction: column;
}

.history .article__photo {
  /* 말풍선 마스크(balloon.svg)가 216x157이라, 같은 비율을 주면 마스크가 박스를 꽉 채운다.
     원본은 고정 height였어서 열 폭에 따라 말풍선 좌우에 빈 공간이 생겼다. */
  aspect-ratio: 216 / 157;
  max-width: 100%;
  margin-bottom: 24px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
  /* 말풍선 마스크 — 원본의 시그니처 요소 유지 */
  /* balloon.svg를 파일로 참조하면 file:// 로 열었을 때 Chrome이 CORS로 막아
     마스크가 통째로 실패하고 사진이 사라진다. data URI로 심어 그 문제를 없앴다. */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 216 157'%3E%3Cpath d='M0 9.99999C0 4.47714 4.47715 0 10 0H206C211.523 0 216 4.47715 216 10V130.104C216 135.627 211.523 140.104 206 140.104H162H138.152C136.1 140.104 134.099 140.735 132.418 141.911L113.734 154.987C110.291 157.397 105.709 157.397 102.266 154.987L83.5821 141.911C81.9014 140.735 79.8997 140.104 77.8484 140.104H54H10C4.47715 140.104 0 135.627 0 130.104L0 9.99999Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 216 157'%3E%3Cpath d='M0 9.99999C0 4.47714 4.47715 0 10 0H206C211.523 0 216 4.47715 216 10V130.104C216 135.627 211.523 140.104 206 140.104H162H138.152C136.1 140.104 134.099 140.735 132.418 141.911L113.734 154.987C110.291 157.397 105.709 157.397 102.266 154.987L83.5821 141.911C81.9014 140.735 79.8997 140.104 77.8484 140.104H54H10C4.47715 140.104 0 135.627 0 130.104L0 9.99999Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.history .article__photo:hover {
  filter: grayscale(0%);
}

/* 원본의 :nth-child 의존을 data-photo 속성으로 교체 — 순서를 바꿔도 사진이 어긋나지 않습니다 */
.history .article__photo[data-photo="1"] {
  background-image: url(../../img/history_1.webp);
}
.history .article__photo[data-photo="2"] {
  background-image: url(../../img/history_2.webp);
}
.history .article__photo[data-photo="3"] {
  background-image: url(../../img/history_3.webp);
}
.history .article__photo[data-photo="4"] {
  background-image: url(../../img/history_present.webp);
}

.history .slider {
  display: flex;
  justify-content: center;
}

.history .slider .dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
}

.history .article__data {
  font-family: var(--sans);
  text-align: center;
  padding-top: 2em;
}

.history .article__data .name {
  font-size: 1.2em;
}

.history .article__data .details {
  padding-top: 1em;
  line-height: 1.6;
  margin: 0;
}

/* ---------------------------------------------- Fabrics */

.fabrics .wrapper__article {
  list-style: none;
  margin: 0;
  padding: 0.5em 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5em;
}

.fabrics .article {
  display: flex;
  flex-direction: column;
}

.fabrics .article__photo {
  width: 100%;
  /* 실제 사진이 640x427(가로 3:2)이다. 세로 비율을 주면 위아래가 크게 잘린다. */
  aspect-ratio: 3 / 2;
  margin-bottom: 1em;
  border-radius: 1em;
  overflow: hidden;
  background: #f4f4f4;
}

.fabrics .article__photo img {
  width: 100%;
  height: 100%;
  /* 원본에서 background-size가 빠져 사진이 잘리거나 반복되던 문제를 해결 */
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.fabrics .article:hover .article__photo img {
  transform: scale(1.04);
}

.fabrics .article__data {
  text-align: center;
  font-family: var(--sans);
  margin-bottom: 32px;
}

.fabrics .article__data .name {
  padding-bottom: 16px;
  font-size: 20px;
}

.fabrics .article__data .details {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.fabrics .badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 999px;
}

/* ---------------------------------------------- Worldwide */

.worldwide__contents {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2em;
  align-items: center;
}

@media (min-width: 900px) {
  .worldwide__contents {
    grid-template-columns: 3fr 1fr;
  }
}

.worldwide__contents__img img {
  width: 100%;
  display: block;
}

.worldwide__contents__details {
  font-family: var(--sans);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.worldwide__contents__details .name {
  font-size: 1.2em;
}

.worldwide__contents__details .details {
  margin-top: 2vh;
}

/* 인증서 목록 — 몇 개가 와도 세로로 쌓인다 */
.worldwide__contents__details .certs {
  list-style: none;
  margin: 2em 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: flex-start;
}

.worldwide__contents__details .button {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
  color: var(--orange);
  background: none;
  border: 0;
  cursor: pointer;
}

.worldwide__contents__details .button:hover {
  text-decoration: underline;
}

/* 표준 <dialog> — ESC 닫기·포커스 트랩·스크린리더 인식이 기본 제공됩니다 */
dialog.box_modal {
  /* 인증서가 여러 쪽일 수 있어 넓게 잡았다. 450px에서는 글자를 읽을 수 없다. */
  width: min(820px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 2px solid var(--orange);
  background: #fff;
  /* 닫기 버튼이 스크롤에 끌려가지 않도록 바깥은 고정, 안쪽만 스크롤 */
  overflow: hidden;
  /* 원본은 left:calc(50vw - 200px)로 중앙이 어긋나 있었는데, dialog는 브라우저가 중앙 정렬합니다 */
}

/* display는 열렸을 때만 준다. 그냥 주면 닫힌 팝업이 화면에 나타난다. */
dialog.box_modal[open] {
  display: flex;
  flex-direction: column;
}

dialog.box_modal::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

/* 긴 인증서(여러 쪽)는 여기서 스크롤된다 */
dialog.box_modal .modal_image {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

dialog.box_modal .modal_image img {
  /* 어떤 크기의 인증서를 넣어도 폭에 맞춰 들어간다.
     그래서 HTML에 width/height를 적지 않았다. */
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}

/* 사진을 아직 안 끼운 상태에서는 깨진 아이콘이 보이지 않게 */
dialog.box_modal .modal_image img:not([src]) {
  display: none;
}

dialog.box_modal .closer {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  width: 40px;
  height: 40px;
  padding: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

dialog.box_modal .closer svg {
  width: 100%;
  height: 100%;
  display: block;
}

dialog.box_modal .closer:hover {
  border-color: var(--ink);
}

/* ---------------------------------------------- Footer */

footer {
  margin: var(--pad-x);
  border: 2px solid var(--orange);
  padding: 40px 4vw;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3em;
}

@media (min-width: 900px) {
  footer {
    grid-template-columns: 1fr 1fr;
    gap: 6em;
  }
}

footer .contacts p {
  color: var(--orange);
  font-size: clamp(2rem, 4vw, 4rem);
  margin: 0 0 0.2em;
}

footer .contacts p:last-child {
  font-size: clamp(1.5rem, 3vw, 3rem);
  word-break: break-all;
}

footer .contacts a {
  text-decoration: none;
}

footer .contacts a:hover {
  text-decoration: underline;
}

footer .more_contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2em;
}

footer .more_contacts h3 {
  color: var(--orange);
  font-size: 1.2em;
  margin-bottom: 0.5em;
}

footer .more_contacts .details,
footer .more_contacts p {
  font-family: var(--sans);
  line-height: 1.6;
  font-style: normal;
  margin: 0;
}

footer .more_contacts .bold {
  font-weight: 700;
  margin-right: 6px;
}


.copyright {
  margin: var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.copyright span {
  font-family: var(--sans);
  color: var(--gray);
  font-size: 16px;
  line-height: 1.5;
}

.copyright a {
  color: var(--gray);
}
