/*
  FriendWorks Oraa - Books Magic Design System
  Premium Fantasy Glassmorphism Architecture
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #0B0E17;
    --bg-secondary: #141A2A;
    --surface: rgba(28, 36, 56, 0.65);
    --surface-hover: rgba(40, 50, 75, 0.85);
    --accent-primary: #D9B75A;
    --accent-secondary: #8B6BFF;
    --highlight: #F4E3A1;
    --text-primary: #F8F7F2;
    --text-secondary: #C6C9D6;
    --muted: #7E869E;
    
    /* Typography */
    --font-head: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Effects */
    --glass-border: 1px solid rgba(217, 183, 90, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-primary: 0 0 20px rgba(217, 183, 90, 0.3);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset & Document Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative; /* Ensure absolute overlays size correctly */
}

/* Single Hero Background Image */
.world-environment {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-image: url('images/bright-magical-hero-bg-floating-books.jpg'); /* name: img-bright-magical-hero-bg */
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}

/* Vertical Fade Overlay */
.world-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    /* Smooth vertical fade to blend image into the website background seamlessly as you scroll */
    background: linear-gradient(
        to bottom,
        rgba(11, 14, 23, 0) 0%,
        rgba(11, 14, 23, 0.1) 15%,
        rgba(11, 14, 23, 0.5) 45%,
        rgba(11, 14, 23, 0.85) 75%,
        rgba(11, 14, 23, 0.98) 95%,
        rgba(11, 14, 23, 1) 100%
    );
}

/* Ambient Magic Effects */
.ambient-magic {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.ambient-item {
    position: absolute;
    opacity: 0;
}

.ambient-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.particle {
    width: 8px; height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px 3px var(--accent-primary);
    animation: float-particle 10s infinite linear;
}

.page-frag {
    width: 40px; height: 50px;
    animation: drift-page 16s infinite ease-in-out;
}

.sparkle {
    width: 25px; height: 25px;
    animation: twinkle 9s infinite ease-in-out;
}

/* Distributed positions & animations */
.p1 { top: 30%; left: 15%; animation-duration: 14s; }
.p2 { top: 80%; left: 85%; animation-duration: 19s; animation-delay: 3s; }
.f1 { top: 50%; left: 10%; animation-duration: 22s; }
.s1 { top: 70%; left: 45%; animation-duration: 11s; animation-delay: 2s; }

@keyframes float-particle {
    0% { transform: translateY(100vh) scale(0.5); opacity: 0; }
    20% { opacity: 0.25; }
    80% { opacity: 0.25; }
    100% { transform: translateY(-20vh) scale(1.5); opacity: 0; }
}

@keyframes drift-page {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    30% { opacity: 0.2; }
    70% { opacity: 0.2; }
    100% { transform: translate(120px, -250px) rotate(60deg); opacity: 0; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 0.25; transform: scale(1.3); }
}

/* Typography Elements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--highlight);
    font-weight: 600;
    letter-spacing: 0.05em;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--highlight);
    text-shadow: 0 0 8px rgba(244, 227, 161, 0.4);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: var(--glow-primary);
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(8, 12, 24, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(217, 183, 90, 0.05);
    transition: var(--transition-smooth);
}

header.scrolled {
    background: rgba(8, 12, 24, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
}

.logo {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--highlight);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--accent-secondary);
    margin-left: 8px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    text-transform: uppercase;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
    box-shadow: var(--glow-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #D9B75A 0%, #A68A3F 100%);
    color: #0B0E17;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(217, 183, 90, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(217, 183, 90, 0.5);
    color: #0B0E17;
}

.btn-outline {
    background: transparent;
    color: var(--highlight);
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--accent-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background: rgba(217, 183, 90, 0.1);
    box-shadow: inset 0 0 20px rgba(217, 183, 90, 0.2), 0 10px 30px rgba(217, 183, 90, 0.3);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 0 60px 0;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #FFFFFF, #F4E3A1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.6));
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Game System */
.game-section {
    padding: 2rem 0 4rem 0;
    position: relative;
    background: transparent;
}

.game-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    z-index: 10;
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Media queries for game width rules */
@media (min-width: 768px) {
    .game-container { width: 90%; }
}
@media (min-width: 1024px) {
    .game-container { width: 80%; }
}

/* Title + Image System Cards (Content Modules) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.content-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--glass-shadow);
}

.content-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(217, 183, 90, 0.5);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 30px rgba(217, 183, 90, 0.2);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--surface) 0%, transparent 100%);
}

.content-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.content-card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.card-context {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--highlight);
    line-height: 1.3;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Stats Section */
.stats-section {
    padding: 2.8rem 0;
    background: transparent;
    border: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-family: var(--font-head);
    font-size: 3.5rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    text-shadow: none;
}

.stat-label {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* FAQ Accordion */
.faq-section {
    padding: 6rem 0;
    background: transparent;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--surface);
    border: var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: rgba(217, 183, 90, 0.4);
    box-shadow: inset 0 0 15px rgba(217, 183, 90, 0.05);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: transparent;
    border: none;
    color: var(--highlight);
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.faq-question:hover {
    color: #FFF;
    text-shadow: 0 0 10px rgba(244, 227, 161, 0.4);
}

.faq-question .icon {
    font-size: 1.5rem;
    transition: transform 0.4s ease;
    color: var(--accent-primary);
}

.faq-item.active .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    padding-bottom: 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Form Styles (Contact) */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--highlight);
    font-family: var(--font-head);
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(11, 14, 23, 0.5);
    border: 1px solid rgba(126, 134, 158, 0.3);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(217, 183, 90, 0.2);
    background: rgba(11, 14, 23, 0.8);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Legal Pages Typography */
.legal-content {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 4rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--glass-shadow);
}

.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--highlight);
}

.legal-content p, .legal-content ul {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.legal-content ul {
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.page-header {
    padding: 10rem 0 4rem 0;
    text-align: center;
}

/* Footer System */
footer {
    background: #06080B;
    border-top: 1px solid rgba(217, 183, 90, 0.1);
    padding: 4rem 0 2rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-brand {
    font-family: var(--font-head);
    font-size: 2rem;
    color: var(--highlight);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.footer-desc {
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: var(--highlight);
}

.footer-contact {
    color: var(--accent-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
    width: 100%;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(11, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(217, 183, 90, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cookie-banner.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}

.cookie-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-right: 2rem;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Responsive Rules */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .legal-content { padding: 2rem; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .hero-actions { flex-direction: column; }
    .cookie-banner { flex-direction: column; text-align: center; gap: 1rem; }
    .cookie-text { padding-right: 0; }
    .footer-links { flex-direction: column; gap: 1rem; }
    section { padding: 4rem 0; }
}