/*
|--------------------------------------------------------------------------
| Landingssida for Produksjonslogg
|--------------------------------------------------------------------------
| Én side, ingen bibliotek og ingen JavaScript. Skrifttypen og merket er de
| samme som i appen, så sida og produktet ser ut som familie.
*/

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/source-sans-pro-latin-400-normal.woff2) format('woff2');
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/source-sans-pro-latin-700-normal.woff2) format('woff2');
}

:root {
    /* Platen i merket er #0f172a - den bærer de mørke flatene */
    --ink: #0f172a;
    --deep: #080d1a;
    --sea: #16264a;
    --paper: #f4f6fa;
    --surface: #ffffff;
    --line: #dfe5ee;
    --text: #1c2740;
    --muted: #56657d;
    --accent: #38bdf8;
    --accent-ink: #0b6699;
    --on-dark: #e8eef8;
    --on-dark-muted: #9fb0c9;
    --dark-line: rgba(255, 255, 255, .12);
    --ok: #34d399;
    --warn: #fbbf24;
    --slip: #fdf6dc;

    --wrap: 1120px;
    --gutter: clamp(16px, 4vw, 32px);
    --radius: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: 'Source Sans Pro', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    line-height: 1.12;
    letter-spacing: -.015em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.3rem, 6.2vw, 4.1rem);
}

h2 {
    font-size: clamp(1.75rem, 3.8vw, 2.6rem);
}

h3 {
    font-size: 1.2rem;
    letter-spacing: 0;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip {
    position: absolute;
    left: -9999px;
}

.skip:focus {
    left: 16px;
    top: 16px;
    z-index: 10;
    padding: 8px 14px;
    background: var(--surface);
    color: var(--ink);
}

.eyebrow {
    display: block;
    margin-bottom: 14px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

.dark .eyebrow {
    color: var(--accent);
}

.lead {
    max-width: 38em;
    font-size: clamp(1.08rem, 1.6vw, 1.25rem);
    color: var(--muted);
}

.dark .lead {
    color: var(--on-dark-muted);
}

/*
|--------------------------------------------------------------------------
| Knapper
|--------------------------------------------------------------------------
*/

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, transform .15s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--deep);
}

.btn-primary:hover {
    background: #7dd3fc;
}

.btn-ghost {
    border-color: var(--dark-line);
    color: var(--on-dark);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, .4);
}

.btn-small {
    padding: 9px 16px;
    font-size: .95rem;
}

/*
|--------------------------------------------------------------------------
| Toppen
|--------------------------------------------------------------------------
*/

.dark {
    background: var(--ink);
    color: var(--on-dark);
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    letter-spacing: -.01em;
}

/* Den inverterte varianten av merket: mørk fisk på lys plate, mot den mørke bakgrunnen */
.brand img {
    width: 38px;
    height: 38px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 1rem;
}

.nav a:not(.btn) {
    color: var(--on-dark-muted);
    text-decoration: none;
}

.nav a:not(.btn):hover {
    color: #fff;
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 480px at 85% -10%, rgba(56, 189, 248, .18), transparent 65%),
        linear-gradient(180deg, var(--ink) 0%, var(--deep) 100%);
}

.hero-body {
    padding-top: clamp(36px, 7vw, 84px);
    padding-bottom: clamp(48px, 8vw, 96px);
}

.hero h1 {
    max-width: 13em;
    color: #fff;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero .lead {
    margin-top: 22px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/*
|--------------------------------------------------------------------------
| Illustrasjonen: fabrikkens skjerm og broas skjerm
|--------------------------------------------------------------------------
| Tegnet i HTML og CSS, ikke et skjermbilde - tallene er oppdiktet og sier
| det selv i bildeteksten.
*/

.stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    align-items: center;
    margin-top: clamp(40px, 6vw, 72px);
}

.screen {
    border: 1px solid var(--dark-line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .045);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
    overflow: hidden;
}

.screen-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--dark-line);
    font-size: .9rem;
    color: var(--on-dark-muted);
}

.screen-bar strong {
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
}

.screen-body {
    padding: 16px;
}

.screen-title {
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.freezers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.freezer {
    padding: 10px;
    border: 1px solid var(--dark-line);
    border-radius: 8px;
    font-size: .82rem;
    line-height: 1.35;
    color: var(--on-dark-muted);
}

.freezer b {
    display: block;
    color: #fff;
    font-size: .9rem;
}

.freezer.is-done {
    border-color: rgba(52, 211, 153, .45);
    background: rgba(52, 211, 153, .08);
}

.freezer.is-active {
    border-color: var(--accent);
    background: rgba(56, 189, 248, .12);
    animation: pulse 2.6s ease-in-out infinite;
}

.queue {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

.queue th,
.queue td {
    padding: 9px 6px;
    text-align: left;
    border-bottom: 1px solid var(--dark-line);
    white-space: nowrap;
}

.queue th {
    font-size: .76rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.queue tr:last-child td {
    border-bottom: 0;
}

.queue .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

.badge-done {
    background: rgba(52, 211, 153, .16);
    color: var(--ok);
}

.badge-active {
    background: rgba(56, 189, 248, .18);
    color: var(--accent);
}

.badge-wait {
    background: rgba(255, 255, 255, .1);
    color: var(--on-dark-muted);
}

/* Forbindelsen mellom de to skjermene: prikken er det som før var en lapp */
.link {
    position: relative;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px);
    opacity: .9;
}

.link::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
    animation: travel 2.6s ease-in-out infinite;
}

.caption {
    margin-top: 14px;
    font-size: .88rem;
    color: var(--on-dark-muted);
    text-align: center;
}

@keyframes travel {
    0% { left: 0; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { left: calc(100% - 12px); opacity: 0; }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
    50% { box-shadow: 0 0 0 4px rgba(56, 189, 248, .18); }
}

/*
|--------------------------------------------------------------------------
| Seksjonene
|--------------------------------------------------------------------------
*/

.section {
    padding: clamp(56px, 9vw, 110px) 0;
}

.section-head {
    max-width: 44em;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head .lead {
    margin-top: 16px;
}

/* Før og nå */
.compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 36px);
    align-items: stretch;
}

.then,
.now {
    padding: clamp(22px, 3vw, 34px);
    border-radius: var(--radius);
}

.then {
    background: var(--slip);
    border: 1px dashed #d9c98a;
    transform: rotate(-1.2deg);
    box-shadow: 0 14px 30px -18px rgba(60, 50, 10, .45);
}

.now {
    background: var(--ink);
    color: var(--on-dark);
}

.tag {
    display: inline-block;
    margin-bottom: 12px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.then .tag {
    color: #8a6d12;
}

.now .tag {
    color: var(--accent);
}

.then h3,
.now h3 {
    margin-bottom: 14px;
    font-size: 1.45rem;
}

.then ul,
.now ul {
    margin: 0;
    padding-left: 1.15em;
}

.then li,
.now li {
    margin-top: 8px;
}

.then li {
    color: #5a4c1c;
}

.now li {
    color: var(--on-dark-muted);
}

.now li::marker {
    color: var(--accent);
}

/* Slik virker det */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
    border-top: 2px solid var(--ink);
}

.steps li {
    counter-increment: step;
    padding: 22px 22px 0 0;
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    margin-bottom: 10px;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--accent-ink);
    font-variant-numeric: tabular-nums;
}

.steps .who {
    display: block;
    margin-bottom: 4px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.steps h3 {
    margin-bottom: 8px;
}

.steps p {
    color: var(--muted);
    font-size: 1rem;
}

/* Funksjonene */
.alt {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.feature {
    padding: 26px;
    background: var(--surface);
}

.feature svg {
    width: 28px;
    height: 28px;
    margin-bottom: 14px;
    stroke: var(--accent-ink);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature h3 {
    margin-bottom: 8px;
}

.feature p {
    color: var(--muted);
    font-size: 1rem;
}

/* Statistikk */
.stats {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.stats ul {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.stats li {
    position: relative;
    margin-top: 10px;
    padding-left: 26px;
    color: var(--on-dark-muted);
}

.stats li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .62em;
    width: 14px;
    height: 2px;
    background: var(--accent);
}

.tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

/* Verdien står nederst, så tallene står på linje også når en ledetekst går over to linjer */
.tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--dark-line);
    border-radius: 8px;
}

.tile span {
    display: block;
    font-size: .76rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.tile b {
    font-size: 1.45rem;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Lasten mot lastekapasiteten, som søyla i turinformasjonen i appen */
.capacity {
    margin-bottom: 18px;
}

.capacity-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-size: .88rem;
    color: var(--on-dark-muted);
}

.capacity-head b {
    font-size: 1rem;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.capacity-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}

.capacity-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--ok);
}

.chart {
    display: block;
    width: 100%;
    height: auto;
}

.chart rect {
    fill: var(--accent);
    opacity: .85;
}

.chart rect.is-best {
    fill: var(--ok);
    opacity: 1;
}

.chart line {
    stroke: var(--dark-line);
}

/* Kontakt */
.contact {
    text-align: center;
}

.contact h2,
.contact .lead {
    margin-left: auto;
    margin-right: auto;
}

.contact .lead {
    margin-top: 16px;
}

.contact .actions {
    justify-content: center;
}

.contact .btn-primary {
    background: var(--ink);
    color: #fff;
}

.contact .btn-primary:hover {
    background: var(--sea);
}

.foot {
    padding: 28px 0;
    font-size: .95rem;
    color: var(--on-dark-muted);
}

.foot .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.foot a {
    color: var(--on-dark);
}

/*
|--------------------------------------------------------------------------
| Smale skjermer
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {
    .features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .steps li {
        padding-bottom: 12px;
    }

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

@media (max-width: 720px) {
    body {
        font-size: 17px;
    }

    .nav a:not(.btn) {
        display: none;
    }

    /* Skjermene under hverandre, og forbindelsen står på høykant */
    .stage {
        grid-template-columns: minmax(0, 1fr);
    }

    .link {
        width: 2px;
        height: 44px;
        margin: 0 auto;
        background: repeating-linear-gradient(180deg, var(--accent) 0 6px, transparent 6px 12px);
    }

    .link::after {
        top: 0;
        left: -5px;
        animation-name: travel-down;
    }

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

    .then {
        transform: rotate(-.6deg);
    }
}

@media (max-width: 560px) {
    .features,
    .steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .steps li {
        padding-right: 0;
    }

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

@keyframes travel-down {
    0% { top: 0; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: calc(100% - 12px); opacity: 0; }
}

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

    .link::after,
    .freezer.is-active {
        animation: none;
    }

    .btn:hover {
        transform: none;
    }
}
