:root {
    --ink: #1c1a17;
    --muted: #6f675d;
    --paper: #fbfaf7;
    --soft: #f2eee8;
    --line: #ddd2c4;
    --gold: #b89252;
    --gold-dark: #7a5c2e;
    --shadow: 0 18px 45px rgba(32, 26, 20, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: "Raleway", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(110deg, rgba(184, 146, 82, 0.1), transparent 42%),
        radial-gradient(circle at top right, rgba(184, 146, 82, 0.08), transparent 36%);
}

a {
    color: var(--gold-dark);
    text-underline-offset: 0.22em;
}

a:hover {
    color: var(--ink);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
    align-items: center;
    gap: 28px;
    width: 100%;
    padding: 12px clamp(20px, 5vw, 70px);
    background: rgba(251, 250, 247, 0.92);
    border-bottom: 1px solid rgba(184, 146, 82, 0.22);
    backdrop-filter: blur(16px);
}

body:not(.home) .site-header {
    min-height: 86px;
}

body.home .site-header {
    display: flex;
    justify-content: center;
    min-height: 72px;
    padding-top: 16px;
    padding-bottom: 16px;
}

body.home .site-header .banner {
    display: none;
}

body:not(.home) > .banner {
    margin: 26px auto 6px;
}

.banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(251, 250, 247, 0.78) 58%, rgba(251, 250, 247, 0) 72%);
}

.banner img {
    display: block;
    width: min(142px, 32vw);
    height: auto;
    mix-blend-mode: multiply;
}

#slogan {
    width: min(960px, calc(100% - 40px));
    margin: 18px auto 0;
    color: var(--gold-dark);
    font-family: "Euphoria Script", cursive;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.1;
    text-align: center;
    opacity: 1;
    transition: opacity 2s ease-in-out;
}

#slogan p {
    margin: 0;
}

.Pääkuva {
    width: 100%;
}

.home .Pääkuva {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #f7f5f0;
}

.home .Pääkuva::after {
    display: none;
}

.home .Pääkuva picture,
.home .Pääkuva img {
    display: block;
    width: 100%;
}

.home .Pääkuva img {
    height: auto;
}

body:not(.home) .Pääkuva {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    padding: 0 clamp(16px, 4vw, 54px);
}

body:not(.home) .Pääkuva img {
    display: block;
    width: min(1280px, 100%);
    max-height: 460px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.mobile {
    display: none;
}

main,
section,
aside {
    width: 100%;
}

main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 52px);
}

.about-main {
    max-width: 1160px;
    padding-top: clamp(38px, 6vw, 76px);
}

section,
aside {
    display: flex;
    align-items: center;
    justify-content: center;
}

article {
    width: 100%;
}

hr {
    width: min(960px, calc(100% - 40px));
    height: 1px;
    margin: 36px auto;
    border: 0;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}

h1,
h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 48px auto 18px;
    color: var(--ink);
    font-family: "Euphoria Script", cursive;
    font-size: clamp(42px, 7vw, 72px);
    font-weight: 400;
    line-height: 1;
    text-align: center;
}

h2 {
    max-width: 860px;
    margin: 40px auto 22px;
    color: var(--ink);
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
}

h3 {
    font-size: clamp(36px, 5vw, 56px);
}

.intro-section {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 720px);
    gap: clamp(28px, 5vw, 62px);
    align-items: center;
    justify-content: center;
    padding-top: clamp(38px, 6vw, 78px);
    padding-bottom: clamp(26px, 4vw, 48px);
}

.intro-section h2 {
    margin: 0 0 22px;
    text-align: left;
}

.tietoa {
    width: 100%;
    margin: 0;
    color: var(--muted);
    text-align: left;
}

.tietoa p {
    margin: 0 0 18px;
}

.tietoa small {
    color: var(--gold-dark);
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: 17px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.about-page h1 {
    margin-top: 0;
    margin-bottom: clamp(28px, 5vw, 54px);
    font-size: clamp(46px, 6vw, 66px);
}

.gallery-page h1 {
    margin-top: clamp(38px, 6vw, 76px);
}

.gallery-page h2,
.gallery-page > .tietoa {
    width: min(900px, calc(100% - 36px));
    margin-left: auto;
    margin-right: auto;
}

.gallery-page > .tietoa {
    text-align: center;
}

.about-copy {
    display: block;
    width: min(900px, 100%);
    margin: 0 auto;
}

.about-copy .tietoa {
    text-align: left;
    font-size: 18px;
    line-height: 1.85;
}

.about-copy .tietoa p {
    margin-bottom: 22px;
}

.section-divider {
    width: min(520px, 72%);
    height: 1px;
    margin: clamp(18px, 4vw, 42px) auto clamp(34px, 6vw, 70px);
    background: linear-gradient(90deg, transparent, rgba(122, 92, 46, 0.55), transparent);
}

#etusivu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(820px, 100%);
    margin: 0 auto 62px;
}

#omaKuva,
#Omakuva,
.VaihtuvatKuvat {
    margin: 0;
}

#omaKuva img,
#Omakuva img,
.VaihtuvatKuvat img {
    display: block;
    width: 100%;
    box-shadow: var(--shadow);
}

#omaKuva img {
    height: auto;
    aspect-ratio: 4 / 4.9;
    object-fit: cover;
    object-position: center top;
}

.VaihtuvatKuvat {
    display: grid;
    place-items: center;
    width: min(760px, 100%);
    min-height: 0;
    padding: 0;
    background: transparent;
    box-shadow: var(--shadow);
}

.VaihtuvatKuvat img {
    display: none;
    width: 100%;
    max-height: none;
    height: auto;
    object-fit: cover;
    box-shadow: none;
}

.visible {
    display: block;
}

#Omakuva {
    width: min(860px, 100%);
    margin: clamp(34px, 6vw, 70px) auto;
}

#Omakuva img {
    display: block;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center top;
}

.Listat {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 24px;
    width: min(980px, calc(100% - 36px));
    margin: 18px auto 40px;
    color: var(--muted);
}

.Listat > div {
    padding: 26px;
    background: #fff;
    border: 1px solid rgba(184, 146, 82, 0.22);
}

.Listat ul {
    margin: 0;
    padding-left: 20px;
}

.Listat li + li {
    margin-top: 10px;
}

.VKS-sormukset {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: min(1240px, calc(100% - 36px));
    margin: 38px auto 52px;
}

.VKS-sormukset img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.08;
    object-fit: cover;
    box-shadow: var(--shadow);
    cursor: zoom-in;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.VKS-sormukset img:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(32, 26, 20, 0.18);
}

#haatlehtiKuvat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    width: 100%;
    margin-top: 20px;
}

#haatlehtiKuvat img {
    width: min(900px, calc(100% - 36px));
    height: auto;
    box-shadow: var(--shadow);
    cursor: zoom-in;
}

.Gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: min(1180px, calc(100% - 28px));
    margin: 20px auto 60px;
}

.Gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--soft);
    cursor: zoom-in;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.Gallery img:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

#clearFloats {
    content: "";
    display: table;
    clear: both;
}

#footerteksti {
    width: min(920px, calc(100% - 36px));
    margin: 32px auto 14px;
    color: var(--muted);
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: 15px;
    text-align: center;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 150px;
    margin-top: 28px;
    padding: 28px 20px;
    background: #161310;
    color: #fffaf1;
    text-align: center;
}

footer #Links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
}

footer #Links img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: brightness(1.18);
}

footer p {
    margin: 6px 0 0;
    color: #d7cab8;
    font-size: 12px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.84);
    justify-content: center;
    align-items: center;
}

.modal-content {
    display: block;
    max-width: 86%;
    max-height: 86%;
    margin: auto;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #d0c1aa;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.next {
    right: 10px;
}

.prev {
    left: 10px;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.55);
}

@media (max-width: 900px) {
    .site-header {
        position: static;
        flex-direction: column;
        gap: 8px;
        padding: 14px 18px 8px;
    }

    .home .Pääkuva {
        min-height: 0;
    }

    #etusivu,
    .Listat {
        grid-template-columns: 1fr;
    }

    .intro-section {
        grid-template-columns: 1fr;
        width: min(620px, 100%);
        margin: 0 auto;
        text-align: center;
    }

    .intro-section article {
        order: 1;
    }

    .intro-section #omaKuva {
        order: 2;
    }

    .tietoa {
        text-align: center;
    }

    .intro-section h2 {
        text-align: center;
    }

    #omaKuva {
        width: min(360px, 100%);
        margin: 0 auto;
    }

    #etusivu {
        width: min(620px, 100%);
        gap: 24px;
    }

    .VaihtuvatKuvat {
        min-height: 0;
    }

    .VaihtuvatKuvat img {
        max-height: none;
    }

    .VKS-sormukset,
    .Gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    body {
        font-size: 16px;
    }

    .banner img {
        width: 170px;
    }

    #slogan {
        display: none;
    }

    .home .Pääkuva {
        min-height: 0;
    }

    .desktop {
        display: none;
    }

    .mobile {
        display: block;
    }

    body:not(.home) .Pääkuva img {
        max-height: 300px;
    }

    .Gallery {
        gap: 8px;
        width: calc(100% - 20px);
    }

    #etusivu {
        width: 100%;
        margin-top: 18px;
    }

    .intro-section {
        padding-top: 30px;
    }

    .section-divider {
        width: 76%;
        margin: 18px auto 34px;
    }

    .VaihtuvatKuvat {
        padding: 0;
    }

    .Listat > div {
        padding: 20px;
    }

    .VKS-sormukset {
        grid-template-columns: 1fr;
    }
}
