@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Work+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --muted: rgba(31, 31, 31, 0.6);
  --line: rgba(31, 31, 31, 0.13);
  --line-soft: rgba(31, 31, 31, 0.07);
  --r: 20px;
  --dock: 78px;
  --font: Outfit, "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--mist);
  padding-bottom: calc(var(--dock) + 28px);
  -webkit-font-smoothing: antialiased;
}

[id] {
  scroll-margin-top: 22px;
  scroll-margin-bottom: calc(var(--dock) + 22px);
}

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

a {
  color: inherit;
}

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

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 18px;
  min-height: 46vh;
  padding: 26px 18px 30px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}

.hero-bgtext {
  position: absolute;
  top: 6px;
  left: -6px;
  margin: 0;
  font-size: clamp(66px, 21vw, 200px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.84;
  color: rgba(31, 31, 31, 0.055);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.hero-media {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 400px);
}

.hero-media figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 18px;
  background: var(--mist);
  box-shadow: 0 10px 26px rgba(31, 31, 31, 0.08);
}

.hero-media figure:last-child {
  transform: translateY(-16px);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: right;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(29px, 7.2vw, 56px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.hero-lede {
  margin: 0 0 0 auto;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- shell ---------- */

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ---------- bento index ---------- */

.index {
  padding-top: 18px;
}

.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 128px;
  gap: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 15px;
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 3px solid var(--line-soft);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tile:hover,
.tile:focus-visible {
  transform: scale(1.02);
  border-bottom-color: var(--ink);
  box-shadow: 0 12px 28px rgba(31, 31, 31, 0.09);
}

.tile-num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.tile h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.38;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.tile h2 span {
  display: block;
}

/* ---------- article body ---------- */

.body {
  padding-top: 14px;
}

.prose {
  display: grid;
  gap: 14px;
  counter-reset: none;
}

.prose > div {
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 3px solid var(--line-soft);
  padding: 22px 18px 20px;
}

.prose > div:first-child {
  padding-top: 26px;
}

.prose h2,
.prose h3 {
  position: relative;
  margin: 0 0 12px;
  padding-top: 15px;
  font-size: clamp(20px, 4.6vw, 27px);
  line-height: 1.3;
  letter-spacing: -0.022em;
  font-weight: 600;
}

.prose h3 {
  font-size: clamp(18px, 4vw, 21px);
  padding-top: 12px;
}

.prose h2::before,
.prose h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
}

.prose h2 span,
.prose h3 span {
  display: block;
}

.prose p {
  margin: 0 0 14px;
  max-width: 72ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 7px;
}

.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.prose a:hover {
  border-bottom-color: var(--ink);
}

.prose strong {
  font-weight: 600;
}

.prose blockquote {
  margin: 0 0 14px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.prose figure {
  margin: 0 0 14px;
}

.prose figure img {
  width: 100%;
  border-radius: 16px;
}

.prose figcaption {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- drawer / aside ---------- */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 26px;
  overflow-y: auto;
  background: var(--paper);
  box-shadow: -22px 0 60px rgba(31, 31, 31, 0.14);
  transform: translateX(102%);
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.drawer[data-open="true"] {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.drawer-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  background: var(--mist);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.drawer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.drawer nav a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 8px 2px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

.drawer nav a:hover {
  color: var(--muted);
}

/* ---------- footer ---------- */

.foot {
  margin-top: 26px;
  padding: 30px 16px 26px;
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
}

.foot-word {
  display: block;
  margin-bottom: 22px;
  font-size: clamp(36px, 11.5vw, 104px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-decoration: none;
  color: var(--ink);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}

.foot address {
  font-style: normal;
  display: grid;
  gap: 6px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.addr-brand {
  color: var(--ink);
  font-weight: 600;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.foot ul a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

.foot ul a:hover {
  color: var(--muted);
}

.foot-col-end {
  display: flex;
  align-items: flex-start;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--muted);
}

.copy {
  margin: 0;
}

.base-links {
  display: flex !important;
  gap: 16px;
}

.base-links a {
  border-bottom: 0 !important;
  padding: 0;
  min-height: 40px;
}

/* ---------- dock ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
}

.dock-brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dock-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.dock-cta:hover {
  transform: scale(1.03);
}

.dock-burger {
  flex: none;
  width: 46px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.burger-lines,
.burger-lines::before,
.burger-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.22s ease;
}

.burger-lines {
  position: relative;
}

.burger-lines::before,
.burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger-lines::before {
  top: -6px;
}

.burger-lines::after {
  top: 6px;
}

.dock-burger:hover .burger-lines::before {
  transform: translateY(-1px);
}

.dock-burger:hover .burger-lines::after {
  transform: translateY(1px);
}

/* ---------- desktop ---------- */

@media (min-width: 720px) {
  body {
    font-size: 18px;
  }

  .hero {
    min-height: 45vh;
    padding: 34px 30px 40px;
    gap: 24px;
  }

  .hero-media {
    gap: 16px;
    width: min(100%, 460px);
  }

  .hero-media figure:last-child {
    transform: translateY(-26px);
  }

  .wrap {
    padding: 0 24px;
  }

  .bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 152px;
    gap: 16px;
  }

  .tile:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile:nth-child(2) {
    grid-column: span 2;
  }

  .tile:nth-child(4) {
    grid-row: span 2;
  }

  .tile:nth-child(7) {
    grid-column: span 2;
  }

  .prose {
    gap: 18px;
  }

  .prose > div {
    padding: 34px 40px 30px;
    border-radius: 24px;
  }

  .foot {
    padding: 46px 30px 32px;
  }

  .foot-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 26px;
  }

  .dock {
    padding: 12px 30px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 1080px) {
  .hero {
    grid-template-columns: minmax(320px, 460px) 1fr;
    align-items: end;
    column-gap: 48px;
  }

  .hero-bgtext {
    top: 10px;
  }

  .hero-copy {
    padding-bottom: 12px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes drift {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-9px);
    }
  }

  .hero-media figure:first-child {
    animation: drift 9s ease-in-out infinite;
  }

  @keyframes slide-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .prose > div {
    animation: slide-in 0.5s ease both;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tile,
  .dock-cta,
  .drawer {
    transition: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
