/* ============================================
   Liberty RP — Página Normativas
   ============================================ */

.norm-hero {
    position: relative;
    padding: 150px 0 70px;
    overflow: hidden;
}

.norm-hero-particles {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 15% 20%, rgba(201, 169, 98, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 40% 35% at 85% 70%, rgba(143, 115, 64, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

.norm-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.norm-hero-copy h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    color: var(--gold-light);
    margin: 12px 0 18px;
    letter-spacing: 0.04em;
}

.norm-hero-lead {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 560px;
    line-height: 1.75;
    margin-bottom: 24px;
}

.norm-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.norm-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(6, 6, 6, 0.55);
    color: var(--gold-light);
    font-size: 0.82rem;
    font-weight: 600;
}

.norm-badge-live .norm-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.65);
    animation: normPulse 2s ease-in-out infinite;
}

@keyframes normPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.9); }
}

.norm-progress-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
}

.norm-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary-alt);
    box-shadow: 0 0 16px rgba(201, 169, 98, 0.45);
    transition: width 0.15s ease-out;
}

/* ---- 3D Codex ---- */
.norm-hero-visual {
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
}

.norm-3d-scene {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.norm-3d-codex {
    position: relative;
    width: 280px;
    height: 360px;
    transform-style: preserve-3d;
    animation: codexFloat 6s ease-in-out infinite;
    transition: transform 0.12s ease-out;
}

@keyframes codexFloat {
    0%, 100% { transform: translateY(0) rotateY(-8deg) rotateX(6deg); }
    50% { transform: translateY(-14px) rotateY(8deg) rotateX(-4deg); }
}

.codex-layer {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    backface-visibility: hidden;
}

.codex-back {
    transform: translateZ(-28px) scale(0.96);
    background: linear-gradient(145deg, rgba(143, 115, 64, 0.25), rgba(6, 6, 6, 0.9));
    opacity: 0.7;
}

.codex-mid {
    transform: translateZ(-12px) scale(0.98);
    background: linear-gradient(145deg, rgba(201, 169, 98, 0.18), rgba(6, 6, 6, 0.88));
}

.codex-front {
    transform: translateZ(18px);
    background: linear-gradient(155deg, rgba(201, 169, 98, 0.35) 0%, rgba(6, 6, 6, 0.94) 58%);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 28px;
    overflow: hidden;
}

.codex-emblem {
    width: 72px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 18px rgba(201, 169, 98, 0.35));
}

.codex-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.codex-front strong {
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1.25;
    color: var(--gold-light);
    margin-bottom: 10px;
}

.codex-front small {
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.codex-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.12) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: codexShine 5s ease-in-out infinite;
}

@keyframes codexShine {
    0%, 70%, 100% { transform: translateX(-120%); }
    40% { transform: translateX(120%); }
}

.codex-orbit {
    position: absolute;
    border: 1px solid rgba(201, 169, 98, 0.22);
    border-radius: 50%;
    pointer-events: none;
}

.codex-orbit-a {
    width: 340px;
    height: 340px;
    left: 50%;
    top: 50%;
    margin: -170px 0 0 -170px;
    transform: rotateX(72deg);
    animation: orbitSpin 14s linear infinite;
}

.codex-orbit-b {
    width: 390px;
    height: 390px;
    left: 50%;
    top: 50%;
    margin: -195px 0 0 -195px;
    transform: rotateX(72deg) rotateY(32deg);
    animation: orbitSpin 20s linear infinite reverse;
    opacity: 0.55;
}

@keyframes orbitSpin {
    from { transform: rotateX(72deg) rotateZ(0deg); }
    to { transform: rotateX(72deg) rotateZ(360deg); }
}

/* ---- Layout ---- */
.norm-layout {
    padding: 40px 0 100px;
}

.norm-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.norm-sidebar-sticky {
    position: sticky;
    top: 110px;
}

.norm-sidebar-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
    margin-bottom: 12px;
    font-weight: 700;
}

.norm-toc-title {
    margin-top: 28px;
}

.norm-doc-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.norm-doc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all var(--transition);
}

.norm-doc-link strong {
    display: block;
    font-size: 0.92rem;
    color: var(--gold-light);
}

.norm-doc-link small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.norm-doc-link.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.14), rgba(6, 6, 6, 0.8));
    box-shadow: 0 0 24px rgba(201, 169, 98, 0.12);
}

.norm-doc-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.norm-doc-icon {
    font-size: 1.2rem;
}

.norm-toc {
    max-height: 52vh;
    overflow: auto;
    padding-right: 6px;
}

.norm-toc-group {
    margin-bottom: 14px;
}

.norm-toc-section {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 6px;
    padding: 4px 0;
}

.norm-toc-item {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    padding: 5px 0 5px 12px;
    border-left: 2px solid transparent;
    transition: all var(--transition);
    line-height: 1.35;
}

.norm-toc-item:hover,
.norm-toc-item.active {
    color: var(--gold-light);
    border-left-color: var(--gold);
}

/* ---- Content ---- */
.norm-content {
    min-width: 0;
}

.norm-doc-header {
    margin-bottom: 36px;
}

.norm-doc-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.norm-doc-tag {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
}

.norm-doc-updated {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.norm-doc-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--gold-light);
    margin-bottom: 18px;
}

.norm-intro-card {
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.1), rgba(6, 6, 6, 0.75));
    border-left: 4px solid var(--gold);
}

.norm-intro-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
}

.norm-section {
    margin-bottom: 48px;
}

.norm-section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(201, 169, 98, 0.15);
}

.norm-section-num,
.norm-article-num {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    color: #120f08;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.norm-section-head h2 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    color: var(--gold-light);
}

.norm-articles {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.norm-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    transition: all var(--transition);
    transform-style: preserve-3d;
}

.norm-article:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(201, 169, 98, 0.06);
}

.norm-article-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.norm-article-num {
    width: 38px;
    height: 38px;
    font-size: 0.82rem;
}

.norm-article-head h3 {
    font-size: 1.08rem;
    color: var(--gold-light);
    padding-top: 6px;
    line-height: 1.35;
}

.norm-article-body p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.75;
    font-size: 0.96rem;
}

.norm-article-body p:last-child {
    margin-bottom: 0;
}

.norm-article-body code {
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(201, 169, 98, 0.12);
    border: 1px solid rgba(201, 169, 98, 0.22);
    color: var(--gold-light);
    font-family: ui-monospace, monospace;
    font-size: 0.88em;
}

.norm-list {
    margin-top: 8px;
}

.norm-list li {
    position: relative;
    padding: 8px 0 8px 18px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(201, 169, 98, 0.08);
    line-height: 1.65;
    font-size: 0.94rem;
}

.norm-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(201, 169, 98, 0.5);
}

.norm-list li:last-child {
    border-bottom: none;
}

.norm-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #fecaca;
    font-size: 0.92rem;
    line-height: 1.6;
}

.norm-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #f87171;
}

.norm-example {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(201, 169, 98, 0.35);
    background: rgba(201, 169, 98, 0.05);
}

.norm-example-label {
    display: inline-block;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 6px;
}

.norm-example p {
    margin: 0;
    font-style: italic;
    color: var(--text-secondary);
}

.norm-subsection {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(201, 169, 98, 0.12);
}

.norm-subsection h4 {
    font-size: 0.98rem;
    color: var(--gold-light);
    margin-bottom: 10px;
}

.norm-subsection h4 span {
    color: var(--gold);
    margin-right: 6px;
}

.norm-disclaimer {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 36px;
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(201, 169, 98, 0.28);
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.08), rgba(6, 6, 6, 0.85));
}

.norm-disclaimer svg {
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.norm-disclaimer p {
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.6;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .norm-hero-grid,
    .norm-layout-grid {
        grid-template-columns: 1fr;
    }

    .norm-sidebar-sticky {
        position: static;
    }

    .norm-toc {
        max-height: none;
    }

    .norm-hero-visual {
        min-height: 320px;
    }
}

@media (max-width: 640px) {
    .norm-hero {
        padding-top: 130px;
    }

    .norm-3d-codex {
        width: 240px;
        height: 310px;
    }

    .codex-orbit-a,
    .codex-orbit-b {
        display: none;
    }

    .norm-article {
        padding: 18px;
    }
}
