/* Five iron plates return to the anvil; the page keeps its light palette. */
.forge { --forge-gold:#d2b17b; --forge-cream:#f2e8d4; position:relative; isolation:isolate; overflow:hidden; background:linear-gradient(#f6faff,#eef5ff 70%,#f5f9ff); color:#17375d; scroll-margin-top:0; }
/* Let the previous illustration meet the same fog colour on narrow screens too. */
.home-page .hero:has(+ .forge) { background:#f6faff; }
.home-page .hero:has(+ .forge) .hero-art { -webkit-mask-image:linear-gradient(#000 calc(100% - 120px),transparent); mask-image:linear-gradient(#000 calc(100% - 120px),transparent); }
/* A static fog layer avoids rectangular backdrop-filter tiles during scrolling. */
.home-page .hero:has(+ .forge) .hero-copy::before { -webkit-backdrop-filter:none; backdrop-filter:none; }
.forge *, .forge *::before, .forge *::after { box-sizing:border-box; }
.forge__scene { position:relative; width:min(100%,1760px); margin:auto; aspect-ratio:16/10; min-height:900px; isolation:isolate; }
.forge__backdrop,.forge__backdrop img { position:absolute; inset:0; width:100%; height:100%; }
/* Fade only the illustration: the text, plates and hammer remain crisp. */
.forge__backdrop { z-index:-2; pointer-events:none; -webkit-mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent),linear-gradient(transparent,#000 17%,#000 83%,transparent); mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent),linear-gradient(transparent,#000 17%,#000 83%,transparent); -webkit-mask-composite:source-in; mask-composite:intersect; }
.forge__backdrop img { object-fit:cover; }
.forge__scene::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; background:linear-gradient(#f6faff,transparent 24%,transparent 78%,#f5f9ff),linear-gradient(90deg,#f3f8ff,transparent 10%,transparent 90%,#f3f8ff); -webkit-mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent); mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent); }
/* Continue the pale fog into the next section without a horizontal rule. */
.forge + .reorin-updates { border-top:0; background:linear-gradient(#f5f9ff,#edf3fb); }
.forge__heading { position:absolute; top:4%; left:20px; right:20px; text-align:center; }
.forge .forge__eyebrow { display:flex; justify-content:center; align-items:center; gap:17px; margin:0 0 10px; font:600 .8125rem/1.5 var(--sans); letter-spacing:.22em; color:#8b6a34; }
.forge__eyebrow span { width:55px; height:1px; background:linear-gradient(90deg,transparent,#ac8d54a6); }
.forge__eyebrow span:last-child { transform:scaleX(-1); }
.forge #forge-title { margin:0; color:#16375c; font:600 clamp(42px,4.7vw,78px)/1.05 var(--sans); letter-spacing:-.025em; text-shadow:0 1px 12px #ffffffa6; }
.forge .forge__intro { margin:14px 0 0; color:#506b89; font:400 1rem/1.65 var(--sans); }
.forge__plates { position:absolute; left:21%; right:10%; top:29%; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:24px; }
.forge .forge-plate { --angle:-4deg; --plate-height:clamp(188px,13vw,230px); position:relative; grid-column:span 2; min-width:0; height:var(--plate-height); padding:0; border:0; background:none; color:var(--forge-cream); font-family:var(--sans); text-align:center; cursor:pointer; perspective:1100px; -webkit-tap-highlight-color:transparent; transform:rotate(var(--angle)); outline-offset:8px; }
.forge-plate:nth-child(2) { --angle:3deg; translate:0 -8px; }
.forge-plate:nth-child(3) { --angle:-2deg; }
.forge-plate:nth-child(4) { --angle:2deg; grid-column:2/span 2; }
.forge-plate:nth-child(5) { --angle:-4deg; grid-column:4/span 2; }
.forge-plate__turn { display:block; position:relative; height:100%; width:100%; transform-style:preserve-3d; transition:transform 340ms cubic-bezier(.2,.7,.2,1); }
.forge-plate.is-open { z-index:3; }
.forge-plate.is-open .forge-plate__turn { transform:rotateX(180deg); }
.forge-plate.is-struck .forge-plate__turn { transition:none; }
.forge-plate__face { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:18px 16px; border:1px solid #899397; border-radius:5px 9px 4px 7px; background:repeating-linear-gradient(112deg,transparent 0 22px,#ffffff04 23px,transparent 24px 43px),radial-gradient(ellipse at 25% 10%,#7e858a55,transparent 65%),linear-gradient(145deg,#46515a,#303b46 35%,#212d38 80%,#36414b); box-shadow:inset 0 1px 0 #e4e3d059,inset 0 0 0 4px #17222c,inset 0 0 0 5px #bdac8545,1px 5px 0 #111923,2px 6px 0 #65645b,3px 13px 18px #12253a69; backface-visibility:hidden; -webkit-backface-visibility:hidden; }
.forge-plate__face::before { content:""; position:absolute; inset:10px; border:1px solid #d0b17b38; border-radius:2px; pointer-events:none; }
.forge-plate__front::after { content:""; position:absolute; inset:0; border-radius:inherit; background:radial-gradient(ellipse at 50% 100%,#ff8a2a26,transparent 65%); opacity:0; transition:opacity 150ms; pointer-events:none; }
.forge-plate:hover .forge-plate__front::after,.forge-plate:focus-visible .forge-plate__front::after,.forge-plate.is-pending .forge-plate__front::after { opacity:1; }
.forge-plate:hover .forge-plate__front,.forge-plate.is-pending .forge-plate__front { border-color:#dfc18c; }
.forge-plate:focus-visible { outline:3px solid #286abc; }
.forge-plate__rivet { position:absolute; width:5px; height:5px; border-radius:50%; background:#b0a68d; top:14px; left:14px; box-shadow:1px 1px 2px #000; }
.forge-plate__crest { width:40px; height:40px; color:var(--forge-gold); filter:drop-shadow(0 2px 1px #0008); margin-bottom:6px; flex-shrink:0; }
.forge-plate__label { display:none; color:#cfc0a0; font-size:.75rem; letter-spacing:.11em; font-weight:500; }
.forge-plate__question { margin:8px 0 10px; font:600 clamp(28px,2.4vw,40px)/1.0 var(--sans); color:#f3e6cf; text-shadow:0 2px 2px #000; }
.forge-plate__hint,.forge-plate__close { color:#d0c1a7; font-size:.75rem; }
.forge-plate__stamp { position:absolute; right:15px; top:12px; width:24px; height:25px; display:grid; place-items:center; border:1px solid #d0a868; color:#d0a868; font:500 18px/1 var(--sans); transform:rotate(12deg); opacity:0; }
.forge-plate.is-read .forge-plate__stamp { opacity:.85; }
.forge-plate__back { inset:50% -12px auto; min-height:calc(100% + 110px); transform:translateY(-50%) rotateX(180deg); gap:12px; padding:22px 22px 18px; background:repeating-linear-gradient(15deg,transparent 0 37px,#d5ad7c06 38px,transparent 39px 65px),linear-gradient(140deg,#464237,#2d353b 48%,#202d37); border-color:#bca378; }
.forge-plate__answer-title { font:600 clamp(26px,2vw,34px)/1.08 var(--sans); color:#ebcf9c; }
.forge-plate__answer { font-size:1rem; line-height:1.5; color:#eee6d9; }
.forge-plate__close { margin-top:auto; padding-top:3px; }
.forge__hammer-rig { position:absolute; left:0; top:0; width:clamp(190px,23vw,360px); aspect-ratio:2/3; z-index:8; pointer-events:none; }
.forge__hammer { display:block; width:100%; height:100%; object-fit:contain; transform-origin:75% 83%; opacity:0; filter:drop-shadow(8px 12px 6px #0005); }
.forge__effects { position:absolute; inset:0; z-index:9; overflow:hidden; pointer-events:none; }
.forge__spark { position:absolute; width:3px; height:3px; border-radius:50%; background:#fff1c5; box-shadow:0 0 6px 1px #f39132; }
.forge__flash { position:absolute; width:130px; height:130px; margin:-65px; border-radius:50%; background:radial-gradient(circle,#fff3c7e6,#fca43c55 12%,#f5721d22 35%,transparent 65%); mix-blend-mode:screen; }
.forge__footer { position:absolute; left:5%; right:5%; bottom:3.2%; text-align:center; }
.forge .forge__instruction { margin:0; color:#4c6580; font:400 .875rem/1.6 var(--sans); }
/* Without JS, keep every answer readable instead of leaving decorative buttons inert. */
.forge:not(.forge--ready) .forge__scene { min-height:0; aspect-ratio:auto; padding:190px 5% 30px; }
.forge:not(.forge--ready) .forge__plates { position:relative; inset:auto; grid-template-columns:repeat(2,minmax(0,1fr)); }
.forge:not(.forge--ready) .forge-plate { height:auto; grid-column:auto; transform:none; translate:none; }
.forge:not(.forge--ready) .forge-plate__turn { transform:none; }
.forge:not(.forge--ready) .forge-plate__face { position:relative; inset:auto; transform:none; }
.forge:not(.forge--ready) .forge-plate__back { margin-top:8px; }
.forge:not(.forge--ready) .forge__footer { position:relative; margin-top:28px; }
@media(min-width:701px) and (max-width:1100px) { .forge__scene { min-height:950px; } .forge__plates { left:14%; right:7%; top:29%; gap:25px 20px; } .forge .forge-plate { --plate-height:190px; } .forge-plate__question { font-size:31px; } .forge-plate__label { letter-spacing:.05em; } .forge-plate__answer { font-size:.9375rem; line-height:1.5; } }
/* Open answers set the row height so they can be read together. */
@media(min-width:701px) {
 .forge--ready .forge__scene { aspect-ratio:auto; min-height:max(900px,min(62.5vw,1100px)); padding-block:clamp(261px,18.125vw,319px) 80px; }
 .forge--ready .forge__plates { position:relative; inset:auto; margin-inline:21% 10%; row-gap:28px; }
 .forge--ready .forge-plate.is-open { height:auto; }
 .forge--ready .forge-plate.is-open .forge-plate__turn { height:auto; }
 .forge--ready .forge-plate.is-open .forge-plate__back { position:relative; inset:auto; min-height:var(--plate-height); transform:rotateX(180deg); }
}
@media(min-width:701px) and (max-width:1100px) {
 .forge--ready .forge__scene { min-height:950px; padding-top:276px; }
 .forge--ready .forge__plates { margin-inline:14% 7%; }
}
@media(max-width:700px) {
 .forge__scene { aspect-ratio:auto; min-height:1150px; padding:0 20px; }
 .forge__backdrop img { object-position:43% center; }
 .forge__backdrop { -webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent),linear-gradient(transparent,#000 15%,#000 84%,transparent); mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent),linear-gradient(transparent,#000 15%,#000 84%,transparent); }
 .forge__heading { top:35px; left:18px; right:18px; }
 .forge .forge__eyebrow { font-size:.75rem; gap:10px; }
 .forge__eyebrow span { width:24px; }
 .forge #forge-title { font-size:clamp(38px,7vw,50px); }
 .forge .forge__intro { margin:13px auto 0; max-width:320px; font-size:.9375rem; }
 .forge__plates { left:24px; right:24px; top:380px; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 16px; }
 .forge .forge-plate { height:170px; grid-column:auto; --angle:-2deg; }
 .forge-plate:nth-child(even) { --angle:2deg; translate:0 5px; }
 .forge-plate:nth-child(5) { grid-column:1/-1; width:calc(50% - 8px); justify-self:center; }
 .forge-plate__front { padding:16px 12px; }
 .forge-plate__crest { width:34px; height:34px; margin-bottom:5px; }
 .forge-plate__label { display:none; }
 .forge-plate__question { font-size:clamp(18px,4.7vw,22px); line-height:1.15; margin:8px 0; }
 .forge-plate__hint { display:none; }
 .forge-plate__back { top:50%; bottom:auto; min-height:340px; height:auto; left:0; right:auto; width:calc(200% + 16px); padding:22px 24px 18px; }
 .forge-plate:nth-child(even) .forge-plate__back { left:auto; right:0; }
 .forge-plate:nth-child(5) .forge-plate__back { left:50%; transform:translate(-50%,-50%) rotateX(180deg); }
 .forge-plate[data-forge-plate="return"] .forge-plate__question { font-size:clamp(16px,4.4vw,20px); }
 .forge-plate__answer-title { font-size:26px; }
 .forge-plate__answer { font-size:1rem; }
 .forge__hammer-rig { width:210px; }
 .forge__footer { bottom:32px; left:24px; right:24px; }
 .forge .forge__instruction { font-size:.8125rem; }
 .forge:not(.forge--ready) .forge__scene { padding:220px 20px 25px; }
 .forge:not(.forge--ready) .forge__plates { grid-template-columns:minmax(0,1fr); }
 .forge:not(.forge--ready) .forge-plate,.forge:not(.forge--ready) .forge-plate:nth-child(5) { width:100%; }
 .forge:not(.forge--ready) .forge-plate__back { width:100%; height:auto; transform:none; }
}
@media(prefers-reduced-motion:reduce) { .forge * { transition:none; } .forge__hammer-rig,.forge__effects { display:none; } }
