/* Import fonts (Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;700&display=swap');

/* Reset and Base Styles */
:root {
    --blue: #002F6C;
}
*, ::before, ::after {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}
html {
    width: 100%;
    scroll-behavior: smooth;
}
body {
    width: 100%;
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    font-size: 18px;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400; /* DM Serif Display has only regular/italic */
    line-height: 1.2em;
    color: inherit;
}
h1, .h1 {
    font-size: 6vw;
    margin-bottom: 0.8em;
}
h2, .h2 {
    font-size: 4vw;
    margin-bottom: 0.8em;
}
h3, .h3 {
    font-size: 3vw;
    margin-bottom: 0.6em;
}
h3 small {
    display: block;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin-top: -20px;

}
h1:last-child, .h1:last-child,
h2:last-child, .h2:last-child,
h3:last-child, .h3:last-child {
    margin-bottom: 0;
}
p:not(:last-child) {
    margin-bottom: 2rem;
}
mark {
    background-color: var(--blue);
    color: white;
    padding: 0 1.5rem;
    border-radius: 0;
}
.highlight {
    font-family: 'DM Serif Display';
    color: #ffafcb;
    font-size: 24px;
}
.blue-bg {
    background-color: var(--blue);
    color: white;
}
.blue-bg mark {
    background-color: white;
    color: var(--blue);
}
img {
    max-width: 100%;
    height: auto;
}
img + p {
    margin-top: 2rem;
}
section {
    width: 100%;
    height: 100%;
    min-height: 100vh;
}
.text-center {
    text-align: center;
}
.v-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px;
}
.v-center > div {
    max-width: 800px;
    margin: 0 auto;
}
.v-center.full-width > div {
    max-width: 100%;
    padding: 50px;
}

.row {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 50px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.row .col {
    width: 45%;
}
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
}
.alternate {
    background-color: var(--blue);
    color: white;
}
a.button,
button {
    background-color: white;
    color: var(--blue);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 400;
    font-size: 1.2rem;
    display: inline-block;
    margin: 0 10px 15px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
a.button svg,
button svg {
    fill: var(--blue);
}
a.button.blue,
button.blue {
    background-color: var(--blue);
    color: white;
}
a.button + p {
    margin-top: 2rem;
}
/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    text-align: center;
}
.hero-image {
    max-width: none;
    width: 100%;
    height: 100vh;
    object-fit: cover;
}
.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
}

/* MAP SECTION */
.map-background {
    overflow: hidden;
    position: relative;
}
.map-image {
    transform-origin: 70% bottom;
}
.map-image-label {
    opacity: 0;
    position: absolute;
    bottom: 165px;
    left: 190px;
    transform: translateX(-50%);
    width: 200px;
    height: 50px;
    color: white;
    text-shadow: 1px 1px 2px #000;
}

/* Taimen Video Section */
.video-bg-section {
    background-color: #000;
    padding-bottom: 50vh;
}
.video-bg {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}
.video-bg video {
    position: absolute; /* changed from relative */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.text-section {
    position: relative;
    z-index: 3;
    margin: 50vh auto 50vh 50px; /* align left */
    width: 600px;
    max-width: 90%; /* responsive fix */
    background-color: var(--blue);
    padding: 50px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* optional */
}
.btn {
    display: inline-block;
    background: #fff;
    color: var(--blue);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    margin: 0 10px;
}

/* BG IMG SCROLLER */
.bg-img-wrapper {
    width: 100%;
    height: 100vh;
    position: sticky;
    z-index: 1;
    inset: 0;
}

.bg-img-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

section.panel {
    position: relative;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.5);
}



/* SPLIT SCENE SCROLLER */
.split-scroll-section {
    background: #f6f6f6;
    padding: 10vh 5vw;
}

.split-scroll-container {
    display: flex;
    gap: 5vw;
    max-width: 1200px;
    margin: 0 auto;
}

/* LEFT COLUMN */
.split-scroll-section .split-scroll-texts {
    flex: 1;
}

.split-scene {
    position: relative;
    margin: 200vh 0; /* space between scenes */
}

.split-scroll-text {
    opacity: 0.2;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    margin: 60vh 0;
}

.split-scroll-text.active {
    opacity: 1;
    transform: translateY(0);
}

.split-scroll-text h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #0077b6;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

/* RIGHT COLUMN */
.split-scroll-image {
    flex: 1;
    position: sticky;
    top: 10vh;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.split-scroll-image img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: cover;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.split-scroll-image img.fade-out {
    opacity: 0;
    transform: scale(1.05);
}

/* SCROLL BG TEXT SECTION */
.scroll-bg-section {
    background-color: #000;
    position: relative;
    isolation: isolate;
    /*padding-bottom: 50vh;*/
}

/* Sticky background inside section */
.bg-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.bg-sticky video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    will-change: opacity;
}

.bg-layer.show {
    opacity: 1;
}

/* Text content */
.text-rail {
    position: relative;
    z-index: 15;
    max-width: 85%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Scenes */
.scene {
    margin: 0 0;
}
.scene:last-child {
    padding-bottom: 50vh;
}

/* Card style */
.scroll-text {
    background: #0b3a72;
    color: #fff;
    padding: 2rem;
    border-radius: 0;
    max-width: 600px;
    margin: 50vh auto 50vh 0; /* align left */
    opacity: 0;
    transition: opacity 0.5s ease;
}
.scroll-text:first-child {
    margin-top: 0;
}
.scroll-text.center {
    text-align: center;
    margin: 50vh auto; /* center */
}
.scroll-text.right {
    margin: 50vh 0 50vh auto; /* align right */
}
.scroll-text.white {
    background: rgba(255, 255, 255, 1);
    color: var(--blue);
}
.scroll-text.active {
    opacity: 1;
}

.scroll-text p {
    line-height: 1.6;
}
.scene-trigger {
    position: relative;
    width: 100%;
    height: 1px;        /* invisible marker */
    margin-top: 0;   /* hits viewport center */
}

/* FORM*/
#js-feedback-form {
    max-width: 600px;
    margin: 0 auto;
}

#js-feedback-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 20px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

#js-feedback-form textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(0, 47, 108, 0.1);
}

#js-feedback-form textarea::placeholder {
    color: #999;
    opacity: 1;
}
#js-feedback:not(:empty) {
    min-height: 52px;
}
#js-feedback.error {
    color: red; 
}
#js-feedback.success {
    color: green; 
}

footer {
    text-align: center;
    color: #aaaaaa;
    padding: 50px 0;
    font-size: 14px;
}

/* For smaller screens */
@media (max-width: 1280px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 900px) {
    .scene { 
        padding: 25vh 0; /* Reduce padding on mobile */
    }
    .scroll-text { 
        margin: 25vh auto; /* Reduce margin on mobile */
        max-width: 90%; /* Better mobile width */
    }
    .v-center > div {
        max-width: 90% !important;
    }
}
@media (max-width: 768px) {
    .row {
        flex-direction: column-reverse;
        gap: 40px;
    }
    .row .col {
        width: 100%;
        max-width: 450px;
    }
    .grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .text-rail {
        z-index: 15;
        max-width: 90%;
        padding: 0;
    }
    .text-center {
        padding: 100px 0;
    }
    .v-center {
        padding: 100px 0;
    }
    .v-center.full-width > div {
        max-width: 100%;
        padding: 100px 25px;
    }
    h1, .h1 {
        font-size: clamp(44px, 8vw, 64px);
    }
    h2, .h2 {
        font-size: clamp(34px, 6vw, 44px);
    }
    h3, .h3 {
        font-size: clamp(24px, 5vw, 34px);
    }
    a.button {
        text-align: center;
        line-height: 1em;
    }

    /*
    section[data-current-scene="live-fishing"] .bg-layer {
        background-position: 70% center !important;
    }
    section[data-current-scene="kymijoki"] .bg-layer {
        background-position: 80% 50% !important;
    }
    section[data-current-scene="live-ice-fishing"] .bg-layer {
        background-position: 30% 50% !important;
    }
    */
}