:root {
  --pink: #e2187a;
  --pink-soft: #ff4fa3;
  --pink-deep: #b0105c;
  --cyan: #00a8d8;
  --navy: #004097;
  --ink: #004097;
  --ink-soft: #3a5a8a;
  --footer: #283644;
  --footer-line: rgba(255, 255, 255, 0.18);
  --white: #ffffff;
  --font-display: "MBC 1961 Gulim", "Apple SD Gothic Neo", sans-serif;
  --font-body: "MBC 1961 Gulim", "Apple SD Gothic Neo", sans-serif;
  --font-ui: "Pretendard", "Apple SD Gothic Neo", sans-serif;
  --font-footer: var(--font-ui);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 5.75rem;
  --side-gutter: clamp(1rem, 3vw, 2.5rem);
  --bottom-gutter: clamp(1.1rem, 3.5vh, 2rem);
  --deco-sq: clamp(10px, 0.85vw, 16px);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

/* ===== Shared page background ===== */
body.main-page,
body.page {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 100%, rgba(196, 148, 178, 0.58) 0%, rgba(196, 148, 178, 0.28) 16%, rgba(196, 148, 178, 0) 34%),
    radial-gradient(circle at 100% 0%, rgba(219, 130, 176, 0.55) 0%, rgba(219, 130, 176, 0.24) 20%, rgba(219, 130, 176, 0) 44%),
    radial-gradient(ellipse at 100% 48%, rgba(212, 140, 175, 0.28) 0%, rgba(212, 140, 175, 0) 34%),
    radial-gradient(ellipse at 54% 46%, rgba(119, 213, 235, 0.98) 0%, rgba(129, 205, 231, 0.84) 30%, rgba(129, 205, 231, 0) 68%),
    radial-gradient(ellipse at 4% 42%, rgba(196, 140, 178, 0.52) 0%, rgba(196, 140, 178, 0.24) 26%, rgba(196, 140, 178, 0) 48%),
    linear-gradient(100deg, #d093b4 0%, #b0c4d8 20%, #83cde7 48%, #a6cee0 74%, #d09bc0 100%);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.main-page.nav-open,
body.page.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Shared header ===== */
.site-header {
  position: relative;
  z-index: 50;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(1.1rem, 2.2vh, 1.75rem) var(--side-gutter) 0.75rem;
  background: transparent;
}

.site-header__brand img {
  width: clamp(120px, 16vw, 210px);
}

.site-header__gangseo img {
  width: clamp(96px, 11vw, 150px);
}

.site-header__toggle {
  display: none;
  position: relative;
  width: 1.85rem;
  height: 1.45rem;
  border: 0;
  background: transparent;
  padding: 0;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  cursor: pointer;
  justify-self: end;
  z-index: 60;
}

.site-header__toggle span {
  display: block;
  flex: 0 0 auto;
  height: 2px;
  border-radius: 1px;
  background: #004097;
  transform-origin: center;
  transition:
    transform 0.28s var(--ease),
    opacity 0.22s ease,
    width 0.28s var(--ease),
    top 0.28s var(--ease);
}

.site-header__toggle span:nth-child(1) {
  width: 100%;
  opacity: 1;
}

.site-header__toggle span:nth-child(2) {
  width: 63%;
  opacity: 0.72;
}

.site-header__toggle span:nth-child(3) {
  width: 80%;
  opacity: 0.54;
}

.site-header__toggle span:nth-child(4) {
  width: 69%;
  opacity: 0.38;
}

.site-header__toggle span:nth-child(5) {
  width: 44%;
  opacity: 0.24;
}

.site-header__toggle[aria-expanded="true"] {
  justify-content: center;
}

.site-header__toggle[aria-expanded="true"] span {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin: 0 auto;
}

.site-header__toggle[aria-expanded="true"] span:nth-child(1) {
  width: 100%;
  opacity: 1;
  transform: translateY(-50%) rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] span:nth-child(5) {
  width: 100%;
  opacity: 1;
  transform: translateY(-50%) rotate(-45deg);
}

.site-header__toggle[aria-expanded="true"] span:nth-child(2),
.site-header__toggle[aria-expanded="true"] span:nth-child(3),
.site-header__toggle[aria-expanded="true"] span:nth-child(4) {
  width: 0;
  opacity: 0;
}

.site-header__nav {
  justify-self: center;
}

.site-header__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-header__list > li {
  position: relative;
}

.site-header__list > li > a {
  display: block;
  padding: 0.65rem 0.9rem;
  font-size: clamp(0.92rem, 1.15vw, 1.05rem);
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-header__list > li > a:hover,
.site-header__list > li.is-active > a {
  color: var(--pink);
}

.site-header__list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__list ul a {
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.site-header__list ul a:hover,
.site-header__list ul a.is-active {
  color: var(--pink);
  background: rgba(226, 24, 122, 0.06);
}

@media (min-width: 1025px) {
  .site-header__list ul {
    padding: 0.5rem;
    position: absolute;
    top: 100%;
    left: 50%;
    min-width: 12.5rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(22, 50, 92, 0.1);
    box-shadow: 0 12px 28px rgba(22, 50, 92, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 6px);
    transition: opacity 0.2s ease, transform 0.2s var(--ease), visibility 0.2s;
    z-index: 40;
  }

  .site-header__list ul::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -0.75rem;
    height: 0.75rem;
  }

  .site-header__list .has-sub:hover > ul,
  .site-header__list .has-sub:focus-within > ul {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 1024px) {
  :root {
    --header-h: 5rem;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    justify-items: center;
    padding-top: clamp(1.1rem, 2.4vh, 1.6rem);
  }

  .site-header__brand {
    grid-column: 1 / -1;
    justify-self: center;
    position: relative;
    z-index: 60;
  }

  .site-header__brand img {
    width: clamp(150px, 42vw, 200px);
  }

  .site-header__toggle {
    display: flex;
    position: absolute;
    top: clamp(1.1rem, 2.4vh, 1.6rem);
    right: var(--side-gutter);
  }

  .site-header__gangseo {
    display: none;
  }

  .site-header__nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--header-h) + 1.5rem) clamp(1.5rem, 6vw, 2.5rem) 2.5rem;
    overflow: auto;
    background:
      radial-gradient(ellipse at 12% 18%, rgba(226, 24, 122, 0.12), transparent 42%),
      radial-gradient(ellipse at 88% 80%, rgba(0, 168, 216, 0.16), transparent 45%),
      linear-gradient(165deg, #eef7fb 0%, #e4f2f8 48%, #f3e8f0 100%);
    transform: translate3d(0, -8px, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.28s ease,
      transform 0.32s var(--ease),
      visibility 0.28s;
    justify-self: stretch;
  }

  .site-header__nav::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.45;
  }

  .site-header__nav:not(.is-open) {
    pointer-events: none !important;
  }

  .site-header__nav:not(.is-open) a {
    pointer-events: none !important;
  }

  .site-header__nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  .site-header__list {
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    width: min(100%, 22rem);
    margin-inline: auto;
  }

  .site-header__list > li {
    border-bottom: 1px solid rgba(0, 64, 151, 0.12);
  }

  .site-header__list > li > a {
    padding: 1rem 0.15rem;
    font-size: clamp(1.2rem, 5.2vw, 1.45rem);
    letter-spacing: -0.01em;
  }

  .site-header__list > li > a:hover,
  .site-header__list > li > a:focus-visible {
    color: var(--pink);
    background: transparent;
  }

  .site-header__list ul {
    position: static;
    left: auto;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 0.85rem 0.15rem;
    display: grid;
    gap: 0.1rem;
  }

  .site-header__list ul::before {
    display: none;
  }

  .site-header__list ul a {
    padding: 0.45rem 0;
    font-size: 0.95rem;
    color: rgba(0, 64, 151, 0.72);
    background: transparent;
  }

  .site-header__list ul a:hover,
  .site-header__list ul a:focus-visible {
    color: var(--pink);
    background: transparent;
  }
}

/* ===== Shared footer ===== */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--footer);
  color: rgba(255, 255, 255, 0.92);
  padding: 1.85rem 0 1.4rem;
  font-family: var(--font-ui);
}

.site-footer__inner {
  width: min(1180px, calc(100% - clamp(3rem, 8vw, 7.5rem) * 2));
  margin-inline: auto;
}

.site-footer__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: clamp(2.75rem, 5.5vw, 5rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.site-footer__brand img {
  width: clamp(120px, 13vw, 160px);
}

.site-footer__contact {
  justify-self: start;
  max-width: 26rem;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
}

.site-footer__contact p {
  margin: 0.1rem 0;
}

.site-footer__logo {
  justify-self: end;
  width: clamp(92px, 10vw, 112px);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer__links {
  display: flex;
  gap: 1.5rem;
}

.site-footer__links a:hover {
  color: var(--white);
}

.site-footer__copy {
  margin: 0;
}

@media (max-width: 1024px) {
  .site-footer__inner {
    width: min(1180px, calc(100% - 2.5rem));
  }

  .site-footer__top {
    grid-template-columns: 1fr auto;
    row-gap: 1rem;
    column-gap: 1.25rem;
  }

  .site-footer__contact {
    grid-column: 1 / -1;
    max-width: none;
    order: 3;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}
