:root {
  --site-header-height: 64px;
  --site-shell-max-width: 1180px;
  --site-shell-gutter: clamp(16px, 4vw, 40px);
  --site-shell-ink: #132238;
  --site-shell-muted: #56687d;
  --site-shell-blue: #0878e8;
  --site-shell-blue-dark: #0750a8;
  --site-shell-focus: #0750a8;
  --site-shell-line: rgba(7, 80, 168, 0.14);
  --site-shell-surface: rgba(255, 255, 255, 0.96);
  --site-font-en: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --site-font-ja: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", "Segoe UI", sans-serif;
  --site-font-ko: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --site-font-zh: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --site-font-display-en: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --site-font-display-ja: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", "Segoe UI", sans-serif;
  --site-font-display-ko: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --site-font-display-zh: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --site-font-family: var(--site-font-ja);
  --site-font-display-family: var(--site-font-display-ja);
  --site-text-body: 1rem;
  --site-text-nav: 0.875rem;
  --site-leading-body: 1.65;
  --site-weight-semibold: 600;
  --site-weight-bold: 700;
  --font-b: var(--site-font-family);
  --font-d: var(--site-font-display-family);
}

html[lang^="en"] {
  --site-font-family: var(--site-font-en);
  --site-font-display-family: var(--site-font-display-en);
}
html[lang="ja"] {
  --site-font-family: var(--site-font-ja);
  --site-font-display-family: var(--site-font-display-ja);
}
html[lang="ko"] {
  --site-font-family: var(--site-font-ko);
  --site-font-display-family: var(--site-font-display-ko);
}
html[lang="zh-Hans"] {
  --site-font-family: var(--site-font-zh);
  --site-font-display-family: var(--site-font-display-zh);
}

html {
  scroll-padding-top: var(--site-header-height);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--site-font-family);
  font-size: var(--site-text-body);
  line-height: var(--site-leading-body);
}

html:lang(ko) :is(h1, h2, h3) {
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  word-break: keep-all;
}

html:lang(zh-Hans) :is(h1, h2, h3) {
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: var(--site-header-height);
  margin-bottom: calc(var(--site-header-height) * -1);
  color: var(--site-shell-ink);
  font-family: var(--site-font-family);
  font-size: var(--site-text-nav);
}

.site-header__bar {
  height: var(--site-header-height);
  border-bottom: 1px solid var(--site-shell-line);
  background: var(--site-shell-surface);
  box-shadow: 0 8px 24px rgba(19, 34, 56, 0.07);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.site-header__inner {
  display: flex;
  width: min(var(--site-shell-max-width), calc(100% - var(--site-shell-gutter) * 2));
  height: 100%;
  margin: 0 auto;
  align-items: center;
  gap: 20px;
}

.site-header__identity,
.site-header__primary,
.site-header__actions {
  display: flex;
  min-width: 0;
  align-items: center;
}

.site-header__identity {
  flex: 0 0 auto;
  gap: 12px;
}

.site-header__brand {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  border-radius: 8px;
}

.site-header__brand img {
  display: block;
  width: 112px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
}

.site-header__language {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  align-items: center;
  color: var(--site-shell-ink);
}

.site-header__language-icon {
  position: absolute;
  left: 11px;
  z-index: 1;
  color: var(--site-shell-blue-dark);
  font-size: 0.72rem;
  font-weight: var(--site-weight-bold);
  line-height: 1;
  pointer-events: none;
}

.site-header__language select {
  width: 116px;
  height: 44px;
  margin: 0;
  padding: 0 28px 0 31px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--site-shell-line);
  border-radius: 999px;
  outline: 0;
  background:
    linear-gradient(45deg, transparent 50%, var(--site-shell-muted) 50%) calc(100% - 14px) 19px / 5px 5px no-repeat,
    linear-gradient(135deg, var(--site-shell-muted) 50%, transparent 50%) calc(100% - 9px) 19px / 5px 5px no-repeat,
    rgba(255, 255, 255, 0.9);
  color: var(--site-shell-ink);
  font: var(--site-weight-semibold) var(--site-text-nav) / 1 var(--site-font-family);
  cursor: pointer;
}

.site-header__primary {
  flex: 1 1 auto;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 22px);
}

.site-header__nav-link,
.site-header__action,
.site-header__menu-link {
  color: inherit;
  font-family: var(--site-font-family);
  font-size: var(--site-text-nav);
  font-weight: var(--site-weight-semibold);
  line-height: 1.35;
  text-decoration: none;
}

.site-header__nav-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--site-shell-muted);
  white-space: nowrap;
}

.site-header__nav-link:hover,
.site-header__nav-link:focus-visible {
  color: var(--site-shell-blue-dark);
}
.site-header__nav-link[aria-current="page"] {
  color: var(--site-shell-blue-dark);
  font-weight: var(--site-weight-bold);
}

.site-header__actions {
  flex: 0 0 auto;
  gap: 8px;
}

.site-header__action {
  display: inline-flex;
  min-height: 44px;
  padding: 8px 13px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
}

.site-header__action--login { color: var(--site-shell-blue-dark); }

.site-header__action--signup {
  border-color: rgba(8, 120, 232, 0.28);
  color: var(--site-shell-blue-dark);
  background: #fff;
}

.site-header__action--cta {
  color: #fff;
  background: var(--site-shell-blue-dark);
  box-shadow: 0 6px 16px rgba(8, 120, 232, 0.22);
}

.site-header__action:hover,
.site-header__action:focus-visible,
.site-header__menu-link:hover,
.site-header__menu-link:focus-visible {
  transform: translateY(-1px);
}

.site-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 11px;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--site-shell-line);
  border-radius: 12px;
  background: #fff;
  color: var(--site-shell-ink);
  font: inherit;
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-header__menu {
  position: absolute;
  top: calc(var(--site-header-height) + 8px);
  right: var(--site-shell-gutter);
  left: var(--site-shell-gutter);
  max-height: calc(100vh - var(--site-header-height) - 24px);
  padding: 10px;
  overflow-y: auto;
  border: 1px solid var(--site-shell-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(19, 34, 56, 0.16);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.site-header__menu[hidden] { display: none; }

.site-header__menu-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.site-header__menu-link {
  display: flex;
  min-height: 48px;
  padding: 11px 14px;
  align-items: center;
  border-radius: 12px;
  color: var(--site-shell-ink);
}

.site-header__menu-link:hover,
.site-header__menu-link:focus-visible { background: #f3f7fc; }
.site-header__menu-link[aria-current="page"] {
  color: var(--site-shell-blue-dark);
  font-weight: var(--site-weight-bold);
}

.site-header__menu-link--cta {
  color: #fff;
  background: var(--site-shell-blue-dark);
}

.site-header__menu-link--cta:hover,
.site-header__menu-link--cta:focus-visible { background: var(--site-shell-blue-dark); }

.site-header__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header :focus-visible {
  outline: 3px solid var(--site-shell-focus);
  outline-offset: 2px;
}

body.site-shell-ready main > header.hero.hero-sub {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: calc(var(--site-header-height) + 40px) 0 64px;
}

body.site-shell-ready .landing-hero {
  padding-top: calc(var(--site-header-height) + 26px);
}

@media (max-width: 1149px) {
  .site-header__inner { gap: 12px; }
  .site-header__primary,
  .site-header__actions { display: none; }
  .site-header__toggle { display: flex; }
}

@media (max-width: 520px) {
  :root { --site-shell-gutter: 14px; }
  .site-header__identity { gap: 8px; }
  .site-header__brand img { width: 98px; }
  .site-header__language select {
    width: 118px;
    padding-right: 24px;
    padding-left: 28px;
    font-size: var(--site-text-nav);
  }
  .site-header__language-icon { left: 9px; }
  .site-header__menu-nav { grid-template-columns: 1fr; }
  body.site-shell-ready main > header.hero.hero-sub {
    padding: calc(var(--site-header-height) + 28px) 0 48px;
  }
}

@media (max-width: 350px) {
  .site-header__brand img { width: 86px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::before,
  .site-header *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
