/* =========================================================
   GABYSARCHIVE
   DARK GOTHIC / NOCTURNAL ARCHIVE
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --void: #050407;
    --black: #08070a;
    --black-soft: #0d0a10;
    --black-card: #110c12;

    --plum: #1a101b;
    --plum-light: #261525;

    --wine: #32101d;
    --wine-dark: #210b14;

    --burgundy: #5b172b;
    --burgundy-light: #78354a;

    --paper: #b8a79d;
    --paper-dark: #87766f;
    --paper-light: #d1c2b8;

    --silver: #a59aa7;
    --silver-dark: #6f6671;

    --text: #c8bec7;
    --text-soft: #8d828d;
    --text-dark: #625964;

    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "DM Sans", Arial, sans-serif;
    --script: "Homemade Apple", cursive;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 10%,
            rgba(91, 23, 43, 0.10),
            transparent 35%
        ),
        radial-gradient(
            circle at 15% 70%,
            rgba(38, 21, 37, 0.18),
            transparent 30%
        ),
        var(--void);

    color: var(--text);
    font-family: var(--sans);
    line-height: 1.7;

    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

::selection {
    background: var(--burgundy);
    color: var(--paper-light);
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--wine);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--burgundy);
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.stars {
    position: absolute;
    inset: 0;

    background-image:
        radial-gradient(
            circle,
            rgba(209, 194, 184, 0.45) 1px,
            transparent 1px
        );

    background-size: 170px 170px;

    opacity: 0.25;

    animation: starDrift 45s linear infinite;
}

@keyframes starDrift {

    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-170px);
    }

}


/* =========================================================
   MOON
   IMPORTANTE:
   La luna está fuera de .background en el HTML para que
   pueda recibir clics.
   ========================================================= */

.moon {
    position: fixed;

    top: 8%;
    right: 9%;

    width: 115px;
    height: 115px;

    z-index: 2;

    pointer-events: auto;
    cursor: pointer;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(255, 255, 255, 0.35),
            transparent 12%
        ),
        radial-gradient(
            circle at 65% 65%,
            rgba(255, 255, 255, 0.08),
            transparent 18%
        ),
        #b7adb7;

    box-shadow:
        0 0 35px rgba(181, 173, 183, 0.10),
        0 0 100px rgba(120, 53, 74, 0.08);

    opacity: 0.18;

    transition:
        transform 0.4s ease,
        opacity 0.5s ease;
}

.moon::after {
    content: "";

    position: absolute;

    width: 105px;
    height: 105px;

    top: -5px;
    left: 25px;

    border-radius: 50%;

    background: var(--void);

    pointer-events: none;
}

.moon:hover {
    opacity: 0.30;
}


/* =========================================================
   MAIN SITE
   ========================================================= */

.site {
    position: relative;
    z-index: 3;

    width: min(1100px, calc(100% - 50px));

    margin: 0 auto;

    padding: 55px 0 70px;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    text-align: center;

    padding: 30px 20px 45px;

    border-bottom:
        1px solid rgba(184, 167, 157, 0.10);
}

.site-header::before {
    content: "✦";

    display: block;

    margin-bottom: 8px;

    font-family: var(--serif);
    font-size: 1.1rem;

    color: var(--burgundy-light);

    opacity: 0.7;
}

.site-title {
    font-family: var(--serif);

    font-size: clamp(4rem, 10vw, 7.5rem);

    font-weight: 500;

    letter-spacing: -0.04em;

    line-height: 0.85;

    color: var(--paper-light);

    text-shadow:
        0 0 35px rgba(120, 53, 74, 0.10);
}

.site-subtitle {
    margin-top: 20px;

    font-size: 0.66rem;

    letter-spacing: 0.35em;

    text-transform: uppercase;

    color: var(--text-soft);
}

.site-motto {
    margin-top: 18px;

    font-family: var(--serif);

    font-size: 0.95rem;

    font-style: italic;

    color: var(--text-dark);
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.main-nav {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 26px;

    padding: 20px 10px;

    border-bottom:
        1px solid rgba(184, 167, 157, 0.08);
}

.main-nav a {
    position: relative;

    font-size: 0.62rem;

    letter-spacing: 0.16em;

    text-transform: uppercase;

    color: var(--text-dark);

    transition: color 0.3s ease;
}

.main-nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -7px;

    width: 100%;
    height: 1px;

    background: var(--burgundy-light);

    transform: scaleX(0);

    transform-origin: center;

    transition: transform 0.3s ease;
}

.main-nav a:hover {
    color: var(--paper);
}

.main-nav a:hover::after {
    transform: scaleX(1);
}


/* =========================================================
   ARCHIVE CONTROLS
   ========================================================= */

.archive-controls {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin: 35px 0 10px;

    padding: 12px 0;

    border-top:
        1px solid rgba(184, 167, 157, 0.12);

    border-bottom:
        1px solid rgba(184, 167, 157, 0.12);
}

.archive-time {
    display: flex;

    align-items: center;

    gap: 14px;

    color: var(--text-soft);
}

.archive-clock {
    font-family: var(--serif);

    font-size: 1rem;

    letter-spacing: 0.08em;

    color: var(--paper);
}

.time-message {
    font-size: 0.62rem;

    letter-spacing: 0.14em;

    text-transform: uppercase;

    color: var(--text-dark);
}


/* =========================================================
   NIGHT MODE BUTTON
   ========================================================= */

.night-mode {
    appearance: none;

    position: relative;

    display: inline-flex;

    align-items: center;

    gap: 9px;

    border:
        1px solid rgba(120, 53, 74, 0.28);

    background:
        linear-gradient(
            135deg,
            rgba(26, 16, 27, 0.75),
            rgba(50, 16, 29, 0.20)
        );

    color: var(--paper-dark);

    padding: 7px 13px 7px 11px;

    font-family: var(--serif);

    font-size: 0.78rem;

    letter-spacing: 0.05em;

    cursor: pointer;

    box-shadow:
        inset 0 0 12px rgba(91, 23, 43, 0.05),
        0 0 0 rgba(120, 53, 74, 0);

    transition:
        color 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease;
}

.night-mode::before {
    content: "☾";

    display: inline-block;

    font-family: var(--serif);

    font-size: 0.95rem;

    line-height: 1;

    color: var(--burgundy-light);

    opacity: 0.75;

    transition:
        color 0.35s ease,
        transform 0.5s ease,
        opacity 0.35s ease;
}

.night-mode:hover {
    color: var(--paper-light);

    border-color:
        rgba(120, 53, 74, 0.55);

    background:
        linear-gradient(
            135deg,
            rgba(38, 21, 37, 0.90),
            rgba(50, 16, 29, 0.35)
        );

    box-shadow:
        inset 0 0 14px rgba(91, 23, 43, 0.10),
        0 0 18px rgba(91, 23, 43, 0.08);

    transform: translateY(-1px);
}

.night-mode:hover::before {
    color: var(--paper);

    opacity: 1;

    transform:
        rotate(-12deg)
        scale(1.08);
}

.night-mode:active {
    transform: translateY(0);
}


/* =========================================================
   WELCOME
   ========================================================= */

.welcome {
    position: relative;

    text-align: center;

    max-width: 760px;

    margin: 0 auto;

    padding: 115px 20px 125px;
}

.eyebrow {
    margin-bottom: 25px;

    font-size: 0.62rem;

    letter-spacing: 0.25em;

    text-transform: uppercase;

    color: var(--burgundy-light);
}

.welcome h1 {
    max-width: 650px;

    margin: 0 auto;

    font-family: var(--serif);

    font-size: clamp(2.4rem, 6vw, 4.4rem);

    font-weight: 500;

    line-height: 1.05;

    color: var(--paper-light);
}

.welcome p:not(.eyebrow):not(.handwritten):not(.random-quote) {
    max-width: 590px;

    margin: 25px auto 0;

    font-family: var(--serif);

    font-size: 1.1rem;

    color: var(--text-soft);
}

.handwritten {
    margin-top: 35px;

    font-family: var(--script);

    font-size: 0.9rem;

    color: var(--paper-dark);

    transform: rotate(-3deg);
}

.random-quote {
    max-width: 500px;

    margin: 35px auto 0;

    text-align: center;

    font-family: var(--serif);

    font-size: 1rem;

    font-style: italic;

    line-height: 1.8;

    color: var(--text-dark);

    opacity: 0.85;
}

.random-quote::before {
    content: "“";

    display: block;

    margin-bottom: -15px;

    font-family: var(--serif);

    font-size: 2rem;

    color: var(--burgundy-light);

    opacity: 0.55;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
    position: relative;

    padding: 105px 0;

    border-top:
        1px solid rgba(184, 167, 157, 0.08);
}

.section-heading {
    margin-bottom: 45px;
}

.chapter {
    display: block;

    margin-bottom: 10px;

    font-size: 0.58rem;

    letter-spacing: 0.25em;

    text-transform: uppercase;

    color: var(--burgundy-light);
}

.section-heading h2 {
    font-family: var(--serif);

    font-size: clamp(2.7rem, 6vw, 4.5rem);

    font-weight: 500;

    line-height: 0.95;

    color: var(--paper-light);
}

.section-intro {
    max-width: 570px;

    margin-top: 17px;

    font-family: var(--serif);

    font-size: 1rem;

    color: var(--text-soft);
}


/* =========================================================
   DIARY
   ========================================================= */

.diary-grid {
    display: grid;

    grid-template-columns: 1.15fr 0.85fr;

    gap: 18px;
}

.diary-card {
    position: relative;

    min-height: 270px;

    padding: 30px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    background:
        linear-gradient(
            145deg,
            rgba(26, 16, 27, 0.75),
            rgba(13, 10, 16, 0.85)
        );

    border:
        1px solid rgba(184, 167, 157, 0.10);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.diary-card:nth-child(3) {
    grid-column: 1 / -1;

    min-height: 210px;
}

.diary-card:hover {
    border-color:
        rgba(120, 53, 74, 0.35);

    box-shadow:
        0 25px 65px rgba(0, 0, 0, 0.35),
        0 0 30px rgba(91, 23, 43, 0.08);
}

.diary-date {
    font-size: 0.57rem;

    letter-spacing: 0.16em;

    text-transform: uppercase;

    color: var(--text-dark);
}

.diary-card h3 {
    margin-top: 12px;

    font-family: var(--serif);

    font-size: 2rem;

    font-weight: 500;

    color: var(--paper);
}

.diary-card p {
    margin-top: 12px;

    font-family: var(--serif);

    color: var(--text-soft);
}

.diary-arrow {
    align-self: flex-end;

    margin-top: 20px;

    color: var(--burgundy-light);

    transition: transform 0.3s ease;
}

.diary-card:hover .diary-arrow {
    transform: translateX(5px);
}


/* =========================================================
   RANDOM ENTRY
   ========================================================= */

.random-entry-wrapper {
    display: flex;

    justify-content: center;

    margin-top: 45px;
}

.random-entry {
    position: relative;

    appearance: none;

    border:
        1px solid rgba(184, 167, 157, 0.16);

    background: transparent;

    color: var(--paper-dark);

    padding: 12px 22px;

    font-family: var(--serif);

    font-size: 0.9rem;

    letter-spacing: 0.08em;

    cursor: pointer;

    transition:
        color 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.random-entry::before,
.random-entry::after {
    content: "✦";

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    color: var(--burgundy-light);

    opacity: 0;

    transition: 0.3s ease;
}

.random-entry::before {
    left: -20px;
}

.random-entry::after {
    right: -20px;
}

.random-entry:hover {
    color: var(--paper-light);

    border-color:
        rgba(120, 53, 74, 0.50);

    background:
        rgba(50, 16, 29, 0.18);

    box-shadow:
        0 0 25px rgba(50, 16, 29, 0.18);

    transform: translateY(-2px);
}

.random-entry:hover::before,
.random-entry:hover::after {
    opacity: 1;
}


/* =========================================================
   LETTERS
   ========================================================= */

.letters-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 25px;
}

.letter-card {
    position: relative;

    min-height: 330px;

    padding: 38px 34px;

    background:
        linear-gradient(
            135deg,
            #171116,
            #0e0a0f
        );

    border:
        1px solid rgba(184, 167, 157, 0.13);

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.28);

    transition:
        transform 0.4s ease,
        border-color 0.4s ease;
}

.letter-card:nth-child(1) {
    transform: rotate(-1.2deg);
}

.letter-card:nth-child(2) {
    transform: rotate(1.2deg);
}

.letter-card:hover {
    border-color:
        rgba(120, 53, 74, 0.35);
}

.letter-number {
    font-size: 0.56rem;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    color: var(--burgundy-light);
}

.letter-card h3 {
    margin-top: 35px;

    font-family: var(--serif);

    font-size: 2rem;

    font-weight: 500;

    color: var(--paper);
}

.letter-card p {
    margin-top: 15px;

    font-family: var(--serif);

    font-size: 1rem;

    color: var(--text-soft);
}

.letter-signature {
    position: absolute;

    right: 28px;
    bottom: 25px;

    font-family: var(--script);

    font-size: 0.75rem;

    color: var(--paper-dark);

    transform: rotate(-5deg);
}


/* =========================================================
   MEMORIES
   ========================================================= */

.memory-layout {
    display: grid;

    grid-template-columns: 0.8fr 1.2fr;

    gap: 55px;

    align-items: start;
}

.memory-note {
    padding: 35px;

    background:
        linear-gradient(
            145deg,
            rgba(26, 16, 27, 0.75),
            rgba(13, 10, 16, 0.90)
        );

    border:
        1px solid rgba(184, 167, 157, 0.10);
}

.memory-note p {
    font-family: var(--serif);

    font-size: 1.25rem;

    line-height: 1.55;

    color: var(--paper);
}

.memory-list {
    display: flex;

    flex-direction: column;
}

.memory-item {
    display: grid;

    grid-template-columns: 100px 1fr;

    gap: 20px;

    padding: 20px 0;

    border-bottom:
        1px solid rgba(184, 167, 157, 0.08);
}

.memory-item:first-child {
    border-top:
        1px solid rgba(184, 167, 157, 0.08);
}

.memory-item span {
    font-size: 0.58rem;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    color: var(--text-dark);
}

.memory-item p {
    font-family: var(--serif);

    color: var(--text-soft);
}


/* =========================================================
   WRITINGS
   ========================================================= */

.writing-feature {
    position: relative;

    padding: 80px 50px;

    text-align: center;

    background:
        radial-gradient(
            circle at center,
            rgba(91, 23, 43, 0.10),
            transparent 60%
        );

    border:
        1px solid rgba(184, 167, 157, 0.08);
}

.writing-feature::before {
    content: "“";

    position: absolute;

    top: 20px;
    left: 30px;

    font-family: var(--serif);

    font-size: 6rem;

    line-height: 1;

    color: var(--burgundy);

    opacity: 0.20;
}

.writing-feature blockquote {
    max-width: 700px;

    margin: 0 auto;

    font-family: var(--serif);

    font-size: clamp(1.7rem, 4vw, 2.7rem);

    font-style: italic;

    line-height: 1.3;

    color: var(--paper);
}

.writing-feature cite {
    display: block;

    margin-top: 30px;

    font-family: var(--script);

    font-size: 0.7rem;

    font-style: normal;

    color: var(--paper-dark);
}


/* =========================================================
   MUSIC
   ========================================================= */

.music-box {
    padding: 45px;

    background:
        linear-gradient(
            145deg,
            rgba(26, 16, 27, 0.80),
            rgba(13, 10, 16, 0.90)
        );

    border:
        1px solid rgba(184, 167, 157, 0.10);
}

.music-box h3 {
    font-family: var(--serif);

    font-size: 2rem;

    font-weight: 500;

    color: var(--paper);
}

.music-box p {
    max-width: 600px;

    margin-top: 12px;

    font-family: var(--serif);

    color: var(--text-soft);
}


/* =========================================================
   ABOUT
   ========================================================= */

.about-card {
    display: grid;

    grid-template-columns: 0.7fr 1.3fr;

    gap: 45px;

    padding: 45px;

    background:
        rgba(13, 10, 16, 0.72);

    border:
        1px solid rgba(184, 167, 157, 0.10);
}

.about-title {
    font-family: var(--serif);

    font-size: 3rem;

    line-height: 1;

    color: var(--paper);
}

.about-text {
    font-family: var(--serif);

    color: var(--text-soft);
}

.about-text p + p {
    margin-top: 15px;
}


/* =========================================================
   TAGS
   ========================================================= */

.tags-section {
    padding: 60px 0;

    border-top:
        1px solid rgba(184, 167, 157, 0.08);
}

.tags-title {
    margin-bottom: 22px;

    font-size: 0.58rem;

    letter-spacing: 0.20em;

    text-transform: uppercase;

    color: var(--text-dark);
}

.tags {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;
}

.tag {
    padding: 6px 11px;

    border:
        1px solid rgba(184, 167, 157, 0.10);

    color: var(--text-dark);

    font-size: 0.58rem;

    letter-spacing: 0.08em;

    transition:
        color 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease;
}

.tag:hover {
    color: var(--paper);

    border-color:
        rgba(120, 53, 74, 0.40);

    background:
        rgba(50, 16, 29, 0.15);
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    padding: 50px 20px 20px;

    text-align: center;

    color: var(--text-dark);
}

.footer-symbols {
    font-size: 0.9rem;

    letter-spacing: 0.4em;

    color: var(--burgundy-light);

    opacity: 0.65;
}

footer p {
    margin-top: 18px;

    font-family: var(--serif);

    font-size: 0.85rem;

    font-style: italic;
}

.footer-copy {
    margin-top: 15px;

    font-family: var(--sans);

    font-size: 0.55rem;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    opacity: 0.5;
}


/* =========================================================
   CURSOR LIGHT
   ========================================================= */

.cursor-light {
    position: fixed;

    width: 320px;
    height: 320px;

    border-radius: 50%;

    pointer-events: none;

    transform: translate(-50%, -50%);

    z-index: 1;

    background:
        radial-gradient(
            circle,
            rgba(120, 53, 74, 0.09) 0%,
            rgba(120, 53, 74, 0.035) 35%,
            transparent 70%
        );

    mix-blend-mode: screen;
}


/* =========================================================
   CURSOR BATS
   ========================================================= */

.cursor-bat {
    position: fixed;

    pointer-events: none;

    z-index: 20;

    transform:
        translate(-50%, -50%)
        rotate(var(--rotation));

    opacity: 0.75;

    animation:
        cursorBatFade 0.9s ease forwards;
}

@keyframes cursorBatFade {

    0% {
        opacity: 0;

        transform:
            translate(-50%, -50%)
            rotate(var(--rotation))
            scale(0.5);
    }

    20% {
        opacity: 0.75;
    }

    100% {
        opacity: 0;

        transform:
            translate(-50%, -70%)
            rotate(var(--rotation))
            scale(0.8);
    }

}


/* =========================================================
   CURSOR SPARKS
   ========================================================= */

.cursor-spark {
    position: fixed;

    pointer-events: none;

    z-index: 21;

    color: var(--burgundy-light);

    font-size: 10px;

    animation:
        sparkFade 0.7s ease forwards;
}

@keyframes sparkFade {

    0% {
        opacity: 0;

        transform:
            scale(0.5)
            translateY(4px);
    }

    25% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;

        transform:
            scale(1.2)
            translateY(-12px);
    }

}


/* =========================================================
   CLICK PARTICLES
   ========================================================= */

.click-particle {
    position: fixed;

    pointer-events: none;

    z-index: 30;

    font-size: 13px;

    color: var(--paper);

    animation:
        clickBurst 0.9s ease forwards;
}

@keyframes clickBurst {

    0% {
        opacity: 0;

        transform:
            translate(-50%, -50%)
            scale(0.5)
            rotate(0deg);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;

        transform:
            translate(
                calc(-50% + var(--move-x)),
                calc(-50% + var(--move-y))
            )
            scale(0.8)
            rotate(var(--rotation));
    }

}


/* =========================================================
   FLYING BAT
   ========================================================= */

.flying-bat {
    position: fixed;

    pointer-events: none;

    z-index: 2;

    opacity: 0.5;
}

.flying-bat.fly-right {
    animation:
        flyRight 9s linear forwards;
}

.flying-bat.fly-left {
    animation:
        flyLeft 9s linear forwards;
}

@keyframes flyRight {

    from {
        transform:
            translateX(0)
            translateY(0)
            rotate(0deg);
    }

    25% {
        transform:
            translateX(25vw)
            translateY(-25px)
            rotate(-5deg);
    }

    50% {
        transform:
            translateX(50vw)
            translateY(30px)
            rotate(4deg);
    }

    75% {
        transform:
            translateX(75vw)
            translateY(-20px)
            rotate(-4deg);
    }

    to {
        transform:
            translateX(110vw)
            translateY(10px)
            rotate(2deg);
    }

}

@keyframes flyLeft {

    from {
        transform:
            translateX(0)
            translateY(0)
            rotate(0deg);
    }

    25% {
        transform:
            translateX(-25vw)
            translateY(30px)
            rotate(5deg);
    }

    50% {
        transform:
            translateX(-50vw)
            translateY(-25px)
            rotate(-4deg);
    }

    75% {
        transform:
            translateX(-75vw)
            translateY(20px)
            rotate(4deg);
    }

    to {
        transform:
            translateX(-110vw)
            translateY(-10px)
            rotate(-2deg);
    }

}


/* =========================================================
   SCROLL REVEAL
   ========================================================= */

.scroll-reveal {
    opacity: 0;

    transform: translateY(25px);

    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.scroll-reveal.is-visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   DEEP NIGHT
   ========================================================= */

body.deep-night {
    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(40, 10, 25, 0.16),
            transparent 45%
        ),
        #020204;
}

body.deep-night .site {
    filter: brightness(0.78);
}

body.deep-night .moon {
    opacity: 0.7;
}

body.deep-night .stars {
    opacity: 0.65;
}


/* =========================================================
   DEEP NIGHT BUTTON STATE
   ========================================================= */

body.deep-night .night-mode {
    color: var(--paper-light);

    border-color:
        rgba(154, 83, 105, 0.50);

    background:
        linear-gradient(
            135deg,
            rgba(50, 16, 29, 0.55),
            rgba(26, 16, 27, 0.85)
        );

    box-shadow:
        inset 0 0 15px rgba(91, 23, 43, 0.16),
        0 0 18px rgba(91, 23, 43, 0.10);
}

body.deep-night .night-mode::before {
    content: "☽";

    color: var(--burgundy-light);

    opacity: 1;

    transform: rotate(-10deg);
}

body.deep-night .night-mode:hover {
    border-color:
        rgba(154, 83, 105, 0.70);

    box-shadow:
        inset 0 0 18px rgba(91, 23, 43, 0.20),
        0 0 24px rgba(91, 23, 43, 0.14);
}


/* =========================================================
   SECRET MESSAGE
   ========================================================= */

.secret-message {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px;

    background:
        rgba(3, 2, 4, 0.94);

    backdrop-filter: blur(8px);

    opacity: 0;

    transition:
        opacity 0.5s ease;

    cursor: pointer;
}

.secret-message.show {
    opacity: 1;
}

.secret-inner {
    text-align: center;

    font-family: var(--serif);

    color: var(--paper);
}

.secret-inner span {
    display: block;

    margin-bottom: 25px;

    color: var(--burgundy-light);

    font-size: 1.1rem;
}

.secret-inner p {
    font-size: 1.4rem;

    line-height: 1.5;

    font-style: italic;
}

.secret-inner small {
    display: block;

    margin-top: 30px;

    color: var(--text-dark);

    font-size: 1rem;
}


/* =========================================================
   PAGE TRANSITIONS
   ========================================================= */

body.page-leaving {
    animation:
        pageLeave 0.45s ease forwards;
}

@keyframes pageLeave {

    from {
        opacity: 1;
    }

    to {
        opacity: 0;

        transform: translateY(5px);
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .site {
        width: min(100% - 30px, 650px);

        padding-top: 30px;
    }

    .site-title {
        font-size:
            clamp(3.5rem, 17vw, 5.5rem);
    }

    .main-nav {
        gap: 15px 20px;
    }

    .archive-controls {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }

    .archive-time {
        flex-wrap: wrap;
    }

    .night-mode {
        width: 100%;

        justify-content: center;
    }

    .welcome {
        padding: 80px 10px 90px;
    }

    .diary-grid {
        grid-template-columns: 1fr;
    }

    .diary-card:nth-child(3) {
        grid-column: auto;
    }

    .letters-grid {
        grid-template-columns: 1fr;
    }

    .memory-layout {
        grid-template-columns: 1fr;

        gap: 30px;
    }

    .about-card {
        grid-template-columns: 1fr;

        gap: 25px;

        padding: 30px;
    }

    .writing-feature {
        padding: 60px 25px;
    }

    .music-box {
        padding: 30px;
    }

    .moon {
        width: 75px;
        height: 75px;

        top: 6%;
        right: 5%;
    }

    .moon::after {
        width: 69px;
        height: 69px;

        left: 17px;
        top: -4px;
    }

    .cursor-light,
    .cursor-bat,
    .cursor-spark {
        display: none;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

    .stars {
        animation: none;
    }

    .scroll-reveal {
        opacity: 1;

        transform: none;
    }

}