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

body {
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 7.5vh;
    background-color: #262624;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1 {
    color: #faf9f5;
    font-size: 2.5rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* ===== LOADER ===== */

#loader {
    position: fixed;
    inset: 0;
    background-color: #262624;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.6s ease;
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}

/* Viking */
.viking {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: viking-bob 1.2s ease-in-out infinite;
    padding-bottom: 28px; /* room for beard overflow */
}

@keyframes viking-bob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.helmet {
    position: relative;
    width: 90px;
    height: 44px;
    background-color: #2c2b29;
    border-radius: 45px 45px 0 0;
    z-index: 2;
}

/* Helmet rim band */
.helmet::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5px;
    right: -5px;
    height: 8px;
    background-color: #3d3b38;
    border-radius: 3px;
}

/* Nasal guard */
.helmet::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 50%;
    transform: translateX(-50%);
    width: 9px;
    height: 20px;
    background-color: #2c2b29;
    border-radius: 0 0 5px 5px;
    z-index: 5;
}

.horn {
    position: absolute;
    width: 20px;
    height: 46px;
    background-color: #9a7e38;
    clip-path: polygon(50% 0%, 88% 100%, 12% 100%);
    top: -14px;
}

.horn-left {
    left: -11px;
    transform: rotate(-20deg);
    transform-origin: bottom center;
}

.horn-right {
    right: -11px;
    transform: rotate(20deg);
    transform-origin: bottom center;
}

.face {
    position: relative;
    width: 88px;
    height: 76px;
    background-color: #c0a882;
    border-radius: 44px 44px 36px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 14px;
    gap: 5px;
    margin-top: -1px;
    z-index: 1;
}

.eyebrows {
    display: flex;
    gap: 12px;
}

.eyebrow {
    width: 20px;
    height: 4px;
    background-color: #5e4220;
    border-radius: 2px;
}

.eyebrow-left  { transform: rotate(-7deg); }
.eyebrow-right { transform: rotate(7deg); }

.eyes {
    display: flex;
    gap: 18px;
}

.eye {
    width: 10px;
    height: 10px;
    background-color: #1d1c1a;
    border-radius: 50%;
    animation: blink 4s ease-in-out infinite;
}

.eye:nth-child(2) { animation-delay: 0.06s; }

@keyframes blink {
    0%, 88%, 100% { transform: scaleY(1); }
    93%            { transform: scaleY(0.1); }
}

.nose {
    width: 14px;
    height: 7px;
    background-color: #a88c6a;
    border-radius: 50%;
}

.mouth {
    width: 22px;
    height: 4px;
    background-color: #8a6040;
    border-radius: 0 0 11px 11px;
}

.beard {
    position: absolute;
    bottom: -26px;
    width: 72px;
    height: 40px;
    background-color: #7a5e28;
    clip-path: polygon(8% 0%, 92% 0%, 100% 50%, 64% 46%, 50% 100%, 36% 46%, 0% 50%);
}

/* Loading text */
.loader-text {
    color: #faf9f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
}

.dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

.loader-bar {
    width: 180px;
    height: 2px;
    background-color: #3a3835;
    border-radius: 1px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #faf9f5;
    border-radius: 1px;
    animation: fill-bar 2.5s ease-out forwards;
}

@keyframes fill-bar {
    0%   { width: 0%; }
    30%  { width: 38%; }
    60%  { width: 68%; }
    85%  { width: 88%; }
    100% { width: 100%; }
}

/* ===== MAIN CONTENT ===== */

main {
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

main.visible {
    opacity: 1;
    transform: translateY(0);
}

.soon-sub {
    color: #5e5c58;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-top: 14px;
}