/* 서브페이지 공통 (Blog / Contact / Products / Services) */
.sub-main {
  padding-top: var(--header-h);
}

/* Services 페이지 전체 배경 */
body[data-page="services"] {
  background: rgba(232, 237, 226, 0.2);
}

/* ===== Blog ===== */
.blog-banner {
  /* min-height가 aspect-ratio보다 우선될 때 너비까지 비율에 맞춰 늘어나며
     좁은 화면에서 가로 스크롤이 생기는 버그가 있어, width를 명시로 고정합니다 */
  width: 100%;
  position: relative;
  aspect-ratio: 2400 / 634;
  min-height: 160px;
  overflow: hidden;
  background: #eef1ee;
}

.blog-banner img {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  max-width: none;
  object-fit: cover;
}

.blog-banner h1 {
  position: absolute;
  left: calc(var(--sub-gutter) + 2.85vw);
  bottom: 18%;
  /* Products 배너 타이틀과 같은 크기·두께 */
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: 1;
  color: #1c3d3a;
}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: clamp(56px, 5.25vw, 100px);
  padding: 0 var(--sub-gutter);
  border-bottom: 1px solid var(--c-line);
  font-size: var(--fs-body);
}

.blog-tabs {
  position: relative;
}

.blog-tabs button {
  padding: 8px 20px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  color: var(--c-muted);
  font-weight: 500;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.blog-tabs button:hover {
  color: #377974;
}

.blog-tabs button.is-active {
  border-color: rgba(55, 121, 116, 0.35);
  color: #377974;
  font-weight: 700;
}

.blog-tabs__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.blog-tabs__caret {
  font-size: 14px;
  transition: transform 0.2s var(--ease);
}

.blog-tabs.is-open .blog-tabs__caret {
  transform: rotate(180deg);
}

.blog-tabs__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 0.2s var(--ease),
    transform 0.2s var(--ease);
  z-index: 5;
}

.blog-tabs.is-open .blog-tabs__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.blog-tabs__menu button {
  width: 100%;
  padding: 10px 18px;
  border: none;
  border-radius: 0;
  text-align: left;
}

.blog-tabs__menu button.is-active {
  background: rgba(55, 121, 116, 0.08);
}

.blog-toolbar__search {
  position: relative;
  width: clamp(200px, 20vw, 320px);
  flex-shrink: 0;
}

.blog-toolbar__search input {
  width: 100%;
  height: clamp(38px, 2.7vw, 48px);
  padding: 0 44px 0 clamp(16px, 1.4vw, 22px);
  border: 1.5px solid #d5dcd5;
  border-radius: 999px;
  font-size: calc(var(--fs-body) * 0.85);
  background: var(--c-white);
}

.blog-toolbar__search input::placeholder {
  color: #aab5ac;
}

.blog-toolbar__search input:focus {
  outline: 2px solid #377974;
  outline-offset: 2px;
}

.blog-toolbar__search button {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  translate: 0 -50%;
  color: #aab5ac;
}

.blog-toolbar__search button:hover {
  color: var(--c-green);
}

.blog-table {
  --cols: clamp(48px, 5.85vw, 117px) 1fr clamp(96px, 9.2vw, 184px);
  font-size: var(--fs-body);
}

.blog-row {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: center;
  min-height: clamp(52px, 4.65vw, 93px);
  /* 선(border)이 화면 끝까지 안 닿고 콘텐츠 폭에서 끝나도록 padding 대신 margin으로 안쪽에 들입니다 */
  margin: 0 var(--sub-gutter);
  border-bottom: 1px solid var(--c-line);
}

.blog-row--head {
  min-height: clamp(56px, 5vw, 100px);
  color: var(--c-ink);
}

.blog-row__no,
.blog-row__date,
.blog-row__views {
  color: var(--c-muted);
  font-weight: 400;
}

.blog-row__title {
  padding-right: 24px;
  font-weight: 500;
  color: var(--c-ink);
  transition: color 0.2s var(--ease);
}

.blog-row:not(.blog-row--head):hover .blog-row__title {
  color: #377974;
}

.blog-empty {
  padding: 64px var(--sub-gutter);
  text-align: center;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-line);
}

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
  /* 위: 카드 그리드와의 간격. 아래: 다른 페이지들처럼 푸터가 바로 붙지 않도록 두는 여백 */
  margin: clamp(32px, 3.75vw, 75px) 0 clamp(56px, 8vw, 140px);
  font-size: var(--fs-body);
  color: var(--c-muted);
}

.blog-pagination button {
  min-width: 2em;
  height: 2em;
  border-radius: 50%;
  color: inherit;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}

.blog-pagination button:hover {
  color: #377974;
}

.blog-pagination button.is-active {
  background: #377974;
  color: #fff;
  font-weight: 700;
}

/* ===== Blog Post (상세) ===== */
.post {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(72px, 10.42vw, 150px) 0 clamp(48px, 6.94vw, 100px);
}

/* 뉴스 포스트 글 안에서는 문단·이미지가 위에서 떨어지며 나타나는
   reveal 효과 없이 바로 보이게 합니다 */
.post .reveal {
  opacity: 1;
  transform: none;
}

.post-head {
  padding-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--c-line);
}

.post-head__cat {
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #377974;
}

.post-head h1 {
  margin-top: 12px;
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-ink);
}

.post-head__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(16px, 2vw, 28px);
  font-size: var(--fs-desc-sm);
  color: var(--c-muted);
}

.post-head__insta {
  display: inline-flex;
  margin-left: auto;
}

.post-head__insta img {
  width: 22px;
  height: 22px;
  transition: transform 0.2s var(--ease);
}

.post-head__insta:hover img {
  transform: scale(1.1);
}

.post-body {
  padding: clamp(40px, 5vw, 72px) 0;
}

.post-body .section-desc + .section-desc {
  margin-top: 1.2em;
}

/* 본문 중간 소제목 */
.post-body h2 {
  margin-top: 2.2em;
  font-size: calc(var(--fs-body) * 1.35);
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-ink);
}

.post-body h2 + .section-desc {
  margin-top: 1em;
}

/* 본문 삽입 이미지 */
.post-figure {
  margin: 2em 0;
}

/* 모든 포스트의 모든 사진 높이를 여기서 통일합니다 (기준: post-2 사진 높이).
   자르지 않고(object-fit: contain) 비율을 그대로 유지한 채 높이만 맞춥니다 */
.post-figure img {
  width: 100%;
  height: clamp(110px, 26vw, 256px);
  object-fit: contain;
  border-radius: 12px;
}

/* 화학구조처럼 자르면 안 되는 그림과 사진을 나란히 둘 때 씁니다.
   위의 높이 통일 규칙을 그대로 따르면서 폭만 반반 나눠 가집니다 */
.post-figure-group {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 2em 0;
}

.post-figure-group .post-figure {
  flex: 1 1 220px;
  margin: 0;
}

.post-figure figcaption {
  margin-top: 10px;
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: var(--c-muted);
  font-style: italic;
}

/* 용어풀이 표 */
.post-glossary {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: var(--fs-desc-sm);
}

.post-glossary th,
.post-glossary td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-line);
}

.post-glossary th {
  width: 30%;
  font-weight: 700;
  color: #377974;
}

.post-glossary td {
  color: var(--c-ink);
  line-height: 1.6;
}

/* 원저자 표기 */
.post-byline {
  margin-top: 2em;
  font-size: var(--fs-caption);
  color: var(--c-muted);
  font-style: italic;
}

/* 본문 끝, 목록보기 버튼 위에 오는 인스타그램 카드형 CTA. 블로그 글 페이지라
   섹션이 너무 커지지 않도록 가로로 납작한 한 줄 카드로 구성했습니다 */
.post-insta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(14px, 1.8vw, 20px) clamp(18px, 2.2vw, 24px);
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: var(--c-paper);
  text-decoration: none;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.post-insta:hover {
  transform: translateY(-2px);
  border-color: #377974;
  box-shadow: 0 10px 24px rgba(55, 121, 116, 0.14);
}

.post-insta__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  /* insta.webp는 이미 둥근 모서리가 있고, blog-icon.webp(사각 배경)는
     이 값으로 모서리를 둥글립니다 */
  border-radius: 10px;
}

.post-insta__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.post-insta__title {
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--c-ink);
}

/* 폭 440px 이하에서만 "@phytorevolution"과 "팔로우하기" 사이를 줄바꿈합니다 */
.post-insta__break {
  display: none;
}

@media (max-width: 440px) {
  .post-insta__break {
    display: block;
  }
}

.post-insta__desc {
  margin-top: 2px;
  font-size: var(--fs-desc-sm);
  color: var(--c-muted);
}

.post-insta__arrow {
  flex-shrink: 0;
  font-size: 20px;
  color: #377974;
  transition: transform 0.2s var(--ease);
}

.post-insta:hover .post-insta__arrow {
  transform: translateX(4px);
}

@media (max-width: 560px) {
  .post-insta__desc {
    display: none;
  }
}

.post-footer {
  display: flex;
  justify-content: center;
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--c-line);
}

.post-back {
  display: inline-flex;
  align-items: center;
  padding: 14px 36px;
  border-radius: 999px;
  background: #377974;
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-body);
  transition:
    transform 0.2s var(--ease),
    filter 0.2s var(--ease);
}

.post-back:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* ===== Contact =====
   services 페이지 .service-intro와 같은 처리(중앙 정렬 인트로) 뒤에,
   연락처 카드 + 지도를 좌우로 배치합니다. */
.contact-head {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10.42vw, 150px);
  text-align: center;
  font-size: var(--fs-body);
  line-height: 2;
  color: var(--c-ink);
}

/* Technology 페이지 .service-material의 반원 장식을 위아래로 뒤집어
   배너 위쪽에 넣습니다 (top:0 + translateY(-50%)) */
.contact-head::before,
.contact-head::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.contact-head::before {
  left: 0;
  width: 600px;
  height: 600px;
  transform: translate(-20%, -50%);
  background: rgba(124, 223, 197, 0.234);
}

.contact-head::after {
  right: 0;
  width: 1000px;
  height: 1000px;
  transform: translate(20%, -50%);
  background: rgb(242 255 152 / 35%);
}

.contact-head h1 {
  /* 다른 페이지 배너 타이틀과 같은 크기·두께 */
  font-size: var(--fs-title);
  font-weight: 700;
  color: var(--c-ink);
}

.contact-head h1 + p {
  margin-top: clamp(28px, 3vw, 48px);
}

.contact-head__quote {
  margin-top: 0.6em;
  font-size: calc(var(--fs-body) * 1.1);
  font-weight: 700;
  color: #377974;
}

/* 모바일에서만 쉼표 뒤에서 줄바꿈 */
.contact-head__quote-break {
  display: none;
}

@media (max-width: 900px) {
  .contact-head__quote-break {
    display: block;
  }
}

/* 전화번호·이메일·주소를 카드 대신 한 줄 설명글로, | 로 구분 */
.contact-head__meta {
  margin-top: 1.2em;
  font-size: var(--fs-desc-sm);
  color: var(--c-muted);
}

.contact-head__meta span {
  margin: 0 0.6em;
  color: rgba(55, 121, 116, 0.4);
}

.contact-head__meta a:hover {
  color: #377974;
  text-decoration: underline;
}

.contact-body {
  display: flex;
  justify-content: center;
  padding: 0 clamp(72px, 10.42vw, 150px) clamp(72px, 10.42vw, 150px);
}

.contact-body .contact-form {
  width: 100%;
  max-width: 920px;
}

/* ===== Contact 문의 폼 ===== */
.contact-form {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  padding: clamp(28px, 3vw, 40px);
  background: #fff;
  border: 2px solid rgba(55, 121, 116, 0.25);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(55, 121, 116, 0.08);
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 24px);
}

.contact-form__field {
  display: grid;
  gap: 8px;
}

.contact-form__label {
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--c-ink);
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #d5dcd5;
  border-radius: 10px;
  font-size: var(--fs-desc-sm);
  font-family: inherit;
  color: var(--c-ink);
  background: var(--c-white);
  resize: vertical;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: 2px solid #377974;
  outline-offset: 1px;
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-desc-sm);
  color: var(--c-ink);
  cursor: pointer;
}

.contact-form__consent input {
  margin-top: 3px;
  accent-color: #377974;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.contact-form__consent-link {
  color: #377974;
  font-weight: 700;
  text-decoration: underline;
}

.contact-form__submit {
  justify-self: start;
  padding: 14px 36px;
  border-radius: 999px;
  background: #377974;
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-body);
  transition:
    transform 0.2s var(--ease),
    filter 0.2s var(--ease);
}

.contact-form__submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.contact-form__status {
  font-size: var(--fs-desc-sm);
  color: var(--c-muted);
}

.contact-form__status.is-error {
  color: #c0392b;
}

/* 개인정보 수집·이용 안내 모달 */
.privacy-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 40, 28, 0.5);
}

.privacy-modal.is-open {
  display: flex;
}

.privacy-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  padding: clamp(28px, 4vw, 40px);
  background: #fff;
  border-radius: 16px;
}

.privacy-modal__dialog h2 {
  font-size: var(--fs-desc-sm);
  font-weight: 800;
  color: var(--c-ink);
  padding-right: 24px;
}

.privacy-modal__body {
  margin-top: 20px;
  display: grid;
  gap: 16px;
  font-size: var(--fs-caption);
  line-height: 1.7;
  color: var(--c-ink);
}

.privacy-modal__close {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 28px;
  height: 28px;
  color: var(--c-muted);
}

.privacy-modal__close:hover {
  color: var(--c-ink);
}

/* ===== Products ===== */
/* services 페이지 .service-band와 배너 높이를 통일하기 위해 원본 사진
   비율(3679x1999) 대신 service-band와 같은 비율(1678/937)을 씁니다.
   사진은 background-size:cover라 비율이 달라져도 잘리기만 할 뿐 찌그러지지
   않습니다. */
.products-head {
  /* blog 페이지 대문사진과 같은 비율로 축소 */
  /* min-height가 aspect-ratio보다 우선될 때 너비까지 비율에 맞춰 늘어나며
     좁은 화면에서 가로 스크롤이 생기는 버그가 있어, width를 명시로 고정합니다 */
  width: 100%;
  position: relative;
  aspect-ratio: 2400 / 634;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 4.6vw, 92px) var(--gutter);
  text-align: center;
  background: #cde9cf url("../assets/images/material.webp") center / cover
    no-repeat;
}

/* 밝은 사진 위에서도 글자가 읽히도록 어둡게 깔아줍니다 */
.products-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(13, 45, 35, 0.45), rgba(13, 45, 35, 0.3));
}

.products-head .section-title,
.products-head p {
  position: relative;
  z-index: 1;
}

.products-head .section-title {
  font-weight: 700;
  color: var(--c-white);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.products-head p {
  margin-top: clamp(16px, 1.6vw, 32px);
  font-size: var(--fs-body);
  color: var(--c-white);
}

/* 4개 섹션 배경을 가로지르는 굴곡진 두 선. svg는 전체 높이를 꽉 채우도록
   깔고(preserveAspectRatio:none이라 실제 높이에 맞게 늘어납니다), 각 섹션은
   z-index로 그 위에 놓여 글이 항상 선보다 위에 보이게 합니다. */
.material-lines {
  position: relative;
}

.material-lines__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.material-lines__path {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.material-lines__path--a {
  stroke: #377974;
  opacity: 0.22;
}

.material-lines__path--b {
  stroke: #a9d9a8;
  opacity: 0.35;
}

/* ===== Material 섹션 1: 01. WHY ===== */
.material-section {
  position: relative;
  z-index: 1;
  padding: clamp(72px, 10.42vw, 150px);
  /* 상단만 최대 100px로 (좌우/하단은 기존 150px 유지) */
  padding-top: clamp(72px, 6.94vw, 100px);
  text-align: left;
  /* services 페이지 .service-intro와 같은 기본 타이포(제목이 그 값을 물려받습니다) */
  font-size: var(--fs-body);
  line-height: 2;
  color: var(--c-ink);
}

/* 대문사진의 "파이토레볼루션의 선택"과 같은 크기 */
.material-section__eyebrow {
  font-size: var(--fs-body);
  font-weight: 600;
  color: #377974;
}

/* services 페이지의 "Plant Cell-based Active Ingredient"와 같은 처리:
   별도 클래스 없이 h1 기본값 + reveal-title만 사용 */
.material-section__eyebrow + h1 {
  margin-top: 12px;
  font-weight: 500;
}

.material-section__body {
  margin-top: clamp(28px, 3vw, 48px);
}

/* 개비자나무 효능 카드 4개: 한 열에 2개씩 두 줄 */
.material-cards {
  margin-top: clamp(28px, 3vw, 48px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.material-cards__card {
  padding: clamp(24px, 2.6vw, 40px);
  background: #fff;
  border: 3px solid rgba(55, 121, 116, 0.25);
  border-radius: 10px;
  /* 사진을 flex-grow로 늘려서, 같은 행의 더 긴 카드에 맞춰 늘어난 만큼
     생기는 빈 공간을 카드 자체 크기는 그대로 둔 채 사진이 채우게 합니다 */
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.material-cards__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(55, 121, 116, 0.18);
}

.material-cards__title {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 700;
  color: #377974;
}

.material-cards__desc {
  margin-top: 8px;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-ink);
}

.material-cards__image {
  width: 100%;
  flex: 1 1 clamp(90px, 9.3vw, 135px);
  min-height: 0;
  object-fit: contain;
  margin-top: 16px;
  border-radius: 8px;
}

/* 01, 03 카드는 설명글이 짧아 사진이 더 붙어 보여서 10px 더 띄웁니다 */
.material-cards__card:nth-child(1) .material-cards__image,
.material-cards__card:nth-child(3) .material-cards__image {
  margin-top: 26px;
}

/* 기존 제품 불편 사항 소비자 조사 막대그래프 */
.material-survey {
  margin-top: clamp(48px, 5.5vw, 88px);
}

.material-survey__tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #377974;
  background: rgba(55, 121, 116, 0.1);
  border-radius: 999px;
}

.material-survey__title {
  margin-top: 16px;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 700;
  color: var(--c-ink);
}

.material-survey__bars {
  margin-top: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2vw, 28px);
}

.material-survey__bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.material-survey__bar-label {
  font-size: var(--fs-body);
  color: var(--c-ink);
}

.material-survey__bar-value {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 800;
  color: #377974;
}

.material-survey__bar-track {
  margin-top: 8px;
  height: 14px;
  background: rgba(55, 121, 116, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

/* 인덱스 파이프라인의 진행 바처럼, 스크롤로 보이는 순간 폭이 0에서
   목표 퍼센트까지 자라며 채워지도록 합니다 (목표값은 --w로 전달) */
.material-survey__bar-fill {
  width: 0;
  height: 100%;
  background: #377974;
  border-radius: 999px;
  transition: width 1.1s var(--ease);
}

.material-survey__bar.is-visible .material-survey__bar-fill {
  width: var(--w);
}

/* MVP 소비자 조사 만족도 통계 */
.material-stats {
  margin-top: clamp(40px, 4.5vw, 72px);
  text-align: center;
}

.material-stats__lead {
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--c-ink);
}

.material-stats__row {
  margin: clamp(20px, 2.4vw, 36px) 0;
  display: flex;
  justify-content: center;
  gap: clamp(40px, 6vw, 100px);
}

.material-stats__num {
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 800;
  color: #377974;
}

.material-stats__label {
  margin-top: 6px;
  font-size: var(--fs-body);
  color: var(--c-ink);
}

/* 출시 예정 제품 티저 카드 */
.material-product {
  margin-top: clamp(40px, 4.5vw, 72px);
  padding: clamp(32px, 3.5vw, 56px);
  text-align: center;
  background: rgba(55, 121, 116, 0.05);
  border: 2px dashed rgba(55, 121, 116, 0.35);
  border-radius: 16px;
}

.material-product__tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: #377974;
  border-radius: 999px;
}

.material-product__name {
  margin-top: 16px;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  color: var(--c-ink);
}

.material-product__desc {
  margin-top: 12px;
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--c-ink);
}

/* ===== Services ===== */
.service-band {
  /* blog 페이지 대문사진과 같은 비율로 축소 */
  /* min-height가 aspect-ratio보다 우선될 때 너비까지 비율에 맞춰 늘어나며
     좁은 화면에서 가로 스크롤이 생기는 버그가 있어, width를 명시로 고정합니다 */
  width: 100%;
  position: relative;
  aspect-ratio: 2400 / 634;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 4.6vw, 92px) var(--gutter);
  text-align: center;
  background: #cde9cf url("../assets/images/s_callus.webp") center / cover
    no-repeat;
}

/* 밝은 실험실 사진 위에서도 글자가 읽히도록 어둡게 깔아줍니다 */
.service-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(13, 45, 35, 0.45), rgba(13, 45, 35, 0.3));
}

.service-band h1,
.service-band p {
  position: relative;
  z-index: 1;
}

.service-band h1 {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-white);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.service-band p {
  margin-top: clamp(12px, 1.4vw, 28px);
  font-size: var(--fs-body);
  color: var(--c-white);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.service-intro {
  /* 1440px 기준 150px, 더 좁은 화면에서는 비례해서 줄어듭니다 */
  padding: clamp(72px, 10.42vw, 150px);
  /* 상단만 최대 100px로 (좌우/하단은 기존 150px 유지) */
  padding-top: clamp(72px, 6.94vw, 100px);
  text-align: center;
  font-size: var(--fs-body);
  line-height: 2;
  color: var(--c-ink);
}

.service-intro h1 {
  font-weight: 500;
}

.service-intro h1 + p {
  margin-top: clamp(28px, 3vw, 48px);
}

.service-intro p + p {
  margin-top: clamp(28px, 4vw, 80px);
}

.service-intro strong {
  font-weight: 600;
  /* 헤더 배경과 같은 색 (#377974) */
  color: #377974;
}

/* 설명글과 인증 섹션 사이에 들어가는 PCAI 5단계 공정 인포그래픽 이미지 */
.service-steps {
  padding: 0 clamp(72px, 10.42vw, 150px) clamp(72px, 10.42vw, 150px);
}

.service-steps__image {
  display: block;
  width: 80%;
  margin: 0 auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

/* service-steps 바로 밑, 개비자나무 소개 섹션. 위쪽 섹션들과 같은 좌우/상하
   패딩을 쓰고, 글은 가운데 정렬. 하단 양쪽 모서리에 서로 다른 크기의
   반원을 깔아 장식합니다(왼쪽보다 오른쪽이 2배 큼). */
.service-material {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10.42vw, 150px);
  /* 상단만 최대 100px로 (좌우/하단은 기존 150px 유지) */
  padding-top: clamp(72px, 6.94vw, 100px);
}

.service-material__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.service-material__eyebrow {
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #377974;
}

.service-material__text h1 {
  margin-top: 8px;
  /* service-intro의 "Plant Cell-based Active Ingredient"와 같은 크기(2em) */
  font-size: calc(var(--fs-body) * 2);
  font-weight: 500;
  line-height: 1.35;
  color: var(--c-ink);
}

/* 캐러셀 바깥 래퍼: 모바일에서 화살표를 좌우에 절대배치하는 기준점.
   데스크톱에서는 3장이 그대로 나란히 보이고 화살표는 숨겨둡니다
   (.service-material__arrow 참고) */
.service-material__carousel {
  position: relative;
  z-index: 1;
}

/* 사업자등록증·특허출원증명서 갤러리: 3장을 나란히, 클릭하면 크게 봅니다 */
.service-material__gallery {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.2vw, 32px);
}

/* 모바일에서 한 화면에 한 장씩 보여주면서도 사진 자체는 70% 크기로
   줄이기 위한 래퍼. 데스크톱에서는 display:contents로 레이아웃에서
   사라지고, .service-material__item이 평소처럼 그리드 칸이 됩니다 */
.service-material__slide {
  display: contents;
}

/* 뉴스 캐러셀의 화살표(.blog__arrow)와 같은 디자인. 데스크톱에서는
   3장이 이미 다 보이므로 화살표가 필요 없어 기본은 숨겨둡니다 */
.service-material__arrow {
  display: none;
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  place-items: center;
  translate: 0 -50%;
  color: var(--c-ink);
}

.service-material__arrow svg {
  width: 26px;
  height: 26px;
}

.service-material__arrow--prev {
  left: 0;
}
.service-material__arrow--next {
  right: 0;
}

.service-material__item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid rgba(55, 121, 116, 0.25);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.service-material__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(55, 121, 116, 0.18);
}

.service-material__item img {
  width: 100%;
  aspect-ratio: 1240 / 1755;
  object-fit: contain;
  background: #f4f6f4;
}

.service-material__caption {
  padding: 14px;
  border-top: 1px solid rgba(55, 121, 116, 0.15);
  font-size: var(--fs-desc-sm);
  font-weight: 700;
  color: var(--c-ink);
}

/* 증명서 확대 보기 */
.cert-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: rgba(16, 40, 28, 0.75);
}

.cert-lightbox.is-open {
  display: flex;
}

.cert-lightbox__figure {
  max-width: min(600px, 90vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-lightbox__figure img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.cert-lightbox__figure figcaption {
  margin-top: 16px;
  font-size: var(--fs-body);
  font-weight: 700;
  color: #fff;
}

.cert-lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
}

.cert-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 반원 두 개: 원을 그려서 아래 절반을 섹션 밖(overflow:hidden)으로
   내보내면 위 절반만 보여서 반원이 됩니다. 좌우로도 20%씩 더 밀어서
   양 옆도 살짝 잘리게 합니다. */
.service-material::before,
.service-material::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  pointer-events: none;
}

.service-material::before {
  left: 0;
  width: 400px;
  height: 400px;
  transform: translate(-20%, 50%);
  background: rgba(169, 217, 168, 0.4);
}

.service-material::after {
  right: 0;
  width: 800px;
  height: 800px;
  transform: translate(20%, 50%);
  background: rgba(55, 121, 116, 0.15);
}

/* 한 단어가 음절 단위로 쪼개져 줄바꿈되는 걸 막습니다. 화면 폭과 무관하게
   항상 적용합니다(데스크톱 포함). .section-desc는 common.css의 기본
   정의에서 이미 적용되어 여기서는 다루지 않습니다 */
.material-cards__desc,
.material-product__desc,
.service-band p,
.service-intro p {
  word-break: keep-all;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  /* 타이틀 keep-all은 일단 모바일 전용으로 둡니다(요청 범위) */
  .products-head .section-title,
  .service-band h1,
  .material-section h1,
  .service-intro h1,
  .service-material__text h1,
  .material-product__name,
  .post-head h1 {
    word-break: keep-all;
  }

  /* 3장을 세로로 쌓는 대신, 한 번에 한 장씩 온전히 보이도록 화살표로
     넘겨보게 합니다 (파이프라인 자생식물 캐러셀과 같은 방식) */
  .service-material__carousel {
    padding: 0 clamp(36px, 10vw, 60px);
  }

  .service-material__arrow {
    display: grid;
  }

  .service-material__gallery {
    grid-template-columns: none;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .service-material__gallery::-webkit-scrollbar {
    display: none;
  }

  /* 슬라이드(래퍼)가 화면 하나를 그대로 차지해 한 장씩만 보이게 하고,
     그 안에서 실제 사진 카드는 70% 크기로 가운데에 놓입니다 */
  .service-material__slide {
    display: block;
    flex: 0 0 100%;
    scroll-snap-align: start;
  }

  .service-material__item {
    width: 70%;
    margin: 0 auto;
  }

  /* 캐러셀로 넘길 때마다 처음 뷰포트에 걸치는 걸로 인식돼 reveal 효과가
     매번 다시 실행되는 걸 막습니다 (파이프라인 캐러셀과 같은 이유) */
  .service-material__item.reveal {
    opacity: 1;
    transform: none;
  }

  .service-material::before {
    width: 240px;
    height: 240px;
  }
  .contact-head::before {
    width: 360px;
    height: 360px;
  }
  .service-material::after {
    width: 480px;
    height: 480px;
  }
  .contact-head::after {
    width: 600px;
    height: 600px;
  }

  /* Products/Technology 배너 타이틀처럼 가운데로 옮깁니다 */
  .blog-banner h1 {
    left: 50%;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
  }

  .products-head .section-title,
  .service-band h1,
  .material-section h1,
  .service-intro h1,
  .service-material__text h1,
  .material-product__name,
  .post-head h1 {
    font-size: 21px;
  }

  .material-cards {
    grid-template-columns: 1fr;
  }

  .service-steps {
    padding: 0;
  }

  /* Products, Technology, 뉴스 상세글, Contact 페이지 좌우 여백을 15px로 통일 */
  .products-head,
  .material-section,
  .service-band,
  .service-intro,
  .service-steps,
  .service-material,
  .post,
  .contact-head,
  .contact-body {
    padding-left: 15px;
    padding-right: 15px;
  }

  .blog-row,
  .blog-table {
    --cols: 40px 1fr 88px;
  }

  .blog-row {
    font-size: 15px;
  }
  .blog-row__title {
    padding-right: 8px;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
  }
}
