:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-soft: #eff6ff;
  --color-primary-disabled-bg: #e9effd;
  --color-primary-disabled-border: #c7d5fb;
  --color-primary-disabled-text: #7892d4;
  --font-family: "Inter", "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: #333333;
  font-family: var(--font-family);
  line-height: 1.5;
  word-break: keep-all;
  -webkit-overflow-scrolling: touch;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

button,
input,
select,
textarea {
  border-radius: 0;
  color: inherit;
  font: inherit;
}

button,
a,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.site-header {
  width: 100%;
  height: auto;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #f3f4f6;
  background-color: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  width: 100%;
  max-width: 1200px;
  min-height: 76px;
  margin: 0 auto;
  padding: 1rem 20px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -moz-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo {
  display: block;
  width: 108px;
  height: 28px;
  overflow: hidden;
  background-image: url("../img/hd_logo.svg");
  background-position: center;
  background-repeat: no-repeat;
  -webkit-background-size: contain;
  background-size: contain;
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  white-space: nowrap;
}

@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .site-logo {
    background-color: var(--color-primary);
    background-image: none;
    -webkit-mask-image: url("../img/hd_logo.svg");
    mask-image: url("../img/hd_logo.svg");
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }
}

.site-nav__list,
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list {
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 2rem;
}

.site-nav__list a,
.site-header__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  -webkit-transition: color 0.2s ease;
  -o-transition: color 0.2s ease;
  -moz-transition: color 0.2s ease;
  transition: color 0.2s ease;
}

.site-header__link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: 0.5rem;
  background-color: #f3f4f6;
  color: #1f2937;
  line-height: 1.2;
  text-align: center;
  font-weight: 600;
}

.site-nav__list a:hover,
.site-header__link:hover {
  color: var(--color-primary);
}

.site-header__link:hover {
  background-color: #e5e7eb;
  color: #1f2937;
}

.site-header__actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 1rem;
}

.site-header__button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: 0.5rem;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  -webkit-transition: background-color 0.2s ease, -webkit-transform 0.2s ease;
  transition: background-color 0.2s ease, -webkit-transform 0.2s ease;
  -o-transition: background-color 0.2s ease, -o-transform 0.2s ease;
  -moz-transition: background-color 0.2s ease, -moz-transform 0.2s ease;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.site-header__button:hover {
  background-color: var(--color-primary-hover);
}

.site-footer {
  background-color: #0f172a;
  color: #cbd5e1;
  border-top: 1px solid #1e293b;
}

.site-footer__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 20px 2rem;
}

.site-footer__content {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(0, 3fr);
  gap: 4rem;
  margin-bottom: 3rem;
}

.site-footer__logo {
  display: inline-block;
  width: 92px;
  height: 25px;
  overflow: hidden;
  background-color: #ffffff;
  -webkit-mask-image: url("../img/hd_logo.svg");
  mask-image: url("../img/hd_logo.svg");
  -webkit-mask-position: left center;
  mask-position: left center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__social {
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 60px;
  margin-bottom: 16px;
}

.site-footer__social a {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: -moz-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -moz-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  color: #94a3b8;
  text-decoration: none;
  -webkit-transition: color 0.2s ease;
  -o-transition: color 0.2s ease;
  -moz-transition: color 0.2s ease;
  transition: color 0.2s ease;
}

.site-footer__social a:hover {
  color: #38bdf8;
}

.site-footer__email {
  display: inline-block;
  color: #38bdf8;
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem;
}

.footer-nav__group h2 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-nav__group li {
  margin-bottom: 0.65rem;
}

.footer-nav__group a {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
  -webkit-transition: color 0.2s ease;
  -o-transition: color 0.2s ease;
  -moz-transition: color 0.2s ease;
  transition: color 0.2s ease;
}

.footer-nav__group a:hover {
  color: #38bdf8;
}

.site-footer__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
}

.site-footer__bottom p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.6;
}

.site-footer__bottom p:last-child {
  text-align: right;
}

.site-footer__bottom strong {
  color: #d1d5db;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-preview-panel {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 50;
  width: 14rem;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.theme-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.theme-preview-title {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.theme-preview-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
}

.theme-preview-label {
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.theme-preview-font-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.theme-preview-color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.theme-preview-button {
  min-height: 2rem;
  min-width: 0;
  padding: 0 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.theme-preview-button:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.theme-preview-button--selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.theme-preview-button--selected:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.theme-preview-button--idle {
  background: #ffffff;
}

.theme-preview-color-button {
  padding: 0;
  height: 2rem;
}

.theme-preview-color-button.theme-preview-button--selected {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px var(--color-primary);
}

@media (max-width: 768px) {
  .site-header__inner {
    min-height: 70px;
    padding: 0 20px;
  }

  .site-nav {
    display: none;
  }

  .site-footer__content {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-nav {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__bottom {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom p:last-child {
    text-align: left;
  }

  .theme-preview-panel {
    bottom: 6rem;
  }
}

@media (max-width: 480px) {
  .site-header__inner {
    padding: 0 15px;
    gap: 16px;
  }

  .site-logo,
  .site-footer__logo {
    font-size: 1.25rem;
  }

  .site-logo {
    width: 90px;
    height: 25px;
    font-size: 0;
  }

  .site-header__actions {
    gap: 8px;
  }

  .site-header__link,
  .site-header__button {
    font-size: 0.8125rem;
  }

  .site-header__link {
    padding: 9px 12px;
  }

  .site-header__button {
    padding: 9px 12px;
  }

  .site-footer__inner {
    padding: 40px 15px 24px;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .theme-preview-panel {
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}
