/* ==========================================================
   MEMORABLE — global base + typography hierarchy + shell
   (header, mobile menu, footer, reveal-on-scroll)
   ========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
[hidden] {
  display: none !important;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
}
::selection {
  background: var(--accent-soft);
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}
.wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}
.wrap--narrow {
  max-width: var(--w-narrow);
}

/* ==========================================================
   TYPE HIERARCHY
   micro → kicker → h1 → lede → h2 → h3 → body → caption
   ========================================================== */
.micro {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: clamp(11.5px, 0.3vw + 10.5px, 14px);
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent-line);
}
.h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 3.5vw + 2rem, 5.25rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0;
}
.h1 em {
  font-style: italic;
  color: var(--accent-ink);
}
.lede {
  font-family: var(--sans);
  font-size: clamp(1.15rem, 0.5vw + 1rem, 1.3rem);
  line-height: 1.58;
  color: var(--ink-soft);
  max-width: 46ch;
}
.h2 {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.9rem, 2.2vw + 1.2rem, 3.3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}
.h3 {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.6rem, 1.2vw + 1.15rem, 2.05rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0;
}
.caption {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
}
.idx {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--head-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.head-in {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--accent);
}
.brand-word {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.16rem;
  letter-spacing: 0.01em;
}
.head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: var(--surface);
}
.lang-switch button {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover {
  border-color: var(--accent-line);
  color: var(--accent-ink);
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}
[data-theme="light"] .ic-sun {
  display: none;
}
[data-theme="dark"] .ic-moon {
  display: none;
}
.menu-btn,
.icon-btn,
.lang-switch {
  flex-shrink: 0;
}
.menu-btn {
  display: none;
}
.head-nav {
  display: flex;
  gap: 22px;
}
@media (max-width: 820px) {
  .menu-btn {
    display: inline-flex;
  }
  .head-nav {
    display: none;
  }
}
@media (max-width: 380px) {
  .head-in {
    gap: 6px;
  }
  .head-tools {
    gap: 4px;
  }
  .lang-switch {
    padding: 1px;
  }
  .lang-switch button {
    padding: 5px 8px;
  }
}
.head-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.head-nav a:hover {
  color: var(--accent-ink);
}
.head-account {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 4px;
}
.head-account:hover {
  color: var(--accent-ink);
}

/* mobile menu */
.m-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--bg);
  padding: 24px clamp(20px, 6vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.m-menu.open {
  opacity: 1;
  visibility: visible;
}
.m-menu .m-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.m-menu a {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 380;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.m-menu .m-account {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  border-bottom: none;
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0 56px;
}
.foot-in {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.foot-note {
  max-width: 52ch;
}

/* ---------- reveal-on-scroll ---------- */
.js .rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .rv.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .rv {
    opacity: 1;
    transform: none;
  }
}
