/* ================================
   FONTS
================================ */
@font-face {
  font-family: 'HakgyoansimByeoljari';
  src: url('fonts/Hakgyoansim Byeoljari TTF B.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'HakgyoansimByeoljari';
  src: url('fonts/Hakgyoansim Byeoljari TTF L.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
}

/* ================================
   RESET & BASE
================================ */
:where(.pub_page), :where(.pub_page) *, :where(.pub_page) *::before, :where(.pub_page) *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* html reset removed for site embed */

.pub_page {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1a1817;
  background: #fff;
  overflow-x: hidden;
}

:where(.pub_page) img { display: block; max-width: 100%; }
:where(.pub_page) a { text-decoration: none; color: inherit; }
:where(.pub_page) button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ================================
   UTILITIES
================================ */
.container   { max-width: 1460px; margin: 0 auto; padding: 0 40px; }
.ta-center   { text-align: center; }
.c-yellow    { color: #ffc117; }
.c-orange    { color: #fe6000; }
.c-red       { color: #fe374c; }
.c-blue      { color: #2db5ff; }
.c-purple    { color: #c24eff; }

/* Shared section heading */
.section-title {
  font-size: clamp(32px, 3.65vw, 56px);
  font-weight: 700;
  line-height: 1.3;
  color: #1a1817;
  margin-bottom: 24px;
}
.section-desc {
  font-size: clamp(16px, 1.56vw, 20px);
  font-weight: 400;
  color: #8f8f93;
  line-height: 1.6;
}

/* ================================
   SCROLL REVEAL
================================ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   SECTION 1: HERO
================================ */
.hero {
  position: relative;
  background: #fff2b8;
  overflow: hidden;
  /* Figma 1920:716 → height = 37.29vw */
  height: clamp(380px, 37.29vw, 716px);
}

/* 모든 히어로 요소의 공통 베이스 */
.hero__el {
  position: absolute;
  pointer-events: none;
}

/* 그라디언트 오버레이 */
.hero__gradient {
  background: linear-gradient(to right,
    #fff2b8 0%,
    rgba(255,242,184,0.7) 35%,
    transparent 100%
  );
  z-index: 1;
}

/* 소년 이미지: 왼쪽 경계를 부드럽게 페이드 */
.hero__boy {
  z-index: 1;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 28%);
  mask-image: linear-gradient(to right, transparent 0%, black 28%);
}

/* 코끼리: 소년 이미지 앞에 배치 */
.hero__elephant {
  z-index: 3;
}

/* 텍스트 블록 */
.hero__text {
  position: absolute;
  z-index: 5;
}

.hero__title {
  font-size: clamp(22.4px, 3.48vw, 70px);
  font-weight: 700;
  line-height: 1.36;
  color: #4a1c00;
  white-space: nowrap;
}
.hero__title--accent { color: #fe6000; }

.hero__mobile-img {
  display: none;
}


/* ================================
   SECTION 2: BRAND INTRO
================================ */
.intro {
  padding: 120px 0;
  background: #fff;
}
.intro__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }

.intro__label {
  font-size: clamp(16px, 1.875vw, 24px);
  font-weight: 500;
  color: #1a1817;
  margin-bottom: 24px;
}

.intro__logo {
  width: clamp(200px, 21.98vw, 422px);
  margin-bottom: 48px;
}
.intro__logo img { width: 100%; }

.intro__title {
  font-size: clamp(32px, 3.65vw, 56px);
  font-weight: 700;
  line-height: 1.35;
  color: #1a1817;
  margin-bottom: 32px;
}

.intro__desc {
  font-size: clamp(15px, 1.56vw, 20px);
  color: #8f8f93;
  line-height: 1.7;
  margin-bottom: 52px;
}

.btn-cta {
  position: relative;
  display: inline-block;
  transition: transform 0.2s;
}

.btn-cta__bg {
  width: clamp(180px, 16.72vw, 321px);
  display: block;
}
.btn-cta__arrow {
  position: absolute;
  left: 80%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(12px, 1.302vw, 25px);
  height: auto;
  transition: transform 0.35s ease;
  pointer-events: none;
}
.btn-cta:hover .btn-cta__arrow {
  transform: translateY(-50%) rotate(45deg);
}


/* ================================
   SECTION 3: READING MODES
================================ */
.modes { padding: 120px 0 160px; background: #fff; }

.modes__header { text-align: center; margin-bottom: 64px; }

/* Frame 42 + Frame 43: 각 709.78/1920=36.97vw, gap≈40px */
.modes__frame {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2.08vw, 40px);
  margin-top: 64px;
}
.modes__frame img {
  width: clamp(140px, 36.97vw, 710px);
  border-radius: 20px;
}

.modes__cards {
  display: flex;
  gap: 32px;
}

.mode-card {
  position: relative;
  flex: 1;
  min-height: 360px;
  border-radius: 26px;
  overflow: hidden;
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mode-card--pink { background: #ffe9ec; }
.mode-card--mint { background: rgba(235,255,253,0.85); border: 1.5px solid #d0f5f0; }

.mode-card__text { position: relative; z-index: 2; }
.mode-card__sub {
  font-size: clamp(15px, 1.25vw, 16px);
  font-weight: 500;
  color: #1a1817;
  margin-bottom: 6px;
}
.mode-card__title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.2;
}
.mode-card__title--red  { color: #fe374c; }
.mode-card__title--blue { color: #2db5ff; }

.mode-card__img {
  position: absolute;
  right: -20px; bottom: 0;
  width: 70%;
  max-width: 420px;
}
.mode-card__img img {
  width: 100%;
  border-radius: 12px;
  transform: perspective(800px) rotateY(-6deg);
  box-shadow: -10px 10px 40px rgba(0,0,0,0.15);
}

/* decorative letters */
.mode-card__deco {
  position: absolute;
  font-weight: 900;
  opacity: 0.4;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}
.mode-card__deco--a {
  top: 14px; right: 52px;
  font-size: 40px;
  color: #ffc300;
  transform: rotate(20deg);
}
.mode-card__deco--b {
  bottom: 50px; left: 120px;
  font-size: 32px;
  color: #ff6060;
  transform: rotate(-36deg);
}


/* ================================
   SECTION 4: FEATURES
================================ */
.features { padding: 120px 0; background: #ffeaed; }

.features__heading { text-align: center; margin-bottom: 72px; }

.features__layout {
  display: flex;
  align-items: stretch;
  gap: clamp(40px, 3.65vw, 70px);
}

.features__img {
  flex: 710 1 0;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
}
.features__img img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.1);
}
.features__img-item { display: none; }
.features__img-item--active { display: block; }

.features__list {
  flex: 680 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.feature {
  padding: 16px 0;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  opacity: 0.28;
  transition: opacity 0.35s;
  cursor: pointer;
}
.feature--active { opacity: 1; }
.feature:hover   { opacity: 0.85; }

.feature__num {
  font-size: clamp(36px, 3.13vw, 48px);
  font-weight: 700;
  line-height: 1;
  min-width: 64px;
  flex-shrink: 0;
}

.feature__title {
  font-size: clamp(20px, 1.82vw, 28px);
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 8px;
  line-height: 1.45;
}
.feature__desc {
  font-size: clamp(20px, 1.82vw, 28px);
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1.45;
  white-space: nowrap;
}

.feature__divider {
  border: none;
  border-top: 1.5px solid #e5e5e5;
  margin: 0;
}


/* ================================
   SECTION 5: SERIES
================================ */
.series {
  position: relative;
  height: clamp(600px, 57.29vw, 900px);
  padding-top: clamp(60px, 6.25vw, 120px);
  overflow: hidden;
  background: #ffeaed;
}

.series__cloud {
  position: absolute;
  pointer-events: none;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 133.33%;
  z-index: 0;
}

.series__chars {
  position: absolute;
  pointer-events: none;
  bottom: 0;
  right: 0;
  width: 100.52%;
  z-index: 1;
}

.series__header { text-align: center; margin-bottom: 64px; position: relative; z-index: 2; }

.series__row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.series__arrow {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  color: #1a1817;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 10;
}
.series__arrow:hover { background: #1a1817; color: #fff; }

.series__viewport { flex: 1; overflow: hidden; }

.series__track {
  display: flex;
  gap: 40px;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
}

.series__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.series__item img {
  width: 100%;
  transition: transform 0.3s;
}
.series__item img:hover {
  transform: translateY(-8px);
}

.series__books {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  margin-top: 60px;
  padding-bottom: 0;
  position: relative;
  z-index: 2;
}
.series__book-main {
  width: 55%;
  border-radius: 12px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.12);
}
.series__book-sub {
  width: 35%;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(20px);
}


/* ================================
   SECTION 6: READING LEVELS
================================ */
.levels {
  padding: 120px 0;
  background: #fffaea;
}

.levels .section-title { margin-bottom: 20px; }
.levels .section-desc  { margin-bottom: 64px; }

.levels__grid {
  display: flex;
  justify-content: center;
  gap: clamp(30px, 3.65vw, 70px);
}

.level-card {
  width: clamp(260px, 22.08vw, 424px);
  transition: transform 0.3s, box-shadow 0.3s;
}
.level-card:hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
}


/* ================================
   SECTION 7: GENRE TAGS
================================ */
.genres { padding: 120px 0 100px; background: #fff; overflow: hidden; }

.genres__header { margin-bottom: 56px; }

.marquee-outer { display: flex; flex-direction: column; gap: 16px; }

.marquee { overflow: hidden; }

.marquee__inner {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 4px 0;
}

.marquee--fwd .marquee__inner  { animation: scrollLeft 30s linear infinite; }
.marquee--rev .marquee__inner  { animation: scrollRight 26s linear infinite; }
.marquee:hover .marquee__inner { animation-play-state: paused; }

@keyframes scrollLeft  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scrollRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.gtag {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: clamp(140px, 12.93vw, 248px);
  height: clamp(80px, 7.95vw, 153px);
  border-radius: 16px;
  font-size: clamp(12px, 0.94vw, 16px);
  font-family: 'HakgyoansimByeoljari', 'Pretendard', sans-serif;
  font-weight: 700;
  color: #1a1817;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gtag em {
  font-style: normal;
  font-size: clamp(32px, 3.13vw, 60px);
  line-height: 1;
}
.gtag:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}


/* ================================
   SECTION 8: CTA
================================ */
.cta {
  position: relative;
  overflow: hidden;
  background: #fff;
  height: clamp(400px, 40.83vw, 784px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta__cloud {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  min-width: 800px;
  pointer-events: none;
  z-index: 0;
}

.cta__chars {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  min-width: 800px;
  pointer-events: none;
  z-index: 1;
}

.cta__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 20px 120px;
}

.cta__sub {
  font-size: clamp(14px, 1.82vw, 35px);
  font-weight: 600;
  color: #1a1817;
  line-height: calc(64 / 57);
  margin-bottom: 0;
}

.cta__title {
  font-size: clamp(14px, 1.82vw, 35px);
  font-weight: 600;
  color: #2db5ff;
  line-height: calc(64 / 57);
  margin-bottom: 200px;
}

.btn-start {
  display: inline-block;
  padding: clamp(12px, 1.04vw, 16px) clamp(28px, 3.13vw, 60px);
  background: #2db5ff;
  color: #fff;
  font-size: clamp(15px, 1.04vw, 16px);
  font-weight: 700;
  border-radius: 50px;
  transition: transform 0.2s, filter 0.2s;
}
.btn-start:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* ================================
   RESPONSIVE — TABLET ≤1024px
================================ */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }

  /* Hero */
  .hero__title { font-size: clamp(19.2px, 3.2vw, 48px); }
  .hero > img.hero__el:nth-child(n+9) { display: none; }
  .hero__mobile-img { display: none; }

  /* Section 3 */
  .modes__cards   { flex-direction: column; }
  .mode-card      { min-height: 300px; }
  .mode-card__img { width: 55%; right: -10px; }

  /* Section 4 */
  .features__layout { flex-direction: column; gap: 40px; }
  .features__img    { flex: none; width: 100%; max-width: 600px; margin: 0 auto; }
  .features__list   { flex: none; width: 100%; }

  /* Section 5 */
  .series { height: auto; min-height: clamp(480px, 55vw, 900px); }

  /* Section 6 */
  .levels__grid { flex-wrap: wrap; justify-content: center; }

  /* Section 8 */
  .cta { height: auto; min-height: clamp(380px, 42vw, 600px); }
  .cta__content { padding: 60px 20px 180px; }
}

/* ================================
   RESPONSIVE — MOBILE ≤640px
================================ */
@media (max-width: 640px) {
  /* Section 1 — 모바일 이미지로 교체 */
  .hero { height: auto; }
  .hero > .hero__el { display: none !important; }
  .hero__mobile-img {
    display: block;
    width: 100%;
    height: auto;
  }
  .hero__text {
    position: absolute !important;
    top: 17% !important;
    left: 50% !important;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    z-index: 5;
  }
  .hero__title { font-size: 35.2px; white-space: nowrap; line-height: 1.3; }

  /* Section 2 */
  .intro { padding: 60px 0; }

  /* Section 3 */
  .modes { padding: 60px 0 80px; }
  .modes__frame { flex-direction: column; align-items: center; }
  .modes__frame img { width: min(80%, 480px); }

  /* Section 4 */
  .features { padding: 60px 0; }
  .feature        { flex-direction: column; gap: 8px; }
  .feature__num   { font-size: 24px; min-width: 40px; }
  .feature__title { font-size: 17.6px; }
  .feature__desc  { font-size: 17.6px; }

  /* Section 5 */
  .series { min-height: 420px; padding-top: 40px; }
  .series__header { padding: 0 16px; }
  .series__row { gap: 16px; padding: 0 16px; }
  .series__arrow { width: 36px; height: 36px; }
  .series__arrow svg { width: 16px; height: 16px; }
  .series__item img { border-radius: 12px; }

  /* Section 6 */
  .levels { padding: 60px 0; }
  .levels__grid { flex-direction: column; align-items: center; gap: 20px; }
  .level-card { width: clamp(260px, 80vw, 380px); }

  /* Section 7 */
  .genres { padding: 60px 0 40px; }
  .gtag {
    width: clamp(100px, 26vw, 180px);
    height: clamp(60px, 15vw, 110px);
    font-size: 12px;
    border-radius: 12px;
  }
  .gtag em { font-size: clamp(20px, 5vw, 32px); }

  /* Section 8 */
  .cta { height: auto; min-height: 360px; }
  .cta__cloud,
  .cta__chars { min-width: 600px; }
  .cta__content { padding: 40px 16px 150px; }
  .section-title,
  .intro__title,
  .cta__sub,
  .cta__title { font-size: 24px; }
  .intro__desc { font-size: clamp(12.8px, 1.56vw, 20px); }
  .btn-start { padding: 12px 32px; font-size: 15px; }
  .section-title,
  .section-desc { word-break: keep-all; }
}
