@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --bg-color: #F7F5F2;
    --surface-color: #FFFFFF;
    --midnight-blue: #1E2A3A;
    --slate-grey: #4E5965;
    --nordic-pine: #40634D;
    --gold: #C89A42;
    --bronze: #8D6A42;
    --stone: #D8D3CC;
    --snow-white: #FCFCFA;
    --river-blue: #7BAFD4;
    --text-primary: #20252B;
    --text-muted: #6B727A;
    --accent-gradient: linear-gradient(135deg, #1E2A3A, #C89A42);
    --secondary-gradient: linear-gradient(135deg, #40634D, #7BAFD4);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --border-radius-lg: 28px;
    --border-radius-md: 22px;
    --border-radius-sm: 4px;
    
    --anim-fast: 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--midnight-blue);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--anim-fast);
}

.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.85rem; }

/* Buttons */
.btn-primary {
    background: var(--midnight-blue);
    color: var(--surface-color);
    padding: 14px 32px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--anim-fast), background var(--anim-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--gold);
}

.btn-secondary {
    background: transparent;
    color: var(--midnight-blue);
    padding: 14px 32px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--stone);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--anim-fast), border-color var(--anim-fast);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
}

/* Nordic Top Bar */
.nordic-top-bar {
    background-color: var(--midnight-blue);
    color: var(--snow-white);
    font-size: 0.75rem;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1000;
}

.nordic-top-bar a {
    color: var(--gold);
}

.nordic-top-bar a:hover {
    color: var(--surface-color);
}

/* Header */
.site-header {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 20px 40px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--midnight-blue);
}

.logo-compass {
    width: 24px;
    height: 24px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-compass::after {
    content: '';
    width: 2px;
    height: 12px;
    background: var(--midnight-blue);
    position: absolute;
}

.logo-compass::before {
    content: '';
    width: 12px;
    height: 2px;
    background: var(--midnight-blue);
    position: absolute;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--slate-grey);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--gold);
    transition: width var(--anim-fast);
}

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

.header-btn {
    padding: 10px 24px;
}

/* Inner Page Adjustments */
.inner-page .site-header {
    position: relative;
    top: 0;
    padding: 20px;
}

/* Sections General */
section {
    padding: 4vw 5vw;
    max-width: 1600px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeUp var(--anim-fast) forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-split {
    display: flex;
    min-height: 80vh;
    padding-top: 120px;
    align-items: center;
    gap: 4vw;
}

.hero-left {
    flex: 1;
    padding-right: 2vw;
}

.hero-left h1 {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-left p {
    font-size: 1.1rem;
    color: var(--slate-grey);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-right {
    flex: 1;
    height: 60vh;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.hero-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--anim-fast);
}

.hero-right:hover img {
    transform: scale(1.02);
}

/* Rune Navigation Band */
.rune-band {
    display: flex;
    justify-content: space-between;
    background: var(--surface-color);
    padding: 30px 5vw;
    border-top: 1px solid var(--stone);
    border-bottom: 1px solid var(--stone);
    margin: 0 auto;
    max-width: 100%;
}

.rune-block {
    text-align: center;
    flex: 1;
    padding: 0 15px;
    border-right: 1px solid var(--stone);
}

.rune-block:last-child {
    border-right: none;
}

.rune-icon {
    font-size: 1.5rem;
    color: var(--bronze);
    margin-bottom: 10px;
}

.rune-block h3 {
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-family: var(--font-body);
    font-weight: 500;
}

.rune-block p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Game Chamber */
.game-chamber {
    text-align: center;
}

.stone-platform {
    background: var(--stone);
    padding: 2vw;
    border-radius: var(--border-radius-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.game-frame {
    background: var(--nordic-pine);
    padding: 10px;
    border-radius: 20px;
    border: 4px solid var(--bronze);
    position: relative;
}

.game-frame::before {
    content: 'ᚠ ᚢ ᚦ ᚨ ᚱ ᚲ';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    color: var(--bronze);
    letter-spacing: 10px;
}

.game-frame iframe {
    width: 100%;
    height: 450px;
    border: none;
    border-radius: 12px;
    background: #000;
    display: block;
}

.game-controls {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Legend Collection */
.legend-collection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2vw;
}

.legend-panel {
    background: var(--surface-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: transform var(--anim-fast);
}

.legend-panel:hover {
    transform: translateY(-4px);
}

.legend-image-wrapper {
    height: 200px;
    overflow: hidden;
}

.legend-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--anim-fast);
}

.legend-panel:hover .legend-image-wrapper img {
    transform: scale(1.05);
}

.legend-content {
    padding: 24px;
}

.legend-content h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.legend-content p {
    font-size: 0.85rem;
    color: var(--slate-grey);
    margin-bottom: 16px;
}

.legend-link {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 500;
}

/* Hall Stories */
.hall-stories {
    display: flex;
    align-items: center;
    gap: 4vw;
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    padding: 0;
}

.story-image {
    flex: 1;
    height: 400px;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-content {
    flex: 1;
    padding: 40px;
    padding-left: 0;
}

.story-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.story-list {
    list-style: none;
    margin-top: 20px;
}

.story-list li {
    font-size: 0.95rem;
    color: var(--slate-grey);
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.story-list li::before {
    content: '•';
    color: var(--gold);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    top: -2px;
}

/* Platform Overview */
.platform-overview {
    display: flex;
    justify-content: space-between;
    text-align: center;
    padding: 3vw 10vw;
}

.platform-block h4 {
    font-size: 2rem;
    color: var(--midnight-blue);
    margin-bottom: 8px;
}

.platform-block p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Guest Hall (Contact) */
.guest-hall {
    display: flex;
    gap: 4vw;
    background: var(--midnight-blue);
    color: var(--snow-white);
    border-radius: var(--border-radius-lg);
}

.guest-hall h2, .guest-hall h3 {
    color: var(--snow-white);
}

.support-info {
    flex: 1;
}

.support-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.support-email {
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 30px;
    display: block;
}

.mini-faq h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    margin-top: 20px;
}

.mini-faq p {
    font-size: 0.85rem;
    color: #9AA4B2;
}

.contact-form {
    flex: 1;
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--slate-grey);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--stone);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--snow-white);
}

.form-group textarea {
    height: 100px;
    resize: none;
}

/* Footer */
.nordic-footer {
    background: var(--surface-color);
    padding: 6vw 5vw 2vw;
    border-top: 1px solid var(--stone);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    font-size: 0.85rem;
    color: var(--slate-grey);
}

.footer-col ul a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--stone);
    padding-top: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-emblem {
    font-size: 2rem;
    color: var(--bronze);
    margin-bottom: 16px;
    font-family: var(--font-heading);
}

.footer-copyright {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--snow-white);
    border: 2px solid var(--stone);
    border-radius: var(--border-radius-md);
    padding: 24px;
    width: 320px;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none;
}

.cookie-popup::before {
    content: 'ᛟ';
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--bronze);
    font-size: 1.2rem;
}

.cookie-popup h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.cookie-popup p {
    font-size: 0.8rem;
    color: var(--slate-grey);
    margin-bottom: 20px;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.cookie-actions button {
    flex: 1;
    padding: 8px;
    font-size: 0.8rem;
}

/* Subpages */
.subpage-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
}

.subpage-container h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.subpage-container h2 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
}

.subpage-container p {
    margin-bottom: 15px;
    color: var(--slate-grey);
}

.subpage-return {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--stone);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-split { flex-direction: column; padding-top: 140px; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-right { width: 100%; height: 400px; }
    .rune-band { flex-wrap: wrap; gap: 20px; }
    .rune-block { border: none; min-width: 150px; }
    .legend-collection { grid-template-columns: 1fr; }
    .hall-stories { flex-direction: column; }
    .platform-overview { flex-wrap: wrap; gap: 30px; justify-content: center; }
    .platform-block { width: 40%; }
    .guest-hall { flex-direction: column; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; }
}

@media (max-width: 600px) {
    .platform-block { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .cookie-popup { left: 5%; width: 90%; bottom: 20px; }
}