/* ================================
   Taehwa Food - Base Stylesheet
   공통 스타일: 리셋, 헤더, 푸터, 레이아웃
   ================================ */

/* ================================
   CSS Variables (핵심만)
   ================================ */
:root {
  --max-width: 1200px;
  --header-height: 56px;
}

/* ================================
   Utility Classes
   ================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================
   CSS Reset (필수만)
   ================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family:
    "Pretendard Variable",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    Roboto,
    "Noto Sans KR",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: #fff;
  min-height: 100vh;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.5;
}

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

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

.only-mobile {
  display: none;
}

/* ================================
   Layout
   ================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ================================
   Header
   ================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: #fff;
  z-index: 10;
  transition:
    color 0.25s,
    background 0.25s,
    box-shadow 0.25s;
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  display: block;
  width: 137px;
  height: 40px;
  background: url(/static/img/header-logo.png) no-repeat center;
  background-size: 100%;
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
}

/* Toggle Button (모바일 전용, 기본 숨김) */
.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  color: inherit;
  opacity: 0.75;
  z-index: 11;
}

.header__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transition: all 0.15s;
  transform-origin: center;
}

.header__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__toggle.active span:nth-child(2) {
  opacity: 0;
}

.header__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Navigation (데스크톱 기본) */
.header__nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header__menu {
  display: flex;
  gap: 24px;
}

.header__menu-link {
  display: block;
  padding: 8px 12px;
}

.header__menu-link:hover,
.header__menu-link.active {
  font-weight: 700;
}

.header__lang {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.header__lang-link {
  padding: 4px 8px;
}

.header__lang-divider,
.header__lang-link:not(.active):not(:hover) {
  opacity: 0.6;
}

/* ================================
   Footer
   ================================ */
.footer__top {
  padding: 24px 0;
  background-color: #4e4e4e;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.footer__top__container {
  display: flex;
  width: 100%;
  max-width: calc(var(--max-width) - 48px);
  margin: 0 auto;
}

.footer__top-item {
  width: 25%;
  padding: 32px 4px;
  border-left: 1px solid #777;
}

.footer__top-item:first-child {
  border: none;
}

.footer__top-item__button-wrap {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.footer__top-item__button {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #aaa url(/static/img/footer-top-sprite.png) no-repeat center;
  background-size: 64px;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.footer__top-item__button:hover {
  opacity: 1;
}

.footer__top-item__button.button-tel {
  background-color: #134ac6;
  background-position-y: 0;
}

.footer__top-item__button.button-talktalk {
  background-color: #2aa94d;
  background-position-y: -64px;
}

.footer__top-item__button.button-kakaotalk {
  background-color: #ccba1f;
  background-position-y: -128px;
}

.footer__top-item__button.button-sample {
  background-color: #997f47;
  background-position-y: -192px;
}

.footer__top-item__button.button-catalog {
  background-color: #b34943;
  background-position-y: -256px;
}

.footer__top-item__desciption {
  margin-top: 20px;
}

.footer__bottom {
  padding: 72px 0;
  background-color: #f9fafb;
}

.footer__bottom__container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__company-name {
  font-size: 28px;
}

.footer__address {
  margin-top: 8px;
  font-size: 14px;
  color: #8b95aa;
}

.footer__address p {
  margin-top: 0;
  line-height: 1.75;
}

.footer__social {
  align-self: flex-end;
  display: flex;
  gap: 12px;
}

.footer__social-link {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #b9bec6 url(/static/img/footer-social-sprite.png) no-repeat 0;
  background-size: auto 54px;
  transition: background 0.15s;
}

.footer__social-link.social-blog {
  background-position-x: 0;
}

.footer__social-link.social-instagram {
  background-position-x: -54px;
}

.footer__social-link.social-youtube {
  background-position-x: -108px;
}

.footer__social-link:hover {
  background-color: #aaa;
}

/* ================================
   Animations
   ================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   Responsive - Mobile
   ================================ */
@media (max-width: 768px) {
  .only-mobile {
    display: inline;
  }

  .container {
    padding: 0 16px;
  }

  /* Header Mobile - 토글 버튼 표시 */
  .header__toggle {
    display: flex;
  }

  /* Navigation - 드롭다운으로 변환 */
  .header__nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    padding: 0 16px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }

  .header__nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
      opacity 0.25s,
      transform 0.25s,
      visibility 0.25s;
  }

  .header__menu {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  .header__menu-link {
    display: block;
    padding: 8px 16px;
  }

  .header__lang {
    justify-content: flex-end;
    margin-top: 16px;
  }

  .footer__top {
    padding: 20px 0;
    font-size: 12px;
  }

  .footer__top__container {
    flex-wrap: wrap;
  }

  .footer__top-item {
    width: 50%;
    padding: 20px 4px;
  }

  .footer__top-item:nth-child(2n + 1) {
    border: none;
  }

  .footer__top-item__button-wrap {
    gap: 12px;
  }

  .footer__top-item__button {
    width: 48px;
    height: 48px;
    background: #aaa url(/static/img/footer-top-sprite.png) no-repeat center;
    background-size: 48px;
  }

  .footer__top-item__button.button-tel {
    background-position-y: 0;
  }

  .footer__top-item__button.button-talktalk {
    background-position-y: -48px;
  }

  .footer__top-item__button.button-kakaotalk {
    background-position-y: -96px;
  }

  .footer__top-item__button.button-sample {
    background-position-y: -144px;
  }

  .footer__top-item__button.button-catalog {
    background-position-y: -192px;
  }

  .footer__top-item__desciption {
    margin-top: 12px;
  }

  .footer__bottom {
    padding: 32px 0;
  }

  .footer__bottom__container {
    flex-direction: column;
  }

  .footer__company-name {
    font-size: 24px;
  }

  .footer__address {
    font-size: 12px;
  }

  .footer__social {
    display: flex;
    gap: 8px;
  }

  .footer__social-link {
    width: 40px;
    height: 40px;
    background: #b9bec6 url(/static/img/footer-social-sprite.png) no-repeat 0;
    background-size: auto 40px;
  }

  .footer__social-link.social-blog {
    background-position-x: 0;
  }

  .footer__social-link.social-instagram {
    background-position-x: -40px;
  }

  .footer__social-link.social-youtube {
    background-position-x: -80px;
  }
}
