/* Sorcerers Unleashed — site appearance
   Colors and spacing: :root. Gallery: .artwork-slot and .gallery-image. */

/* OD-LAYOUT-PRIMITIVES v1 — structure only: display, flex/grid, overflow, wrapping, ratio.
   Put this @layer first; product CSS outside the layer always wins. */
@layer od-layout {
  :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }
  .od-stack { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
  .od-row { display: flex; align-items: center; gap: var(--od-gap, 8px); }
  .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
  .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
  .od-fill { flex: 1 1 0; min-width: 0; }
  .od-fixed { flex: none; }
  .od-grid { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }
  .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
  :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
  .od-tile { display: grid; grid-template-rows: auto 1fr; }
  :where(.od-tile) > :where(*) { display: block; }
  .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
  .od-media-cover { object-fit: cover; }
  .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .od-clamp-2 { -webkit-line-clamp: 2; }
  .od-clamp-3 { -webkit-line-clamp: 3; }
  .od-lines-2 { min-height: calc(2 * 1.4em); }
  .od-nowrap { white-space: nowrap; }
  .od-keep { word-break: keep-all; overflow-wrap: anywhere; }
  .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
  .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
  .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
  .od-rail::-webkit-scrollbar { display: none; }
  :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
  :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }
  .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
  .od-touch { min-width: 44px; min-height: 44px; }
}
/* /OD-LAYOUT-PRIMITIVES v1 */


/* Design tokens: colors, type, spacing */
:root {
  color-scheme: dark;
  --bg: #101112; --surface: #1a1c1e; --text: #f5f5f5; --muted: #b4b8bc;
  --accent: #ff786f; --primary: #f45d52; --ink: #101112; --rule: #383c40; --focus: #fff;
  --display: Impact, Haettenschweiler, sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hero-size: clamp(56px, 8vw, 128px); --section-size: clamp(32px, 4vw, 64px);
  --name-size: 24px; --body-size: 16px; --lead-size: 20px; --body-leading: 1.6;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px;
  --s6: 48px; --s7: 64px; --s8: 96px; --radius: 4px;
  --gutter: clamp(32px, 5vw, 96px); --max-width: 1280px;
  --enter: 180ms; --exit: 120ms; --od-gap: var(--s3);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--s8); }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--body-size)/var(--body-leading) var(--body); }
h1,h2,h3,h4,p,blockquote,figure { margin: 0; }
h1,h2,h3 { text-wrap: balance; }
p { max-width: 65ch; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: var(--s1); }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border-radius: var(--radius); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--s1); }
[hidden] { display: none !important; }
svg { display: block; flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(calc(100% - var(--gutter) * 2), var(--max-width)); margin-inline: auto; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.eyebrow { font-size: var(--body-size); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .015em; line-height: 1.05; }
.skip { display: block; position: fixed; top: var(--s3); left: var(--s3); padding: var(--s3); background: var(--text); color: var(--ink); z-index: 20; transform: translateY(-180%); }
.skip:focus { transform: translateY(0); }
.progress { position: fixed; z-index: 15; top: 0; left: 0; display: block; width: 100%; height: var(--s1); background: var(--primary); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* Header and navigation */
.site-header { position: sticky; z-index: 10; top: 0; background: var(--bg); border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 88px; padding-block: var(--s3); --od-gap: var(--s6); }
.wordmark { display: grid; gap: 0; font: 400 var(--name-size)/1.05 var(--display); letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.wordmark span { display: block; }
.wordmark span:last-child { color: var(--accent); }
.site-nav { margin-left: auto; --od-gap: var(--s5); }
.site-nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 550; }
.site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.site-nav .nav-download { gap: var(--s2); border: 1px solid var(--rule); padding: var(--s2) var(--s3); }
.menu-button { display: none; min-height: 44px; gap: var(--s2); align-items: center; background: transparent; border: 1px solid var(--rule); padding: var(--s2) var(--s3); }

/* Hero and links */
.hero { padding-block: var(--s8) var(--s6); }
.hero-label { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); }
.hero-label::before { content: ""; display: block; width: var(--s5); height: var(--s1); background: var(--primary); }
.hero-layout { --od-cols: 2; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); --od-gap: var(--s6); align-items: end; }
.hero h1 { font-size: var(--hero-size); }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--accent); }
.hero-copy { --od-gap: var(--s5); padding-bottom: var(--s2); }
.hero-tagline { font-size: var(--lead-size); color: var(--muted); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: var(--s3); min-height: 56px; width: fit-content; max-width: 100%; padding: var(--s3) var(--s4); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; font-weight: 700; background: transparent; }
.button.primary { background: var(--primary); color: var(--ink); border-color: var(--primary); }
.action-links { --od-gap: var(--s3); }
.text-action { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 48px; padding-block: var(--s2); border-bottom: 1px solid var(--rule); font-weight: 600; text-decoration: none; }
.hero-bottom { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--rule); justify-content: space-between; --od-gap: var(--s4); }
.social-links { --od-gap: var(--s4); }
.social-links a { display: flex; align-items: center; gap: var(--s2); min-height: 44px; text-decoration: none; }
.social-links svg { width: 16px; height: 16px; }
.development { gap: var(--s2); }
.development::before { content: ""; display: block; width: var(--s2); height: var(--s2); background: var(--accent); }

/* Gallery and image frames */
.gallery-section { padding-bottom: var(--s8); }
.gallery-grid { --od-cols: 3; --od-gap: var(--s4); }
.gallery-card { display: grid; text-align: left; border: 0; border-radius: 0; padding: 0; background: transparent; min-width: 0; width: 100%; }
/* Image frames keep the layout steady while artwork loads. */
.artwork-slot { display: grid; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; background: var(--surface); }
.artwork-slot .art-panel { min-height: 0; height: 100%; }
.gallery-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; border: 1px solid var(--rule); }
.dialog-stage .artwork-slot { aspect-ratio: auto; height: min(50vh, 500px); }
.dialog-stage .artwork-slot .art-panel { min-height: 0; }
.art-panel { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s4); width: 100%; min-height: 280px; padding: var(--s4); background: var(--surface); border: 1px solid var(--rule); position: relative; }
.art-panel::after { content: ""; position: absolute; right: var(--s4); bottom: var(--s4); width: var(--s5); height: var(--s5); border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); pointer-events: none; }
.art-top { justify-content: space-between; --od-gap: var(--s3); }
.art-number { display: block; font: 400 clamp(64px, 7vw, 96px)/1 var(--display); color: var(--muted); }
.art-label { display: block; max-width: calc(100% - var(--s6)); font-weight: 550; color: var(--muted); }
.gallery-card:nth-child(2) .art-panel { background: var(--bg); }
.gallery-card:nth-child(3) .art-panel .art-number { color: var(--accent); }
.gallery-caption { --od-gap: var(--s2); padding-top: var(--s3); }
.gallery-title { font: 400 var(--name-size)/1.2 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.gallery-desc { color: var(--muted); }
.gallery-tag { color: var(--accent); }

/* Sections and team cards */
.section { padding-block: var(--s8); border-top: 1px solid var(--rule); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: end; margin-bottom: var(--s6); }
.section-title { font-size: var(--section-size); }
.section-subtitle { color: var(--muted); max-width: 48ch; }
.spotlight-section { background: var(--surface); }
.spotlight { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); --od-gap: var(--s7); align-items: center; }
.spotlight-person { --od-gap: var(--s4); }
.initials { display: flex; align-items: center; justify-content: center; width: var(--s7); min-height: var(--s7); border: 1px solid var(--rule); font: 400 var(--name-size)/1 var(--display); color: var(--muted); background: var(--bg); flex: none; }
.initials img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.initials.large { width: var(--s8); min-height: var(--s8); font-size: var(--section-size); color: var(--accent); }
.person-info { --od-gap: var(--s2); }
.spotlight-name { font-size: clamp(32px, 4vw, 64px); }
.person-role { color: var(--accent); font-weight: 600; }
.quote { font-size: clamp(24px, 2.8vw, 40px); line-height: 1.4; font-weight: 450; text-wrap: pretty; }
.spotlight-meta { margin-top: var(--s4); color: var(--muted); }
.team-grid { --od-cols: 3; --od-gap: var(--s5); }
.member { --od-gap: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--rule); align-content: start; }
.member-top { justify-content: space-between; align-items: start; --od-gap: var(--s3); }
.member .person-info { --od-gap: var(--s2); }
.member-name { font-size: var(--name-size); font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.member-role { color: var(--accent); }
.member-desc { color: var(--muted); overflow-wrap: anywhere; }
.recognition { font-size: var(--body-size); line-height: 1.5; font-weight: 600; color: var(--accent); }
.higher-grid { --od-cols: 2; --od-gap: var(--s6); }
.higher-grid .member { flex-direction: row; align-items: start; }
.higher-grid .member-main { --od-gap: var(--s3); }
.empty-section { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); --od-gap: var(--s6); align-items: start; }
.empty-copy { border-top: 1px solid var(--rule); padding-top: var(--s4); color: var(--muted); }
.empty-heading { --od-gap: var(--s3); }

/* Footer and secondary pages */
.site-footer { padding-block: var(--s6); border-top: 1px solid var(--rule); }
.footer-inner { justify-content: space-between; align-items: start; --od-gap: var(--s5); }
.footer-copy { --od-gap: var(--s3); }
.footer-links { --od-gap: var(--s4); }
.footer-links a { display: flex; min-height: 44px; align-items: center; }
.subpage { padding-block: var(--s8); min-height: 65vh; }
.subpage-layout { grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); --od-gap: var(--s7); }
.subpage-side { --od-gap: var(--s4); align-items: start; }
.subpage-number { font-size: var(--hero-size); color: var(--accent); }
.subpage-body { --od-gap: var(--s5); align-items: start; }
.subpage-title { font-size: var(--section-size); }
.subpage-desc { font-size: var(--lead-size); color: var(--muted); max-width: 55ch; }
.subpage-actions { --od-gap: var(--s3); }

/* Full-size image dialog */
dialog { color: var(--text); width: min(960px, calc(100% - var(--s6))); max-height: calc(100dvh - var(--s6)); margin: auto; padding: var(--s4); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); overflow-y: auto; }
dialog::backdrop { background: rgb(0 0 0 / .88); }
dialog[open] { animation: dialog-enter var(--enter) ease-out; }
.dialog-layout { --od-gap: var(--s4); }
.dialog-toolbar { justify-content: space-between; --od-gap: var(--s3); }
.icon-button { display: flex; align-items: center; justify-content: center; width: 48px; min-height: 48px; padding: var(--s2); background: transparent; border: 1px solid var(--rule); }
.dialog-stage .art-panel { min-height: clamp(240px, 40vh, 400px); }
.dialog-stage .art-number { font-size: clamp(96px, 14vw, 192px); }
.dialog-title { font-size: var(--section-size); }
.dialog-info { --od-gap: var(--s2); }
.dialog-controls { --od-gap: var(--s3); justify-content: space-between; padding-top: var(--s3); border-top: 1px solid var(--rule); }
.dialog-tabs { --od-gap: var(--s2); flex: 1 1 auto; }
.dialog-tab { display: flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: var(--s2); background: transparent; border: 1px solid var(--rule); }
.dialog-tab[aria-current="true"] { border-color: var(--accent); color: var(--accent); text-decoration: underline; text-underline-offset: var(--s1); }
.dialog-image { max-height: 50vh; object-fit: contain; }

/* Changelogs and embedded media */
.changelog-list { --od-gap: var(--s6); }
.changelog-item { --od-gap: var(--s4); border-top: 1px solid var(--rule); padding-top: var(--s4); }
.cl-header { justify-content: space-between; --od-gap: var(--s3); }
.cl-version { font-size: var(--name-size); }
.cl-body { --od-cols: 2; --od-gap: var(--s5); }
.cl-body h4 { font-size: var(--lead-size); font-weight: 650; }
.cl-list { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.cl-list li { display: flex; gap: var(--s3); margin-bottom: var(--s2); overflow-wrap: anywhere; }
.cl-list li::before { content: "+"; color: var(--accent); font-weight: 700; }
.cl-removed li::before { content: "−"; }
.cl-media-wrapper { --od-gap: var(--s4); }
.cl-video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--rule); }
.cl-images { --od-cols: 2; --od-gap: var(--s3); }
.announcement { --od-gap: var(--s3); padding: var(--s4); background: var(--surface); border: 1px solid var(--rule); }
.announcement-content { white-space: pre-line; overflow-wrap: anywhere; }
.discord-widget { display: block; width: 100%; min-height: 400px; border: 1px solid var(--rule); }
.notice { padding: var(--s4); border-bottom: 1px solid var(--rule); color: var(--muted); }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Interaction and responsive layouts */
@media (hover: hover) {
  a:hover, .gallery-card:hover .gallery-title { color: var(--accent); }
  .button.primary:hover { color: var(--ink); outline: 2px solid var(--primary); outline-offset: var(--s1); }
  .button:not(.primary):hover, .icon-button:hover, .dialog-tab:hover { border-color: var(--accent); color: var(--accent); }
  .gallery-card:hover .art-panel { border-color: var(--accent); }
  .gallery-card .art-panel { transition: transform var(--enter) ease-out; }
  .gallery-card:hover .art-panel { transform: translateY(-4px); }
}
@media (min-width: 1440px) { .hero { padding-top: var(--s8); } .hero-layout { --od-gap: var(--s7); } }
@media (max-width: 1023px) {
  .header-inner { --od-gap: var(--s4); }
  .site-nav { --od-gap: var(--s4); }
  .hero-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); --od-gap: var(--s5); }
  .hero-tagline { font-size: var(--body-size); }
  .spotlight { --od-gap: var(--s5); }
  .art-panel { min-height: 240px; padding: var(--s3); }
  .team-grid { --od-gap: var(--s4); }
  .member-top { flex-direction: column; }
}
@media (max-width: 767px) {
  :root { --gutter: 24px; }
  .header-inner { flex-wrap: wrap; min-height: 80px; --od-gap: var(--s3); }
  .menu-button { display: flex; margin-left: auto; }
  .site-nav { width: 100%; margin-left: 0; padding-top: var(--s3); border-top: 1px solid var(--rule); flex-direction: column; align-items: stretch; --od-gap: var(--s2); }
  .site-nav a { justify-content: space-between; padding-inline: var(--s2); }
  .hero { padding-block: var(--s6) var(--s5); }
  .hero-label { font-size: var(--body-size); letter-spacing: .04em; margin-bottom: var(--s4); }
  .hero-layout { grid-template-columns: minmax(0, 1fr); --od-gap: var(--s5); }
  .hero h1 { font-size: clamp(56px, 12vw, 88px); }
  .hero-copy { --od-gap: var(--s4); }
  .hero-tagline { font-size: var(--lead-size); }
  .hero-copy .primary { width: 100%; }
  .hero-bottom { margin-top: var(--s5); --od-gap: var(--s3); align-items: start; }
  .social-links { --od-gap: var(--s4); }
  .gallery-section { padding-bottom: var(--s6); }
  .gallery-grid { --od-cols: 1; --od-gap: var(--s5); }
  .art-panel { min-height: 224px; padding: var(--s4); }
  .gallery-card .art-number { font-size: 80px; }
  .section { padding-block: var(--s6); }
  .section-heading { grid-template-columns: minmax(0, 1fr); gap: var(--s3); margin-bottom: var(--s5); }
  .spotlight { grid-template-columns: minmax(0, 1fr); --od-gap: var(--s5); }
  .spotlight-person { flex-direction: row; align-items: center; }
  .quote { font-size: 28px; }
  .team-grid, .higher-grid, .empty-section, .subpage-layout, .cl-body, .cl-images { --od-cols: 1; grid-template-columns: minmax(0, 1fr); --od-gap: var(--s5); }
  .member-top { flex-direction: row; }
  .higher-grid .member { --od-gap: var(--s3); }
  .subpage { padding-block: var(--s6); }
  .subpage-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .subpage-number { font-size: 56px; }
  .subpage-actions { width: 100%; }
  .subpage-actions .button { width: 100%; }
  .subpage-actions .primary { order: -1; }
  dialog { width: calc(100% - var(--s5)); padding: var(--s3); max-height: calc(100dvh - var(--s5)); }
  .dialog-toolbar .eyebrow { letter-spacing: .02em; }
  .dialog-controls { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; }
  .site-footer { padding-block: var(--s5); }
}
@media (max-width: 375px) {
  .hero h1 { font-size: 56px; letter-spacing: 0; }
  .spotlight-person { --od-gap: var(--s3); }
  .initials.large { width: 80px; min-height: 80px; }
  .dialog-controls { --od-gap: var(--s2); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .gallery-card:hover .art-panel { transform: none; }
}

.hero-art { margin-bottom: var(--s6); }
.hero-art img { display: block; width: 100%; height: auto; }
.gallery-grid .artwork-slot { aspect-ratio: 16 / 9; }
.printables-section { padding-bottom: var(--s6); }
.printables-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.printables-preview { margin: 0; }
.printables-preview img { display: block; width: 100%; height: auto; }
.printables-preview figcaption { margin-top: var(--s2); color: var(--muted); }
.printables-styles { display: flex; flex-wrap: wrap; gap: var(--s3); border: 1px solid var(--rule); padding: var(--s3); }
.printables-selects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.printables-selects select { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--rule); padding: var(--s2); }
.printables-actions { flex-wrap: wrap; }
#printPrintables[hidden] { display: none; }
.print-preview-frame { display: block; width: 100%; height: 75vh; margin-block: var(--s4); border: 1px solid var(--rule); }
@media (max-width: 640px) {
  .printables-layout, .printables-selects { grid-template-columns: minmax(0, 1fr); }
}
