/* =========================================
   PRIVATE ARCHIVE
   Analog Typewriter / Dark Archive
   ========================================= */

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

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% 30%,
            #403b34 0%,
            #292622 45%,
            #171615 100%
        );

    color: #ded5c3;

    font-family: "Libre Baskerville", Georgia, serif;

    overflow-x: hidden;
}

/* -----------------------------------------
   SZUM
   ----------------------------------------- */

.noise {
    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: 0.075;

    z-index: 20;

    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");

    mix-blend-mode: overlay;
}

/* -----------------------------------------
   GŁÓWNY KONTENER
   ----------------------------------------- */

.archive {
    min-height: 100vh;

    width: min(1200px, 94%);

    margin: 0 auto;

    display: flex;
    flex-direction: column;

    justify-content: space-between;

    padding: 28px 0 24px;
}

/* -----------------------------------------
   NAGŁÓWEK
   ----------------------------------------- */

.top,
.bottom {
    display: flex;
    justify-content: space-between;

    font-family: "Special Elite", monospace;

    font-size: 11px;

    letter-spacing: 3px;

    color: #918a7d;

    opacity: 0.75;
}

.top {
    border-bottom: 1px solid rgba(210, 200, 180, 0.15);

    padding-bottom: 14px;
}

.bottom {
    border-top: 1px solid rgba(210, 200, 180, 0.15);

    padding-top: 14px;
}

/* -----------------------------------------
   BIURKO
   ----------------------------------------- */

.desk {
    flex: 1;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 55px 0;
}

/* -----------------------------------------
   MASZYNA
   ----------------------------------------- */

.typewriter {
    width: min(700px, 90vw);

    position: relative;

    filter:
        drop-shadow(0 35px 30px rgba(0, 0, 0, 0.55));
}

/* -----------------------------------------
   GÓRA MASZYNY
   ----------------------------------------- */

.typewriter-top {
    position: absolute;

    width: 72%;
    height: 65px;

    top: -25px;
    left: 14%;

    z-index: 1;
}

.paper-holder {
    position: absolute;

    width: 70%;
    height: 42px;

    left: 15%;
    top: 12px;

    background: linear-gradient(
        to bottom,
        #292725,
        #151514
    );

    border-radius: 5px 5px 2px 2px;

    box-shadow:
        inset 0 2px 2px rgba(255,255,255,0.05),
        0 5px 12px rgba(0,0,0,0.5);
}

.roller {
    position: absolute;

    width: 74%;
    height: 18px;

    left: 13%;
    top: 4px;

    border-radius: 50%;

    background:
        linear-gradient(
            to bottom,
            #55514b,
            #272522
        );

    box-shadow:
        inset 0 3px 4px rgba(255,255,255,0.12),
        0 3px 6px rgba(0,0,0,0.6);
}

/* -----------------------------------------
   PAPIER
   ----------------------------------------- */

.paper {
    position: relative;

    width: 68%;

    margin: 0 auto;

    min-height: 570px;

    padding: 60px 70px 45px;

    z-index: 3;

    background:
        linear-gradient(
            90deg,
            rgba(80,60,40,0.08),
            transparent 8%,
            transparent 92%,
            rgba(80,60,40,0.08)
        ),
        #ded4bd;

    color: #26231f;

    transform:
        rotate(-0.7deg);

    box-shadow:
        0 8px 15px rgba(0,0,0,0.25),
        0 20px 35px rgba(0,0,0,0.25);

    overflow: hidden;
}

/* stare krawędzie papieru */

.paper::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            ellipse at center,
            transparent 55%,
            rgba(70,55,40,0.12) 100%
        );
}

.paper-content {
    position: relative;

    z-index: 2;
}

/* -----------------------------------------
   DATA
   ----------------------------------------- */

.paper-date {
    font-family: "Special Elite", monospace;

    font-size: 12px;

    letter-spacing: 2px;

    opacity: 0.55;

    margin-bottom: 35px;
}

/* -----------------------------------------
   TYTUŁ
   ----------------------------------------- */

.paper h1 {
    font-family: "Special Elite", monospace;

    font-size: clamp(30px, 5vw, 48px);

    font-weight: normal;

    letter-spacing: 6px;

    margin-bottom: 15px;
}

.line {
    height: 1px;

    width: 100%;

    background: rgba(30,25,20,0.25);

    margin-bottom: 28px;
}

/* -----------------------------------------
   MENU
   ----------------------------------------- */

.menu {
    display: flex;

    flex-direction: column;

    gap: 3px;
}

.menu a {
    position: relative;

    display: grid;

    grid-template-columns: 45px 1fr;

    grid-template-rows: auto auto;

    column-gap: 5px;

    padding: 15px 12px;

    color: #26231f;

    text-decoration: none;

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.menu a span {
    grid-row: 1 / 3;

    font-family: "Special Elite", monospace;

    font-size: 12px;

    opacity: 0.45;

    padding-top: 5px;
}

.menu a strong {
    font-family: "Special Elite", monospace;

    font-size: 22px;

    font-weight: normal;

    letter-spacing: 2px;
}

.menu a small {
    font-size: 10px;

    letter-spacing: 1px;

    opacity: 0.5;

    margin-top: 3px;
}

.menu a:hover {
    background: rgba(40,35,28,0.08);

    transform: translateX(6px);
}

.menu a::after {
    content: "→";

    position: absolute;

    right: 12px;
    top: 50%;

    transform:
        translateY(-50%)
        translateX(-5px);

    opacity: 0;

    font-family: "Special Elite", monospace;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.menu a:hover::after {
    opacity: 0.65;

    transform:
        translateY(-50%)
        translateX(0);
}

/* -----------------------------------------
   STOPKA PAPIERU
   ----------------------------------------- */

.paper-footer {
    display: flex;

    justify-content: space-between;

    margin-top: 42px;

    padding-top: 12px;

    border-top: 1px dashed rgba(30,25,20,0.25);

    font-family: "Special Elite", monospace;

    font-size: 9px;

    letter-spacing: 2px;

    opacity: 0.5;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 45% {
        opacity: 1;
    }

    46%, 100% {
        opacity: 0;
    }
}

/* -----------------------------------------
   KORPUS MASZYNY
   ----------------------------------------- */

.typewriter-body {
    position: relative;

    width: 100%;

    height: 170px;

    margin-top: -5px;

    z-index: 5;

    border-radius: 18px 18px 35px 35px;

    background:
        linear-gradient(
            170deg,
            #403e3a 0%,
            #292825 45%,
            #191918 100%
        );

    box-shadow:
        inset 0 4px 3px rgba(255,255,255,0.08),
        inset 0 -10px 15px rgba(0,0,0,0.35),
        0 12px 15px rgba(0,0,0,0.4);
}

/* -----------------------------------------
   LOGO
   ----------------------------------------- */

.typewriter-logo {
    position: absolute;

    top: 25px;
    left: 50%;

    transform: translateX(-50%);

    font-family: "Special Elite", monospace;

    font-size: 13px;

    letter-spacing: 4px;

    color: #a59d8e;

    opacity: 0.65;
}

/* -----------------------------------------
   KLAWISZE
   ----------------------------------------- */

.typewriter-keys {
    position: absolute;

    left: 8%;
    right: 8%;

    bottom: 47px;

    display: flex;

    justify-content: center;

    gap: 7px;

    flex-wrap: wrap;
}

.typewriter-keys i {
    display: block;

    width: 23px;
    height: 23px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #65615b,
            #252422 65%
        );

    box-shadow:
        0 3px 3px rgba(0,0,0,0.7),
        inset 0 1px 1px rgba(255,255,255,0.12);

    transition: transform 0.15s ease;
}

.typewriter-keys i:hover {
    transform: translateY(2px);
}

/* -----------------------------------------
   SPACJA
   ----------------------------------------- */

.spacebar {
    position: absolute;

    width: 45%;
    height: 16px;

    left: 27.5%;

    bottom: 15px;

    border-radius: 10px;

    background: #252422;

    box-shadow:
        inset 0 2px 3px rgba(0,0,0,0.8),
        0 2px 2px rgba(255,255,255,0.04);
}

/* -----------------------------------------
   RESPONSIVE
   ----------------------------------------- */

@media (max-width: 700px) {

    .archive {
        width: 94%;
        padding-top: 18px;
    }

    .desk {
        padding: 35px 0;
    }

    .paper {
        width: 88%;

        min-height: 530px;

        padding:
            45px
            35px
            35px;
    }

    .paper h1 {
        font-size: 30px;

        letter-spacing: 4px;
    }

    .menu a strong {
        font-size: 18px;
    }

    .menu a small {
        font-size: 9px;
    }

    .typewriter-body {
        height: 135px;
    }

    .typewriter-keys {
        bottom: 38px;

        gap: 4px;
    }

    .typewriter-keys i {
        width: 17px;
        height: 17px;
    }

    .typewriter-logo {
        top: 18px;

        font-size: 10px;
    }

    .bottom,
    .top {
        font-size: 8px;

        letter-spacing: 2px;
    }
}

@media (max-width: 430px) {

    .paper {
        width: 92%;

        padding:
            38px
            25px
            30px;
    }

    .paper-date {
        margin-bottom: 25px;
    }

    .paper h1 {
        font-size: 26px;
    }

    .menu a {
        padding: 13px 5px;
    }

    .menu a span {
        font-size: 10px;
    }

    .menu a strong {
        font-size: 16px;
    }

    .menu a small {
        font-size: 8px;
    }

    .paper-footer {
        font-size: 7px;
    }
}