/* Shared Mesheract page styles (templates/mesheract/base.html).
 * Matches the homepage (index_mesheract.html): IBM Plex Mono, all caps, the
 * sky video behind a dark scrim, outline buttons that go purple on hover,
 * the classes ledger and the arch cards. The homepage and the Founding
 * Federation page still carry their own copies of these rules. */
:root {
    --night: #0a0d18; --cream: #f3e6cf; --cream-dim: #c9bda8; --gold: #e9c27a;
    --line: rgba(243, 230, 207, .22); --card: rgba(10, 13, 24, .74);
    --purple: #9323c1; --purple-hi: #c56cf0; --purple-down: #7a1aab;
    --font: 'IBM Plex Mono', ui-monospace, monospace;
    --radius: 2px; --scrim: .45; --vignette: .5; --glass: .55; --arrow: 1.6;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--cream); background: var(--night); line-height: 1.6; font-size: 15px; text-transform: uppercase; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.label { text-transform: uppercase; letter-spacing: .2em; font-size: .74rem; }
.prose { text-transform: none; letter-spacing: .01em; }
.arr { display: inline-block; font-size: calc(1em * var(--arrow)); line-height: 0; vertical-align: -.08em; font-family: system-ui, sans-serif; letter-spacing: 0; }

/* sky */
.sky { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: linear-gradient(180deg, #0b1026, #2a2340 55%, #3a2a3a); }
.sky video, .sky img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sky::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse 75% 70% at 50% 40%, transparent 30%, rgba(0,0,0,calc(var(--vignette) * .6)) 70%, rgba(0,0,0,var(--vignette)) 100%); }
.sky::after { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(5,7,14,calc(var(--scrim) + .25)) 0%, rgba(5,7,14,calc(var(--scrim) + .05)) 30%, rgba(5,7,14,calc(var(--scrim) + .3)) 70%, rgba(5,7,14,.92) 100%); }
.top, .eyebrow, h1, .sec__head { text-shadow: 0 1px 12px rgba(0,0,0,.65); }

/* header + phone menu */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; gap: 16px; position: relative; z-index: 40; }
.brand { display: flex; gap: 14px; align-items: center; text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand span { letter-spacing: .32em; font-size: .7rem; line-height: 1.7; }
.top nav { display: flex; gap: 24px; align-items: center; }
.top nav a { text-decoration: none; letter-spacing: .2em; font-size: .68rem; opacity: .85; }
.top nav a:hover, .top nav a[aria-current] { opacity: 1; color: var(--gold); }
.navtoggle { display: none; }

/* buttons + links */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; text-decoration: none; letter-spacing: .18em;
    font: inherit; font-size: .82rem; text-transform: uppercase; padding: 16px 52px 16px 30px; border: 1px solid var(--cream); border-radius: var(--radius); color: var(--cream); cursor: pointer;
    background: rgba(8, 10, 20, var(--glass)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .18s, box-shadow .18s; }
.btn .arr { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
.btn:hover, .btn:focus-visible { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 0 18px rgba(147, 35, 193, .45); }
.btn:active { border-color: var(--purple-hi); }
.btn--small { min-height: 44px; padding: 10px 40px 10px 18px; font-size: .74rem; }
.btn--small .arr { right: 14px; }
.link { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 3px; letter-spacing: .2em; font-size: .74rem; }
.link:hover { color: var(--gold); }

/* page head */
.pagehead { padding: 48px 0 24px; }
.eyebrow { color: var(--gold); margin: 0 0 14px; }
h1 { font-weight: 400; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 18px; }
h1 em { font-style: normal; color: var(--gold); }
.lede { color: var(--cream-dim); font-size: .92rem; max-width: 40em; margin: 0 0 22px; }
.scholar { font-size: .86rem; color: var(--cream-dim); margin: 0; }
.scholar strong { color: var(--cream); font-weight: 600; }
.scholar a { color: var(--gold); }

/* sections */
.sec { padding: 56px 0; }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.sec__head h2, h2.title { font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.02em; line-height: 1.12; margin: 0; }
.panel { background: var(--card); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip { font: inherit; text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; color: var(--cream); background: rgba(8,10,20,.55); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; cursor: pointer; min-height: 36px; }
.chip:hover { border-color: var(--purple); }
.chip[aria-pressed="true"] { border-color: var(--purple-hi); background: rgba(147,35,193,.3); }
.tag { display: inline-block; font-size: .62rem; letter-spacing: .16em; padding: 2px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--cream-dim); margin: 6px 6px 0 0; }

/* ledger: the homepage classes list */
.ledger { border-top: 1px solid var(--line); }
.ledger--card { background: var(--card); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ledger__month { padding: 26px 4px 10px; color: var(--gold); border-bottom: 1px solid var(--line); }
.lrow { display: grid; grid-template-columns: 150px 1fr auto; gap: 20px; align-items: baseline; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.lrow:hover { background: rgba(243, 230, 207, .04); }
.lrow:hover h3 { color: var(--gold); }
.lrow time { font-size: .72rem; letter-spacing: .14em; color: var(--cream-dim); }
.lrow h3 { font-weight: 400; font-size: 1.35rem; margin: 0; line-height: 1.25; transition: color .15s; }
.lrow__by { font-size: .66rem; letter-spacing: .16em; color: var(--cream-dim); }
.lrow .price { font-size: .72rem; letter-spacing: .14em; color: var(--gold); white-space: nowrap; }

/* arch cards (homepage paths) */
.arches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.arch { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; padding: 0 22px 30px;
    border: 1px solid var(--line); border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; background: var(--card); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.arch:hover { border-color: var(--gold); }
.arch__window { position: relative; width: calc(100% + 44px); aspect-ratio: 1 / 1.05; margin-bottom: 22px; background: radial-gradient(60% 50% at 50% 62%, rgba(147,35,193,.55), transparent 70%), linear-gradient(180deg, #0b1026, #241a3a); }
.arch__window img, .arch__window video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arch__window video { opacity: 0; transition: opacity .6s; } .arch__window video.is-playing { opacity: 1; }
.arch__window::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,13,24,.9) 100%); }
.arch__window .fa-solid { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 2.4rem; color: var(--cream); filter: drop-shadow(0 0 14px rgba(255,255,255,.35)); z-index: 1; }
.arch__flag { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: .6rem; letter-spacing: .18em; padding: 3px 10px; border-radius: 99px; background: var(--purple); color: #fff; white-space: nowrap; }
.arch__name { letter-spacing: .28em; font-size: .82rem; margin: 0 0 12px; }
.arch__out { margin: 0 0 18px; color: var(--cream-dim); font-size: .8rem; line-height: 1.6; flex: 1; }
.arch__meta { font-size: .68rem; letter-spacing: .18em; color: var(--gold); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; }
.field label { font-size: .72rem; letter-spacing: .16em; color: var(--cream-dim); }
.field input, .field select, .field textarea { font: inherit; text-transform: none; letter-spacing: .01em; color: var(--cream); background: rgba(8,10,20,.6); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 46px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--purple-hi); box-shadow: 0 0 0 1px var(--purple); }
.field textarea { min-height: 120px; resize: vertical; }

footer.site-foot { padding: 48px 0 70px; border-top: 1px solid var(--line); margin-top: 24px; }
footer.site-foot a { margin-right: 22px; text-decoration: none; letter-spacing: .2em; font-size: .72rem; display: inline-flex; min-height: 44px; align-items: center; }
footer.site-foot a:hover { color: var(--gold); }

@media (max-width: 900px) {
    .arches { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .wrap { padding: 0 20px; }
    .top { padding: 14px 0; }
    .brand span { font-size: .62rem; letter-spacing: .26em; }
    .navtoggle { display: grid; place-items: center; width: 46px; height: 46px; margin-right: -8px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(8,10,20,.55); color: var(--cream); font-size: 1.1rem; cursor: pointer; }
    .navtoggle .fa-xmark { display: none; }
    .top.is-open .navtoggle .fa-bars { display: none; }
    .top.is-open .navtoggle .fa-xmark { display: block; }
    .top nav { display: none; position: absolute; top: 100%; left: -20px; right: -20px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px; background: rgba(6,8,16,.96); border-bottom: 1px solid var(--line); }
    .top.is-open nav { display: flex; }
    .top nav a { display: flex; align-items: center; min-height: 52px; font-size: .9rem; opacity: 1; border-bottom: 1px solid var(--line); }
    .top nav a:last-child { border-bottom: 0; }
    .pagehead { padding: 24px 0 12px; }
    h1 { font-size: 2rem; }
    .lede, .arch__out { text-transform: none; letter-spacing: .01em; font-size: .9rem; }
    .sec { padding: 40px 0; }
    .label, .link { font-size: .8rem; }
    .chip { font-size: .74rem; min-height: 44px; }
    .lrow { grid-template-columns: 1fr auto; grid-template-areas: "date price" "name name"; gap: 6px 14px; padding: 16px 4px; }
    .lrow time { grid-area: date; font-size: .8rem; }
    .lrow > div { grid-area: name; }
    .lrow .price { grid-area: price; font-size: .8rem; }
    .lrow h3 { font-size: 1rem; line-height: 1.35; letter-spacing: .02em; }
    .lrow__by { display: block; margin-top: 4px; font-size: .78rem; }
    .arches { grid-template-columns: 1fr; gap: 18px; }
    .arch__window { aspect-ratio: 16 / 9; }
    .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
