:root {
  --brick: #2a2522;
  --mortar: #141110;
  --frame: #1a1310;
  --gold-1: #ffe29a;
  --gold-2: #e3a64a;
  --gold-3: #8a5a1c;
  --parch-1: #f3e2b8;
  --parch-2: #dcc18a;
  --ink: #3a2412;
  --red: #8e1d16;
  --f-goth: "UnifrakturMaguntia", serif;
  --f-cap: "Cinzel", serif;
  --f-body: "IM Fell English", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 400 1.12rem/1.65 var(--f-body); overflow-x: hidden;
  background-color: var(--mortar);
  background-image:
    radial-gradient(ellipse at 50% 0, rgba(255, 190, 80, .2), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='64'%3E%3Cg fill='%232c2623' stroke='%23131010' stroke-width='4'%3E%3Crect x='2' y='2' width='116' height='28' rx='3'/%3E%3Crect x='-58' y='34' width='116' height='28' rx='3'/%3E%3Crect x='62' y='34' width='116' height='28' rx='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100% 100%, 120px 64px;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, .6));
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h2, p { margin: 0; }

/* floating turkey fish behind everything */
.drift { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.drift img { position: absolute; width: 120px; opacity: .12; filter: sepia(.4); animation: float 22s ease-in-out infinite; }
.drift img:nth-child(1) { left: 4%; top: 12%; }
.drift img:nth-child(2) { right: 5%; top: 30%; width: 90px; animation-delay: -6s; }
.drift img:nth-child(3) { left: 8%; top: 58%; width: 80px; animation-delay: -11s; }
.drift img:nth-child(4) { right: 9%; top: 74%; width: 130px; animation-delay: -3s; }
.drift img:nth-child(5) { left: 46%; top: 88%; width: 70px; animation-delay: -15s; }
.drift img:nth-child(6) { right: 30%; top: 4%; width: 60px; animation-delay: -9s; }
@keyframes float { 0%, 100% { translate: 0 0; rotate: -4deg; } 50% { translate: 0 -24px; rotate: 4deg; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 50; transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 6px; background: var(--parch-1); color: var(--ink); border: 2px solid var(--gold-3);
  font: 700 .9rem/1.3 var(--f-cap); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* main column */
.frame { position: relative; z-index: 1; width: min(800px, 100% - 24px); margin: 24px auto 40px; padding: 8px;
  background: var(--frame); border: 3px solid #5a4636; outline: 2px solid #0b0807; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.banner { border: 2px solid #5a4636; overflow: hidden; }
.banner img { width: 100%; height: auto; }

.gothic { font-family: var(--f-goth); font-weight: 400; text-align: center; color: var(--gold-1);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #2a1708) drop-shadow(0 0 14px rgba(255, 190, 80, .25)); }

/* parchment + rods */
.scroll { position: relative; margin: 30px 34px 0; padding: 34px 40px;
  background: radial-gradient(ellipse at 50% 40%, var(--parch-1), var(--parch-2) 85%);
  box-shadow: inset 0 0 40px rgba(122, 84, 34, .45), 0 10px 26px rgba(0, 0, 0, .55); }
.scroll::before, .scroll::after { content: ""; position: absolute; left: -18px; right: -18px; height: 18px; border-radius: 9px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3)); box-shadow: 0 3px 8px rgba(0, 0, 0, .5); }
.scroll::before { top: -9px; }
.scroll::after { bottom: -9px; }
.scroll p + p { margin-top: 1em; }
.dropcap::first-letter { float: left; margin: 6px 8px 0 0; font: 400 3.6rem/.8 var(--f-goth); color: var(--red); }
.scroll em { color: var(--red); }

/* links */
.intro { padding-bottom: 34px; }
.intro > .gothic { margin: 34px 0 16px; font-size: clamp(2rem, 6vw, 2.8rem); }
.links { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; padding: 0 16px; }
.peek { position: absolute; right: -6px; bottom: -20px; width: 130px; transform: rotate(8deg); pointer-events: none; animation: bob 4s ease-in-out infinite; }
.peek img { width: 100%; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .6)) sepia(.25); }
.smoke { position: absolute; left: 2%; top: 8%; width: 22px; height: 22px; border-radius: 50%; background: rgba(230, 225, 215, .5);
  filter: blur(6px); animation: smoke 4.5s ease-out infinite; }
.smoke:nth-child(2) { animation-delay: 1.5s; }
.smoke:nth-child(3) { animation-delay: 3s; }
@keyframes smoke { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 15% { opacity: .8; } 100% { transform: translate(-30px, -90px) scale(2.4); opacity: 0; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.link-btn { display: flex; align-items: center; gap: 14px; min-width: 230px; padding: 10px 18px; text-decoration: none;
  background: linear-gradient(180deg, #3b2c22, #22180f); border: 2px solid var(--gold-3); border-radius: 4px; color: var(--gold-1);
  box-shadow: inset 0 1px 0 rgba(255, 226, 154, .2), 0 6px 14px rgba(0, 0, 0, .5); transition: transform .15s, border-color .15s; }
.link-btn:hover { transform: translateY(-2px); border-color: var(--gold-2); }
.link-btn b { font: 400 1.5rem/1 var(--f-goth); min-width: 34px; text-align: center; }
.link-btn span { display: flex; flex-direction: column; font: 700 .95rem/1.2 var(--f-cap); }
.link-btn small { font: italic .82rem/1.3 var(--f-body); color: rgba(255, 226, 154, .65); }

.ca { display: flex; align-items: center; gap: 12px; width: calc(100% - 68px); max-width: 560px; margin: 22px auto 0; padding: 10px 14px;
  background: rgba(0, 0, 0, .35); border: 1px solid #5a4636; border-radius: 4px; color: var(--gold-1); cursor: pointer; font: inherit; text-align: left; }
.ca-label { font: 700 .75rem/1 var(--f-cap); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); }
.ca code { flex: 1; min-width: 0; font: .9rem/1.3 ui-monospace, Consolas, monospace; color: var(--parch-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca.empty code { font: italic 1rem/1.3 var(--f-body); color: rgba(243, 226, 184, .6); }
.ca-copy { font: 700 .75rem/1 var(--f-cap); padding: 7px 10px; border: 1px solid var(--gold-3); border-radius: 3px; }
.ca.empty .ca-copy { opacity: .4; }

/* testament */
.testament { padding: 0 0 30px; background: linear-gradient(180deg, #120d0a, #1a1310); border-top: 2px solid #5a4636; }
.plaque { margin: 0 0 6px; padding: 14px 10px 8px; background: linear-gradient(180deg, #4a3423, #2b1d13); border-bottom: 2px solid var(--gold-3); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.plaque .gothic { font-size: clamp(2.1rem, 6.5vw, 3rem); }
.sub { margin: 16px 0 26px; text-align: center; font: italic 1.1rem/1.3 var(--f-body); color: var(--parch-1); }

.commandments { list-style: none; margin: 0; padding: 0 30px; display: grid; gap: 34px; }
.commandments li { position: relative; padding: 26px 40px 32px; text-align: center;
  background: radial-gradient(ellipse at 50% 35%, #e9d3a1, #c9a86a 90%);
  box-shadow: inset 0 0 36px rgba(92, 60, 22, .55);
  clip-path: polygon(0 0, 100% 0, 100% 94%, 92% 100%, 80% 95%, 66% 100%, 50% 96%, 36% 100%, 20% 95%, 8% 100%, 0 95%); }
.commandments li::before, .commandments li::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14px;
  background: linear-gradient(90deg, var(--gold-3), #c47e33 40%, var(--gold-3)); }
.commandments li::before { left: 0; }
.commandments li::after { right: 0; }
.roman { position: absolute; left: 30px; top: 16px; font: 700 1rem/1 var(--f-cap); color: var(--ink); }
.commandments p { font: 700 1rem/1.5 var(--f-cap); letter-spacing: .02em; text-transform: uppercase; color: #3b240f; max-width: 34rem; margin: 10px auto 0; }

/* footer */
.foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px 22px; border-top: 2px solid #5a4636; }
.foot img { border-radius: 50%; border: 2px solid var(--gold-3); }
.foot .gothic { font-size: 1.7rem; }
.foot small { font-style: italic; color: rgba(243, 226, 184, .55); }

@media (max-width: 600px) {
  body { font-size: 1.02rem; }
  .frame { width: calc(100% - 16px); margin: 8px auto 24px; padding: 5px; }
  .scroll { margin: 24px 18px 0; padding: 24px 20px; }
  .commandments { padding: 0 12px; gap: 26px; }
  .commandments li { padding: 34px 26px 32px; }
  .commandments p { font-size: .86rem; }
  .link-btn { min-width: 0; width: 100%; }
  .peek { width: 86px; right: 0; bottom: auto; top: -64px; }
  .seal { width: 54px; height: 54px; font-size: 1.6rem; left: -10px; bottom: -22px; }
  .ca { width: calc(100% - 32px); }
  .drift img { width: 70px; }
}
/* =========== OLDE & WITHERED =========== */
/* whole column: soft focus + faded print, like the pfp and banner */
.frame { filter: blur(.45px) sepia(.18) saturate(.88) contrast(1.06); }
.banner img { filter: sepia(.15) contrast(1.05); }
.banner { position: relative; }
.banner::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(30, 15, 5, .75); background: radial-gradient(ellipse at center, transparent 55%, rgba(40, 20, 5, .35)); }

/* film grain over everything */
.grain { position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .3 0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* dust specks + old film scratches */
.dust { position: fixed; inset: 0; z-index: 41; pointer-events: none; opacity: .35; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cg fill='%23e8dcc4'%3E%3Ccircle cx='40' cy='80' r='1.4'/%3E%3Ccircle cx='310' cy='40' r='1'/%3E%3Ccircle cx='520' cy='210' r='1.8'/%3E%3Ccircle cx='150' cy='390' r='1.1'/%3E%3Ccircle cx='430' cy='470' r='1.5'/%3E%3Ccircle cx='260' cy='560' r='.9'/%3E%3Ccircle cx='80' cy='520' r='1.3'/%3E%3Ccircle cx='560' cy='560' r='1'/%3E%3C/g%3E%3C/svg%3E"); }
@keyframes dust { 0% { background-position: 0 0; } 50% { background-position: 37px -61px; } 100% { background-position: -23px 14px; } }

/* candlelight flicker on the wall */
body::before { animation: candle 3.2s ease-in-out infinite; }
@keyframes candle { 0%, 100% { opacity: 1; } 22% { opacity: .82; } 31% { opacity: .96; } 58% { opacity: .78; } 70% { opacity: .92; } }

/* withered parchment: stains, foxing, burnt edges, ragged outline */
.scroll, .commandments li {
  background:
    radial-gradient(circle at 18% 22%, rgba(120, 70, 20, .18) 0 7%, transparent 8%),
    radial-gradient(circle at 18% 22%, transparent 9%, rgba(110, 65, 20, .14) 10%, transparent 12%),
    radial-gradient(ellipse at 82% 70%, rgba(95, 55, 15, .2), transparent 22%),
    radial-gradient(ellipse at 60% 15%, rgba(130, 80, 25, .12), transparent 18%),
    radial-gradient(circle at 35% 85%, rgba(90, 50, 15, .16), transparent 10%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.02 .06' numOctaves='4'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .12 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 40%, #f0dcab, #cfae6e 80%, #a9803f 100%);
  box-shadow: inset 0 0 30px rgba(70, 35, 8, .7), inset 0 0 90px rgba(120, 70, 20, .35), 0 10px 26px rgba(0, 0, 0, .55); }
.scroll { filter: url(#rough); }
.scroll p, .commandments p { color: #3a210c; text-shadow: 0 0 1px rgba(58, 33, 12, .45), 0 0 4px rgba(90, 50, 15, .2); }
.scroll::before, .scroll::after { filter: none; background: linear-gradient(180deg, #e9c77d, #b07a32 45%, #5e3a12); }
.burn { position: absolute; right: -2px; top: -2px; width: 90px; height: 70px; pointer-events: none;
  background: radial-gradient(ellipse at 100% 0, #1a1310 30%, rgba(60, 25, 5, .9) 42%, rgba(120, 60, 10, .4) 55%, transparent 68%); }

/* wax seal */
.seal { position: absolute; left: -16px; bottom: -26px; width: 70px; height: 70px; display: grid; place-items: center; border-radius: 47% 53% 50% 46%;
  background: radial-gradient(circle at 35% 30%, #c8392e, #8e1d16 55%, #561009);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .55), inset 0 0 0 6px rgba(80, 10, 5, .45), inset 0 -4px 8px rgba(0, 0, 0, .35);
  font: 400 2.1rem/1 var(--f-goth); color: rgba(60, 8, 4, .8); text-shadow: 0 1px 0 rgba(255, 140, 120, .35); transform: rotate(-12deg); z-index: 2; }

/* commandment cards: hung slightly crooked, each one a bit different */
.commandments li { filter: url(#rough); }
.commandments li:nth-child(odd) { transform: rotate(-.6deg); }
.commandments li:nth-child(even) { transform: rotate(.5deg) translateX(4px); }
.commandments li:nth-child(3n) { background-position: 40px 20px, 0 0, 0 0, 0 0, 0 0, 120px 60px, 0 0; }

/* worn gold: duller, rubbed */
.gothic { filter: drop-shadow(0 2px 0 #2a1708) drop-shadow(0 0 10px rgba(255, 170, 60, .2)) url(#inkbleed); }
.link-btn { background: linear-gradient(180deg, #3b2c22, #1d140d); border-color: #6e4818; }
.foot img { filter: sepia(.25); }

/* =========== THE WALL =========== */
body {
  background-color: #100c0a;
  background-image:
    radial-gradient(ellipse at 50% 0, rgba(255, 170, 70, .16), transparent 55%),
    linear-gradient(rgba(10, 6, 4, .25), rgba(10, 6, 4, .45)),
    url("img/bricks.jpg");
  background-size: 100% 100%, 100% 100%, 480px 384px;
  background-attachment: scroll;
}
.wall { position: absolute; left: 0; right: 0; top: 0; height: 100%; min-height: 100vh; z-index: 0; pointer-events: none; filter: blur(.5px) sepia(.2); }
html, body { position: relative; }

/* torches with flicker and warm light on the bricks */
.torch { position: absolute; top: 230px; width: 40px; height: 120px; }
.torch-l { left: calc(50% - 400px - 110px); }
.torch-r { right: calc(50% - 400px - 110px); top: 820px; }
.torch .stick { position: absolute; left: 14px; top: 40px; width: 12px; height: 76px; border-radius: 3px;
  background: linear-gradient(90deg, #2b1a0e, #5a3a1c 50%, #24160c); box-shadow: 0 6px 10px rgba(0, 0, 0, .6); }
.torch .stick::after { content: ""; position: absolute; left: -10px; top: 46px; width: 32px; height: 9px; border-radius: 3px; background: #2a2420; box-shadow: inset 0 1px 0 #4a403a; }
.torch .flame { position: absolute; left: 6px; top: 0; width: 28px; height: 46px; border-radius: 50% 50% 40% 40% / 65% 65% 35% 35%;
  background: radial-gradient(ellipse at 50% 75%, #fff6c8 0 18%, #ffc04a 38%, #ff7a1a 62%, rgba(200, 50, 10, 0) 75%);
  filter: blur(1.5px); transform-origin: 50% 90%; animation: flame .35s ease-in-out infinite alternate; }
.torch .glow { position: absolute; left: 50%; top: 20px; width: 520px; height: 520px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 150, 50, .28), rgba(255, 120, 30, .08) 40%, transparent 68%); mix-blend-mode: screen; animation: glow 2.4s ease-in-out infinite; }
@keyframes flame { 0% { transform: scale(1, 1) rotate(-2deg); } 100% { transform: scale(.92, 1.08) rotate(3deg); } }
@keyframes glow { 0%, 100% { opacity: 1; } 30% { opacity: .75; } 55% { opacity: .95; } 80% { opacity: .7; } }

/* posters nailed to the wall */
.wanted, .nailed { position: absolute; padding: 14px 14px 16px; text-align: center; color: #3a210c;
  background:
    radial-gradient(circle at 70% 80%, rgba(110, 65, 20, .25), transparent 22%),
    radial-gradient(ellipse at 50% 40%, #e6cf9c, #c09a58 85%, #8f6a30);
  box-shadow: inset 0 0 26px rgba(70, 35, 8, .7), 6px 10px 18px rgba(0, 0, 0, .6); filter: url(#rough); }
.wanted::before, .nailed::before { content: ""; position: absolute; left: 50%; top: 7px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9a948c, #3a3430); box-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.wanted { left: calc(50% - 400px - 215px); top: 470px; width: 180px; transform: rotate(-4deg); }
.wanted b { display: block; margin-top: 8px; font: 400 2.3rem/1 var(--f-goth); color: #5a1a10; }
.wanted img { width: 120px; height: 120px; margin: 10px auto; border: 3px solid #3a210c; filter: sepia(.6) contrast(1.1) blur(.4px); }
.wanted span { display: block; font: 700 .72rem/1.3 var(--f-cap); text-transform: uppercase; }
.wanted em { display: block; margin-top: 6px; font: italic 1rem/1.2 var(--f-body); }
.nailed { right: calc(50% - 400px - 200px); top: 360px; width: 160px; transform: rotate(5deg); }
.nailed b { display: block; margin-top: 8px; font: 400 1.8rem/1 var(--f-goth); color: #5a1a10; }
.nailed span { display: block; margin-top: 6px; font: italic .95rem/1.35 var(--f-body); }

/* things scratched into the bricks */
.carve { position: absolute; font: 700 1.2rem/1.15 var(--f-cap); letter-spacing: .1em; color: rgba(8, 5, 3, .9);
  text-shadow: 0 1px 0 rgba(190, 140, 100, .55), 0 -1px 0 rgba(0, 0, 0, .7); }
.carve-r { right: calc(50% - 400px - 175px); top: 1250px; transform: rotate(-7deg); font-size: 1.5rem; }
.carve-l { left: calc(50% - 400px - 175px); top: 1500px; transform: rotate(4deg); }
.tally { position: absolute; left: calc(50% - 400px - 160px); top: 1900px; font: 700 1.6rem/1 serif; letter-spacing: .15em; color: rgba(10, 6, 4, .7);
  text-shadow: 0 1px 0 rgba(160, 110, 80, .35); transform: rotate(-3deg); }

/* cobwebs in the top corners */
.web { position: absolute; top: 0; width: 180px; height: 180px; opacity: .3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 180' fill='none' stroke='%23d8d0c4' stroke-width='.8'%3E%3Cpath d='M0 0L180 40M0 0L150 110M0 0L90 170M0 0L30 180'/%3E%3Cpath d='M40 9Q34 20 33 36Q22 44 9 41M80 18Q66 42 67 72Q44 90 18 82M120 27Q100 64 100 108Q66 132 27 122M160 36Q132 86 133 144Q90 172 36 164'/%3E%3C/svg%3E") no-repeat; }
.web-l { left: 0; }
.web-r { right: 0; transform: scaleX(-1); }

/* no gutter room on smaller screens: keep only the bricks and cobwebs */
@media (max-width: 1240px) { .wanted, .nailed, .carve, .tally { display: none; } }
@media (max-width: 1060px) { .torch { display: none; } }
@media (max-width: 600px) { .web { width: 110px; height: 110px; background-size: contain; } }

@media (prefers-reduced-motion: reduce) {
  .drift img, .grain, .dust, body::before, .peek, .smoke, .torch .flame, .torch .glow { animation: none; }
}
