:root {
    color-scheme: light;
    --ink: #142420;
    --muted: #5d6b66;
    --line: #d8e3df;
    --soft: #eef5f2;
    --paper: #ffffff;
    --water: #0f6f75;
    --water-dark: #0b4e56;
    --moss: #4d7c46;
    --sun: #d79835;
    --ice: #dceef2;
    --shadow: 0 18px 48px rgba(20, 36, 32, 0.14);
    --header-height: 76px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f7faf8;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--water-dark);
}

.skip-link,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
    z-index: 20;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    background: var(--paper);
    border: 2px solid var(--water);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(247, 250, 248, 0.92);
    border-bottom: 1px solid rgba(216, 227, 223, 0.9);
    backdrop-filter: blur(14px);
}

.site-header__inner,
.section,
.site-footer__inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand__mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--water-dark);
    color: #fff;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    background: var(--soft);
    color: var(--water-dark);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.nav-toggle span:not(.sr-only) {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
}

.hero {
    height: calc(100svh - var(--header-height));
    min-height: 0;
    display: grid;
    align-items: end;
    background:
        linear-gradient(180deg, rgba(10, 28, 26, 0.12), rgba(10, 28, 26, 0.82)),
        url("/assets/images/bysjon-ockelbo-ronnasen-hero.webp") center / cover no-repeat,
        linear-gradient(135deg, #dceef2, #f7faf8);
    color: #fff;
}

@supports (height: 100dvh) {
    .hero {
        height: calc(100dvh - var(--header-height));
    }
}

.hero__inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(32px, 10svh, 132px) 0 clamp(24px, 5svh, 42px);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--sun);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.12;
}

h1 {
    max-width: 760px;
    font-size: clamp(34px, 6.4vw, 72px);
}

h2 {
    font-size: clamp(30px, 4vw, 48px);
}

h3 {
    font-size: 22px;
}

.hero__copy {
    max-width: 680px;
    margin: clamp(10px, 2svh, 18px) 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 1.7vw, 20px);
}

.hero__actions,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(16px, 3svh, 28px);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--water-dark);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.button--light {
    background: #fff;
    color: var(--water-dark);
}

.button--ghost {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.section {
    padding: clamp(48px, 8vw, 92px) 0;
}

.section--compact {
    padding-top: 34px;
}

.section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section__head p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 18px;
}

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

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.water-overview {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(280px, 0.85fr);
    align-items: stretch;
}

.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 8px 28px rgba(20, 36, 32, 0.06);
}

.card__body {
    padding: clamp(18px, 3vw, 28px);
}

.metric-card {
    background: var(--paper);
    color: var(--ink);
}

.metric-card--water {
    position: relative;
    overflow: hidden;
    border-color: rgba(15, 111, 117, 0.25);
    background:
        linear-gradient(135deg, rgba(15, 111, 117, 0.14), rgba(215, 152, 53, 0.12)),
        var(--paper);
    box-shadow: 0 18px 44px rgba(15, 79, 86, 0.16);
}

.metric-card--water::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 9px;
    background: linear-gradient(90deg, var(--water), var(--sun));
}

.metric-card--water .card__body {
    display: grid;
    min-height: 190px;
    align-content: center;
}

.metric-card--temperature {
    border-color: rgba(15, 111, 117, 0.2);
    background:
        linear-gradient(135deg, rgba(220, 238, 242, 0.82), rgba(255, 255, 255, 0.9)),
        var(--paper);
}

.metric-card--temperature .card__body {
    display: grid;
    min-height: 190px;
    align-content: center;
}

.metric-card .waterlevel-current p {
    margin: 0;
}

.metric-card .watertemperature-current p {
    margin: 0;
}

.waterlevel-now,
.watertemperature-now {
    display: grid;
    gap: 10px;
}

.metric-card b,
.waterlevel-now b,
.watertemperature-now b {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.waterlevel-now__value {
    display: block;
    color: var(--water-dark);
    font-size: clamp(48px, 8vw, 76px);
    line-height: 1.05;
    font-weight: 850;
}

.watertemperature-now__value {
    display: block;
    color: var(--water-dark);
    font-size: clamp(40px, 7vw, 66px);
    line-height: 1.05;
    font-weight: 850;
}

.watertemperature-now__message {
    display: block;
    max-width: 260px;
    color: var(--water-dark);
    font-size: 20px;
    line-height: 1.25;
    font-weight: 850;
}

.waterlevel-now__trend {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 32px;
    padding: 5px 11px;
    border: 1px solid rgba(15, 111, 117, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    color: var(--water-dark);
    font-size: 15px;
    font-weight: 850;
}

.waterlevel-updated {
    margin-top: 16px;
    padding-top: 4px;
    border-top: 0;
    color: var(--muted);
    font-size: 15px;
}

.stat-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stat-list span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-list strong {
    font-size: 24px;
}

.prose {
    max-width: 760px;
}

.prose p {
    margin: 14px 0 0;
    color: var(--muted);
}

.feature-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding-left: 24px;
    position: relative;
}

.feature-list li::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--water);
}

.chart-panel {
    overflow: hidden;
}

.chart-panel__head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 0;
}

.chart-panel__head p {
    max-width: 580px;
    margin: 6px 0 0;
    color: var(--muted);
}

.chart-panel__body {
    padding: 18px 18px 22px;
}

.chart-panel .chart-scroll,
.chart-panel .chart-24h-scroll,
.chart-panel .chart-3m-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chart-panel canvas {
    max-width: none;
}

.subscribe-box {
    background: var(--water-dark);
    color: #fff;
}

.subscribe-box p {
    color: rgba(255, 255, 255, 0.82);
}

.subscribe-box form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 18px;
}

.subscribe-box input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
}

.subscribe-box input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.subscribe-box button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    background: #fff;
    color: var(--water-dark);
    font: inherit;
    font-weight: 850;
}

.timeline {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.timeline time {
    color: var(--water-dark);
    font-weight: 800;
}

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 0;
}

.site-footer p {
    margin: 4px 0 0;
    color: var(--muted);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.include-missing {
    padding: 14px 16px;
    border: 1px solid #f1cc74;
    border-radius: 8px;
    background: #fff8e1;
    color: #7a4f01;
}

@media (max-width: 780px) {
    .site-header__inner,
    .section,
    .site-footer__inner,
    .hero__inner {
        width: min(100% - 24px, 1120px);
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: var(--header-height);
        right: 12px;
        left: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--paper);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        border-radius: 8px;
    }

    .hero__inner {
        padding-top: clamp(18px, 6svh, 54px);
        padding-bottom: clamp(18px, 3svh, 28px);
    }

    h1 {
        font-size: clamp(30px, 10vw, 46px);
    }

    .hero__copy {
        font-size: 16px;
        line-height: 1.45;
    }

    .hero__actions {
        gap: 8px;
        margin-top: 14px;
    }

    .hero__actions .button {
        min-height: 42px;
        padding: 10px 14px;
    }

    .section__head,
    .site-footer__inner {
        display: grid;
    }

    .grid--2,
    .grid--3,
    .grid--4,
    .water-overview {
        grid-template-columns: 1fr;
    }

    .chart-panel__head {
        display: grid;
        padding: 18px 18px 0;
    }

    .subscribe-box form {
        grid-template-columns: 1fr;
    }

    .timeline li {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
