/* Public faction homepage / command center. Colors come from brand.css tokens. */
:root { color-scheme: dark; --width: 1200px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
.page-shell { overflow-x: clip; min-height: 100vh; }
.wrap { width: min(var(--width), calc(100% - 72px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 12px 16px; border-radius: 9px; background: var(--sr-action); color: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }

.site-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 18px; min-height: 88px; padding-block: 18px; border-bottom: 1px solid var(--sr-line); }
.brand-logo-link { display: block; flex-shrink: 0; }
.brand-logo { display: block; width: 240px; height: auto; }

/* Hero: copy left, reaper right. The mascot carries the ornament; no extra glow rings. */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px; border-bottom: 1px solid var(--sr-line); }
.hero-copy { padding: 56px 0; }
.eyebrow, .overline { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .22em; color: var(--sr-accent); }
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow-line { width: 28px; height: 2px; background: var(--sr-action); }
h1 { margin: 26px 0 22px; font-size: clamp(42px, 6.3vw, 84px); line-height: 1; letter-spacing: -.05em; font-weight: 900; }
h1 em { font-style: normal; color: var(--sr-action); }
.hero-description { max-width: 500px; margin-bottom: 28px; font-size: 16px; line-height: 1.75; color: var(--sr-muted); }
.hero-actions, .join-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.primary-btn, .secondary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 14px 22px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 800; letter-spacing: .06em; transition: background .2s, border-color .2s; }
.primary-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.secondary-btn { border-color: var(--sr-line); color: var(--sr-text); background: transparent; }
.secondary-btn:hover { border-color: var(--sr-accent); color: var(--sr-text); }
.hero-note { margin: 18px 0 0; font-size: 13px; line-height: 1.6; color: var(--sr-muted); }
.hero-art { display: flex; justify-content: center; align-items: center; }
.hero-art img { display: block; width: min(100%, 440px); height: auto; filter: drop-shadow(0 18px 40px #000a); }

/* Command center tool directory */
.command { padding: 56px 0 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.section-heading h2, .join-copy h2 { margin: 10px 0 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.035em; font-weight: 850; }
.section-heading > p { max-width: 380px; margin: 0; font-size: 14px; line-height: 1.7; color: var(--sr-muted); }
.period { color: var(--sr-action); }
.group-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 30px 0 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.group-title small { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--sr-muted); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 196px; padding: 22px; border: 1px solid var(--sr-line); border-radius: 14px; background: var(--sr-surface); transition: border-color .2s, transform .2s; }
.tool-card:hover { border-color: var(--sr-accent); transform: translateY(-2px); }
.tool-card.featured { border-color: #6b1d27; background: linear-gradient(150deg, #241117, var(--sr-surface) 60%); }
.tool-card.featured::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; border-radius: 14px 14px 0 0; background: var(--sr-action); }
.tool-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #7a1f2a; border-radius: 12px; background: var(--sr-tint); color: var(--sr-accent); }
.tool-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-body { display: flex; flex-direction: column; gap: 6px; }
.tool-body strong { font-size: 18px; color: var(--sr-text); }
.tool-body span { font-size: 14px; line-height: 1.6; color: var(--sr-muted); }
.access { position: absolute; top: 22px; right: 22px; padding: 5px 10px; border: 1px solid var(--sr-line); border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sr-text); }
.access.members { border-color: #7a1f2a; color: var(--sr-accent); }

.access.owner { color: var(--sr-warning); border-color: #7c6544; }
.tool-grid.compact .tool-card { min-height: 0; flex-direction: row; align-items: flex-start; padding: 18px 20px; }
.tool-grid.compact .tool-icon { flex-shrink: 0; width: 40px; height: 40px; }
.tool-grid.compact .tool-body { padding-right: 96px; }
.tool-grid.compact .tool-body strong { font-size: 16px; }
.tool-grid.compact .access { top: 18px; right: 18px; }
.access-note { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: var(--sr-muted); }

/* Recruitment block with the raccoon mascot */
.join { display: grid; grid-template-columns: 300px 1fr; align-items: center; gap: 40px; margin-top: 48px; padding: 40px 0 56px; border-top: 1px solid var(--sr-line); }
.join-art { display: block; width: 100%; height: auto; }
.join-copy p:not(.overline) { max-width: 620px; margin: 18px 0 24px; font-size: 16px; line-height: 1.75; color: var(--sr-muted); }

.site-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; padding: 26px 0 max(30px, env(safe-area-inset-bottom)); border-top: 1px solid var(--sr-line); font-size: 13px; color: var(--sr-muted); }
.site-footer p { flex: 1 1 260px; margin: 0; line-height: 1.6; }
.footer-emblem { width: 40px; height: 40px; }
.footer-signature { width: 180px; height: auto; opacity: .85; }

@media (max-width: 1000px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .brand-logo { width: 200px; }
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { padding: 30px 0 10px; }
  .hero-art { order: -1; padding-top: 18px; }
  .hero-art img { width: 140px; }
  .hero-actions > a { flex: 1 1 100%; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .command { padding-top: 36px; }
  .tool-grid { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { min-height: 0; flex-direction: row; align-items: flex-start; padding: 16px; }
  .tool-icon { flex-shrink: 0; width: 40px; height: 40px; }
  .tool-body { padding-right: 84px; }
  .tool-body strong { font-size: 16px; }
  .access { top: 16px; right: 16px; }
  .join { grid-template-columns: 1fr; gap: 10px; margin-top: 30px; padding: 30px 0 36px; }
  .join-art { width: 140px; }
  .join-links > a { flex: 1 1 100%; }
}
.tool-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .tool-grid.four { grid-template-columns: 1fr; } }
