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

:root{
  --paper:#f5e6c8;
  --amber:#d4a574;
  --ink:#262117;
  --ink-soft:#4d4131;
  --line:rgba(38,33,23,.22);
  --wash:rgba(212,165,116,.2);
  --card:rgba(255,249,235,.66);
  --rad:10px;
}

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

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

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans SC",sans-serif;
  font-size:17px;
  line-height:1.78;
  font-weight:400;
  color:var(--ink);
  background-color:var(--paper);
  background-image:
    radial-gradient(58% 38% at 84% 0%, rgba(212,165,116,.5), transparent 68%),
    radial-gradient(46% 30% at 4% 26%, rgba(255,241,213,.8), transparent 70%),
    linear-gradient(180deg,#f8edd6,#efe0bd 62%,#f5e6c8);
  background-attachment:fixed,fixed,scroll;
  overflow-x:clip;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:9;
  pointer-events:none;
  opacity:.3;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23g)' opacity='0.6'/%3E%3C/svg%3E");
}

a{color:#8a5527;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
a:hover{color:var(--ink)}
:focus-visible{outline:2px solid #8a5527;outline-offset:2px}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:.45rem 1.1rem;
  padding:.5rem clamp(.8rem,3vw,2rem) .65rem;
  background:rgba(245,230,200,.94);
  -webkit-backdrop-filter:blur(6px) saturate(.9);
  backdrop-filter:blur(6px) saturate(.9);
  border-bottom:1px solid var(--line);
}

.strip{
  flex:1 0 100%;
  display:flex;
  justify-content:center;
  padding-bottom:.3rem;
  margin-bottom:.1rem;
  border-bottom:1px dashed var(--line);
}
.strip-in{
  font-size:.85rem;
  letter-spacing:.44em;
  color:var(--ink-soft);
  text-indent:.44em;
}

.menu ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.4rem;
}

.menu a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:.35rem 1.05rem;
  font-size:.95rem;
  font-weight:500;
  color:var(--ink);
  text-decoration:none;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,250,238,.55);
  transition:background .25s ease,color .25s ease,border-color .25s ease;
}
.menu a:hover,.menu a:focus-visible{background:var(--ink);color:var(--paper);border-color:var(--ink)}

.brand{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:.3rem .55rem;
  font-size:1.12rem;
  font-weight:600;
  letter-spacing:.2em;
  text-indent:.2em;
  color:var(--ink);
  text-decoration:none;
  white-space:nowrap;
}
.brand:hover{color:#7a4a1f}

main{
  display:grid;
  grid-template-columns:minmax(0,1fr) 288px;
  gap:clamp(1.2rem,3vw,2.6rem);
  align-items:start;
  max-width:1180px;
  margin:0 auto;
  padding:clamp(.9rem,2.6vw,1.8rem) clamp(.9rem,3vw,2rem) 2.6rem;
}

article{min-width:0}

article section[id]{scroll-margin-top:170px}

.hero{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:45vh;
  display:grid;
  place-items:center;
  text-align:center;
  padding:clamp(1.5rem,5vw,3rem) clamp(1rem,4vw,2rem);
  border:1px solid var(--line);
  border-radius:var(--rad) var(--rad) 46% 46% / var(--rad) var(--rad) 9% 9%;
  background-image:
    repeating-linear-gradient(0deg, rgba(38,33,23,.08) 0 1px, transparent 1px 15px),
    repeating-linear-gradient(90deg, rgba(38,33,23,.08) 0 1px, transparent 1px 15px),
    radial-gradient(72% 92% at 18% 8%, rgba(255,239,205,.94), transparent 64%),
    linear-gradient(158deg,#ecd6ab,#cda274 68%,#a67c4f);
}

.hero-media{
  position:absolute;
  inset:-8% 0;
  z-index:-1;
  will-change:transform;
}
.hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  opacity:.6;
  filter:sepia(.32) contrast(1.06) saturate(.72);
}

.hero::after{
  content:"";
  position:absolute;
  inset:-30% -12%;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(112deg,transparent 34%,rgba(255,212,148,.6) 47%,rgba(255,236,200,.28) 53%,transparent 64%);
  animation:leak 15s ease-in-out infinite alternate;
}
@keyframes leak{
  from{transform:translate3d(-12%,0,0) rotate(-2deg)}
  to{transform:translate3d(13%,0,0) rotate(3deg)}
}

.hero::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:20%;
  top:-25%;
  z-index:1;
  pointer-events:none;
  background:linear-gradient(180deg,transparent,rgba(255,255,255,.36),transparent);
  animation:track 8s linear infinite;
}
@keyframes track{
  0%{top:-25%;transform:skewY(0)}
  45%{transform:skewY(-1.6deg)}
  100%{top:104%;transform:skewY(0)}
}

.hero-in{position:relative;z-index:2;max-width:24ch}
.hero h1{
  margin:0;
  font-size:clamp(1.85rem,6.2vw,3.5rem);
  line-height:1.22;
  font-weight:600;
  letter-spacing:.06em;
  color:#221d14;
  text-shadow:0 1px 0 rgba(255,246,224,.85);
}

.body{
  max-width:70ch;
  padding-top:clamp(1.5rem,3.6vw,2.4rem);
}
.body > article{
  padding-bottom:1.9rem;
  margin-bottom:2.1rem;
  border-bottom:1px dashed var(--line);
}
.body > article:last-child{border-bottom:0;margin-bottom:0}

h2{
  font-size:clamp(1.35rem,3.4vw,1.8rem);
  line-height:1.34;
  letter-spacing:.02em;
  font-weight:600;
  margin:0 0 .2rem;
}
h3{
  font-size:1.14rem;
  line-height:1.5;
  margin:1.7rem 0 .2rem;
  font-weight:600;
}
hr{
  border:0;
  height:8px;
  margin:.6rem 0 1.15rem;
  border-radius:3px;
  background:linear-gradient(90deg,var(--amber),rgba(212,165,116,0));
}

p{margin:0 0 1.1rem}
ul,ol{margin:0 0 1.1rem;padding-left:1.3rem}
li{margin:.35rem 0}

.body img{
  max-width:100%;
  height:auto;
  display:block;
  margin:1.2rem 0;
  padding:7px 7px 20px;
  background:#fffaf0;
  border:1px solid rgba(38,33,23,.18);
  border-radius:3px;
  filter:sepia(.24) saturate(.88) contrast(1.04);
}

blockquote{
  margin:1.4rem 0;
  padding:.9rem 1.15rem;
  border-left:3px solid var(--amber);
  border-radius:0 var(--rad) var(--rad) 0;
  background:var(--card);
  color:var(--ink-soft);
}
blockquote p:last-child{margin:0}

table{width:100%;border-collapse:collapse;margin:1.2rem 0;font-size:.97rem}
th,td{border:1px solid var(--line);padding:.55rem .7rem;text-align:left}
th{background:var(--wash);font-weight:600}

.tail{
  display:flex;
  justify-content:flex-end;
  padding-top:.6rem;
}
.totop{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.4rem 1.15rem;
  font-size:.92rem;
  color:var(--ink);
  text-decoration:none;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,250,238,.55);
}
.totop:hover{background:var(--ink);color:var(--paper);border-color:var(--ink)}

.side{
  position:sticky;
  top:158px;
  padding:1rem 1rem 1.2rem;
  border:1px solid var(--line);
  border-radius:var(--rad);
  background:var(--card);
}
.side h2{
  margin:0;
  font-size:1rem;
  font-weight:600;
  letter-spacing:.26em;
  text-indent:.26em;
  color:var(--ink-soft);
}
.side hr{
  height:1px;
  margin:.6rem 0 .85rem;
  border-radius:0;
  background:var(--line);
}

.index{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:.2rem;
}
.index a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:.2rem .55rem;
  font-size:.95rem;
  color:var(--ink-soft);
  text-decoration:none;
  border-left:2px solid rgba(212,165,116,.55);
  border-radius:0 6px 6px 0;
  transition:background .2s ease,color .2s ease,border-color .2s ease;
}
.index a:hover,.index a:focus-visible{background:var(--wash);color:var(--ink);border-left-color:var(--ink)}

.stack{position:relative;height:146px;margin-top:1.1rem}
.stack img{
  position:absolute;
  inset:0;
  width:100%;
  height:134px;
  object-fit:cover;
  padding:6px 6px 20px;
  background:#fffaf0;
  border:1px solid rgba(38,33,23,.2);
  border-radius:3px;
  opacity:0;
  transform:rotate(-4deg);
  filter:sepia(.26) saturate(.85) contrast(1.06);
  transition:opacity .8s ease,transform .8s ease;
}
.stack img:first-child{opacity:1}
.stack img.on{opacity:1;transform:rotate(-2deg)}
.stack img:nth-child(even).on{transform:rotate(2.6deg)}

footer{
  border-top:1px solid var(--line);
  padding:clamp(1.5rem,5vw,2.8rem) clamp(.9rem,3vw,2rem) 1.8rem;
  text-align:center;
  background:linear-gradient(180deg,rgba(212,165,116,.24),rgba(245,230,200,0));
}
.foot-mark{margin:0 0 .5rem}
.mega{
  margin:0;
  font-size:clamp(2.1rem,10.5vw,5.8rem);
  line-height:1.06;
  font-weight:600;
  letter-spacing:.14em;
  text-indent:.14em;
  color:rgba(38,33,23,.26);
  white-space:nowrap;
}
.foot-line p{
  margin:0;
  font-size:.92rem;
  letter-spacing:.18em;
  color:var(--ink-soft);
}

.body > article.fade{opacity:0;transform:translateY(14px);transition:opacity .7s ease,transform .7s ease}
.body > article.fade.in{opacity:1;transform:none}

@media (max-width:820px){
  main{grid-template-columns:minmax(0,1fr);padding-top:.75rem}
  .side{position:static;order:2}
  .hero{min-height:38vh;border-radius:var(--rad)}
  .topbar{gap:.4rem .5rem}
  .brand{order:1;flex:1 0 100%;justify-content:center;font-size:1.05rem}
  .strip{order:0}
  .menu{order:2;flex:1 0 100%}
  .menu ul{gap:.35rem}
  .menu a{padding:.3rem .8rem;font-size:.9rem;min-height:40px}
  section article[id]{scroll-margin-top:200px}
}

@media (max-width:400px){
  .menu a{padding:.28rem .62rem;font-size:.86rem}
  .mega{letter-spacing:.1em;text-indent:.1em}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
}

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