/*******************
        Font Definitions
*******************/
@font-face {
  font-family: 'brand-font-1';
  font-weight: 500;
  src: url('/assets/fonts/NNKnitGrotesk/NNKnitGrotesk-Stripe2.woff2') format('woff2');
}

@font-face {
  font-family: 'brand-font-2';
  font-weight: 500;
  src: url('/assets/fonts/NNKnitGrotesk/NNKnitGrotesk-Dot2.woff2') format('woff2');
}

@font-face {
  font-family: 'brand-font-3';
  font-weight: 500;
  src: url('/assets/fonts/NNKnitGrotesk/NNKnitGrotesk-Dot3.woff') format('woff2');
}

.source-serif-pro {
  font-family: source-serif-pro, sandoll-myeongjoneo1, serif;
  font-weight: 400;
  font-style: normal;
}

.sandoll-gothicneo1 {
  font-family: sandoll-gothicneo1, sans-serif;
  font-weight: 300;
  font-style: normal;
  -webkit-text-stroke-width: 0.5px;
}

.sandoll-myeongjoneo1 {
  font-family: sandoll-myeongjoneo1, source-serif-pro, sans-serif;
  font-weight: 400;
  font-style: normal;
  -webkit-text-stroke-width: 0.5px;
}

/*******************
        Variables
*******************/
:root {
  --light-brown: #CB8C5F;
  --brown: #b87f5e;
  --dark-brown: #713A34;
  --gray: #232629;
  --black: #473B42;
  --blue: #235477;
  --light-gray: #F3F3F3;

  --page-vertical-margin: clamp(40px, 10vw, 70px);
  --page-horizontal-margin: calc(var(--page-vertical-margin)*2);
  --menu-height: var(--page-vertical-margin);

  --font-size: 22px;
  --text-2xs: calc(1rem / 1.125 / 1.125 / 1.125);
  --text-xs: calc(1rem / 1.125 / 1.125);
  --text-sm: calc(1rem / 1.125);
  --text-base: 1rem;
  --text-lg: calc(1rem * 1.125);
  --text-xl: calc(1rem * 1.125 * 1.125);
  --text-2xl: calc(1rem * 1.125 * 1.125 * 1.125);

  --h-times: 1.5;
  --grid: 1fr 2fr;
  --gap: var(--text-2xl);

  --box-shadow: 10px 10px 10px 0px rgba(0, 0, 0, 0.05);
}

::selection {
  background-color: var(--brown);
}

::-moz-selection {
  background-color: var(--brown);
}

/*******************
        Global Styles
*******************/

html {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--light-brown);
  overflow-x: hidden;
  overflow-y: scroll;
  color: var(--black);
  font-size: var(--font-size);
  word-break: keep-all;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: scroll;
}

html ::-webkit-scrollbar {
  width: 5px;
  background-color: var(--light-brown);
}

html ::-webkit-scrollbar-thumb {
  background-color: var(--black);
  border-radius: 6px;
}

html ::-webkit-scrollbar-thumb:hover {
  background-color: var(--gray);
}

html ::-webkit-scrollbar-track {
  background-color: var(--light-brown);
}

.no-scroll {
  overflow: hidden; 
  position: fixed;
  width: 100%;
  height: 100%; 
}

.wf-active {
  visibility: visible;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 120% !important;
}

h1 {
  font-size: calc(var(--text-xl) * var(--h-times)) !important;
}

h2 {
  font-size: calc(var(--text-lg) * var(--h-times)) !important;
}

h3 {
  font-size: calc(var(--text-base) * var(--h-times)) !important;
}

h4 {
  font-size: calc(var(--text-sm) * var(--h-times)) !important;
}

h5 {
  font-size: calc(var(--text-xs) * var(--h-times)) !important;
}

h6 {
  font-size: calc(var(--text-2xs) * var(--h-times)) !important;
}

small {
  font-size: var(--text-xs);
  color: gray;
}

strong {
  font-weight: 600;
}

.main {
  padding: var(--menu-height) var(--page-horizontal-margin);
  width: 100%;
  height: auto;
}

.eng {
  font-size: 110%;
  line-height: 145%;
}

.kr {
  letter-spacing: -0.025rem;
  line-height: 160%;
}

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #00000080;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--light-brown);
  border-top: 5px solid var(--brown);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 99999;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*******************
        Header Styles
*******************/
.header {
  width: 100%;
  height: var(--menu-height);
  position: fixed;
  top: 0;
  left: 0;
  font-size: var(--text-base);
  font-family: sandoll-gothicneo1, sans-serif;
  color: var(--black);
  background-color: var(--light-brown);
  padding: 1rem var(--page-horizontal-margin);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  transition: transform 0.3s ease-in-out;
  transform: translateY(0);
  overflow: visible;
}

.header-logo .kr {
  /* position: absolute; */
}

.header-logo:has(>.eng) {
  position: absolute;
}

.header li:hover {
  color: var(--blue);
}

.header-logo {
  height: 40px;
  display: flex;
  align-items: center;
}

.header-menu {
  display: flex;
  align-items: center;
  overflow-x: scroll;
  max-width: 50vw;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.header-menu nav ul {
  display: flex;
  gap: var(--text-lg);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-menu nav ul a:hover {
  color: var(--blue);
}

.menu-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  gap: var(--gap);
  align-items: center;
}

.menu-items li.active {
  color: var(--blue);
}

.menu-items li.active a {
  color: var(--blue);
  font-weight: bold;
}

.menu-toggle {
  display: none;
  fill: var(--black);
  width: 1rem;
  height: 100%;
}

.menu-toggle:hover {
  fill: var(--yellow);
}

.menu-items-exit {
  display: none;
  position: fixed;
  top: 9vh;
  left: 6vh;
  fill: var(--white);
  width: clamp(20px, 5vh, 40px);
  height: 100%;
}

.menu-items-exit:hover {
  fill: var(--yellow);
}

.menu-items-container {
  transition: opacity 0.3s ease;
}

.language .language-EN:hover,
.language .language-KR:hover {}

.language span {
  cursor: pointer;
}

.menu-items span {
  display: block;
}

.language span.active {
  display: none;
}

/*******************
        Footer Styles
*******************/
.footer {
  border-top: 1px solid var(--black);
  width: 100%;
  display: grid;
  gap: 1rem;
  grid-template-columns: 7fr 1fr;
  padding: 0.7rem var(--page-horizontal-margin) 1.5rem var(--page-horizontal-margin);
  align-items: end;
  background-color: var(--light-brown);
  z-index: 999;
}

.footer .information {
  font-size: var(--text-2xs);
  display: flex;
  width: 100%;
  padding-right: 5rem;
  flex-direction: column;
}

.footer .information .kr .grid {
  padding-top: 0.25rem;
}

.footer .information .eng .grid {
  padding-top: 0.4rem;
}

.footer .logo {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.footer .logo svg {
  max-width: 200px;
}

.footer svg {
  fill: var(--black);
}

.footer .grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, 1fr);
}

.image-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-grid-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.image-grid-item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-grid-caption {
  margin-top: 8px;
  text-align: center;
  font-style: italic;
}

.column-span-1 {
  grid-column: span 1;
}

.column-span-2 {
  grid-column: span 2;
}

.column-span-3 {
  grid-column: span 3;
}

.column-span-4 {
  grid-column: span 4;
}

.column-span-5 {
  grid-column: span 5;
}

.column-span-6 {
  grid-column: span 6;
}

.column-span-7 {
  grid-column: span 7;
}

.column-span-8 {
  grid-column: span 8;
}

.column-span-9 {
  grid-column: span 9;
}

.column-span-10 {
  grid-column: span 10;
}

.column-span-11 {
  grid-column: span 11;
}

.column-span-12 {
  grid-column: span 12;
}

/*******************
        Media Queries for Different Screen Sizes
*******************/

@media (min-width: 1920px) {
  :root {

    --page-vertical-margin: 200px;
    /* --page-horizontal-margin: clamp(200px, calc(var(--page-vertical-margin) * 4), 1000px); */
    --font-size: clamp(23px, 1.2vw, 60px);
    --menu-height: clamp(85px, 4vh, 200px);
  }
}

@media (max-width: 1440px) {
  :root {
    --font-size: 18px;
  }
}

@media (max-width: 1280px) {
  :root {
    --font-size: 20px;
    --page-horizontal-margin: calc(var(--page-vertical-margin)/2);
    --gap: var(--text-base);
  }

  .footer {
    grid-template-columns: 5fr 1fr;
  }
}

@media (min-width: 1000px) and (max-width: 1030px) {
  :root {
    --font-size: 16.5px;
  }
}

@media (max-width: 767px) {
  :root {
    --font-size: 18px;
    --page-horizontal-margin: calc(var(--page-vertical-margin)/4);
    --gap: 0.5rem;
  }

  .menu-items {
    padding-bottom: 3rem;
  }

  .menu-items-container {
    opacity: 0;
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 999999999;
    background: #cf9c73f2;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle:hover,
  .menu-toggle:active,
  .menu-items-exit {
    fill: var(--blue);
  }

  .header-menu nav ul {
    align-items: flex-start;
    padding: var(--page-vertical-margin) var(--page-horizontal-margin);
  }

  .menu-items-container.active {
    opacity: 1;
    visibility: visible;
  }

  .menu-items {
    align-items: center;
    flex-direction: column;
    justify-content: center;
    align-content: center;
    width: 100%;
    height: 100%;
    font-size: var(--text-2xl);
    gap: 1rem;
  }

  .menu-items-exit {
    display: block;
    width: clamp(30px, 8vw, 40px);
    pointer-events: painted;
  }

  .menu-items.active {
    display: flex;
  }

  .header-menu nav ul.dropdown-content {
    display: none !important;
  }
}

@media (max-width: 650px) {
  :root {
    --font-size: 16px;
  }

  .footer {
    gap: 1rem;
    grid-template-columns: 1fr;
  }

  .footer .information {
    padding-right: 0;
  }

  .footer .logo {
    display: none;
  }
}
