/* ==========================================================================
   הממלכה - the public site. Dark, gilded, parchment-lit; RTL first.
   ========================================================================== */

:root {
    color-scheme: dark;
    --gold: #cfa964;
    --gold-light: #f0d9a8;
    --gold-dark: #8a6a3c;
    --parchment: #efe3c9;
    --text: #e6d9bf;
    --dim: #a9997f;
    --ink: #0b0805;
    --ink-2: #120d09;
    --panel: rgba(38, 30, 23, .78);
    --line: rgba(203, 158, 76, .26);
    --line-strong: rgba(203, 158, 76, .5);
    --red: #b45a49;
    --green: #9fae72;
    --blue: #7796a0;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23c9b58e' opacity='.05' filter='url(%23g)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
    --radius: 14px;
    --shadow: 0 18px 44px rgba(6, 4, 2, .55);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--ink);
    background-image: var(--grain);
    color: var(--text);
    font-family: 'Birzia', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: #fff0cf; }

h1, h2, h3, h4 { font-weight: 900; line-height: 1.2; color: var(--parchment); letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 6vw, 68px); }
h2 { font-size: clamp(26px, 3.6vw, 42px); }
h3 { font-size: clamp(19px, 2.2vw, 24px); }

.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.skip { position: absolute; right: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip:focus { right: 12px; top: 12px; z-index: 100; background: var(--gold); color: #1a1209; padding: 10px 16px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------- buttons -- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 28px; border-radius: 10px; border: 1px solid var(--line-strong);
    font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-gold {
    background: linear-gradient(180deg, #e5c079, #b98c40 60%, #8f6829);
    color: #22160a;
    border-color: #e8cea1;
    box-shadow: 0 10px 26px rgba(200, 150, 60, .28), inset 0 1px 0 rgba(255, 246, 219, .6);
    text-shadow: 0 1px 0 rgba(255, 240, 200, .45);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(214, 165, 74, .42), inset 0 1px 0 rgba(255, 246, 219, .7); color: #22160a; }
.btn-ghost { background: rgba(28, 22, 17, .6); color: var(--gold-light); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(48, 38, 28, .8); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 15px; border-radius: 8px; }
.btn-xl { padding: 18px 46px; font-size: clamp(18px, 2.4vw, 22px); border-radius: 12px; }

/* -------------------------------------------------------------- header -- */

.site-head {
    position: sticky; top: 0; z-index: 60;
    background: linear-gradient(180deg, rgba(10, 7, 5, .92), rgba(10, 7, 5, .68));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(203, 158, 76, .18);
    transition: background .25s ease, border-color .25s ease;
}
.site-head.is-scrolled { background: rgba(9, 6, 4, .97); border-color: var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--parchment); }
.brand img { width: auto; height: 42px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(226, 176, 80, .35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 21px; font-weight: 900; letter-spacing: .02em; }
.brand-text i { font-style: normal; font-size: 12.5px; color: var(--dim); }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a { padding: 8px 14px; border-radius: 8px; color: var(--text); font-weight: 700; font-size: 16px; }
.site-nav > a:hover { background: rgba(203, 158, 76, .12); color: var(--gold-light); }
.site-nav > a.btn { margin-inline-start: 8px; color: #22160a; border: 1px solid #f1d9a1; border-radius: 3px; box-shadow: 0 0 0 3px #2c2113, 0 0 0 4px #8c6c39; letter-spacing: .04em; }
.language-menu { position: relative; margin-inline-start: 8px; }
.language-menu summary { display: inline-flex; align-items: center; gap: 6px; min-height: 37px; padding: 7px 9px; cursor: pointer; border: 1px solid var(--line); border-radius: 9px; color: var(--gold-light); background: rgba(8, 6, 4, .52); font-size: 13px; font-weight: 700; line-height: 1; list-style: none; user-select: none; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary:hover { border-color: var(--line-strong); background: rgba(42, 31, 18, .86); }
.language-menu-caret { width: 8px; height: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); font-size: 0; line-height: 0; transform: translateY(-2px) rotate(45deg); transition: transform .18s ease; }
.language-menu[open] .language-menu-caret { transform: translateY(2px) rotate(225deg); }
.language-menu-options { position: absolute; z-index: 90; inset-inline-end: 0; top: calc(100% + 7px); display: none; min-width: 138px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 9px; background: #17100a; box-shadow: 0 14px 28px rgba(0,0,0,.5); }
.language-menu[open] .language-menu-options { display: grid; gap: 2px; }
.language-option { display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 6px; color: var(--dim); font-size: 13px; font-weight: 700; line-height: 1; }
.language-option:hover { color: var(--parchment); background: rgba(203, 158, 76, .14); }
.language-option.is-active { color: #24170a; background: linear-gradient(180deg, #e6c37c, #b98d43); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--gold-light); border-radius: 2px; }
.nav-toggle span + span { margin-top: 4px; }

@media (max-width: 880px) {
    .nav-toggle { display: block; }
    .site-nav {
        position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch;
        gap: 2px; padding: 12px 4vw 20px; background: #0a0705;
        border-bottom: 1px solid var(--line); box-shadow: 0 18px 34px rgba(0, 0, 0, .6); display: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav > a { padding: 13px 10px; font-size: 17px; }
    .site-nav > a.btn { margin: 8px 0 0; }
    .language-menu { width: calc(100% - 12px); margin: 8px 6px 0; }
    .language-menu summary { width: 100%; justify-content: center; padding: 12px; }
    .language-menu-options { position: static; margin-top: 5px; width: 100%; }
}

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

.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(70px, 12vh, 140px) 0 clamp(60px, 10vh, 110px); }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; transform: scale(1.06); filter: saturate(.92) contrast(1.04); }
.hero-fallback {
    position: absolute; inset: 0; z-index: -3;
    background:
        radial-gradient(ellipse 46% 28% at 50% 78%, rgba(255, 176, 74, .38), transparent 70%),
        radial-gradient(ellipse 90% 60% at 50% -12%, rgba(70, 96, 128, .3), transparent 70%),
        linear-gradient(180deg, #0d121b, #1a151b 42%, #2b1a12 70%, #0b0805);
}
.hero-veil {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(270deg, rgba(8, 6, 4, .94) 6%, rgba(8, 6, 4, .78) 42%, rgba(8, 6, 4, .3) 80%, rgba(8, 6, 4, .55)),
        linear-gradient(180deg, rgba(8, 6, 4, .78), rgba(8, 6, 4, .18) 34%, rgba(8, 6, 4, .92) 96%);
}
.hero-embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ember { position: absolute; bottom: -12px; width: 3px; height: 3px; border-radius: 50%; background: #ffbe6a; box-shadow: 0 0 8px #ff9d3c; opacity: 0; animation: rise linear infinite; }
@keyframes rise { 0% { opacity: 0; transform: translateY(0) } 12% { opacity: .8 } 100% { opacity: 0; transform: translateY(-88vh) translateX(var(--drift, 20px)) } }

.hero-inner { max-width: 720px; }
.hero h1 { margin-bottom: 8px; text-shadow: 0 4px 30px rgba(0, 0, 0, .8); }
.hero h1 em { font-style: normal; display: block; font-size: .46em; font-weight: 400; color: var(--gold); letter-spacing: .06em; margin-top: 10px; }
.hero-lead { font-size: clamp(17px, 2vw, 21px); color: #dccdb2; max-width: 60ch; margin: 18px 0 30px; text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-stats div b { display: block; font-size: 26px; font-weight: 900; color: var(--gold-light); }
.hero-stats div span { font-size: 14px; color: var(--dim); }

/* ------------------------------------------------------------ sections -- */

section { position: relative; }
.band { padding: clamp(56px, 9vw, 100px) 0; }
.band-alt { background: linear-gradient(180deg, rgba(24, 18, 13, .55), rgba(14, 10, 7, .8)); border-block: 1px solid rgba(203, 158, 76, .14); }

.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { display: block; color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: .16em; margin-bottom: 12px; }
.section-head p { color: var(--dim); font-size: 18px; margin-top: 14px; }

.rule { display: flex; align-items: center; gap: 14px; color: var(--gold-dark); margin: 0 0 8px; }
.rule::before, .rule::after { content: ''; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); flex: 1; }

/* --------------------------------------------------------------- cards -- */

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.card {
    position: relative; padding: 28px 26px; border-radius: var(--radius);
    background: var(--grain), linear-gradient(150deg, rgba(52, 41, 31, .9), rgba(28, 22, 17, .92));
    border: 1px solid var(--line); box-shadow: var(--shadow);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 50px rgba(6, 4, 2, .6); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--dim); font-size: 16px; }
.card .ico {
    display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px;
    border-radius: 12px; border: 1px solid var(--line-strong);
    background: radial-gradient(circle at 32% 26%, rgba(226, 182, 96, .28), rgba(24, 18, 13, .9));
    color: var(--gold-light);
}
.card .ico svg { width: 26px; height: 26px; }

a.card { display: block; color: inherit; }
a.card::after { content: '←'; position: absolute; left: 22px; bottom: 22px; color: var(--gold); opacity: 0; transform: translateX(6px); transition: .22s ease; }
a.card:hover::after { opacity: 1; transform: translateX(0); }
.card-tag { display: inline-block; margin-bottom: 12px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--gold-light); background: rgba(203, 158, 76, .14); border: 1px solid var(--line); }

/* --------------------------------------------------------- story split -- */

.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split p + p { margin-top: 16px; }
.split p { color: #cfc0a6; }
.frame {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line-strong); box-shadow: var(--shadow);
    background: linear-gradient(180deg, #1b1510, #0e0a07);
}
.frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8, 6, 4, .75)); pointer-events: none; }
.frame figcaption { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 16px 20px; font-size: 14px; color: var(--gold-light); }

.quote {
    border-inline-start: 3px solid var(--gold-dark); padding: 6px 20px; margin: 26px 0;
    color: var(--gold-light); font-size: 19px; font-style: italic;
}

/* --------------------------------------------------------------- steps -- */

.steps { counter-reset: step; display: grid; gap: 16px; }
.step {
    display: grid; grid-template-columns: 46px 1fr; gap: 18px; align-items: start;
    padding: 22px 24px; border-radius: var(--radius);
    background: linear-gradient(150deg, rgba(48, 38, 29, .7), rgba(24, 19, 14, .85));
    border: 1px solid var(--line);
}
.step::before {
    counter-increment: step; content: counter(step);
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #e6c37e, #9a7433);
    color: #1e1409; font-weight: 900; font-size: 20px;
}
.step h3 { font-size: 20px; margin-bottom: 6px; }
.step p { color: var(--dim); font-size: 16px; }

/* --------------------------------------------------------------- table -- */

.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 460px; background: rgba(24, 19, 14, .6); }
th, td { padding: 13px 18px; text-align: start; border-bottom: 1px solid rgba(203, 158, 76, .14); font-size: 16px; }
th { background: rgba(203, 158, 76, .1); color: var(--gold-light); font-weight: 700; }
tr:last-child td { border-bottom: none; }

/* ------------------------------------------------------------- article -- */

.page-head { padding: clamp(48px, 8vw, 88px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid rgba(203, 158, 76, .16); background: radial-gradient(ellipse 70% 100% at 70% 0%, rgba(120, 82, 34, .3), transparent 70%); }
.crumbs { font-size: 14px; color: var(--dim); margin-bottom: 16px; }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--gold-light); }
.crumbs span { margin: 0 8px; opacity: .5; }
.page-head p.lead { font-size: clamp(17px, 2vw, 20px); color: #d3c4aa; max-width: 68ch; margin-top: 16px; }

.prose { max-width: 78ch; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 52px; padding-top: 8px; }
.prose h3 { margin-top: 34px; }
.prose ul, .prose ol { padding-inline-start: 22px; color: #d0c1a7; }
.prose li + li { margin-top: 9px; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--parchment); }
.prose code { background: rgba(203, 158, 76, .12); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; font-size: .92em; }

.callout {
    border-radius: var(--radius); border: 1px solid var(--line-strong);
    background: linear-gradient(150deg, rgba(60, 47, 33, .7), rgba(26, 20, 15, .85));
    padding: 20px 24px;
}
.callout b { color: var(--gold-light); display: block; margin-bottom: 6px; }

.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; background: rgba(24, 19, 14, .55); }
.toc b { color: var(--gold-light); display: block; margin-bottom: 10px; }
.toc a { display: block; padding: 4px 0; color: var(--text); }
.toc a:hover { color: var(--gold-light); }

/* ----------------------------------------------------------------- faq -- */

.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(26, 20, 15, .6); overflow: hidden; }
.faq-item + .faq-item { margin-top: 12px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 700; font-size: 18px; color: var(--parchment); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--gold); font-size: 24px; line-height: 1; flex: none; }
.faq-item[open] summary::after { content: '-'; }
.faq-item p { padding: 0 24px 22px; color: var(--dim); }

/* ----------------------------------------------------------------- cta -- */

.cta-band {
    position: relative; overflow: hidden; text-align: center;
    padding: clamp(60px, 9vw, 108px) 0;
    background:
        radial-gradient(ellipse 60% 100% at 50% 100%, rgba(190, 122, 40, .3), transparent 68%),
        linear-gradient(180deg, rgba(14, 10, 7, .6), rgba(9, 6, 4, .95));
    border-block: 1px solid var(--line);
}
.cta-inner { max-width: 720px; }
.cta-inner p { color: var(--dim); font-size: 18px; margin: 16px 0 30px; }
.cta-note { font-size: 14.5px !important; color: var(--gold-dark) !important; margin: 20px 0 0 !important; }

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

.site-foot { padding: 60px 0 28px; background: linear-gradient(180deg, #0a0705, #060403); border-top: 1px solid rgba(203, 158, 76, .16); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-brand img { width: min(230px, 80%); height: auto; object-fit: contain; margin-bottom: 14px; }
.foot-brand p { font-size: 15px; }
.foot-brand .dim { color: var(--dim); margin-top: 8px; font-size: 14.5px; }
.foot-col h3 { font-size: 15px; letter-spacing: .1em; color: var(--gold); margin-bottom: 12px; }
.foot-col a { display: block; padding: 4px 0; color: var(--text); font-size: 15px; }
.foot-col a:hover { color: var(--gold-light); }
.foot-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(203, 158, 76, .14); color: var(--dim); font-size: 14px; }

/* ------------------------------------------------------------- reveals -- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .ember { display: none; }
}

/* A portrait with a transparent background needs air, not a crop. */
.frame.is-portrait { background: radial-gradient(ellipse 70% 60% at 50% 88%, rgba(190, 122, 40, .22), transparent 70%), linear-gradient(180deg, #1c1610, #0c0906); }
.frame.is-portrait img { object-fit: contain; padding: 18px 18px 0; }

/* The public kingdom: gatehouse, royal records and an inspectable armoury. */
[hidden] { display: none !important; }
#hall, #armory { scroll-margin-top: 90px; }
.portal-hero { padding: 58px 0 0; border-bottom: 3px solid #82653c; }
.portal-hero-layout { display: grid; grid-template-columns: 1.3fr .9fr; align-items: center; min-height: 600px; gap: 40px; padding-bottom: 42px; }
.portal-hero .hero-inner { min-width: 0; max-width: 660px; }

/* The painted lockup carries the name; the reserved box keeps the page still. */
.hero-logo { margin: 0; line-height: 0; }
.hero-logo img { width: min(560px, 100%); height: auto; filter: drop-shadow(0 20px 42px rgba(0, 0, 0, .8)); }
.hero-promise { margin-top: 24px; font-size: clamp(22px, 2.3vw, 31px); font-weight: 900; text-shadow: 0 3px 22px rgba(0, 0, 0, .85); }
.portal-hero .hero-lead { font-size: 19px; max-width: 43ch; line-height: 1.65; margin: 14px 0 26px; }
.portal-hero .hero-actions { gap: 24px; }
.portal-hero .btn-xl { min-height: 70px; min-width: 280px; border-radius: 3px; padding: 17px 32px; border: 2px solid #f1d9a1; box-shadow: 0 0 0 4px #2c2113, 0 0 0 5px #8c6c39, 0 8px 38px #bf8a3655; }
.portal-hero .hero-google-cta { background: linear-gradient(180deg, #fff 0%, #e9e5dd 100%); border-color: rgba(255,255,255,.86); color: #332819; box-shadow: 0 0 0 4px #2c2113, 0 0 0 5px #8c6c39, 0 8px 38px #00000070; text-shadow: none; }
.portal-hero .hero-google-cta:hover { color: #332819; background: linear-gradient(180deg, #fff 0%, #f1eee8 100%); box-shadow: 0 0 0 4px #2c2113, 0 0 0 5px #a9874d, 0 14px 38px #00000088; }
.hero-google-mark { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #4285f4; color: #fff; font-family: Arial, sans-serif; font-size: .82em; font-weight: 900; line-height: 1; }
.btn-chevron { padding-inline-start: 14px; font-size: 1.35em; line-height: 0; }
.hero-explore { font-size: 16px; border-bottom: 1px solid #cfa96488; padding: 6px 0; }
.hero-explore span { padding-inline-start: 12px; font-size: 1.3em; }
[dir="rtl"] .btn-chevron, [dir="rtl"] .hero-explore span, [dir="rtl"] .path-arrow { display: inline-block; transform: scaleX(-1); }
.hero-note { font-size: 14px; color: #c7b798; margin-top: 21px; }
.portal-hero .hero-veil { background: linear-gradient(270deg, #090805ed 0%, #090805b0 35%, #0908051f 75%), linear-gradient(0deg, #0b0906 0%, transparent 35%, #0b090660 100%); }
html[dir="ltr"] .portal-hero .hero-veil { background: linear-gradient(90deg, #090805ed 0%, #090805b0 35%, #0908051f 75%), linear-gradient(0deg, #0b0906 0%, transparent 35%, #0b090660 100%); }
.portal-hero .hero-art img { transform: none; filter: saturate(.95); }

/* The gatehouse: two painted towers holding the hero between them. */
.gate-tower { position: absolute; z-index: -1; inset-block: 0 132px; display: flex; align-items: flex-end; width: clamp(140px, 21vw, 300px); pointer-events: none;
    filter: drop-shadow(0 26px 50px rgba(0, 0, 0, .75));
    -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 96px); mask-image: linear-gradient(0deg, transparent 0, #000 96px); }
.gate-tower img { width: 100%; height: 100%; object-fit: contain; }
.gate-tower-left { left: 0; }
.gate-tower-left img { object-position: bottom left; }
.gate-tower-right { right: 0; }
.gate-tower-right img { object-position: bottom right; }

/* The hero of the game stands in the gate, lit from the kingdom behind him. */
.hero-figure { position: relative; align-self: end; justify-self: center; margin-bottom: -36px; }
.hero-figure::before { content: ''; position: absolute; z-index: -1; left: 50%; bottom: 6%; width: 118%; height: 74%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 60%, rgba(214, 156, 68, .3), rgba(150, 96, 30, .12) 45%, transparent 72%); }
.hero-figure::after { content: ''; position: absolute; left: 50%; bottom: 8px; width: 74%; height: 42px; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(6, 4, 2, .72), transparent 70%); }
.hero-figure img { width: min(412px, 100%); height: auto; margin-inline: auto; filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .7)) contrast(1.04) saturate(1.02); }

/* Three doors out of the hero, each with a window into where it leads. */
.kingdom-paths { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; position: relative; padding-bottom: 8px; }
.kingdom-paths a { position: relative; display: flex; align-items: center; padding: 14px 18px; gap: 16px; color: var(--text); background: linear-gradient(#211b14f2,#100d09f7); border: 1px solid #8b6e4266; box-shadow: 0 14px 34px #00000073; transition: transform .2s, border-color .2s, background .2s; }
.kingdom-paths a::before, .kingdom-paths a::after { content: ''; position: absolute; width: 12px; height: 12px; border: 1px solid #d3aa6688; }
.kingdom-paths a::before { top: -1px; inset-inline-start: -1px; border-width: 1px 0 0 1px; }
.kingdom-paths a::after { bottom: -1px; inset-inline-end: -1px; border-width: 0 1px 1px 0; }
html[dir="rtl"] .kingdom-paths a::before { border-width: 1px 1px 0 0; }
html[dir="rtl"] .kingdom-paths a::after { border-width: 0 0 1px 1px; }
.kingdom-paths a:hover { transform: translateY(-3px); border-color: #d3aa66; background: linear-gradient(#2a2218f2,#15110bf7); }
.path-art { flex: none; width: 94px; height: 72px; overflow: hidden; border: 1px solid #8b6e4255; background: #0a0806; }
.path-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .35s; }
.kingdom-paths a:hover .path-art img { transform: scale(1.07); }
.path-icon { color: #e0bb7a; flex: none; }
.path-icon svg { width: 26px; height: 26px; }
.path-text { min-width: 0; }
.kingdom-paths b { display: block; font-size: 17px; letter-spacing: .02em; }
.kingdom-paths small { display: block; color: #b9ab91; font-size: 13.5px; line-height: 1.4; }
.path-arrow { margin-inline-start: auto; color: var(--gold); font-size: 26px; line-height: 1; }

/* The line the kingdom signs its hero with. */
.hero-motto { width: min(1180px, 92vw); margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 4px 0 20px; color: #b49b6e; font-size: 13px; letter-spacing: .14em; }
.hero-motto::before, .hero-motto::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #8b6e42); }
.hero-motto::after { background: linear-gradient(90deg, #8b6e42, transparent); }
.hero-motto span { text-align: center; }
.hero-motto span::before { content: '\25C6\00A0\00A0'; color: #8b6e42; }
.hero-motto span::after { content: '\00A0\00A0\25C6'; color: #8b6e42; }

.world-pulse { padding: 25px 0 30px; background: #171610; border-bottom: 1px solid #52452d; }
.pulse-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.pulse-heading h2 { font-size: 18px; font-weight: 700; }
.pulse-heading > span { color: #b5b093; font-size: 13px; }
.pulse-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.pulse-stat { display: flex; gap: 16px; align-items: center; padding-inline: 24px; border-inline-start: 1px solid #76623b55; }
.pulse-stat:first-child { border: 0; padding-inline-start: 0; }
.pulse-icon svg { width: 29px; height: 29px; color: var(--gold); }
.pulse-stat b { display: block; color: #e8d6a7; font-size: 32px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pulse-stat span:not(.pulse-icon) { color: #b7af99; font-size: 14px; }
.hall-band { background: radial-gradient(ellipse at 10% 50%, #42301c30, transparent 60%), var(--grain), #10100d; overflow: hidden; }
.hall-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: start; }
.hall-intro { position: relative; padding-bottom: 200px; }
.hall-intro > p { max-width: 38ch; color: #bbb29c; margin: 18px 0 25px; font-size: 18px; }
.hall-warrior { position: absolute; bottom: -60px; inset-inline-end: -5px; width: 210px; height: 240px; object-fit: contain; opacity: .8; pointer-events: none; mask-image: linear-gradient(#000 60%, transparent); }
.royal-panel { padding: 22px; position: relative; border: 1px solid #a78a50; outline: 1px solid #564529; outline-offset: 5px; background: var(--grain), linear-gradient(135deg,#29251d,#171611); box-shadow: 0 15px 65px #0008; }
.royal-panel::before, .royal-panel::after { content: '◆'; position: absolute; color: #b4975e; font-size: 15px; top: -14px; background: #191813; padding: 0 5px; }
.royal-panel::before { left: -12px; }.royal-panel::after { right: -12px; }
.panel-ornament { display: flex; justify-content: center; align-items: center; gap: 18px; color: #a48b59; font-size: 13px; margin: 0 0 16px; }
.panel-ornament svg { width: 27px; height: 27px; }
.hall-list { list-style: none; }
.hall-hero { display: flex; align-items: center; gap: 16px; padding: 17px 8px; border-bottom: 1px solid #b69c6230; }
.hall-champion { background: linear-gradient(90deg,#a3833020,transparent); border: 1px solid #a38b4a66; padding-inline: 10px; }
.hall-rank { flex: none; width: 38px; text-align: center; color: #b59a66; font-size: 22px; }
.hall-rank svg { width: 32px; height: 32px; }
.hall-name { min-width: 0; }
.hall-name b { display: block; overflow-wrap: anywhere; color: #e9dec5; font-size: 19px; }
.hall-name span, .hall-xp span { display: block; color: #afa18a; font-size: 13px; }
.hall-xp { margin-inline-start: auto; text-align: end; flex: none; }
.hall-xp b { color: #d7bc7e; font-size: 19px; font-variant-numeric: tabular-nums; }
.hall-invitation { text-align: center; margin-top: 19px; color: #bca779; font-size: 15px; }
.portal-empty { padding: 36px 20px; color: #c2b59a; border: 1px dashed #a68b514f; text-align: center; }
.armory-band { background: var(--grain), radial-gradient(ellipse at 50% 0,#50412935,transparent 65%),#171410; border-block: 1px solid var(--line); }
.armory-band .section-head { max-width: 800px; margin-bottom: 25px; }
.armory-filter { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 15px 0 24px; font-size: 15px; color: #c5b692; }
.armory-filter select { font: inherit; padding: 10px 16px; border: 1px solid #77603c; background: #211c14; color: #f1dfba; border-radius: 2px; max-width: 100%; }
.armory-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; align-items: start; }
.armory-item { --item-color: #aca38f; border: 1px solid #5f5037; border-top: 2px solid var(--item-color); background: linear-gradient(160deg,#2e281f,#13110d); box-shadow: 0 6px 20px #0005; }
.rarity-uncommon { --item-color: #9aac76; }.rarity-rare { --item-color: #7fa9d2; }.rarity-epic { --item-color: #bc8cdb; }.rarity-legendary { --item-color: #e4b568; }
.armory-item summary { cursor: pointer; list-style: none; padding: 17px 18px 0; }
.armory-item summary::-webkit-details-marker { display: none; }
.item-rarity { color: var(--item-color); font-size: 13px; }
.item-art { display: flex; align-items: center; justify-content: center; height: 145px; margin: 8px 0 16px; background: radial-gradient(ellipse,#b98b3224,transparent 68%); }
.item-art img { height: 130px; width: 130px; object-fit: contain; filter: drop-shadow(0 9px 9px #0008); transition: transform .2s; }
.item-art > svg { width: 64px; height: 64px; color: var(--item-color); }
.armory-item summary:hover .item-art img { transform: translateY(-5px) rotate(-3deg); }
.armory-item summary > strong { display: block; font-size: 19px; line-height: 1.3; color: #ece0c7; overflow-wrap: anywhere; }
.item-level { display: block; margin: 6px 0 17px; font-size: 13px; color: #b8aa8c; }
.item-inspect { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid #5c4b30; color: var(--item-color); font-size: 14px; }
.armory-item[open] .item-inspect > span { transform: rotate(45deg); }
.item-detail { border-top: 1px solid #675532; padding: 17px; background: #0d0d0a77; }
.item-detail p { font-size: 15px; line-height: 1.6; color: #bdb29a; }
.item-detail dl { margin: 12px 0; }
.item-detail dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; }
.item-detail dd { color: #c5dba3; }
.item-detail small { color: #b1a185; font-size: 12px; }
.codex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }
.codex-entry, .codex-start { border: 1px solid #6c563744; background: var(--grain), linear-gradient(120deg,#292219,#17130f); }
.codex-entry summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 18px; padding: 22px; }
.codex-entry summary::-webkit-details-marker { display: none; }
.codex-entry svg, .codex-start svg { width: 28px; height: 28px; color: var(--gold); flex: none; }
.codex-entry h3 { font-size: 21px; }.codex-entry summary > b { margin-inline-start: auto; color: var(--gold); }
.codex-entry[open] summary > b { transform: rotate(45deg); }
.codex-entry > div { padding: 0 22px 22px; }.codex-entry p { color: #bfb097; margin-bottom: 16px; }
.codex-entry a { border-bottom: 1px solid var(--line); padding-bottom: 5px; font-size: 15px; }
.codex-start { display: flex; align-items: center; gap: 18px; padding: 22px; }.codex-start b { font-size: 20px; }.codex-start p { font-size: 14px; color: #bfb097; }
.reveal { opacity: 1; transform: none; }
@media (max-width: 1100px) {
    .site-nav > a { padding-inline: 9px; font-size: 14px; }
    .portal-hero-layout { gap: 25px; grid-template-columns: 1.5fr 1fr; }
    .hall-layout { gap: 36px; }.kingdom-paths a { padding: 12px 14px; gap: 12px; }.path-art { width: 80px; height: 64px; }
    .path-icon { display: none; }.kingdom-paths b { font-size: 16px; }
}
@media (max-width: 760px) {
    .codex-grid { grid-template-columns: 1fr; }
    .portal-hero { padding-top: 48px; }.portal-hero-layout { grid-template-columns: 1fr; min-height: 0; padding-bottom: 38px; }
    .hero-logo img { width: min(460px, 100%); }
    .portal-hero .hero-lead { font-size: 18px; }.hero-figure { display: none; }
    .portal-hero .hero-veil, html[dir="ltr"] .portal-hero .hero-veil { background: linear-gradient(0deg,#090805f2,#09080588 55%,#0908058a); }
    .gate-tower { display: none; }.kingdom-paths { grid-template-columns: 1fr; }
    .kingdom-paths a { padding: 12px 14px; gap: 13px; }.path-art { width: 76px; height: 60px; }
    .hero-motto { font-size: 11px; letter-spacing: .1em; gap: 10px; }
    .kingdom-paths b { font-size: 16px; }.path-icon svg { width: 22px; height: 22px; }
    .pulse-heading { align-items: flex-start; flex-direction: column; gap: 3px; }.pulse-grid { grid-template-columns: 1fr 1fr; gap: 23px 12px; }
    .pulse-stat { padding-inline: 0; border: 0; gap: 12px; }.pulse-stat b { font-size: 28px; }.pulse-stat span:not(.pulse-icon) { font-size: 12px; }
    .hall-layout { grid-template-columns: 1fr; gap: 25px; }.hall-intro { padding-bottom: 0; }.hall-warrior { display: none; }
    .hall-intro > p { max-width: none; }.royal-panel { margin: 5px; padding: 15px; }
    .armory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.armory-item summary { padding-inline: 12px; }
    .item-art { height: 115px; }.item-art img { width: 105px; height: 105px; }.item-detail { padding: 12px; }
    .armory-filter { justify-content: space-between; flex-wrap: wrap; }
}
@media (max-width: 400px) {
    .hero-logo img { width: 100%; }.portal-hero .btn-xl { width: 100%; font-size: 19px; padding-inline: 12px; }
    .portal-hero .hero-actions { justify-content: center; gap: 12px; }.hero-note { text-align: center; font-size: 12px; }
    .hall-hero { gap: 9px; }.hall-rank { width: 25px; }.hall-name b, .hall-xp b { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .armory-item summary:hover .item-art img { transform: none; }
}