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

:root{
  --ink:#000;
  --paper:#fff;
  --gutter:clamp(1.15rem,5vw,4rem);
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  padding-bottom:9.5rem;
  background:var(--paper);
  color:var(--ink);
  font-family:'Quicksand',system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.72;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%}
a{color:inherit}
:focus-visible{outline:2px solid #000;outline-offset:3px}

/* ---------- hero ---------- */
.hero{
  position:relative;
  min-height:70vh;
  display:flex;
  align-items:center;
  overflow:hidden;
  padding:clamp(2.4rem,9vw,6rem) var(--gutter) clamp(3.2rem,9vw,6rem);
}
.hero::before{
  content:"";
  position:absolute;
  left:-9%;
  right:-9%;
  bottom:-.9rem;
  height:clamp(1.5rem,4.2vw,2.7rem);
  background:var(--ink);
  transform:rotate(-3.2deg);
}
.hero-text{position:relative;z-index:2;max-width:min(100%,58%)}
.hero-title{
  margin:0;
  font-size:clamp(3rem,10vw,12rem);
  line-height:.9;
  font-weight:900;
  letter-spacing:-.05em;
  word-break:break-word;
}
.collage{
  position:absolute;
  right:var(--gutter);
  top:50%;
  transform:translateY(-50%);
  width:min(32vw,320px);
  height:min(48vh,360px);
  z-index:3;
}
.shot{
  position:absolute;
  object-fit:cover;
  background:#f1f1f1;
  border:2px solid var(--ink);
  border-radius:4px;
  filter:grayscale(1) contrast(1.04);
}
.shot-1{left:0;top:3%;width:64%;height:55%;transform:rotate(-4deg)}
.shot-2{right:0;bottom:1%;width:60%;height:48%;transform:rotate(4.5deg)}

/* ---------- main grid ---------- */
.wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) 14.5rem;
  gap:clamp(1.6rem,4vw,3.4rem);
  max-width:1200px;
  margin:0 auto;
  padding:clamp(1.8rem,5vw,3.4rem) var(--gutter) clamp(2.6rem,7vw,4rem);
}
.chapter{padding-top:.3rem}
.chapter-h{
  margin:0;
  font-size:clamp(1.05rem,3vw,1.35rem);
  font-weight:700;
  letter-spacing:.09em;
  line-height:1.3;
}
.subtitle{
  margin:.45rem 0 2.1rem;
  padding-bottom:1.1rem;
  border-bottom:1px solid var(--ink);
  font-size:1.02rem;
  max-width:66ch;
}

/* ---------- prose ---------- */
.prose h2{
  margin:0 0 1.05rem;
  font-size:clamp(1.85rem,5.4vw,3.4rem);
  line-height:1.02;
  font-weight:900;
  letter-spacing:-.035em;
}
.prose h3{
  margin:2rem 0 .6rem;
  font-size:1.22rem;
  font-weight:700;
}
.prose p{margin:0 0 1.1rem;max-width:66ch}
.prose div{
  padding:clamp(2.2rem,6vw,3.6rem) 0;
  border-top:1px solid var(--ink);
}
.prose div:first-child{border-top:0;padding-top:0}
.prose div[id]{scroll-margin-top:1.5rem;scroll-margin-bottom:9.5rem}
.prose div > *:last-child{margin-bottom:0}
.prose ul,.prose ol{margin:0 0 1.2rem;padding-left:1.25rem;max-width:66ch}
.prose li{
  margin:0 0 .55rem;
  padding-bottom:.55rem;
  border-bottom:1px solid var(--ink);
}
.prose a{
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
}
.prose img{height:auto;border:1px solid var(--ink);border-radius:4px}
.prose blockquote{
  margin:1.6rem 0;
  padding:.35rem 1.2rem;
  border-left:3px solid var(--ink);
  font-weight:500;
}

/* ---------- aside ---------- */
.side{
  position:sticky;
  top:1.4rem;
  align-self:start;
  border-left:1px solid var(--ink);
  padding-left:1.1rem;
  font-size:.95rem;
}
.side-h{
  margin:.3rem 0 .9rem;
  font-size:.95rem;
  font-weight:700;
  letter-spacing:.1em;
}
.side-list{margin:0;padding:0;list-style:none}
.side-list li{border-bottom:1px solid var(--ink)}
.side-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  line-height:1.35;
  text-decoration:none;
}
.side-list a:hover,.side-list a:focus-visible{background:var(--ink);color:var(--paper)}

/* ---------- footer ---------- */
.foot{
  display:grid;
  gap:clamp(1.6rem,5vw,2.8rem);
  border-top:1px solid var(--ink);
  padding:clamp(2.2rem,6vw,3.4rem) var(--gutter) clamp(2rem,5vw,3rem);
}
.brand-big{
  margin:0;
  font-size:clamp(2.4rem,10vw,6.5rem);
  font-weight:900;
  line-height:.86;
  letter-spacing:-.05em;
  word-break:break-word;
}
.foot-links{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem 1.4rem;
  margin:0;
  padding:0;
  list-style:none;
}
.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:.95rem;
  text-decoration:none;
  border-bottom:1px solid var(--ink);
}
.foot-links a:hover,.foot-links a:focus-visible{background:var(--ink);color:var(--paper)}
.foot-base{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:.8rem;
  border-top:1px solid var(--ink);
  padding-top:1rem;
  font-size:.9rem;
}
.copy{margin:0;display:flex;align-items:baseline;gap:.35rem}
.year{font-family:'Caveat',cursive;font-size:1.5rem;line-height:1;letter-spacing:.02em}
.totop{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 .1rem;
  font-size:.9rem;
  text-decoration:none;
  border-bottom:1px solid var(--ink);
}

/* ---------- dock ---------- */
.dock{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:70;
  background:var(--paper);
  border-top:1px solid var(--ink);
  padding:.4rem var(--gutter) calc(.5rem + env(safe-area-inset-bottom));
}
.dock-brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--ink);
  padding-bottom:.3rem;
}
.brand{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:1.02rem;
  font-weight:700;
  letter-spacing:.02em;
  text-decoration:none;
}
.dock-row{
  display:flex;
  align-items:center;
  gap:.5rem;
  padding-top:.4rem;
}
.dock-menu{
  display:flex;
  align-items:center;
  gap:.5rem;
  flex:1 1 auto;
  min-width:0;
}
.sum{background:var(--ink);color:var(--paper);flex:0 0 auto;cursor:pointer}
.sum::-webkit-details-marker{display:none}
.sum::marker{content:""}
.pills{
  display:flex;
  gap:.45rem;
  flex:1 1 auto;
  min-width:0;
  margin:0;
  padding:0 0 .1rem;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.pills::-webkit-scrollbar{display:none}
.pill{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:.45rem 1rem;
  border:1px solid var(--ink);
  border-radius:999px;
  background:var(--paper);
  font-size:.95rem;
  text-decoration:none;
  white-space:nowrap;
}
.pill:hover,.pill:focus-visible{background:var(--ink);color:var(--paper)}
.ring{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:.45rem 1.05rem;
  border:1px solid var(--ink);
  border-radius:999px;
  font-size:.95rem;
  text-decoration:none;
}
.ring:hover,.ring:focus-visible{background:var(--ink);color:var(--paper)}

/* ---------- reveal ---------- */
.js .prose div{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .55s cubic-bezier(.2,.7,.2,1),transform .55s cubic-bezier(.2,.7,.2,1);
}
.js .prose div.in{opacity:1;transform:none}
.js .pills li{
  opacity:0;
  transform:translateY(6px);
  animation:pill-in .45s ease forwards;
}
.js .pills li:nth-child(1){animation-delay:.04s}
.js .pills li:nth-child(2){animation-delay:.08s}
.js .pills li:nth-child(3){animation-delay:.12s}
.js .pills li:nth-child(4){animation-delay:.16s}
.js .pills li:nth-child(5){animation-delay:.2s}
.js .pills li:nth-child(6){animation-delay:.24s}
.js .pills li:nth-child(7){animation-delay:.28s}
@keyframes pill-in{to{opacity:1;transform:none}}

/* ---------- responsive ---------- */
@media (min-width:820px){
  .foot{grid-template-columns:1.15fr .85fr;align-items:start}
  .foot-base{grid-column:1 / -1}
}
@media (max-width:900px){
  .wrap{grid-template-columns:1fr}
  .side{
    position:static;
    border-left:0;
    border-top:1px solid var(--ink);
    padding-left:0;
    padding-top:1.1rem;
  }
  .hero{
    min-height:0;
    flex-direction:column;
    align-items:flex-start;
    padding-top:clamp(2rem,10vw,3rem);
  }
  .hero-text{max-width:100%}
  .collage{
    position:relative;
    right:auto;
    top:auto;
    transform:none;
    width:100%;
    height:min(52vw,240px);
    margin-top:2rem;
  }
  .shot-1{width:56%;height:84%;top:0;left:0}
  .shot-2{width:50%;height:76%;bottom:0;right:0}
}
@media (max-width:420px){
  body{font-size:16.5px}
  .hero-title{letter-spacing:-.045em}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js .prose div{opacity:1;transform:none;transition:none}
  .js .pills li{animation:none;opacity:1;transform:none}
}

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