/* Marshlight Studios — shared styles */
:root {
  --bg: #0B171B;
  --surface: #102328;
  --line: #1C3238;
  --line-strong: #3E6B6A;
  --text: #E8F1EC;
  --text-soft: #B9CEC8;
  --muted: #9FB8B2;
  --green: #9ED9A8;
  --purple: #B48CFF;
  --purple-soft: #C9A8FF;
  --stream: #D17BF0;
  --fire: #F0661C;
  --yellow: #FFD866;
  --live: #E5484D;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3, .brand { font-family: "Space Grotesk", Inter, sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: var(--green); }
a:hover { color: var(--text); }
img { max-width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section.alt { background: var(--surface); }
.eyebrow { margin: 0 0 8px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-size: 13px; color: var(--green); }
.lead { color: var(--text-soft); font-size: 18px; max-width: 620px; }
.soft { color: var(--text-soft); }
.muted { color: var(--muted); }
.row-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; }
.btn-fire { background: var(--fire); color: var(--bg); }
.btn-purple { background: var(--purple); color: var(--bg); }
.btn-green { background: var(--green); color: var(--bg); }
.btn-stream { background: var(--stream); color: var(--bg); }
.btn-live { background: var(--live); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); }
.btn:disabled { opacity: 0.45; cursor: default; }
[hidden] { display: none !important; }
.btn:hover { filter: brightness(1.08); color: inherit; }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo-link img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: 0.04em; }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-weight: 500; font-size: 15px; }
.nav .btn { font-size: 15px; }
@media (max-width: 1260px) and (min-width: 721px) { .site-header .wrap { justify-content: center; } .nav { justify-content: center; } }
.nav a { color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--green); border-bottom: 2px solid var(--green); }
.nav .btn { min-height: 44px; padding: 0 20px; color: var(--bg); }

/* Live banner (hidden until someone is live) */
.live-banner { display: block; background: #2A1640; color: var(--text); text-decoration: none; border-bottom: 1px solid #4A2A6A; }
.live-banner[hidden] { display: none; }
.live-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; font-size: 15px; }
.live-banner .go { color: var(--stream); font-weight: 600; }
.live-tag { display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px; border-radius: 6px; background: var(--live); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; }
.live-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* Hero */
.hero { padding: 96px 0 104px; background: radial-gradient(ellipse at 50% 30%, #12332D 0%, var(--bg) 65%); }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 999 1 480px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
.hero .lead { margin-top: 24px; font-size: 19px; }
.hero .btn-row { margin-top: 36px; }
.hero-art { flex: 1 1 320px; display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 400px; aspect-ratio: 1; object-fit: cover; border-radius: 28px; box-shadow: 0 0 80px rgba(240, 102, 28, 0.18); }

/* Page intro */
.page-intro { padding: 72px 0 40px; }
.page-intro h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 16px; }

/* Status pills */
.pill { align-self: flex-start; display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill-live { background: #173A2C; color: var(--green); }
.pill-soon { background: #3A3118; color: var(--yellow); }
.pill-dev { background: #2A2142; color: var(--purple-soft); }
.pill-hiatus, .pill-tag { background: #1E2A2D; color: var(--muted); }
.pill-tag { color: var(--text-soft); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Cards and grids */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
a.card { text-decoration: none; color: var(--text); }
a.card:hover { border-color: var(--line-strong); }
.card h3 { font-size: 20px; }
.section.alt .card { background: var(--bg); }

/* Server detail */
.server { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px; display: flex; flex-wrap: wrap; gap: 32px; }
.server-main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.server-main h2 { font-size: 32px; }
.server-main ul { margin: 0; padding-left: 20px; color: var(--text-soft); }
.server-side { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.address { padding: 14px 16px; border-radius: 12px; background: var(--bg); font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 24px; }

/* Streamers */
.streamer { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.streamer.is-live { border: 2px solid var(--live); }
.section.alt .streamer { background: var(--bg); }
.streamer-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: #2A3E44; object-fit: cover; flex-shrink: 0; }
.streamer.is-live .avatar { box-shadow: 0 0 0 3px var(--live); }
.streamer-name { font-weight: 700; }
.streamer-status { font-size: 13px; font-weight: 600; color: var(--muted); }
.streamer.is-live .streamer-status { color: #FF8A8E; font-weight: 700; letter-spacing: 0.06em; }
.empty { padding: 28px; border-radius: 16px; border: 1px dashed var(--line-strong); color: var(--text-soft); }

/* Player */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid #2A3E44; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; }

/* Schedule table */
.table-box { overflow-x: auto; }
table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: left; }
th { padding: 12px 16px; border-bottom: 1px solid #2A3E44; color: var(--muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); }

/* Features + CTA */
.feature { border-top: 2px solid var(--green); padding-top: 18px; }
.feature h3 { font-size: 20px; margin-bottom: 6px; }
.cta { padding: 40px; border-radius: 24px; background: linear-gradient(135deg, #12332D, #1A2240); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { font-size: 30px; margin-bottom: 8px; }
.split { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; }
.split > .grow { flex: 999 1 460px; min-width: 0; }
.split > .side { flex: 1 1 320px; }
.roles { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.roles li { padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.discord-widget { width: 100%; height: 420px; border: 0; border-radius: 16px; }

/* Discord card */
.dc-card { height: 100%; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.dc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: linear-gradient(135deg, #12332D, #1A2240); }
.dc-head span { color: var(--text-soft); font-size: 14px; }
.dc-head b { color: var(--green); }
.dc-body { padding: 16px 20px; flex-grow: 1; max-height: 420px; overflow-y: auto; }
.dc-label { margin: 8px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dc-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dc-channel { display: flex; flex-direction: column; font-size: 15px; }
.dc-in { padding-left: 14px; color: var(--muted); font-size: 13px; }
.dc-member { display: flex; align-items: center; gap: 10px; font-size: 15px; min-width: 0; }
.dc-avatar { position: relative; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: #2A3E44; }
.dc-avatar img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.dc-dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--surface); background: #3BA55C; }
.dc-idle { background: #FAA61A; }
.dc-dnd { background: #ED4245; }
.dc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-activity { margin-left: auto; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.dc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13px; }
.dc-foot .btn { min-height: 40px; padding: 0 18px; }

/* Staff team */
.staff-group h3 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.staff-group h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--role, var(--text)); }
.staff-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.staff-member { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.staff-member img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--role, transparent); }
.staff-member span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roles li { background: var(--surface); }

/* Footer */
.site-footer { padding: 48px 0; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 14px; }
.site-footer .col { display: flex; flex-direction: column; gap: 6px; }
.site-footer strong { color: var(--text); }
.site-footer .copy { align-self: flex-end; }

/* Live server status */
.live-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.live-status:empty { display: none; }
.live-status.is-online { color: var(--green); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-on { background: var(--green); box-shadow: 0 0 0 3px rgba(158, 217, 168, 0.2); }
.dot-off { background: var(--muted); }

/* News */
.news-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.news-list.full { grid-template-columns: 1fr; max-width: 760px; }
.news-post { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.section.alt .news-post { background: var(--bg); }
.news-post h3 { font-size: 21px; }
.news-date { color: var(--fire); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* Text pages (FAQ, Rules, Privacy, Join) */
.prose { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 26px; margin-top: 24px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; color: var(--text-soft); display: flex; flex-direction: column; gap: 8px; }
.prose li strong { color: var(--text); }
.rules { list-style: none; counter-reset: rule; padding: 0 !important; gap: 12px !important; }
.rules li { counter-increment: rule; position: relative; padding: 16px 18px 16px 60px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.rules li::before { content: counter(rule); position: absolute; left: 18px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #173A2C; color: var(--green); font-weight: 700; font-size: 14px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 18px; color: var(--text-soft); display: flex; flex-direction: column; gap: 10px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--text-soft); font-size: 14px; }
.toc a:hover { color: var(--text); }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.role-cards .card { border-top: 3px solid var(--role, var(--green)); }
.role-cards .age { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Footer links */
.site-footer .col a { color: var(--text-soft); text-decoration: none; }
.site-footer .col a:hover { color: var(--text); }

/* Phones */
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 64px; }
  .page-intro { padding: 48px 0 28px; }
  .server { padding: 24px; border-radius: 18px; }
  .server-main h2 { font-size: 26px; }
  .cta { padding: 28px; }
  .site-header .wrap { padding-top: 12px; padding-bottom: 12px; }
  .nav { gap: 14px 18px; font-size: 15px; width: 100%; }
  .nav .btn { margin-left: auto; min-height: 40px; padding: 0 16px; font-size: 15px; }
  .roles { grid-template-columns: 1fr; }
}

/* Events */
.events { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.event { display: flex; gap: 20px; align-items: flex-start; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.section.alt .event { background: var(--bg); }
.event-date { flex-shrink: 0; width: 64px; padding: 8px 0; border-radius: 12px; background: #2E2410; text-align: center; display: flex; flex-direction: column; }
.event-date span { color: var(--yellow); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.event-date b { font-family: "Space Grotesk", sans-serif; font-size: 28px; line-height: 1.1; }
.event-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.event-body h3 { font-size: 20px; }
.event-when { color: var(--muted); font-size: 14px; font-weight: 600; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.shot button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; overflow: hidden; display: block; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform .2s; }
.shot button:hover img { transform: scale(1.03); }
.shot figcaption { display: flex; flex-direction: column; font-size: 14px; }
.lightbox { max-width: min(1200px, 94vw); padding: 0; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); }
.lightbox::backdrop { background: rgba(5, 10, 12, 0.85); }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.lightbox p { padding: 12px 18px; color: var(--text-soft); font-size: 15px; }
.lightbox p:empty { display: none; }
.lightbox-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.6); color: #fff; font-size: 24px; cursor: pointer; }
@media (max-width: 720px) { .event { gap: 14px; padding: 16px; } .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Applications */
.apply-card { border-top: 3px solid var(--role, var(--green)); }
.apply-head { border-left: 4px solid var(--role, var(--green)); padding-left: 20px; margin: 20px 0 32px; display: flex; flex-direction: column; gap: 10px; }
.apply-head h1 { font-size: clamp(30px, 5vw, 44px); }
.apply-form { max-width: 760px; display: flex; flex-direction: column; gap: 28px; }
.q-group { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.q-group h2 { font-size: 22px; }
.q { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.q-label, .q legend { font-weight: 600; padding: 0; }
.q .hint { color: var(--muted); font-size: 13px; }
.q input:not([type=checkbox]):not([type=radio]), .q textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; font: 400 16px Inter, sans-serif; }
.q textarea { min-height: 110px; resize: vertical; }
.q input:focus, .q textarea:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.opt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer; font-size: 15px; min-height: 40px; }
.opt:has(input:checked) { border-color: var(--purple); background: rgba(180, 140, 255, 0.14); }
.opt input, .q-agree input { accent-color: var(--purple); width: 18px; height: 18px; flex-shrink: 0; }
.q-agree { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); cursor: pointer; }
.q-agree span { color: var(--text-soft); }
.policies { border-radius: 12px; background: var(--bg); padding: 12px 16px; }
.policies summary { cursor: pointer; font-weight: 600; color: var(--green); }
.policies ol { margin: 12px 0 0; padding-left: 22px; color: var(--text-soft); font-size: 15px; display: flex; flex-direction: column; gap: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.apply-send { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: flex-end; }
.apply-send .status { margin-right: auto; color: var(--muted); }
.apply-send .status.err { color: #ff9a9d; }
.apply-done { max-width: 640px; display: flex; flex-direction: column; gap: 14px; padding: 24px 0; }
@media (max-width: 720px) { .q-group { padding: 18px; } }
.apply-card.is-closed { opacity: 0.6; }
.apply-card.is-closed h3 { color: var(--text-soft); }
.site-footer .foot-end { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; align-self: flex-end; }
.site-footer .btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; color: var(--text-soft); }
@media (max-width: 720px) { .site-footer .foot-end { align-items: flex-start; align-self: flex-start; } }
.topbar { background: #081215; border-bottom: 1px solid var(--line); font-size: 13px; }
.topbar .wrap { display: flex; justify-content: flex-end; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: var(--muted); text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--text); }
.topbar .wrap { gap: 18px; }
.feedback-form select { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; font: 400 16px Inter, sans-serif; }
.feedback-form [data-fb-who][hidden] { display: none !important; }
