/* =====================================================================
   Primordial WoW - shared styles for the info pages
   (server_info, rules, faq, terms, privacy) and the home-page pitch block.
   Matches the existing dark / orange / crimson theme used by index.php
   and pages/how_to_play.php. All classes are prefixed "pw-" so nothing
   collides with Tailwind or the header/footer styles.
   ===================================================================== */
:root {
    --pw-gold: #eab308;
    --pw-gold-light: #fef08a;
    --pw-orange: #ea580c;
    --pw-crimson: #991b1b;
    --pw-text: #e2e8f0;
    --pw-muted: #a8a29e;
}

/* ---------- Page background (same ember look as the home page) ---------- */
.pw-doc {
    min-height: 100vh;
    color: var(--pw-text);
    background-color: #050608;
    background-image:
        radial-gradient(1000px 700px at -10% 35%, rgba(220, 38, 38, 0.18), transparent 65%),
        radial-gradient(800px 600px at 110% 85%, rgba(234, 88, 12, 0.18), transparent 70%),
        linear-gradient(180deg, #0f0c0c 0%, #050608 45%, #000000 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.pw-wrap { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 3rem 1rem 4rem; }
@media (min-width: 768px) { .pw-wrap { padding: 4.5rem 1.5rem 5rem; } }

/* ---------- Hero ---------- */
.pw-hero { text-align: center; margin-bottom: 3rem; }
.pw-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .4rem 1.2rem; margin-bottom: 1.25rem;
    background: rgba(0,0,0,.75);
    border: 1px solid rgba(234, 88, 12, 0.4);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    color: var(--pw-gold); font-size: .75rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
    text-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
}
.pw-pill::before { content: ''; width: 8px; height: 8px; background: var(--pw-gold); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.pw-title {
    font-family: 'Cinzel', serif; font-weight: 900; line-height: 1.1;
    font-size: 2.4rem; margin: 0 0 1rem;
    background: linear-gradient(180deg, #fef08a 0%, #eab308 35%, #ea580c 70%, #991b1b 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.9));
    letter-spacing: .02em;
}
@media (min-width: 768px) { .pw-title { font-size: 3.6rem; } }
.pw-lead { max-width: 46rem; margin: 0 auto; color: #d6d3d1; font-size: 1.05rem; line-height: 1.7; }
.pw-updated { margin-top: .9rem; color: var(--pw-muted); font-size: .8rem; letter-spacing: .05em; }

/* ---------- Panels ---------- */
.pw-panel {
    position: relative;
    background: linear-gradient(180deg, rgba(15, 12, 12, 0.95), rgba(5, 6, 8, 0.95));
    border: 1px solid rgba(234, 88, 12, 0.35);
    box-shadow: 0 12px 32px rgba(0,0,0,.85), inset 0 0 60px rgba(220, 38, 38, 0.12);
    clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
    padding: 1.5rem; margin-bottom: 1.75rem;
}
@media (min-width: 768px) { .pw-panel { padding: 2rem 2.25rem; } }
.pw-panel::before {
    content: ''; position: absolute; inset: 6px; pointer-events: none;
    border: 1px solid rgba(234, 179, 8, 0.13);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.pw-h2 {
    font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.35rem;
    color: var(--pw-gold); margin: 0 0 1rem;
    text-shadow: 0 0 12px rgba(234, 88, 12, 0.45), 0 2px 4px rgba(0,0,0,.9);
    display: flex; align-items: center; gap: .6rem;
}
.pw-h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(234, 88, 12, 0.5), transparent); }
.pw-h3 { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.05rem; color: #fcd34d; margin: 1.25rem 0 .5rem; }
.pw-panel p, .pw-panel li { color: var(--pw-text); font-size: .95rem; line-height: 1.7; }
.pw-panel p { margin: 0 0 .8rem; }
.pw-panel a { color: var(--pw-gold); text-decoration: underline; text-underline-offset: 3px; }
.pw-panel a:hover { color: var(--pw-gold-light); }
.pw-list { margin: 0 0 .8rem; padding-left: 1.25rem; }
.pw-list li { margin-bottom: .45rem; }
.pw-list li::marker { color: var(--pw-orange); }
.pw-note {
    border-left: 3px solid var(--pw-orange); background: rgba(234, 88, 12, 0.08);
    padding: .75rem 1rem; color: #e7e5e4; font-size: .88rem; line-height: 1.6; margin: 1rem 0 0;
}
.pw-muted { color: var(--pw-muted) !important; font-size: .85rem !important; }

/* ---------- Table of contents ---------- */
.pw-toc { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 0 0 2rem; }
.pw-toc a {
    padding: .45rem .9rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: #d6d3d1; text-decoration: none; background: rgba(0,0,0,.55);
    border: 1px solid rgba(234, 88, 12, 0.3);
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    transition: color .2s ease, border-color .2s ease;
}
.pw-toc a:hover { color: var(--pw-gold); border-color: var(--pw-gold); }

/* ---------- Tables (rates) ---------- */
.pw-table-wrap { overflow-x: auto; }
.pw-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pw-table th, .pw-table td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid rgba(234, 88, 12, 0.15); }
.pw-table th { color: var(--pw-gold); font-family: 'Cinzel', serif; font-weight: 700; font-size: .85rem; letter-spacing: .05em; background: rgba(234, 88, 12, 0.08); }
.pw-table td:first-child { color: #e7e5e4; }
.pw-table td.pw-rate { color: #4ade80; font-weight: 800; white-space: nowrap; text-shadow: 0 0 6px rgba(74,222,128,.25); }
.pw-table tr:hover td { background: rgba(234, 179, 8, 0.04); }

/* ---------- Stat tiles ---------- */
.pw-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.75rem; }
@media (min-width: 768px) { .pw-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pw-stat {
    text-align: center; padding: 1.1rem .75rem;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.75), rgba(12, 10, 9, 0.9));
    border: 1px solid rgba(234, 88, 12, 0.3);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.pw-stat-value { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.6rem; color: var(--pw-gold); text-shadow: 0 0 10px rgba(234, 88, 12, 0.5); }
.pw-stat-label { margin-top: .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pw-muted); }

/* ---------- Feature cards (server info + home pitch) ---------- */
.pw-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 640px) { .pw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .pw-cards.pw-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pw-card {
    position: relative; padding: 1.25rem 1.25rem 1.1rem;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.6), rgba(12, 10, 9, 0.85));
    border: 1px solid rgba(234, 88, 12, 0.25);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    transition: transform .3s ease, border-color .3s ease;
}
.pw-card:hover { transform: translateY(-4px); border-color: rgba(234, 179, 8, 0.7); }
.pw-card-icon {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; margin-bottom: .8rem;
    color: #050608; font-size: 1.05rem;
    background: linear-gradient(180deg, #fef08a 0%, var(--pw-orange) 55%, var(--pw-crimson) 100%);
    clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.pw-card-title { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.02rem; color: var(--pw-gold); margin: 0 0 .4rem; }
.pw-card p { color: #d6d3d1; font-size: .88rem; line-height: 1.6; margin: 0; }

/* ---------- Numbered steps ---------- */
.pw-steps { list-style: none; counter-reset: pwstep; margin: 0; padding: 0; }
.pw-steps li { counter-increment: pwstep; position: relative; padding: 0 0 1rem 3.1rem; min-height: 2.4rem; }
.pw-steps li::before {
    content: counter(pwstep); position: absolute; left: 0; top: 0;
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    font-family: 'Cinzel', serif; font-weight: 900; color: #050608;
    background: linear-gradient(180deg, #fef08a 0%, var(--pw-orange) 45%, var(--pw-crimson) 100%);
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.pw-code {
    display: inline-block; padding: .35rem .7rem; margin: .25rem 0;
    font-family: 'Fira Code', 'Courier New', monospace; font-size: .88rem;
    color: #4ade80; background: rgba(0,0,0,.8); border: 1px solid rgba(234, 88, 12, 0.4);
}

/* ---------- Rules ---------- */
.pw-rule { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .9rem; padding: 1rem 0; border-bottom: 1px solid rgba(234, 88, 12, 0.12); }
.pw-rule:last-child { border-bottom: 0; }
.pw-rule-num { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.35rem; color: var(--pw-orange); text-shadow: 0 0 10px rgba(234, 88, 12, 0.45); }
.pw-rule h3 { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.02rem; color: var(--pw-gold); margin: .1rem 0 .35rem; }
.pw-rule p { margin: 0; }
.pw-ladder { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; counter-reset: pwlad; }
@media (min-width: 768px) { .pw-ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.pw-ladder div { padding: .9rem .8rem; text-align: center; background: rgba(0,0,0,.45); border: 1px solid rgba(234, 88, 12, 0.25); font-size: .85rem; color: #e7e5e4; }
.pw-ladder strong { display: block; font-family: 'Cinzel', serif; color: var(--pw-gold); margin-bottom: .25rem; }

/* ---------- FAQ accordion ---------- */
.pw-faq details { border-bottom: 1px solid rgba(234, 88, 12, 0.15); }
.pw-faq details:last-child { border-bottom: 0; }
.pw-faq summary {
    cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
    font-family: 'Cinzel', serif; font-weight: 700; font-size: 1rem; color: #fcd34d;
}
.pw-faq summary::-webkit-details-marker { display: none; }
.pw-faq summary::after { content: '+'; position: absolute; right: .25rem; top: .8rem; font-size: 1.3rem; color: var(--pw-orange); transition: transform .2s ease; }
.pw-faq details[open] summary::after { transform: rotate(45deg); }
.pw-faq summary:hover { color: var(--pw-gold-light); }
.pw-faq .pw-answer { padding: 0 0 1rem; }

/* ---------- Buttons / CTA ---------- */
.pw-cta { text-align: center; }
.pw-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 1.25rem; }
.pw-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .85rem 1.6rem; font-weight: 800; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    text-decoration: none !important; transition: transform .2s ease, filter .2s ease;
}
.pw-btn:hover { transform: translateY(-2px) scale(1.02); }
.pw-btn-gold { background: linear-gradient(180deg, #fef08a 0%, #eab308 45%, #ea580c 100%); color: #050608 !important; }
.pw-btn-gold:hover { filter: drop-shadow(0 0 12px rgba(234, 88, 12, 0.6)); }
.pw-btn-iron { background: linear-gradient(180deg, #1c1917 0%, #0c0a09 55%, #000 100%); color: var(--pw-orange) !important; border: 1px solid rgba(234, 88, 12, 0.45); }
.pw-btn-iron:hover { color: var(--pw-gold-light) !important; filter: drop-shadow(0 0 14px rgba(234, 88, 12, 0.5)); }

/* ---------- Home-page pitch block ---------- */
.pw-pitch-hero { text-align: center; margin-bottom: 1.5rem; }
.pw-pitch-tagline {
    font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.6rem; line-height: 1.2; margin: 0 0 .6rem;
    background: linear-gradient(180deg, #fef08a 0%, #eab308 40%, #ea580c 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.95));
}
@media (min-width: 768px) { .pw-pitch-tagline { font-size: 2.3rem; } }
.pw-pitch-sub { max-width: 44rem; margin: 0 auto; color: #d6d3d1; font-size: .98rem; line-height: 1.7; }
.pw-pitch-more { text-align: center; margin-top: 1.25rem; }

@keyframes pwFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pw-fade { animation: pwFadeUp .6s cubic-bezier(0.16, 1, 0.3, 1) both; }
@media (prefers-reduced-motion: reduce) { .pw-fade, .pw-card, .pw-btn { animation: none; transition: none; } }
