/* ========================================
   Variables
======================================== */
:root {
  /* Color — 디자인 확정 후 수정 */
  --color-primary: #1A3365;
  --color-secondary: #003C77;
  --color-accent: #CF1A45;
  --color-primary-muted: #122448;
  --color-secondary-muted: #002951;
  --color-accent-muted: #b2173c;
  --color-text: #05121c;
  --color-text-muted: #6b7280;
  --color-bg-alt: #f5f7fb;
  --color-border: #e5e7eb;
  --color-white: #FEFEFE;
  --color-white-muted : #f5f5f5;
  --color-black: #000000;
  --color-kakao: #FAE100;
  --color-telegram: #24A1DE;
  --color-kakao-muted: #f0d801;
  --color-telegram-muted: #0e8dcb;

  --card-shadow: 0 0 10px rgba(5, 18, 28, 0.1);

  /* border-radius */
  --rodius-16: 1rem;
  --rodius-24: 1.5rem;

  /* Typography */
  --font-base: "SUIT Variable","Pretendard", "Noto Sans KR", sans-serif;

  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --fs-48: 3rem;


  /* Layout */
  --inner-max: 1400px;
  --inner-pad: 2rem;
  --header-h: 6.25rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.35s;
}

@media (max-width: 1024px) {
  :root {
    --fs-40: clamp(1.5rem, 3.2vw, 2rem);
    --fs-24: clamp(1.15rem, 2.5vw, 1.45rem);
  }
}

/* ========================================
   Base
======================================== */
html {
  font-size: 16px; /* 1rem = 10px */
}

body {
  font-family: var(--font-base);
  font-size: var(--fs-16);
  color: var(--color-text);
  word-break: keep-all;
  letter-spacing: 0.02em;
}

#wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main {
  flex: 1;
}

.inner {
  width: 80%;
  max-width: var(--inner-max);
  margin: 0 auto;
}

.point-color {
  color: var(--color-secondary);
}
.point-color-accent {
  color: var(--color-accent);
}

/* ========================================
   Header
======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: var(--header-h);
  color: var(--color-white);
}

.header.on {
  background-color: var(--color-white);
  color: var(--color-text);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.header.on .logo a img {
  filter: brightness(0) invert(0);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 90%;
  margin: 0 auto;
  height: 100%;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 1rem;
}

.logo a {
  font-size: var(--fs-16);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.logo a img {
  width: auto;
  height: 3.75rem;
  filter: brightness(0) invert(1);
}

.header-nav > nav {
  flex: 1;
}

.header-nav .gnb-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--fs-40);
  font-weight: 500;
}
.header-nav .gnb-list .gnb-item a {
  padding: 0.5rem;
  display: block;
  position: relative;
}
.header-nav .gnb-list .gnb-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background-color: var(--color-white);
  transition: all var(--duration) var(--ease);
}

.header__utils {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: var(--fs-14);
  font-weight: 600;
}
.header__cs {
  background-color: var(--color-accent);
  color: var(--color-white);
}
.header__login {
  background-color: var(--color-primary);
  color: var(--color-white);
}



.ham-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  width: 30px;
  height: 2.8rem;
  z-index: 120;
}

.ham-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.header.on .ham-menu span {
  background: var(--color-text);
}

/* ========================================
   Dimmed / Mobile Nav
======================================== */
.dimmed {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 18, 28, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease), visibility var(--duration) var(--ease);
}

.m-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--color-white);
  transform: translateX(100%);
  transition: transform var(--duration) var(--ease);
  overflow-y: auto;
}

.m-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: var(--header-h);
}

.m-nav__logo img {
  width: auto;
  height: 2.5rem;
}

.m-nav__close {
  position: relative;
  width: 2rem;
  height: 2rem;
}

.m-nav__close span {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
}

.m-nav__close span:first-child {
  transform: translateY(-50%) rotate(45deg);
}

.m-nav__close span:last-child {
  transform: translateY(-50%) rotate(-45deg);
}

.m-nav__content {
  display: grid;
  grid-template-columns: 55% 1fr;
  gap: 1rem;
  height: stretch;
}

.m-nav__content-img {
  width: 100%;
  height: 100%;
}

.m-nav__content-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-nav__content-inner {
  padding: 0 1.25rem 2rem;
}

.m-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.m-nav__link {
  display: block;
  padding: 0.875rem 0.25rem;
  font-size: var(--fs-18);
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--color-border);
}

.m-nav__utils {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.m-nav__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  font-size: var(--fs-14);
  font-weight: 600;
  border-radius: 0.5rem;
}

.m-nav__btn--cs {
  background: var(--color-accent);
  color: var(--color-white);
}

.m-nav__btn--login {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Open state */
body.is-menu-open {
  overflow: hidden;
}

body.is-menu-open .dimmed {
  opacity: 1;
  visibility: visible;
}

body.is-menu-open .m-nav {
  transform: translateX(0);
}

body.is-menu-open .ham-menu span:nth-child(1) {
  transform: translateY(0.7rem) rotate(45deg);
}

body.is-menu-open .ham-menu span:nth-child(2) {
  opacity: 0;
}

body.is-menu-open .ham-menu span:nth-child(3) {
  transform: translateY(-0.7rem) rotate(-45deg);
}


/* ========================================
   Responsive
======================================== */
@media (max-width: 1280px) {
  .gnb{
    display: none;
  }

  .ham-menu {
    display: flex;
  }
}
@media (max-width: 768px) {
  :root {
    --header-h: 5rem;
    --inner-pad: 1.6rem;
  }
  
  html {
    font-size: 15px;
  }

  .logo a img {
    height: 3rem;
  }

  .ham-menu {
    width: 24px;
    height: 24px;
    gap: 6px;
  }
  .ham-menu span,
  .m-nav__close span {
    height: 1px;
  }
  .m-nav__close {
    width: 24px;
    height: 24px;
  }
  .m-nav {
    width: 320px;
  }
  .m-nav__head {
    margin-bottom: 1.5rem;
  }
  .m-nav__content {
    grid-template-columns: 1fr;
  }
  .m-nav__content-img {
    display: none;
  }
  .m-nav__utils {
    display: grid;
    gap: 0.5rem;
  }

}
@media (max-width: 500px) {
  html {
    font-size: 14px;
  }
  .inner {
    width: 90%;
  } 
  .header__utils{
    display: none;
  }
}


/* ========================================
   Aside
======================================== */
.aside {
  position: fixed;
  bottom: 50px;
  right: 2vw;
  z-index: 999;
}
.aside .side-menu {
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.aside .side-menu-item{
  width: 100%;
  font-size: var(--fs-14);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
} 
.aside .side-menu .side-menu-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  aspect-ratio: 1/1;
}
.aside .side-menu .side-menu-link .sm-icon {
  width: 35%;
}
.sm-item-kakao .side-menu-link{
  background-color: var(--color-kakao);
  font-weight: 800;
}
.sm-item-telegram .side-menu-link{
  background-color: var(--color-telegram);
  color: var(--color-white);
  font-weight: 700;
}
.side-menu-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  width: 100%;
  padding: 10px;
}

/* Responsive */
@media (max-width: 1280px) {
  .aside .side-menu {
    width: 80px;
    gap: 1rem;
  }
  .aside .side-menu-item
   {
    font-size: var(--fs-12);
  } 
}
@media (max-width: 768px) {
  .aside {
    bottom: 0;
    right: 0;
    width: 100%;
  }
  .aside .side-menu {
    width: 100%;
    height: 50px;
    flex-direction: row;
    gap: 0;
  }
  .aside .side-menu-item{
    font-size: 1rem;
  }
  .aside .side-menu-item{
    border-radius: 0;
  }
  .aside .side-menu .side-menu-link,
  .side-menu-top{
    height: 100%;
    aspect-ratio: auto;
  }
  .aside .side-menu .side-menu-link{
    flex-direction: row;
    gap: 1rem;
  }
  .aside .side-menu .side-menu-link .sm-icon {
    width: 25px;
    max-height: 20px;
  }
}




/* ========================================
   Footer
======================================== */
.footer {
  background: var(--color-text);
  color: var(--color-white-muted);
  font-weight: 200;
  padding-bottom: 2rem;
}
.ft-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(254, 254, 254, .85);
}
.ft-links .ft-link {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--color-white);
}
.ft-bottom {
  margin: 2.5rem 0 1.5rem;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  font-size: var(--fs-14);
}
.ft-bottom h6 {
  font-size: var(--fs-28);
  font-weight: 800;
}
h6.ft-logo {
  margin-bottom: 1rem;
}
.ft-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.ft-cs-wrap {
  text-align: right;
}
.ft-cs-title {
  margin-bottom: 1rem;
}
.ft-cs-title > p {
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 2px;
}
.ft-cs-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ft-cs-info p > span {
  display: inline-block;
}
.ft-cs-account, .ft-cs-account > p {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.ft-cr {
  text-transform: uppercase;
  font-size: var(--fs-14);
  font-weight: 400;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .footer {
    padding-bottom: calc(40px + 2rem);
  }
  .ft-bottom {
    flex-direction: column;
  }
  h6.ft-logo {
    text-align: center;
  }
  .ft-info-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
  }
  .ft-cs-wrap {
    text-align: center;
  }
  .ft-cs-title{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }
  .ft-cs-info {
    align-items: center;
    justify-content: center;
    row-gap: 0.25rem;
  }
  .ft-cs-account, .ft-cs-account > p {
    justify-content: center;
  }
}
@media (max-width: 500px) {
  .ft-cs-title {
    flex-direction: column;
    gap: 0;
  }
}

/* hover */
@media (hover: hover) and (pointer: fine) {
  .header-nav .gnb-list .gnb-item a:hover {
    font-weight: 700;
  }
  .header-nav .gnb-list .gnb-item a:hover::after {
    width: 100%;
  }
  .header.on .header-nav .gnb-list .gnb-item a:hover::after {
    background-color: var(--color-text);
    height: 2px;
  }
  .header__cs:hover {
    background-color: var(--color-accent-muted);
  }
  .header__login:hover {
    background-color: var(--color-primary-muted);
  }
  .sm-item-kakao .side-menu-link:hover {
    background-color: var(--color-kakao-muted);
  }
  .sm-item-telegram .side-menu-link:hover {
    background-color: var(--color-telegram-muted);
  }
  .side-menu-top:hover {
    background-color: var(--color-primary-muted);
  }
}

