/* HC-Main (Scoped)
   - Only affects markup inside .hc-main
   - Background is NOT set (Elementor/Theme handles it)
*/

.hc-main,
.hc-main * { box-sizing: border-box; }

.hc-main {
  --hc-nav-width: 70rem;
  --hc-nav-pad-x: 3.8rem;
  --hc-anim-duration: 1.2s;
  --hc-anim-delay: 0.25s;
  width: 100%;
  min-height: calc(var(--hc-minvh, 100) * 1vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  font-family: 'HancomUljuBangudaePetroglyph', 'Noto Sans KR', sans-serif;
  color: rgba(255,255,255,0.98);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  position: relative;
  isolation: isolate;
}

.hc-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 1;
  animation: hc-main-bg-fade var(--hc-anim-duration) ease-out calc(var(--hc-delay, 120ms) + var(--hc-anim-delay)) forwards;
  pointer-events: none;
  z-index: 0;
}

.hc-main__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(100%, var(--hc-nav-width));
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.hc-main__header > * {
  transition: opacity var(--hc-anim-duration) ease-in-out;
  position: relative;
  margin-top: 3.5rem;
}

.hc-main__header > *:before {
  content: '';
  display: block;
  position: absolute;
  top: calc(-3.5rem - 1px);
  left: calc(50% - 1px);
  width: 1px;
  height: calc(3.5rem + 1px);
  background: rgba(255,255,255,0.9);
}

.hc-main__header > :first-child { margin-top: 0; }
.hc-main__header > :first-child:before { display: none; }

.hc-main__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.hc-main__top-title {
  font-size: 10rem;
  font-weight: 600;
  letter-spacing: 0.12rem;
}

.hc-main__top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1rem;
}

.hc-main__top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  font-size: 2rem;
  letter-spacing: 0.08rem;
  white-space: nowrap;
}

.hc-main__top-link:hover,
.hc-main__top-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.5);
  color: #4a3e35;
  outline: none;
}

.hc-main__content {
  border-top: 1px solid rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.9);
  width: 100%;
  max-width: 100%;
}

.hc-main__inner {
  padding: 3rem 5rem;
  max-height: 40rem;
  overflow: hidden;
  transition:
    max-height var(--hc-anim-duration) ease,
    padding var(--hc-anim-duration) ease,
    opacity var(--hc-anim-duration) ease-in-out,
    transform var(--hc-anim-duration) ease-in-out;
  transition-delay: var(--hc-anim-delay);
}

.hc-main__title {
  margin: 0 0 1.25rem;
  font-size: 6.5rem;
  font-weight: 600;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.98);
  font-family: 'HancomUljuBangudaePetroglyph' !important;
}

.hc-main__desc {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-size: 2.5rem;
  line-height: 2;
  opacity: 0.95;
  font-family: 'HancomUljuBangudaePetroglyph' !important;
}

.hc-main__nav {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hc-main__navlist {
  display: flex;
  margin: 0;
  list-style: none;
  padding-left: 0;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.hc-main__navlist li {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 0;
  border-left: 1px solid rgba(255,255,255,0.9);
}
.hc-main__navlist li:first-child { border-left: 0; }

.hc-main__navlink {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 5rem;
  padding: 1rem var(--hc-nav-pad-x);
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  font-size: 2rem;
  line-height: 1.1;
  text-decoration: none;
  color: inherit;
  user-select: none;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  word-break: keep-all;
}

.hc-main__navlink:hover,
.hc-main__navlink:focus-visible {
  background-color: rgba(255, 255, 255, 0.5);
  color: #4a3e35;
  outline: none;
}

.hc-main__footer {
  margin-top: 3.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.hc-main__header.is-collapsed .hc-main__inner {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(4px);
}

.hc-main__header.is-open .hc-main__inner {
  opacity: 1;
  transform: translateY(0);
}

@media screen and (max-width: 1024px) {
  .hc-main {
    --hc-nav-width: 56rem;
    --hc-nav-pad-x: 3rem;
    padding: 2.2rem 1.2rem;
  }
  .hc-main__top-title { font-size: 10rem; }
  .hc-main__top-link { font-size: 2.5rem; padding: 0.3rem 1rem; }
  .hc-main__inner { padding: 2.4rem 3rem; }
  .hc-main__title { font-size: 5rem; }
  .hc-main__desc { font-size: 2rem; letter-spacing: 0.16rem; }
  .hc-main__navlink { font-size: 2.5rem; min-height: 4.4rem; }
}

@media screen and (max-width: 770px) {
  .hc-main {
    --hc-nav-width: 90%;
    --hc-nav-pad-x: 2rem;
    padding: 1.8rem 1rem;
  }
  .hc-main__header > * { margin-top: 2.2rem; }
  .hc-main__header > *:before {
    top: calc(-2.2rem - 1px);
    height: calc(2.2rem + 1px);
  }
  .hc-main__top-title { font-size: 5rem; }
  .hc-main__top-link { font-size: 2rem; padding: 0.28rem 0.9rem; }
  .hc-main__inner { padding: 5rem 1.4rem; }
  .hc-main__title { font-size: 3.4rem; }
  .hc-main__desc { font-size: 2rem; letter-spacing: 0.12rem; }
  .hc-main__navlist { flex-direction: column; }
  .hc-main__navlist li { border-left: 0; border-top: 1px solid rgba(255,255,255,0.9); }
  .hc-main__navlist li:first-child { border-top: 0; }
  .hc-main__navlink { font-size: 2rem; min-height: 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-main::before { animation: none; opacity: 0; }
  .hc-main__header > * ,
  .hc-main__inner { transition: none !important; }
}

@keyframes hc-main-bg-fade {
  to { opacity: 0; }
}
