/* OriginRPG – aszfalt, króm és naplemente narancs */
:root {
  --bg: #101216;
  --bg-2: #14171c;
  --panel: #1a1e24;
  --panel-2: #21262e;
  --field: #12151a;
  --line: #2a3038;
  --line-2: #3b434e;
  --chrome: #eceff3;
  --text: #c8cdd5;
  --muted: #8a929e;
  --orange: #ff8c1a;
  --amber: #ffb547;
  --ember: #d9590a;
  --ok: #3ddc97;
  --danger: #ff5a5a;
  --cut: 10px;
  --head: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.03rem/1.6 var(--body); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--amber); text-decoration: none; cursor: pointer; }
a:hover { color: var(--chrome); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); color: var(--chrome); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #111; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 860px; }
.block { padding-top: 64px; padding-bottom: 64px; }
.block-tight { padding-top: 8px; padding-bottom: 72px; }

/* ── Gombok: a logó szögletes, levágott sarkai ── */
.btn {
  --c: var(--cut);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font: 600 .95rem/1 var(--head); letter-spacing: .02em;
  color: #1b1104;
  background: linear-gradient(180deg, var(--amber), var(--orange) 55%, var(--ember));
  border: 0; padding: .85em 1.4em; cursor: pointer;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: filter .15s, background-color .15s;
  text-align: center;
}
.btn:hover { color: #1b1104; filter: brightness(1.12); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-ghost { color: var(--chrome); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { color: var(--chrome); background: #2a303a; filter: none; }
.btn-discord { color: #fff; background: #5865f2; }
.btn-discord:hover { color: #fff; }
.btn-sm { --c: 6px; font-size: .82rem; padding: .6em 1em; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-big { font-size: 1.05rem; padding: 1em 1.6em; }
.btn.ok { color: #0d2a1d; background: var(--ok); box-shadow: none; }

/* ── Fejléc ── */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(16, 18, 22, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--chrome); }
.brand img { width: 44px; height: 44px; mix-blend-mode: lighten; }
.brand-word { font: 700 1.25rem/1 var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--chrome); }
.brand-word b { color: var(--orange); margin-left: .25em; }
.mainnav { display: flex; align-items: center; gap: 4px; flex: 1; }
.mainnav > a:not(.btn) { position: relative; font: 500 1rem/1 var(--head); color: var(--text); padding: 25px 13px; }
.mainnav > a:not(.btn):hover, .mainnav > a.on { color: var(--chrome); }
.mainnav > a.on::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 9px; background: var(--orange); transform: translateX(-50%) rotate(45deg); box-shadow: 0 0 10px var(--orange); }
.nav-cta { margin-left: auto; }
.navtoggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); width: 44px; height: 40px; padding: 10px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.navtoggle span:not(.sr) { display: block; height: 2px; background: var(--chrome); }

/* ── Hero ── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(60% 70% at 72% 100%, rgba(255, 140, 26, .32), transparent 70%), radial-gradient(40% 40% at 72% 55%, rgba(255, 181, 71, .1), transparent 70%), var(--bg); }
.hero::after, .page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 40px; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 700; letter-spacing: -.01em; margin-bottom: .35em; }
.lead { font-size: 1.15rem; max-width: 34em; }
.lead-sm { color: var(--muted); max-width: 70ch; margin: 0; }
.lead-sm b { color: var(--chrome); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 28px; }
.connect-box { border: 1px solid var(--line); background: rgba(20, 23, 28, .75); padding: 14px 16px; width: fit-content; max-width: 100%; }
.connect-label { display: block; font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.connect-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.connect-row code { font-size: 1rem; color: var(--amber); background: var(--field); border: 1px solid var(--line-2); padding: 7px 12px; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 560px; justify-self: center; width: 100%; }
.hero-art img { position: relative; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: lighten; animation: logo-in 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.ring { position: absolute; border-radius: 50%; pointer-events: none; }
.ring-a { inset: 1.5% 20% 38.5% 20%; border: 1px dashed rgba(255, 140, 26, .28); animation: spin 90s linear infinite; }
.ring-b { inset: -5% 13.5% 32% 13.5%; border: 1px solid rgba(236, 239, 243, .06); border-top-color: rgba(255, 181, 71, .45); animation: spin 40s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes logo-in { from { opacity: 0; transform: scale(.94); filter: brightness(2) blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.horizon { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--orange) 50%, transparent); box-shadow: 0 0 18px 1px rgba(255, 140, 26, .6); }

.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: 56px 0 40px; border-bottom: 1px solid var(--line); margin-bottom: 40px; background: radial-gradient(50% 120% at 85% 100%, rgba(255, 140, 26, .16), transparent 70%), var(--bg); }
.page-hero h1 { margin-bottom: .3em; }

.sec-title { font-size: 1.2rem; margin: 0 0 18px; padding-left: 14px; position: relative; }
.sec-title::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 3px; background: var(--orange); }

/* ── Főoldal blokkok ── */
.join-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.join-grid.solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 64px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -4px; width: 42px; height: 42px; display: grid; place-items: center; font: 700 1.1rem var(--head); color: var(--orange); border: 1px solid color-mix(in srgb, var(--orange) 55%, transparent); background: color-mix(in srgb, var(--orange) 8%, var(--bg)); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 44px; bottom: 4px; width: 1px; background: var(--line-2); }
.steps h3 { margin: 6px 0 4px; }
.steps p { color: var(--muted); margin: 0; }
.discord-widget iframe { width: 100%; height: 440px; border: 1px solid var(--line); background: var(--panel); display: block; }

.rules-teaser { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.teaser-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.teaser-head .sec-title { margin: 0; }
.key-rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 22px; border: 1px solid var(--line); }
.key-rule { padding: 22px 22px 18px; color: var(--text); border-right: 1px solid var(--line); background: var(--panel); }
.key-rule:last-child { border-right: 0; }
.key-rule:hover { background: var(--panel-2); color: var(--text); }
.key-rule h3 { color: var(--orange); font-size: 1.02rem; }
.key-rule p { margin: 0; font-size: .95rem; color: var(--muted); }

.cta-card { border: 1px solid var(--line); border-left: 3px solid var(--orange); background: var(--panel); padding: 28px 30px; margin-top: 8px; }
.cta-card p { color: var(--muted); max-width: 64ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-row { padding-top: 56px; }
.gallery-sec { padding-top: 0; }

/* ── Szabályzat ── */
.doc-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin: -16px 0 32px; }
.doc-tabs a { padding: 12px 18px; font: 600 .98rem var(--head); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.doc-tabs a:hover { color: var(--chrome); }
.doc-tabs a.on { color: var(--chrome); border-bottom-color: var(--orange); }
.fill { color: #1b1104; background: var(--amber); padding: 0 .35em; font-weight: 600; border-radius: 2px; }
.rules-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 80px; }
.toc-sticky { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 110px); overflow: auto; }
.search { display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid var(--line-2); padding: 0 10px; }
.search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 140, 26, .18); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--chrome); font: 400 .98rem var(--body); padding: 11px 0; outline: none; }
.search kbd { font-size: .75rem; color: var(--muted); border: 1px solid var(--line-2); padding: 1px 6px; }
.rule-count { font-size: .85rem; color: var(--amber); min-height: 1em; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: flex; gap: 10px; padding: 7px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); font: 500 .94rem/1.3 var(--head); }
.toc a:hover { color: var(--chrome); }
.toc a.on { color: var(--chrome); border-left-color: var(--orange); }
.toc-n { color: var(--line-2); min-width: 1.6em; }
.toc a.on .toc-n { color: var(--orange); }
.searching .toc { opacity: .4; }

.rule-section { margin-bottom: 56px; }
.rs-head { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.rs-n { font: 700 2.4rem/1 var(--head); color: transparent; -webkit-text-stroke: 1px var(--orange); min-width: 1.4em; }
.rs-head h2 { font-size: 1.55rem; margin: 2px 0 4px; }
.rs-head p { margin: 0; color: var(--muted); }
.rule { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rule:target { background: linear-gradient(90deg, rgba(255, 140, 26, .1), transparent 70%); }
.rule-id { font: 600 .92rem/1.6 var(--head); color: var(--orange); padding-top: 1px; }
.rule-id:hover { color: var(--amber); }
.rule-id.ok { color: var(--ok); }
.rule-id.ok::after { content: " ✓"; }
.rule-body h3 { margin: 0 0 4px; font-size: 1.04rem; }
.rule-body p { margin: 0; max-width: 72ch; }
.rule-body strong { color: var(--chrome); }
.rule-empty { padding: 24px; border: 1px dashed var(--line-2); color: var(--muted); text-align: center; }
[hidden] { display: none !important; }

.table-wrap { overflow-x: auto; margin: 20px 0 6px; border: 1px solid var(--line); }
.ptable { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 620px; }
.ptable th, .ptable td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ptable thead th { font: 600 .85rem var(--head); color: var(--muted); background: var(--bg-2); border-bottom-color: var(--line-2); white-space: nowrap; }
.ptable tbody th { font-weight: 500; color: var(--chrome); background: var(--panel); width: 38%; }
.ptable tbody tr:last-child > * { border-bottom: 0; }
.ptable td.perm { color: var(--danger); font-weight: 600; }
.ptable td.warn-c { color: var(--amber); }
.ptable td.dash { color: var(--line-2); }

/* ── Csapat ── */
.team-group { --rc: var(--orange); margin-bottom: 44px; }
.team-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid color-mix(in srgb, var(--rc) 40%, var(--line)); }
.team-head h2 { color: var(--rc); margin: 0; display: flex; align-items: center; gap: 10px; }
.team-head .n { font-size: .85rem; color: var(--muted); font-weight: 500; }
.team-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.member { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 18px 22px; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--rc); }
.member-av img, .member-av .ini { width: 84px; height: 84px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--rc) 60%, var(--line-2)); object-fit: cover; }
.member-av .ini { display: grid; place-items: center; font: 700 1.6rem var(--head); color: var(--rc); background: color-mix(in srgb, var(--rc) 10%, var(--bg-2)); }
.member h3 { margin: 6px 0 0; font-size: 1.12rem; }
.member p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.member .dc { font-size: .82rem; color: var(--muted); margin-top: auto; padding-top: 6px; }
.member .dc b { color: var(--text); font-weight: 500; }
.rank { --c: 5px; display: inline-flex; font: 600 .74rem/1 var(--head); letter-spacing: .03em; color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); box-shadow: inset 2px 0 0 var(--rc); padding: .35em .7em .33em .8em; clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%); }
.join-staff { margin-top: 12px; }

/* ── GYIK ── */
.faqs { border-top: 1px solid var(--line); margin-bottom: 40px; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 44px 18px 0; position: relative; font: 600 1.08rem/1.35 var(--head); color: var(--chrome); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--amber); }
.faq p { margin: 0 0 20px; color: var(--text); max-width: 72ch; }

/* ── Lábléc ── */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 600 .95rem var(--head); color: var(--chrome); }
.foot-brand img { mix-blend-mode: lighten; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-size: .92rem; }
.foot-links a:hover { color: var(--amber); }
.foot small { width: 100%; color: #5f6672; font-size: .8rem; }

/* ── Háttérképek (assets/img/kepek) ── */
.hero.has-img::before {
  background:
    linear-gradient(90deg, rgba(16, 18, 22, .96) 0%, rgba(16, 18, 22, .78) 40%, rgba(16, 18, 22, .3) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%),
    radial-gradient(60% 70% at 72% 100%, rgba(255, 140, 26, .28), transparent 70%),
    var(--hero-img) center / cover no-repeat,
    var(--bg);
}
.page-hero.has-img {
  background:
    linear-gradient(90deg, rgba(16, 18, 22, .97) 0%, rgba(16, 18, 22, .8) 50%, rgba(16, 18, 22, .45) 100%),
    radial-gradient(50% 120% at 85% 100%, rgba(255, 140, 26, .18), transparent 70%),
    var(--hero-img) center 40% / cover no-repeat,
    var(--bg);
}

/* ── Galéria ── */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gal-item { position: relative; display: block; padding: 0; border: 1px solid var(--line); background: var(--panel); aspect-ratio: 16 / 9; overflow: hidden; cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; filter: saturate(.9); }
.gal-item:hover img, .gal-item:focus-visible img { transform: scale(1.04); filter: saturate(1.05); }
.gal-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 14, .78), transparent 45%); pointer-events: none; }
.gal-item:hover { border-color: var(--orange); }
.gal-cap { position: absolute; left: 14px; bottom: 10px; z-index: 1; font: 600 .92rem var(--head); color: var(--chrome); text-align: left; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(6, 7, 9, .92); }
.lightbox img { max-width: 100%; max-height: 84vh; display: block; border: 1px solid var(--line-2); }
.lb-cap { margin: 10px 0 0; color: var(--chrome); font: 600 1rem var(--head); text-align: center; min-height: 1.2em; }
.lb-btn { position: absolute; width: 46px; height: 46px; display: grid; place-items: center; font-size: 2rem; line-height: 1; color: var(--chrome); background: rgba(26, 30, 36, .85); border: 1px solid var(--line-2); cursor: pointer; }
.lb-btn:hover { color: #1b1104; background: var(--orange); border-color: var(--orange); }
.lb-prev { left: -58px; top: 50%; transform: translateY(-50%); }
.lb-next { right: -58px; top: 50%; transform: translateY(-50%); }
.lb-close { right: -58px; top: 0; font-size: 1.6rem; }
@media (max-width: 980px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-prev { left: 6px; } .lb-next { right: 6px; } .lb-close { right: 6px; top: 6px; }
}
@media (max-width: 600px) { .gallery { grid-template-columns: minmax(0, 1fr); } }

/* ── Mobil ── */
@media (max-width: 980px) {
  .navtoggle { display: flex; }
  .mainnav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 20px 18px; }
  .mainnav.open { display: flex; }
  .mainnav > a:not(.btn) { padding: 15px 4px; border-bottom: 1px solid var(--line); }
  .mainnav > a.on::after { left: auto; right: 6px; bottom: 50%; transform: translateY(50%) rotate(45deg); }
  .nav-cta { margin: 16px 0 0; }
  .hero-in { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  .hero-art { order: -1; max-width: 340px; }
  .join-grid { grid-template-columns: minmax(0, 1fr); }
  .key-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-rule:nth-child(2) { border-right: 0; }
  .key-rule:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .rules-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc-sticky { position: static; max-height: none; }
  .toc { display: none; }
}
@media (max-width: 600px) {
  .key-rules { grid-template-columns: minmax(0, 1fr); }
  .key-rule { border-right: 0; border-bottom: 1px solid var(--line); }
  .key-rule:last-child { border-bottom: 0; }
  .rule { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rs-n { font-size: 1.8rem; }
  .connect-box { width: 100%; }
  .btn-big { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
