@import url('https://fonts.googleapis.com/css2?family=Karla:wght@400;500;600;700&family=Playfair+Display+SC:wght@400;700&display=swap');

:root{
  --paper:#fafaf8;
  --mid:#4a4a4a;
  --ink:#1a1a1a;
  --line:rgba(26,26,26,.22);
  --tape:rgba(26,26,26,.09);
  --sans:"Karla","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --disp:"Playfair Display SC","Songti SC","SimSun",Georgia,serif;
}

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

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::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:9;
  pointer-events:none;
  opacity:.06;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:160px 160px;
}

img{max-width:100%;height:auto}
a{color:var(--ink)}
h1,h2,h3{font-family:var(--disp);font-weight:700;letter-spacing:.01em}
p{margin:0 0 1rem}

[id]{scroll-margin-top:1rem}

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

.hero{
  min-height:100vh;
  min-height:100svh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:clamp(1.4rem,4vw,2.6rem);
  padding:clamp(1.6rem,5vw,3.4rem) clamp(1.1rem,4vw,3rem) clamp(1.6rem,4vw,2.6rem);
  border-bottom:3px solid var(--ink);
  position:relative;
  overflow:hidden;
  background-color:var(--paper);
  background-image:radial-gradient(circle at 1px 1px, rgba(74,74,74,.3) 1px, transparent 1px);
  background-size:20px 20px;
}

.hero-text{max-width:34ch;position:relative}

.hero h1{
  margin:0 0 .9rem;
  font-size:clamp(2.1rem,8.4vw,4.6rem);
  line-height:1.06;
  letter-spacing:.005em;
  transform:rotate(-.6deg);
  text-shadow:2px 2px 0 rgba(26,26,26,.09);
}

.hero-text::after{
  content:"";
  display:block;
  width:96px;
  height:6px;
  margin:0 0 1rem;
  background:var(--ink);
  transform:rotate(-1.4deg) skewX(-12deg);
  opacity:.85;
}

.hero-lede{
  font-size:1rem;
  color:var(--mid);
  max-width:40ch;
  line-height:1.7;
  margin:0 0 1.4rem;
}

.hero-jump{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.5rem 1.3rem;
  border:2px solid var(--ink);
  border-radius:999px;
  text-decoration:none;
  font-weight:600;
  background:var(--paper);
  transform:rotate(-.8deg);
  box-shadow:3px 3px 0 var(--ink);
}

.hero-jump:hover{background:var(--ink);color:var(--paper);transform:rotate(0) translateY(-2px);box-shadow:4px 5px 0 rgba(26,26,26,.55)}

.hero-fig{
  margin:0;
  position:relative;
  align-self:flex-start;
  width:100%;
  max-width:620px;
  transform:rotate(.9deg);
}

.hero-fig::before,
.hero-fig::after{
  content:"";
  position:absolute;
  width:82px;
  height:24px;
  background:var(--tape);
  border:1px solid rgba(26,26,26,.14);
  top:-11px;
  z-index:2;
}
.hero-fig::before{left:6%;transform:rotate(-7deg)}
.hero-fig::after{right:9%;transform:rotate(6deg)}

.hero-shot{
  display:block;
  width:100%;
  max-height:40svh;
  object-fit:cover;
  border:7px solid #fff;
  box-shadow:4px 6px 0 rgba(26,26,26,.16);
  filter:grayscale(1) contrast(1.06);
  animation:wob 7s steps(3,end) infinite;
}

@keyframes wob{
  0%{transform:rotate(.9deg)}
  50%{transform:rotate(.15deg)}
  100%{transform:rotate(.9deg)}
}

/* ---------- body grid ---------- */

.wrap{
  display:grid;
  grid-template-columns:minmax(0,216px) minmax(0,1fr);
  gap:clamp(1.2rem,4vw,3rem);
  max-width:1080px;
  margin:0 auto;
  padding:clamp(2rem,5vw,3.6rem) clamp(1.1rem,4vw,2.4rem) 4rem;
  overflow-x:clip;
}

.side{
  position:sticky;
  top:1rem;
  align-self:start;
  padding:1rem .95rem 1.1rem;
  background:#fff;
  border:2px solid var(--ink);
  border-radius:10px 15px 12px 10px;
  box-shadow:3px 3px 0 rgba(26,26,26,.16);
  transform:rotate(-.8deg);
}

.side h2{
  margin:0 0 .4rem;
  font-size:1.05rem;
  line-height:1.35;
  letter-spacing:.02em;
}

.side hr{
  border:0;
  border-top:2px dashed var(--mid);
  margin:0 0 .7rem;
  opacity:.6;
}

.side-links a{
  display:block;
  min-height:40px;
  padding:.45rem 0;
  font-size:.95rem;
  color:var(--mid);
  text-decoration:none;
  border-bottom:1px dashed var(--line);
}
.side-links a:last-child{border-bottom:0}
.side-links a:hover{color:var(--ink);padding-left:.2rem}

.stream{min-width:0}

.sheet{
  border-left:2px dashed var(--line);
  padding-left:clamp(.85rem,2vw,1.6rem);
}

.sheet > article{
  margin:0 0 2rem;
  padding:1.2rem clamp(.9rem,2.4vw,1.5rem) 1.5rem;
  background:#fff;
  border:1.5px solid rgba(26,26,26,.18);
  border-bottom:5px solid var(--ink);
  border-radius:10px;
  box-shadow:2px 3px 0 rgba(26,26,26,.07);
  transform:rotate(.16deg);
}
.sheet > article:nth-child(even){transform:rotate(-.22deg)}

.sheet h2{
  font-size:clamp(1.35rem,3.6vw,1.9rem);
  line-height:1.3;
  margin:0 0 .5rem;
}

.sheet h3{
  font-size:1.12rem;
  margin:1.4rem 0 .4rem;
}

.sheet hr{
  border:0;
  border-top:2px dashed var(--mid);
  opacity:.65;
  margin:.15rem 0 1.1rem;
  transform:rotate(-.25deg);
}

.sheet p,.sheet li{line-height:1.8}
.sheet ul,.sheet ol{padding-left:1.2rem;margin:0 0 1rem}
.sheet li{margin:0 0 .4rem}
.sheet a{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px}
.sheet a:hover{background:var(--tape)}
.sheet blockquote{
  margin:1rem 0;
  padding:.4rem 0 .4rem 1rem;
  border-left:4px solid var(--ink);
  color:var(--mid);
  font-style:normal;
}
.sheet pre{overflow-x:auto;padding:.9rem;background:var(--paper);border:1.5px dashed var(--line);border-radius:10px}
.sheet code{font-size:.95rem}
.sheet figure{margin:1.2rem 0}
.sheet figcaption{font-size:.9rem;color:var(--mid);margin-top:.35rem}
.sheet table{width:100%;border-collapse:collapse;font-size:.98rem}
.sheet th,.sheet td{border-bottom:1px solid var(--line);padding:.5rem .4rem;text-align:left}

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

.foot{
  border-top:3px solid var(--ink);
  background:#fff;
  padding:clamp(1.6rem,4vw,2.6rem) clamp(1.1rem,4vw,2.4rem) calc(7rem + env(safe-area-inset-bottom));
}

.foot-cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1.4rem;
  max-width:1080px;
  margin:0 auto;
}

.foot dl{margin:0}
.foot dt{
  font-family:var(--disp);
  font-size:.95rem;
  letter-spacing:.08em;
  margin:0 0 .5rem;
  padding-bottom:.3rem;
  border-bottom:1px solid var(--line);
}
.foot dd{
  margin:0 0 .3rem;
  color:var(--mid);
  font-size:.95rem;
  line-height:1.6;
}

.foot-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--mid);
  text-decoration:none;
  border-bottom:1px solid transparent;
}
.foot-nav a:hover{color:var(--ink);border-bottom-color:var(--ink)}

.foot-line{
  max-width:1080px;
  margin:1.5rem auto 0;
  padding-top:.9rem;
  border-top:1px dashed var(--line);
  color:var(--mid);
  font-size:.95rem;
}

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

.dock{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:6;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  padding:.5rem clamp(.6rem,2vw,1.2rem) calc(.5rem + env(safe-area-inset-bottom));
  background:rgba(250,250,248,.95);
  border-top:2px solid var(--ink);
}

.dock-a,.dock-b{display:flex;align-items:center;gap:.4rem;flex:1 1 0;min-width:0}
.dock-a{justify-content:flex-end}
.dock-b{justify-content:flex-start}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.3rem .8rem;
  font-size:.95rem;
  white-space:nowrap;
  color:var(--ink);
  text-decoration:none;
  background:var(--paper);
  border:1.5px solid var(--mid);
  border-radius:999px;
  transform:rotate(-.6deg);
}
.pill:nth-child(even){transform:rotate(.7deg)}
.pill:hover,.pill.is-on{background:var(--ink);color:var(--paper);border-color:var(--ink);transform:rotate(0) translateY(-2px)}

.dock-brand{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.3rem .9rem;
  font-family:var(--disp);
  font-size:1rem;
  white-space:nowrap;
  color:var(--ink);
  text-decoration:none;
  background:#fff;
  border:2px solid var(--ink);
  border-radius:999px;
  transform:rotate(-1.2deg);
  box-shadow:2px 2px 0 var(--ink);
}

.dock-cta{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.3rem .85rem;
  font-size:.95rem;
  white-space:nowrap;
  text-decoration:none;
  color:var(--paper);
  background:var(--ink);
  border:2px solid var(--ink);
  border-radius:999px;
  transform:rotate(.8deg);
}
.dock-cta:hover{background:#fff;color:var(--ink);transform:rotate(0) translateY(-2px)}

/* ---------- small screens ---------- */

@media (max-width:860px){
  .wrap{grid-template-columns:minmax(0,1fr);padding-bottom:2.5rem}
  .side{position:static;transform:rotate(-.6deg)}
  .sheet{border-left:0;padding-left:0}
  .foot-cols{grid-template-columns:1fr 1fr}
  .foot{padding-bottom:calc(8.5rem + env(safe-area-inset-bottom))}

  .dock{flex-wrap:wrap;gap:.35rem}
  .dock-brand{order:-1;flex:1 0 100%;justify-content:center}
  .dock-a,.dock-b{flex:1 1 0;overflow-x:auto;scrollbar-width:none}
  .dock-a::-webkit-scrollbar,.dock-b::-webkit-scrollbar{display:none}
  .dock-b{justify-content:flex-end}
  .hero-shot{max-height:34svh}
}

@media (max-width:420px){
  .foot-cols{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
}

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