@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    width: 100%;
    overflow: hidden;
}

#main_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Medieval parchment glass effect */
    background: linear-gradient(
        135deg,
        rgba(255, 248, 235, 0.9) 0%,
        rgba(245, 235, 215, 0.92) 50%,
        rgba(255, 248, 235, 0.9) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 2px solid rgba(139, 105, 20, 0.4);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 0 0 1px rgba(201, 162, 39, 0.2);
    padding: 3vh 4vh;
    color: #2c1810;
    z-index: 1;
    animation: fadeIn 1s ease-out forwards;
    width: 92%;
    max-width: 900px;
    height: 76vh;
    max-height: 76vh;
    position: relative;
    overflow: hidden;
    margin-bottom: 3vh;
}

/* Decorative corner flourishes */
#main_container::before,
#main_container::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(139, 105, 20, 0.3);
    pointer-events: none;
    z-index: 10;
}

#main_container::before {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
    border-radius: 8px 0 0 0;
}

#main_container::after {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 8px 0;
}

/* ========================================
   LEGAL PAGE STYLES
   ======================================== */

.legal-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* Header with decorations */
.legal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0.5vh;
    animation: slideFromTop 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.1s;
    animation-fill-mode: forwards;
    flex-shrink: 0;
}

.header-decoration {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b6914, transparent);
    position: relative;
}

.header-decoration::before {
    content: '◆';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #c9a227;
    font-size: 10px;
}

.header-decoration.left::before {
    right: -8px;
}

.header-decoration.right::before {
    left: -8px;
}

.legal-title {
    font-family: 'Inter', sans-serif;
    font-size: 2.8vh;
    font-weight: 700;
    color: #2c1810;
    margin: 0;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.legal-subtitle {
    font-size: 1.5vh;
    color: #5a4a3a;
    margin: 0 0 2vh 0;
    font-style: italic;
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.3s;
    animation-fill-mode: forwards;
    flex-shrink: 0;
}

/* Scrollable container */
.legal-scroll-container {
    flex: 1;
    width: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-right: 10px;
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.5s;
    animation-fill-mode: forwards;
}

/* Custom scrollbar styling - Slim & Fancy */
.legal-scroll-container::-webkit-scrollbar {
    width: 8px;
    display: block;
}

.legal-scroll-container::-webkit-scrollbar-track {
    background: rgba(139, 105, 20, 0.12);
    border-radius: 10px;
    margin: 5px 0;
    border: 1px solid rgba(139, 105, 20, 0.08);
}

.legal-scroll-container::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        #d4b043 0%,
        #c9a227 30%,
        #a8860d 70%,
        #8b6914 100%
    );
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.2);
    min-height: 40px;
}

.legal-scroll-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        #e0bc4e 0%,
        #d4ad32 30%,
        #b8960d 70%,
        #9b7914 100%
    );
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 2px 6px rgba(139, 105, 20, 0.4);
}

.legal-scroll-container::-webkit-scrollbar-thumb:active {
    background: linear-gradient(
        180deg,
        #c9a227 0%,
        #a8860d 50%,
        #7a5a10 100%
    );
}

/* Firefox scrollbar */
@supports (scrollbar-width: thin) {
    .legal-scroll-container {
        scrollbar-width: thin;
        scrollbar-color: #c9a227 rgba(139, 105, 20, 0.12);
    }
}

/* Scrollbar corner */
.legal-scroll-container::-webkit-scrollbar-corner {
    background: transparent;
}

/* Legal content */
.legal-content {
    padding: 1vh 2vh 3vh 1vh;
}

/* Section styling */
.legal-section {
    margin-bottom: 3vh;
    padding-bottom: 2vh;
    border-bottom: 1px solid rgba(139, 105, 20, 0.15);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 1vh;
}

.legal-section h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.9vh;
    font-weight: 700;
    color: #3d2914;
    margin: 0 0 1.5vh 0;
    padding-bottom: 0.8vh;
    border-bottom: 2px solid rgba(201, 162, 39, 0.4);
    display: inline-block;
}

.legal-section p {
    font-size: 1.6vh;
    line-height: 1.7;
    color: #2c1810;
    margin: 0 0 1.2vh 0;
    text-align: left;
}

.legal-section ul {
    margin: 1vh 0 1.5vh 0;
    padding-left: 2.5vh;
}

.legal-section li {
    font-size: 1.5vh;
    line-height: 1.6;
    color: #2c1810;
    margin-bottom: 0.6vh;
    position: relative;
}

.legal-section li::marker {
    color: #c9a227;
}

/* Info grid for structured data */
.info-grid {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 1.5vh;
    margin: 1.5vh 0;
    border: 1px solid rgba(139, 105, 20, 0.15);
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    padding: 0.8vh 0;
    border-bottom: 1px solid rgba(139, 105, 20, 0.1);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row:first-child {
    padding-top: 0;
}

.info-label {
    font-size: 1.4vh;
    font-weight: 600;
    color: #5a4a3a;
    min-width: 200px;
    flex-shrink: 0;
}

.info-value {
    font-size: 1.5vh;
    color: #2c1810;
    flex: 1;
}

.info-value a {
    color: #8b6914;
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-value a:hover {
    color: #c9a227;
    text-decoration: underline;
}

/* Links in content */
.legal-section a {
    color: #8b6914;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.legal-section a:hover {
    color: #c9a227;
    text-decoration: underline;
}

/* Last updated section special styling */
.legal-section.last-updated {
    background: rgba(201, 162, 39, 0.1);
    padding: 2vh;
    border-radius: 8px;
    border: 1px solid rgba(201, 162, 39, 0.3);
    margin-top: 2vh;
}

.legal-section.last-updated h2 {
    border-bottom: none;
    margin-bottom: 1vh;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideFromTop {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideFromBottom {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* ========================================
   TOP BUTTONS
   ======================================== */

#top_buttons {
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 1200px;
    justify-content: space-between;
    align-items: center;
    height: 12vh;
}

#homeBtn {   
    font-family: 'Bebas Neue', cursive;
    color: rgb(211, 211, 211);
    border-radius: 50%;
    transition: transform 0.7s;
} 

#homeBtn img {
    height: 3.3vh;
}

#homeBtn:hover {
    transform: scale(1.3);
    cursor: pointer;
}

#backBtn {
    font-family: 'Bebas Neue', cursive;
    color: rgb(211, 211, 211);
    border-radius: 50%;
    transition: transform 0.7s;
}

#backBtn img {
    height: 2.5vh;
}

#backBtn:hover {
    transform: scale(1.3);
    cursor: pointer;
}

.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 1.2vh;
    margin-bottom: 1vh;
    padding: 7px 18px;
    border-radius: 6px;
    /* Silver heraldic layered background */
    background:
      repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(255,255,255,0.04) 5px,
        rgba(255,255,255,0.04) 6px
      ),
      linear-gradient(160deg, #2e2e2e 0%, #1a1a1a 45%, #272727 100%);
    border: 1px solid #5a5a5a;
    border-top-color: #888;
    border-bottom-color: #333;
    box-shadow:
      0 1px 0 rgba(255,255,255,0.12) inset,
      0 -1px 0 rgba(0,0,0,0.4) inset,
      0 3px 10px rgba(0,0,0,0.5);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.site-footer-link {
    color: #c8c8c8;
    text-decoration: none;
    margin: 0 8px;
    padding: 2px 0;
    font-variant: small-caps;
    letter-spacing: 0.8px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer-link:hover {
    color: #f0f0f0;
    transform: translateY(-1px);
}

.site-footer-link:focus-visible {
    outline: 1px solid #999;
    outline-offset: 3px;
    border-radius: 2px;
}

.site-footer-link.is-active {
    color: #e8e8e8;
    font-weight: 600;
}

.site-footer-link:not(:last-child)::after {
    content: '✦';
    color: #6a6a6a;
    font-size: 7px;
    margin-left: 16px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    #main_container {
        width: 95%;
        padding: 2vh 3vh;
        height: 82vh;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-label {
        min-width: auto;
        margin-bottom: 0.3vh;
    }
    
    .legal-section h2 {
        font-size: 1.7vh;
    }
    
    .legal-section p,
    .legal-section li {
        font-size: 1.4vh;
    }
}
