:root {
  --ink: #07090f;
  --night: #0d1220;
  --panel: #121a2c;
  --panel-2: #172036;
  --line: rgba(255,255,255,.09);
  --text: #e9edf5;
  --muted: #a6b0c4;
  --red: #ff2d3d;
  --red-btn: #d91c2c;
  --blue: #2f7bff;
  --amber: #ffb547;
  --green: #3ddc84;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--ink); color: var(--text); font-family: Barlow, system-ui, sans-serif; font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.display { font-family: "Barlow Condensed", Impact, sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: .92; }
.eyebrow { font-family: "Barlow Condensed", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: .22em; font-size: .85rem; color: var(--amber); }

/* lightbar */
.lightbar { height: 4px; background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); background-size: 200% 100%; animation: flash 1.2s steps(2) infinite; }
@keyframes flash { 0% { background-position: 0 0; } 100% { background-position: -200% 0; } }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7,9,15,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header.overlay { position: fixed; inset: 0 0 auto; background: rgba(7,9,15,.6); }
nav.bar { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.badge { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--red), #a3101c); display: grid; place-items: center; font-family: "Barlow Condensed"; font-weight: 800; font-size: 1.05rem; letter-spacing: .03em; }
.brand-name { font-family: "Barlow Condensed"; font-weight: 800; text-transform: uppercase; font-size: 1.25rem; letter-spacing: .04em; white-space: nowrap; }
.links { display: flex; gap: 26px; align-items: center; font-size: .95rem; color: var(--muted); }
.links a:hover, .links a.active { color: var(--text); }
.links a.active { position: relative; }
.links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--red); border-radius: 2px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; }

/* user chip */
.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 5px 6px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: .9rem; position: relative; cursor: pointer; }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; }
.user-chip .name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.user-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; min-width: 180px; padding: 6px; }
.user-menu.open { display: block; }
.user-menu a { display: block; padding: 10px 12px; border-radius: 8px; font-size: .92rem; }
.user-menu a:hover { background: rgba(255,255,255,.06); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem; transition: transform .15s, background .15s, opacity .15s; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-red { background: var(--red-btn); color: #fff; }
.btn-red:hover { background: #ec2232; }
.btn-ghost { border: 1px solid rgba(255,255,255,.25); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; padding: 140px 0 90px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: center 35% / cover no-repeat; transform: scale(1.04); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,9,15,.55) 0%, rgba(7,9,15,.15) 35%, rgba(7,9,15,.85) 78%, var(--ink) 100%), linear-gradient(90deg, rgba(7,9,15,.85) 0%, rgba(7,9,15,0) 65%); }
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(3.2rem, 9vw, 7.4rem); max-width: 11ch; margin: 18px 0 22px; }
.hero h1 em { font-style: italic; color: var(--red); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: #c9d1e0; max-width: 580px; margin-bottom: 34px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(13,18,32,.6); font-size: .88rem; color: #c9d1e0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; flex-shrink: 0; }
.dot.pulse { box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }

/* page header (inner pages) */
.page-hero { position: relative; padding: 110px 0 70px; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero .bg { position: absolute; inset: 0; background: center / cover no-repeat; opacity: .35; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,9,15,.4), var(--ink)); }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(3rem, 7vw, 5.6rem); margin: 12px 0 16px; }
.page-hero p { color: #c9d1e0; max-width: 620px; font-size: 1.12rem; }

section { padding: 100px 0; }
section.tight { padding: 70px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 4rem); margin-top: 10px; }
.section-head p { color: var(--muted); max-width: 440px; }

/* departments */
.depts { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.dept { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 360px; border: 1px solid var(--line); background: var(--panel); isolation: isolate; }
.dept img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.dept:hover img { transform: scale(1.05); }
.dept::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,9,15,0) 20%, rgba(7,9,15,.6) 55%, rgba(7,9,15,.95) 100%); }
.dept .body { position: absolute; left: 24px; right: 24px; bottom: 22px; }
.dept h3 { font-size: 2rem; }
.dept p { color: #c9d1e0; font-size: .96rem; margin-top: 6px; max-width: 460px; }
.chip { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.c-police { background: rgba(47,123,255,.28); color: #a9c8ff; }
.c-fire { background: rgba(255,45,61,.28); color: #ffa3aa; }
.c-ems { background: rgba(255,255,255,.18); color: #fff; }
.c-so { background: rgba(255,181,71,.25); color: var(--amber); }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; }

.grow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; aspect-ratio: 16/9; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { position: absolute; left: 16px; bottom: 14px; font-size: .88rem; font-weight: 600; background: rgba(7,9,15,.78); backdrop-filter: blur(6px); padding: 6px 12px; border-radius: 8px; }

/* cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.card .meta { display: flex; gap: 12px; align-items: center; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.card h3 { font-size: 2.1rem; }
.card p { color: var(--muted); }
.card .btn { align-self: flex-start; margin-top: 8px; }
.card.accent { background: linear-gradient(150deg, rgba(255,45,61,.16), var(--panel) 50%); }
.card.accent-b { background: linear-gradient(150deg, rgba(47,123,255,.16), var(--panel) 50%); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.06); font-size: 1.3rem; }

/* team */
.team { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.member { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; }
.avatar { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-family: "Barlow Condensed"; font-weight: 800; font-size: 1.5rem; margin-bottom: 18px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member h3 { font-size: 1.12rem; font-weight: 600; }
.member .role { color: var(--muted); font-size: .92rem; }
.status { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: #c9d1e0; background: rgba(255,255,255,.05); padding: 5px 10px; border-radius: 999px; }
.s-off { background: #6b7489; } .s-meet { background: var(--amber); } .s-busy { background: var(--blue); }

/* panels + forms */
.panel { border-radius: var(--radius); border: 1px solid var(--line); padding: 40px; background: var(--panel); position: relative; }
.panel h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 10px 0 14px; }
.panel > p { color: var(--muted); max-width: 520px; margin-bottom: 24px; }
.panel.appeal { background: linear-gradient(135deg, rgba(255,45,61,.14), var(--panel) 55%); }
.steps { list-style: none; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; color: #c9d1e0; }
.steps li::before { content: counter(s); font-family: "Barlow Condensed"; font-weight: 800; color: var(--red); font-size: 1.2rem; min-width: 18px; }
.form-layout { display: grid; grid-template-columns: 1fr 1.35fr; gap: 28px; align-items: start; }

form.fri { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .85rem; }
.field input, .field textarea, .field select { width: 100%; background: var(--ink); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 12px 14px; color: var(--text); font: inherit; font-size: 1rem; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.counter { text-align: right; color: var(--muted); font-size: .78rem; }
.signed-as { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); font-size: .95rem; }
.signed-as img { width: 34px; height: 34px; border-radius: 50%; }
.signed-as a { margin-left: auto; color: var(--muted); font-size: .85rem; }
.notice { padding: 14px 16px; border-radius: 12px; font-size: .95rem; }
.notice.ok { background: rgba(61,220,132,.12); border: 1px solid rgba(61,220,132,.35); color: #b5f3d0; }
.notice.err { background: rgba(255,45,61,.12); border: 1px solid rgba(255,45,61,.4); color: #ffc2c7; }
.login-gate { text-align: center; padding: 50px 30px; display: grid; gap: 16px; justify-items: center; }
.login-gate p { color: var(--muted); max-width: 380px; }

.pos-list { display: grid; gap: 12px; }
.pos { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.pos h3 { font-size: 1.08rem; font-weight: 600; }
.pos p { color: var(--muted); font-size: .9rem; }
.pos .open { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--green); white-space: nowrap; }
.pos .closed { color: var(--muted); }

/* band */
.band { position: relative; padding: 130px 0; text-align: center; overflow: hidden; }
.band-bg { position: absolute; inset: 0; background: center/cover; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0%, rgba(7,9,15,.7) 40%, rgba(7,9,15,.7) 60%, var(--ink) 100%); }
.band .wrap { position: relative; z-index: 2; }
.band h2 { font-size: clamp(2.8rem, 7vw, 5.6rem); margin-bottom: 26px; }
.band .cta { justify-content: center; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer .links { gap: 22px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .lightbar, .dot.pulse { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 1040px) {
  .team { grid-template-columns: repeat(3, 1fr); }
  .links { gap: 18px; }
}
@media (max-width: 960px) {
  .span-7, .span-5, .span-6, .span-4 { grid-column: span 12; }
  .grow-grid, .grid-2, .grid-3, .form-layout { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .links.main { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--night); border-bottom: 1px solid var(--line); }
  .links.main.open { display: flex; }
  .links.main a { padding: 16px 4vw; border-top: 1px solid var(--line); }
  .links.main a.active::after { display: none; }
  .menu-btn { display: block; }
  section { padding: 76px 0; }
  .panel { padding: 28px; }
  .user-chip .name { display: none; }
}
@media (max-width: 460px) {
  .brand-name .long { display: none; }
  .nav-right .btn-discord span { display: none; }
}

/* live stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: "Barlow Condensed"; font-weight: 800; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; }
.stat .lbl { color: var(--muted); font-size: .88rem; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.stats-foot { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin-top: 12px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; }

/* update log */
.update-list { display: grid; gap: 0; }
.update-entry { display: grid; grid-template-columns: 170px 1fr; gap: 30px; padding: 34px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.update-entry:first-child { border-top: 0; padding-top: 0; }
.update-date { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: .92rem; }
.update-date .ver { align-self: flex-start; font-family: "Barlow Condensed"; font-weight: 800; font-size: 1.05rem; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); padding: 2px 10px; border-radius: 8px; }
.update-body h3 { font-size: 2rem; margin-bottom: 10px; }
.update-body > p { color: #c9d1e0; margin-bottom: 16px; }
.chg-group { margin-top: 14px; }
.chg-tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 3px 10px; border: 1px solid; border-radius: 999px; margin-bottom: 8px; }
.chg-group ul { list-style: none; display: grid; gap: 6px; }
.chg-group li { padding-left: 18px; position: relative; color: #d6dcea; }
.chg-group li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.muted-sm { color: var(--muted); font-size: .9rem; }
.muted-sm a { color: var(--text); text-decoration: underline; }
.tabs { display: flex; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.tab { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--text); color: var(--ink); border-color: var(--text); }
.member h3 a:hover { text-decoration: underline; }

/* admin */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.admin-list { display: grid; gap: 10px; }
.admin-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); }
.admin-item .t { font-weight: 600; }
.admin-item .s { color: var(--muted); font-size: .85rem; }
.admin-item .acts { display: flex; gap: 6px; flex-shrink: 0; }
.icon-btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: .85rem; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn.danger { color: #ff8a93; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.team-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr auto; gap: 8px; align-items: center; }
.team-row input { background: var(--ink); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 9px 10px; color: var(--text); font: inherit; font-size: .92rem; width: 100%; }
.change-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; }
.change-row select, .change-row input { background: var(--ink); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 9px 10px; color: var(--text); font: inherit; font-size: .92rem; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 12px 20px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; }

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .admin-grid, .row { grid-template-columns: 1fr; }
  .update-entry { grid-template-columns: 1fr; gap: 10px; }
  .team-row { grid-template-columns: 1fr 1fr; }
}
.update-entry:last-child { padding-bottom: 0; }
form.fri > button[type=submit] { justify-self: start; }
