/* 허브 B안 (/b/) — 공통 장치(영문 라벨·워드마크·알약 버튼·유리)와 첫 화면.
   참고 시안: 연블루 바탕 + 로열블루 3D 원형, 반투명 유리 카드, 자간 넓은 영문 라벨 */

/* ---------- 자간 넓은 영문 라벨 + 짧은 선 ---------- */
.label-en {
  display: block;
  color: #7a8399;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.label-en > span {
  white-space: nowrap;
}

/* ---------- 워드마크 ---------- */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink);
  line-height: 1;
}

.wordmark-main {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wordmark-sub {
  padding-left: 0.42em; /* 자간 때문에 생기는 오른쪽 쏠림을 맞춘다 */
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.42em;
}

/* ---------- 머리말: 첫 화면 위에서는 투명, 내려가면 유리 ---------- */
[data-theme='blue'] .site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}

[data-theme='blue'] .site-header.is-scrolled {
  background: rgba(246, 247, 249, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(28, 40, 96, 0.08);
}

[data-theme='blue'] .site-header .bar {
  height: 72px;
}

[data-theme='blue'] .nav a:not(.btn):hover {
  background: rgba(42, 73, 184, 0.07);
}

/* ---------- 알약 버튼 ---------- */
.btn-pill,
.btn-outline,
.btn-white {
  border-radius: var(--radius-pill);
}

.btn-pill {
  background: linear-gradient(100deg, #3a5bc7 0%, #2a49b8 45%, #1f3484 100%);
  color: var(--white);
  box-shadow: var(--shadow-blue), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-pill:hover {
  box-shadow: 0 18px 38px rgba(42, 73, 184, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-pill:active {
  transform: scale(0.98);
}

.btn-pill.btn-sm {
  box-shadow: 0 6px 16px rgba(42, 73, 184, 0.28);
}

.btn-outline {
  border: 1.5px solid var(--brand);
  background: rgba(255, 255, 255, 0.5);
  color: var(--brand-deep);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.85);
}

.btn-white {
  background: var(--white);
  color: var(--brand-deep);
  box-shadow: 0 14px 32px rgba(10, 16, 48, 0.3);
}

.btn-white:hover {
  transform: translateY(-1px);
}

.btn-xl {
  min-height: 64px;
  padding: 0 40px;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
}

/* 시안의 가는 긴 화살표 */
.arrow-long {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 12px;
  margin-left: 6px;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.arrow-long::before,
.arrow-long::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
}

.arrow-long::before {
  left: 0;
  height: 1.6px;
  margin-top: -0.8px;
  background: currentColor;
  border-radius: 2px;
}

.arrow-long::after {
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border: solid currentColor;
  border-width: 1.6px 1.6px 0 0;
  transform: rotate(45deg);
}

.btn:hover .arrow-long,
a:hover .arrow-long,
button:hover .arrow-long {
  transform: translateX(5px);
}

/* ---------- 유리 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}

/* ---------- 첫 화면 ---------- */
.b-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: -72px;
  padding-top: 72px;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: center;
  background: var(--page);
}

.b-hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.b-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
  transform-origin: 85% 55%;
  animation: art-in 2.2s var(--ease-out-expo) both, art-drift 18s ease-in-out 2.2s infinite alternate;
}

/* 글자 쪽(왼쪽)은 바탕색으로 살짝 덮어 어떤 화면 폭에서도 제목이 또렷하게 */
.b-hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(246, 247, 249, 0.9) 0%, rgba(246, 247, 249, 0.6) 34%, rgba(246, 247, 249, 0) 58%);
  pointer-events: none;
}

.b-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
  grid-template-areas:
    'copy card'
    'actions card';
  align-items: end;
  column-gap: clamp(2rem, 4vw, 4rem);
  padding-block: clamp(3rem, 6vh, 5rem) clamp(3rem, 7vh, 5.5rem);
}

.b-hero-copy {
  grid-area: copy;
}

.b-hero-kicker {
  margin-bottom: 30px;
}

.b-hero-kicker > span {
  display: block;
}

.b-hero-kicker::after,
.b-head .label-en::after,
.b-hero-card .label-en::after {
  content: '';
  display: block;
  width: 60px;
  height: 1.5px;
  margin-top: 18px;
  background: #b9c0d2;
}

.b-hero-title {
  color: var(--ink);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.055em;
}

.b-hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, #3a5bc7 10%, #2a49b8 55%, #1f3484 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.b-hero-lead {
  margin-top: 30px;
  color: #262c3d;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.6;
  letter-spacing: -0.03em;
}

.b-hero-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

/* 유리 카드 */
.b-hero-card {
  grid-area: card;
  padding: 30px 26px 26px;
  border-radius: 28px;
}

.b-hero-card .label-en {
  font-size: 0.75rem;
  letter-spacing: 0.34em;
}

.b-hero-card .label-en > span {
  display: block;
}

.b-hero-card .label-en::after {
  width: 40px;
  margin-top: 14px;
}

.b-hero-card-title {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 1.1875rem;
  line-height: 1.5;
  letter-spacing: -0.03em;
}

.b-hero-card-title strong {
  color: var(--ink);
  font-weight: 700;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 24px;
}

.pillars li + li {
  border-left: 1px solid rgba(122, 131, 153, 0.25);
}

.pillars a,
.pillars button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 4px;
  border-radius: 14px;
  text-align: center;
  transition: background var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.pillars a:hover,
.pillars button:hover {
  background: rgba(42, 73, 184, 0.07);
}

.pillars a:active,
.pillars button:active {
  transform: scale(0.96);
}

.pillars strong {
  color: var(--brand);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap; /* "무료 교육"이 두 줄로 쪼개지지 않게 — 칸이 모자라면 b-fit.js 가 3+2 로 나눈다 */
}

.pillars small {
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* 글자가 크게 설정된 폰·접힌 화면을 편 폰(갤럭시 폴드)처럼 다섯 칸이 비좁을 때: 3+2 두 줄 */
.pillars.is-stacked {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 10px;
}

.pillars.is-stacked li:nth-child(4) {
  border-left: 0;
}

/* 첫 화면 순서대로 떠오르기 */
.b-hero-kicker,
.b-hero-title,
.b-hero-lead,
.b-hero-card,
.b-hero-actions {
  animation: b-rise var(--duration-slow) var(--ease-out-expo) both;
}

.b-hero-title {
  animation-delay: 90ms;
}

.b-hero-lead {
  animation-delay: 200ms;
}

.b-hero-card {
  animation-delay: 340ms;
  animation-duration: 1s;
}

.b-hero-actions {
  animation-delay: 300ms;
}

@keyframes b-rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes art-in {
  from {
    opacity: 0;
    transform: scale(1.08) translateX(3%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes art-drift {
  to {
    transform: scale(1.04) translate(-1%, -1%);
  }
}

/* 태블릿: 카드가 글 아래로 내려온다 */
@media (max-width: 1099px) {
  .b-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'copy'
      'card'
      'actions';
  }

  .b-hero-card {
    max-width: 760px;
    margin-top: 44px;
  }

  .b-hero-actions {
    margin-top: 28px;
  }
}

/* 세로 그림(b-hero-art-m)을 쓰는 폭: 원이 오른쪽 아래에 오도록 */
@media (max-width: 900px) {
  .b-hero-art img {
    object-position: 100% 100%;
  }
}

/* 모바일: 시안 그대로 — 글, 유리 카드, 꽉 찬 알약 버튼 두 개 */
@media (max-width: 720px) {
  .b-hero {
    min-height: auto;
  }

  .b-hero-veil {
    background: linear-gradient(90deg, rgba(246, 247, 249, 0.72) 0%, rgba(246, 247, 249, 0.3) 46%, rgba(246, 247, 249, 0) 70%);
  }

  .b-hero-inner {
    padding-block: 28px 40px;
  }

  .b-hero-kicker {
    margin-bottom: 26px;
    font-size: 0.75rem;
  }

  .b-hero-lead {
    margin-top: 22px;
  }

  .b-hero-card {
    margin-top: 32px;
    padding: 24px 14px 16px;
    border-radius: 24px;
  }

  .b-hero-card-intro {
    padding-inline: 8px;
  }

  .b-hero-card-title {
    font-size: 1.0625rem;
  }

  .pillars {
    margin-top: 18px;
  }

  .pillars a,
  .pillars button {
    padding: 8px 2px;
  }

  .pillars strong {
    font-size: 1rem;
  }

  .pillars small {
    font-size: 0.6875rem;
  }

  .b-hero-actions {
    flex-direction: column;
    margin-top: 20px;
  }

  .b-hero-actions .btn {
    width: 100%;
  }
}

/* 아주 좁은 폰: 다섯 칸을 3+2 로 */
@media (max-width: 359px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 6px;
  }

  .pillars li:nth-child(4) {
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .b-hero-art img {
    animation: none;
  }
}
