@font-face {
  font-family: "Baloo 2";
  src: url("assets/fonts/Baloo2-ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #1f1f1f;
  --ink-soft: #3b3732;
  --paper: #fffdf8;
  --cream: #f5ede2;
  --cream-deep: #eadccb;
  --coral: #ff7a4d;
  --coral-soft: #ffd8c8;
  --muted: #706a61;
  --line: rgba(31, 31, 31, 0.14);
  --line-strong: rgba(31, 31, 31, 0.28);
  --white: #ffffff;
  --display: "Baloo 2", "Arial Rounded MT Bold", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open,
body.dialog-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  color: var(--ink);
  background: var(--coral);
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.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;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(255, 253, 248, 0.97);
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--ink);
  border-radius: 13px;
  background: var(--cream);
  object-fit: cover;
}

.brand-type {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  line-height: 0.8;
}

.brand-type small {
  margin-top: 5px;
  font-family: var(--body);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.primary-nav a {
  position: relative;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s var(--ease);
}

.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.lang-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream);
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch a:hover {
  color: var(--ink);
}

.lang-switch a[aria-current="true"] {
  color: var(--paper);
  background: var(--ink);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-cta:hover {
  color: var(--paper);
  background: var(--ink);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 18px;
  height: 1.8px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}

.menu-toggle span:first-child {
  transform: translateY(-4px);
}

.menu-toggle span:last-child {
  transform: translateY(4px);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

/* shared bits */
.section-index {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.section-index::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--coral);
}

.btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--coral);
}

.btn-ghost {
  background: transparent;
}

.btn-ghost:hover {
  background: var(--cream);
}

.page {
  padding: 72px 0 100px;
}

.page-head {
  max-width: 760px;
  margin-bottom: 38px;
}

.page-head h1 {
  margin: 0;

  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.page-head p:not(.section-index) {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

/* footer */
.site-footer {
  margin-top: 40px;
  padding: 40px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.footer-brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.disclaimer {
  max-width: 900px;
  margin: 24px 0 0;
  color: #9a948b;
  font-size: 9px;
  line-height: 1.8;
}

/* toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 120;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* generic dialog */
dialog {
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(31, 31, 31, 0.58);
}

@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .primary-nav {
    position: fixed;
    inset: 76px 0 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 18px 20px 32px;
    border-top: 1px solid var(--line);
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-14px);
    transition: opacity 0.3s ease, transform 0.4s var(--ease), visibility 0.4s;
  }

  .primary-nav a {
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.04em;
  }

  .primary-nav a::after {
    display: none;
  }

  body.nav-open .primary-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.4s var(--ease), visibility 0s;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .footer-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .brand-type {
    font-size: 21px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .nav-shell {
    min-height: 70px;
    gap: 12px;
  }

  .lang-switch {
    padding: 2px;
  }

  .lang-switch a {
    min-width: 30px;
    min-height: 26px;
    padding: 0 6px;
  }

  .primary-nav {
    inset: 70px 0 0;
  }

  .page {
    padding: 48px 0 72px;
  }

  .page-head h1 {
    font-size: 38px;
  }

  .footer-nav {
    gap: 14px;
  }
}
