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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.main-header {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
}

#theme-toggle {
    background: var(--cream-color);
    border: 2px solid var(--dark-green);
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

.dark-mode #theme-toggle {
    background: var(--dark-green);
    border-color: var(--cream-color);
}

.icon-moon { display: none; }
.dark-mode .icon-sun { display: none; }
.dark-mode .icon-moon { display: block; }

html {
    font-size: 15px;
    min-height: 100%;
}

/* fonts */
.alfa-slab-one-regular {
    font-family: "Alfa Slab One", serif;
    font-weight: 400;
    font-style: normal;
}

.roboto-serif {
    font-family: "Roboto Serif", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "wdth" 100,
        "GRAD" 0;
}

/* global styles */
body {
    margin: 0;
    text-align: center;
    background-color: var(--bg-color);
    background-size: 100% auto;
    background-position: center top;
    background-repeat: repeat-y;
    color: var(--text-main);
    font-family: var(--body-font);
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: auto !important; /* Required for ScrollSmoother */
}

/* Accessibility: Focus States */
:focus-visible {
    outline: 3px solid var(--light-orange);
    outline-offset: 4px;
    border-radius: 4px;
}

.trail-marker:focus-visible,
.trail-marker2:focus-visible {
    outline: 5px solid var(--cream-color);
    outline-offset: 10px;
}

main {
    display: flex;
    flex-direction: column;
}

section {
    min-height: 100svh;
    padding: var(--body-font-M);
}

.section-hero {
    position: relative;
    overflow: hidden;
    padding: 0;
    height: 100vh;
    width: 100%;
}

.parallax-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.section-content {
    width: min(50rem, 100%);
    margin-inline: auto;
    background-color: var(--card-bg);
    padding: var(--body-font-L);
    border-radius: 1rem;
    color: var(--text-main);
}

p {
    width: 40rem;
    height: 100%;
    margin: auto;
}

.trail-marker {
    width: 50rem;
    height: auto;
    margin-left: -40rem;
}

/* parallax scene */

.hero-layer-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -11;
}

.hero-layer-2, .hero-layer-3, .hero-layer-4, .hero-layer-5, .hero-layer-6, .hero-layer-7, .hero-layer-8 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-layer-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -10;
}

.hero-layer-3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -9;
}

.hero-layer-4 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -8;
}

.hero-layer-5 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -7;
}

.hero-layer-6 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -6;
}

.hero-layer-7 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -5;
}

.hero-layer-8 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -4;
}

/* sun svg */
.sun-svg {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translateX(-50%);
    width: 20rem;
    height: auto;
    z-index: -10;
}

.trail-start-svg {
    position: absolute;
    top: 100%;
    left: 45%;
    transform: translateX(-50%);
    width: 1210px;
    height: auto;
    z-index: -10;
    margin-top: 18rem;
}

.trail-svg {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: auto;
    z-index: -10;
    margin-top: 38.4rem;
}

h1 {
    font-family: var(--header-font);
    font-size: var(--header-font-M);
    margin: 3rem 0 0 0;
    color: var(--text-main);
}

h2 {
    font-family: var(--header-font);
    font-size: var(--body-font-L);
    margin: 0;
    color: var(--text-accent);
    letter-spacing: 0.05em;
}

.section-1-content {
    position: relative;
    z-index: 10;
    color: var(--cream-color);
    margin-top: 35vh;
}

/* section opening */
.section-content {
    justify-content: right;
    align-items: flex-end;
    gap: var(--body-font-M);
    margin-top: 18rem;
}

.section-content {
    line-height: 2;
}

ul {
    list-style-position: inside;
    text-align: left;
    padding-left: 10rem;
}

.opening-title-text {
    margin-left: -40rem;
    margin-top: -24rem;
}

/* right side signs stlying */
.trail-marker2 {
    width: 50rem;
    height: auto;
    margin-right: -40rem;
}

.closing-title-text {
    margin-right: -40rem;
    margin-top: -24rem;
    transition: transform 0.3s ease;
}

.trail-marker:hover,
.trail-marker2:hover {
    transform: scale(1.05) rotate(2deg);
}

.trail-marker:active,
.trail-marker2:active {
    transform: scale(0.95);
}

/* subheaders */
.opening-sub-text {
    margin-right: -40rem;
}

.closing-sub-text {
    margin-right: 40rem;
}

/* spacer */
.spacer {
    height: 30svh;
}

.spacer2 {
    height: 30svh;
}

/* opening */
.backpack-svg {
    position: absolute;
    top: 2;
    left: 65%;
    width: 20rem;
    height: auto;
    z-index: -10;
}

/* naming things */
.bush-svg {
    position: absolute;
    top: 57;
    left: 50%;
    width: 40rem;
    height: auto;
    z-index: -10;
}

#cloud {
    position: relative;
    z-index: -10;
    opacity: 0.7;
}

/* listening */
.listening-icons-row {
    width: min(60rem, 100%);
    margin: 7rem auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
}

.listening-sun-svg,
.listening-boot-svg,
.listening-arrows-merge-svg {
    width: 10rem;
    height: 10rem;
    object-fit: contain;
}

.listening-sun-svg {
    filter: drop-shadow(0 0 0.5rem rgba(222, 145, 0, 0.35));
}

.section-listening .section-content {
    margin-top: 18rem;
}

/* the memory */
.rock-svg {
    position: absolute;
    top: 1;
    left: 8%;
    width: 30rem;
    height: auto;
    z-index: -10;
}

.memory-icons-row {
    width: min(60rem, 100%);
    margin: 12rem auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.memory-row-item {
    width: 8.5rem;
    height: 8.5rem;
    object-fit: contain;
    fill: var(--cream-color);
}

/* campfire showpiece */
.section-campfire {
    padding: 0;
    background-color: #0c1402; /* Deep forest night */
    overflow: hidden;
}

.campfire-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sky-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 100%, #1a2a0a 0%, #050a02 100%);
    z-index: 1;
}

.campfire-elements {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.campfire-svg {
    width: 15rem;
    height: auto;
    filter: drop-shadow(0 0 20px #ff6600);
}

.tent-svg {
    width: 12rem;
    height: auto;
    margin-right: -4rem;
    margin-bottom: 1rem;
    transform: rotate(-5deg);
}

.campfire-text {
    position: relative;
    z-index: 3;
    color: var(--cream-color);
    text-align: center;
    max-width: 40rem;
    margin-top: 2rem;
}

.campfire-text h2 {
    color: #ffaa00;
    text-shadow: 0 0 10px rgba(255,170,0,0.5);
}

/* responsive layout */
@media (max-width: 900px) {
    section {
        padding: clamp(1rem, 4vw, 1.5rem);
    }

    h1 {
        font-size: clamp(2rem, 8.5vw, 3.3rem);
        line-height: 1.1;
    }

    h2 {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }

    p {
        width: 100%;
        max-width: 65ch;
    }

    .section-content {
        width: 100%;
        padding: clamp(1rem, 4vw, 1.6rem);
        margin-top: clamp(4rem, 10vw, 7rem);
        line-height: 1.7;
    }

    .section-1-content {
        margin-top: clamp(7rem, 14vh, 10rem);
    }

    .trail-marker,
    .trail-marker2 {
        width: clamp(11rem, 52vw, 16rem);
        margin-left: 0;
        margin-right: 0;
    }

    .opening-title-text,
    .closing-title-text,
    .opening-sub-text,
    .closing-sub-text {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0.5rem;
    }

    ul {
        padding-left: 1rem;
    }

    .sun-svg {
        width: clamp(8rem, 30vw, 13rem);
    }

    .trail-start-svg {
        width: 170vw;
        left: 50%;
        margin-top: 10rem;
    }

    .trail-svg {
        width: 185vw;
        margin-top: 24rem;
    }

    .backpack-svg,
    .bush-svg,
    .rock-svg {
        position: relative;
        left: auto;
        top: auto;
        width: min(82vw, 20rem);
        margin: 2rem auto 0;
        display: block;
        z-index: -2;
    }

    .listening-icons-row {
        margin-top: 4rem;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .listening-sun-svg,
    .listening-boot-svg,
    .listening-arrows-merge-svg {
        width: 5rem;
        height: 5rem;
    }

    .memory-icons-row {
        margin-top: 5rem;
        gap: 1.2rem;
    }

    .memory-row-item {
        width: 4.8rem;
        height: 4.8rem;
    }

    .spacer,
    .spacer2 {
        height: 16svh;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 14px;
    }

    .section-1-content {
        margin-top: clamp(6rem, 12vh, 8rem);
    }

    .trail-start-svg {
        margin-top: 7rem;
    }

    .trail-svg {
        margin-top: 18rem;
    }

    .listening-sun-svg,
    .listening-boot-svg,
    .listening-arrows-merge-svg {
        width: 4.3rem;
        height: 4.3rem;
    }
}