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

:root{
  --ink:#1f1726;
  --plum:#56228b;
  --rust:#8b4513;
  --moss:#8fae6a;
  --bg:#221a2b;
  --panel:#2b2137;
  --panel-2:#241b2e;
  --paper:#f0e7db;
  --dim:#c6b7cd;
  --line:rgba(240,231,219,.14);
  --serif:"Cormorant Garamond","Libre Baskerville",Georgia,"Songti SC","Noto Serif SC","SimSun",serif;
  --r-lg:24px;
  --r-sm:4px;
}

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

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

body{
  margin:0;
  font-family:var(--serif);
  font-size:17px;
  line-height:1.78;
  color:var(--paper);
  background-color:var(--bg);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(86,34,139,.42), transparent 44%),
    radial-gradient(circle at 92% 10%, rgba(139,69,19,.30), transparent 40%),
    radial-gradient(circle at 48% 108%, rgba(143,174,106,.18), transparent 52%),
    radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size:auto,auto,auto,21px 21px;
  background-attachment:scroll,fixed,fixed,scroll;
  overflow-x:hidden;
}

img{max-width:100%;}

a{color:#d7c3e6;}
a:hover{color:#f3e7fb;}

/* ---------- header ---------- */
.brandbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px clamp(16px,4vw,52px) 10px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  min-height:44px;
  text-decoration:none;
  color:var(--paper);
  font-size:21px;
  font-weight:600;
  letter-spacing:.02em;
}

.brand:hover{color:#fff;}

.mark{
  width:42px;height:42px;
  display:grid;place-items:center;
  font-size:19px;
  color:#fff;
  background:linear-gradient(150deg,var(--plum),var(--rust));
  border-radius:22px 15px 20px 17px / 17px 22px 15px 21px;
  box-shadow:0 10px 22px rgba(31,23,38,.55);
}

.brand-name{white-space:nowrap;}

.cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 22px;
  font-size:16px;
  font-family:var(--serif);
  letter-spacing:.08em;
  text-decoration:none;
  color:#fff;
  background:linear-gradient(135deg,var(--plum),var(--rust));
  border:1px solid rgba(240,231,219,.28);
  border-radius:999px 999px 999px 14px;
  box-shadow:0 12px 26px rgba(31,23,38,.5);
  transition:transform .3s ease, box-shadow .3s ease;
}

.cta:hover{transform:translateY(-2px);box-shadow:0 16px 30px rgba(31,23,38,.62);color:#fff;}

.cta-lg{padding:14px 34px;font-size:18px;}

/* ---------- shell ---------- */
.shell{
  display:grid;
  grid-template-columns:minmax(190px,236px) minmax(0,1fr);
  gap:clamp(16px,3vw,42px);
  align-items:start;
  padding:6px clamp(16px,4vw,52px) 10px;
}

/* ---------- side rail ---------- */
.rail{
  position:sticky;
  top:16px;
  padding:18px 16px 20px;
  background:linear-gradient(170deg,var(--panel),var(--panel-2));
  border:1px solid var(--line);
  border-radius:var(--r-lg) 18px 26px 20px / 18px 26px 20px var(--r-lg);
  box-shadow:0 20px 44px rgba(15,10,20,.42);
}

.rail-title{
  margin:0 0 8px;
  font-size:17px;
  font-weight:600;
  letter-spacing:.22em;
  color:var(--moss);
}

.rail hr,
.rail-title + hr{
  margin:0 0 14px;
}

.rail-list{
  list-style:none;
  margin:0;
  padding:0;
  display:block;
}

.rail-list li{margin:0 0 4px;}

.rail-list a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:8px 10px;
  font-size:16px;
  line-height:1.4;
  text-decoration:none;
  color:var(--dim);
  border-radius:14px 10px 14px 10px;
  border-bottom:2px solid transparent;
  transition:background .25s ease,color .25s ease,border-color .25s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible{
  color:#fff;
  background:rgba(86,34,139,.34);
  border-bottom-color:var(--rust);
}

.num,
.tile-num{
  font-variant-numeric:tabular-nums;
  font-size:15px;
  letter-spacing:.06em;
  color:var(--moss);
  flex:0 0 auto;
}

.rail-top{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  margin-top:12px;
  padding:6px 4px;
  font-size:16px;
  color:var(--moss);
  text-decoration:none;
  border-bottom:1px dashed rgba(143,174,106,.5);
}

/* ---------- main ---------- */
main{min-width:0;}

article{
  max-width:74ch;
  overflow-wrap:break-word;
}

/* ---------- hero ---------- */
.hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
  align-items:center;
  gap:clamp(14px,3vw,32px);
  min-height:45vh;
  margin:4px 0 34px;
  padding:clamp(14px,3vw,26px);
  background:linear-gradient(158deg,rgba(86,34,139,.34),rgba(31,23,38,.66));
  border:1px solid var(--line);
  border-radius:30px 22px 34px 24px / 24px 32px 22px 30px;
  box-shadow:0 26px 56px rgba(15,10,20,.5);
  overflow:hidden;
}

.hero-blob{
  position:absolute;
  right:-70px;
  bottom:-90px;
  width:280px;
  height:280px;
  background:radial-gradient(circle at 40% 40%,rgba(143,174,106,.34),rgba(86,34,139,.12) 62%,transparent 72%);
  border-radius:58% 42% 36% 64% / 46% 56% 44% 54%;
  pointer-events:none;
}

.hero-media{
  position:relative;
  overflow:hidden;
  border-radius:26px 18px 28px 20px / 20px 28px 18px 26px;
  aspect-ratio:4/3;
  background:radial-gradient(circle at 38% 32%,rgba(143,174,106,.45),rgba(86,34,139,.55) 58%,#1a1322);
  box-shadow:inset 0 0 0 1px rgba(240,231,219,.14);
}

.hero-media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.06);
  will-change:transform;
}

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

.badge{
  display:inline-block;
  padding:4px 16px;
  font-size:16px;
  letter-spacing:.18em;
  text-indent:.18em;
  color:#dcebc8;
  background:rgba(143,174,106,.2);
  border:1px solid rgba(143,174,106,.52);
  border-radius:999px;
}

h1{
  margin:12px 0 10px;
  font-size:clamp(28px,4.4vw,46px);
  line-height:1.24;
  font-weight:600;
  color:#faf3f8;
  text-shadow:0 8px 26px rgba(15,10,20,.6);
}

.lede{
  margin:0;
  font-size:16px;
  line-height:1.7;
  color:var(--dim);
}

/* ---------- article body ---------- */
article div{
  padding:26px 0;
  border-top:1px dashed rgba(240,231,219,.15);
}

article div:first-of-type{border-top:0;}

article div[id]{scroll-margin-top:18px;}

article h2,
article h3,
article h4{
  font-weight:600;
  line-height:1.34;
  color:#f6edf6;
  scroll-margin-top:18px;
}

article h2{font-size:clamp(22px,3vw,29px);margin:0 0 10px;}
article h3{font-size:clamp(19px,2.4vw,23px);margin:26px 0 10px;}
article h4{font-size:18px;margin:20px 0 8px;}

article h2 + hr,
article h3 + hr{
  margin:0 0 18px;
}

hr{
  border:0;
  height:1px;
  margin:0;
  background:linear-gradient(90deg,rgba(139,69,19,.85),rgba(143,174,106,.42),rgba(240,231,219,0));
}

article p{margin:0 0 16px;}

article ul,
article ol{
  margin:0 0 18px;
  padding-left:1.3em;
}

article li{margin:0 0 8px;}

article li::marker{color:var(--moss);}

article blockquote{
  margin:22px 0;
  padding:14px 20px 14px 24px;
  background:rgba(31,23,38,.5);
  border-left:4px solid var(--rust);
  border-radius:0 18px 18px 0;
  color:#e7dcea;
}

article img{
  height:auto;
  border-radius:20px 14px 22px 16px;
  display:block;
  margin:16px 0;
}

article strong{color:#fdf6fd;}

article code{
  font-size:15px;
  padding:2px 6px;
  background:rgba(0,0,0,.32);
  border-radius:4px;
}

article table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 20px;
  font-size:16px;
}

article th,
article td{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
}

article th{color:var(--moss);font-weight:600;}

/* ---------- tiles ---------- */
.tiles{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(168px,1fr));
  gap:12px;
}

.tile{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:44px;
  padding:15px 14px;
  text-decoration:none;
  color:var(--paper);
  font-size:16px;
  line-height:1.45;
  background:linear-gradient(165deg,var(--panel),var(--panel-2));
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  border-bottom:3px solid var(--rust);
  transition:transform .3s ease,border-bottom-color .3s ease,box-shadow .3s ease;
}

.tile:hover{
  transform:translateY(-3px);
  border-bottom-color:var(--moss);
  box-shadow:0 16px 30px rgba(15,10,20,.48);
  color:#fff;
}

/* ---------- footer ---------- */
.site-foot{
  margin-top:48px;
  padding:clamp(26px,5vw,58px) clamp(16px,4vw,52px) 22px;
  background:linear-gradient(180deg,rgba(31,23,38,.55),#171120);
  border-top:1px solid var(--line);
}

.foot-cta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:clamp(18px,3vw,30px);
  margin:0 0 34px;
  background:radial-gradient(circle at 8% 12%,rgba(86,34,139,.5),transparent 58%),rgba(31,23,38,.62);
  border:1px solid var(--line);
  border-radius:26px 18px 28px 20px / 20px 28px 18px 26px;
}

.foot-mark{
  margin:0;
  font-size:clamp(21px,3vw,28px);
  font-weight:600;
  letter-spacing:.04em;
  color:#fbf3fb;
}

.foot-cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(14px,3vw,32px);
}

.foot-cols dl{margin:0;}

.foot-cols dt{
  font-size:16px;
  letter-spacing:.2em;
  color:var(--moss);
  margin:0 0 8px;
}

.foot-cols dd{
  margin:0;
  font-size:16px;
  color:var(--dim);
}

.foot-cols dd a{
  display:inline-block;
  min-height:40px;
  padding:7px 0;
  text-decoration:none;
  color:var(--dim);
  border-bottom:1px solid transparent;
}

.foot-cols dd a:hover{color:#fff;border-bottom-color:var(--rust);}

.kw{line-height:1.6;}

.foot-base{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:32px;
  padding-top:16px;
  border-top:1px solid var(--line);
  font-size:16px;
  color:var(--dim);
}

.foot-links{display:flex;gap:18px;flex-wrap:wrap;}

.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  text-decoration:none;
  color:var(--dim);
}

.foot-links a:hover{color:#fff;}

/* ---------- motion ---------- */
.js .reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .7s ease,transform .7s ease;
}

.js .reveal.on{
  opacity:1;
  transform:none;
}

/* ---------- responsive ---------- */
@media (max-width:860px){
  .shell{
    grid-template-columns:minmax(0,1fr);
    padding-top:0;
  }

  .rail{
    position:static;
    padding:14px 14px 12px;
    border-radius:20px 16px 22px 18px / 18px 22px 16px 20px;
  }

  .rail-title{
    font-size:16px;
    margin-bottom:6px;
    letter-spacing:.18em;
  }

  .rail hr{margin-bottom:10px;}

  .rail-list{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding-bottom:6px;
    -webkit-overflow-scrolling:touch;
  }

  .rail-list li{flex:0 0 auto;margin:0;}

  .rail-list a{
    white-space:nowrap;
    min-height:42px;
    padding:8px 14px;
    border:1px solid var(--line);
    border-radius:999px;
    background:rgba(240,231,219,.05);
  }

  .rail-top{display:none;}

  .hero{
    grid-template-columns:minmax(0,1fr);
    min-height:0;
    margin-top:14px;
    border-radius:24px 18px 26px 20px / 20px 26px 18px 24px;
  }

  .hero-media{aspect-ratio:16/10;}

  .hero-copy{text-align:left;}

  .foot-cols{grid-template-columns:repeat(2,minmax(0,1fr));}

  .foot-cta{padding:20px 18px;}
}

@media (max-width:480px){
  body{font-size:16px;}

  .brand{font-size:19px;}

  .cta{padding:9px 16px;font-size:16px;}

  .cta-lg{padding:12px 24px;}

  .tiles{grid-template-columns:minmax(0,1fr);}

  .foot-cols{grid-template-columns:minmax(0,1fr);}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  .js .reveal{opacity:1;transform:none;transition:none;}
  .hero-media img{transform:none;}
  .cta,.tile{transition:none;}
}

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