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

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

:root {
  --ink: #1f1f1f;
  --ink2: #4b4b4b;
  --ink3: #767676;
  --paper: #ffffff;
  --wash: #f5f5f5;
  --line: #1f1f1f;
  --hair: #dcdcdc;
  --r: 28px;
  --r-s: 14px;
  --serif: 'EB Garamond', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  --sans: 'Lato', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --e1: 0 1px 2px rgba(31, 31, 31, .07);
  --e2: 0 6px 14px -8px rgba(31, 31, 31, .22);
  --e3: 0 16px 30px -16px rgba(31, 31, 31, .30);
  --e4: 0 30px 60px -26px rgba(31, 31, 31, .40);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-x: hidden;
}

body.veil-on { overflow: hidden; }

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

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- top two rows ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--line);
}

.top-brand { display: flex; justify-content: center; padding: 10px 18px 2px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 2px 8px;
  border-radius: 999px;
}
.brand:hover { text-decoration: none; }
.brand:hover .brand-word { box-shadow: var(--e2); }
.mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--wash);
  object-fit: cover;
  flex: 0 0 auto;
}
.brand-word {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: var(--r-s);
  transition: box-shadow .22s ease;
}

.top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 18px 12px;
}

.burger {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 9px 22px;
  min-height: 44px;
  letter-spacing: .1em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.burger:hover { transform: translateY(-2px); box-shadow: var(--e2); background: var(--wash); }
.burger:active { transform: translateY(0); }

.search { display: flex; align-items: center; gap: 8px; }
.search input {
  font: inherit;
  font-size: .95rem;
  width: min(42vw, 220px);
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}
.search input:focus-visible { outline: 3px solid var(--hair); outline-offset: 2px; }
.search button {
  font: inherit;
  font-size: .95rem;
  min-height: 44px;
  min-width: 60px;
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.search button:hover { background: #353535; transform: translateY(-2px); }

/* ---------- full-screen veil menu ---------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  padding: clamp(24px, 6vw, 64px);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.veil.is-open { visibility: visible; opacity: 1; transform: none; }

.veil-nav { align-self: center; justify-self: center; width: min(560px, 100%); }
.veil-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  counter-reset: vstep;
}
.veil-list li { counter-increment: vstep; }
.veil-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: var(--r);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 3vw, 1.55rem);
  font-weight: 500;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.veil-list a::before {
  content: counter(vstep, decimal-leading-zero);
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--ink3);
  min-width: 2.2ch;
}
.veil-list a:hover {
  text-decoration: none;
  background: var(--wash);
  border-color: var(--line);
  transform: translateX(5px);
  box-shadow: var(--e2);
}

.veil-foot { justify-self: center; }
.veil-close {
  font: inherit;
  min-height: 44px;
  padding: 9px 28px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  letter-spacing: .14em;
  transition: background .2s ease, color .2s ease;
}
.veil-close:hover { background: var(--ink); color: #fff; }

/* ---------- layout shell ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 30px) clamp(14px, 3vw, 24px) 30px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(16px, 2.4vw, 28px);
  align-items: start;
}

.leaf {
  position: relative;
  z-index: 2;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: clamp(14px, 2.4vw, 32px);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(16px, 3vw, 30px);
  align-items: center;
  min-height: 45vh;
  padding: clamp(16px, 2.6vw, 32px);
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--wash);
  overflow: hidden;
}

.hero-copy { position: relative; z-index: 3; text-align: center; }

.chip {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: .8rem;
  letter-spacing: .16em;
  box-shadow: var(--e2);
  transform: rotate(-2deg);
}

.hero-h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 4.2vw, 2.4rem);
  line-height: 1.24;
  letter-spacing: .01em;
}

.hero-desc { margin: 0; color: var(--ink2); font-size: 1.01rem; }

.hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 8px;
}

.plane {
  position: absolute;
  width: 80%;
  height: 86%;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  z-index: 1;
}
.p1 { transform: translate(-16px, -14px) rotate(-3.4deg); box-shadow: var(--e3); }
.p2 { transform: translate(18px, 16px) rotate(3.4deg); background: #ebebeb; box-shadow: var(--e2); }

.hero-frame {
  position: relative;
  z-index: 2;
  margin: 0;
  width: 88%;
  aspect-ratio: 4 / 3;
  border: 2px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--e4);
}
.hero-pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-pic-mark { object-fit: contain; padding: 18%; background: var(--paper); }

/* ---------- div body ---------- */
div > section {
  position: relative;
  padding: clamp(22px, 3vw, 36px) 0;
  border-top: 2px dashed var(--hair);
}
div > section:first-of-type { border-top: 0; padding-top: clamp(24px, 3vw, 42px); }
div section[id] { scroll-margin-top: 134px; }

h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.3;
}
h3 {
  margin: 22px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.12rem, 2vw, 1.32rem);
  line-height: 1.4;
}
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 1.35em; }
li { margin: 0 0 6px; }
hr { border: 0; border-top: 2px solid var(--line); margin: 12px 0 18px; }
blockquote {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-left: 4px solid var(--line);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  background: var(--wash);
  color: var(--ink2);
}
strong { font-weight: 700; }
img { max-width: 100%; height: auto; }
table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: .97rem; }
th, td { border: 1px solid var(--hair); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--wash); font-weight: 700; }
code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: .93em;
  background: var(--wash);
  padding: 1px 5px;
  border-radius: 6px;
}
div section > :last-child { margin-bottom: 0; }

main div section.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
main div section.rv.in { opacity: 1; transform: none; }

/* ---------- right rail ---------- */
.rail {
  position: sticky;
  top: 126px;
  z-index: 1;
  padding: 20px 16px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--wash);
}
.rail-h {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: .14em;
}
.rail hr { margin: 0 0 12px; border-top: 2px solid var(--line); }
.rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail-list a {
  display: block;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--r-s);
  font-size: .96rem;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.rail-list a:hover {
  text-decoration: none;
  background: var(--paper);
  box-shadow: var(--e1);
  transform: translateX(3px);
}
.rail-back { margin: 16px 0 0; }
.rail-back a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: .88rem;
}
.rail-back a:hover { text-decoration: none; background: var(--ink); color: #fff; }

/* ---------- footer single row ---------- */
.foot {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 34px;
  padding: 16px clamp(14px, 2.4vw, 24px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--wash);
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: .06em;
}
.foot-nav { flex: 1 1 240px; }
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 1px;
  font-size: .93rem;
  border-bottom: 2px solid transparent;
  transition: border-color .18s ease;
}
.foot-list a:hover { text-decoration: none; border-bottom-color: var(--line); }

.sub { display: flex; gap: 8px; }
.sub input {
  font: inherit;
  font-size: .92rem;
  width: 128px;
  min-height: 40px;
  padding: 6px 13px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.sub button {
  font: inherit;
  font-size: .92rem;
  min-height: 40px;
  padding: 6px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease;
}
.sub button:hover { background: #353535; }
.foot-copy { font-size: .86rem; color: var(--ink2); letter-spacing: .04em; }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 2; }
  .rail-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-art { min-height: 200px; order: 2; }
  .foot { justify-content: flex-start; }
  .foot-nav, .foot-sub { flex: 1 1 100%; }
  .sub { width: 100%; }
  .sub input { flex: 1 1 auto; width: auto; }
  div section[id] { scroll-margin-top: 122px; }
}

@media (max-width: 420px) {
  .search input { width: min(38vw, 160px); }
  .brand-word { font-size: 1.3rem; }
  .veil-list a { font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  main div section.rv { opacity: 1 !important; transform: none !important; }
}

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