:root {
    --orange: #ff8a3d;
    --turquoise: #46c7c7;
    --black: #111;
    --paper: #fffdf8;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--black);
    background: #f2efe9 url("img/saksa-opaasi.png") center top / cover fixed no-repeat;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.125rem;
    line-height: 1.65;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, .80);
}

a {
    color: #064f52;
    text-decoration-thickness: .12em;
    text-underline-offset: .18em;
}

a:hover {
    text-decoration-thickness: .2em;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
    outline: 4px solid var(--black);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    z-index: 20;
    top: 1rem;
    left: 1rem;
    padding: .7rem 1rem;
    background: #fff;
    color: #000;
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: none;
}

main {
    width: min(100% - 2rem, 1400px);
    margin-inline: auto;
    padding: clamp(2rem, 6vw, 6rem) 0;
}

.content-card {
    width: min(100%, var(--max));
    margin: 0 auto clamp(3rem, 8vw, 7rem);
    padding: clamp(1.4rem, 4vw, 4rem);
    background: rgba(255, 253, 248, .95);
    border-top: 12px solid var(--orange);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .12);
}

.intro {
    border-bottom: 8px solid var(--turquoise);
}

h1,
h2,
h3 {
    margin: 0 0 .55em;
    line-height: 1.12;
    letter-spacing: -.025em;
}

h1 {
    max-width: 14ch;
    font-size: clamp(2.7rem, 8vw, 6.8rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
    margin-top: 1.7em;
    font-size: 1.35rem;
}

p,
li {
    max-width: 72ch;
}

.eyebrow {
    margin: 0 0 .6rem;
    font-size: .86rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.carousel-section {
    margin-bottom: clamp(3rem, 8vw, 7rem);
}

.carousel-shell {
    display: grid;
    grid-template-columns: 10% 80% 10%;
    align-items: center;
}

.slide {
    margin: 0;
    min-width: 0;
    background: var(--paper);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
}

.image-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: zoom-in;
}

.slide img {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain;
}

figcaption {
    min-height: 14rem;
    padding: clamp(1.2rem, 3vw, 2.5rem);
    border-top: 8px solid var(--turquoise);
}

figcaption h2 {
    max-width: 32ch;
}

figcaption p {
    margin-bottom: 0;
}

.counter {
    margin: 0 0 .5rem;
    font-weight: 800;
}

.arrow {
    width: clamp(2.8rem, 6vw, 5.5rem);
    height: clamp(2.8rem, 6vw, 5.5rem);
    justify-self: center;
    border: 3px solid #000;
    border-radius: 50%;
    color: #000;
    background: var(--orange);
    font: 700 clamp(1.5rem, 3vw, 2.5rem)/1 Arial;
    cursor: pointer;
}

.arrow:hover {
    background: var(--turquoise);
}

blockquote {
    margin: 2rem 0 0;
    padding: 1rem 1.5rem;
    border-left: 8px solid var(--orange);
    background: #e7fafa;
    font-size: 1.25rem;
    font-weight: 700;
}

code {
    padding: .08em .28em;
    background: #eee7dc;
    color: #000;
}

.link-list {
    padding: 0;
    list-style: none;
}

.link-list li {
    border-top: 2px solid #1f1f1f;
}

.link-list li:last-child {
    border-bottom: 2px solid #1f1f1f;
}

.link-list a {
    display: block;
    padding: 1rem .2rem;
    color: #000;
    font-weight: 700;
}

.fullscreen-dialog {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #000;
    overflow: hidden;
}

.fullscreen-dialog::backdrop {
    background: #000;
}

.fullscreen-dialog[open] {
    display: grid;
    place-items: center;
}

.fullscreen-dialog img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
}

.close {
    position: fixed;
    z-index: 2;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    width: 3rem;
    height: 3rem;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .72);
    font-size: 1.25rem;
    cursor: pointer;
}

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

@media (max-width:700px) {
    body {
        font-size: 1rem;
        background-attachment: scroll;
    }

    main {
        width: min(100% - 1rem, 1400px);
    }

    .carousel-shell {
        grid-template-columns: 3.25rem minmax(0, 1fr) 3.25rem;
    }

    .arrow {
        width: 2.7rem;
        height: 2.7rem;
        position: relative;
        z-index: 2;
    }

    .previous {
        margin-right: -1rem;
    }

    .next {
        margin-left: -1rem;
    }

    figcaption {
        min-height: 17rem;
    }
}

@media (prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}