/*
 * uokonsult.se: Material 3 in hand-written CSS, the look the Vue site had (2026-10-30: the plum top bar, Nunito, a
 * rounded hero with the page's name on a scrim, outlined surfaces, icons on tonal rounds), without Bootstrap.
 * The plum and the light tokens are the Vue site's own (src/styles/theme/material.scss, $MainColor #7D2E68); the dark
 * tokens are the same hue at Material's dark tones (CIE LCh, hue 337.6). Every text colour pair is at least 4.5:1.
 * The top bar is plum in both, like the brand. Widths follow the old Bootstrap container: 540, 720, 960 and 1140 px.
 */

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/nunito-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2");
}

:root {
    color-scheme: light dark;
    --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --top-bar-height: 64px;
    /* the top bar: plum in light and dark */
    --bar: #7d2e68;
    --on-bar: #ffffff;
    --bar-active: #f6dff0;
    --on-bar-active: #5c2150;

    --primary: #7d2e68;
    --on-primary: #ffffff;
    --primary-hover: #5c2150;
    --container: #f6dff0;
    --on-container: #5c2150;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f5eff3;
    --outline: #e6dde3;
    --outline-strong: #d8ccd4;
    --text: #1f1a21;
    --text-2: #5f5764;
    --focus: rgba(125, 46, 104, 0.35);
    --ok-bg: #d4edda;
    --ok-text: #155724;
    --ok-line: #c3e6cb;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --error-line: #f5c6cb;
    --info-bg: #d1ecf1;
    --info-text: #0c5460;
    --info-line: #bee5eb;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #f3b3de;
        --on-primary: #581347;
        --primary-hover: #fdd8f0;
        --container: #722d5f;
        --on-container: #fdd8f0;
        --bg: #1a1418;
        --surface: #231b20;
        --surface-2: #30272d;
        --outline: #4a3f46;
        --outline-strong: #685a63;
        --text: #ebe3e8;
        --text-2: #c5b8c0;
        --focus: rgba(243, 179, 222, 0.4);
        --ok-bg: #233a25;
        --ok-text: #bfe7c0;
        --ok-line: #2f4d31;
        --error-bg: #572626;
        --error-text: #fed3d0;
        --error-line: #6e3332;
        --info-bg: #0d3a42;
        --info-text: #b9e4ee;
        --info-line: #164b55;
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--top-bar-height) + env(safe-area-inset-top, 0px) + 8px);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    margin: 0 0 0.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    text-wrap: balance;
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.icon {
    flex-shrink: 0;
    display: block;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    padding: 8px 16px;
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
}

.skip:focus {
    top: 12px;
}

/* the page width: the old Bootstrap container */
.wrap {
    width: 100%;
    margin: 0 auto;
    padding: 0 max(15px, env(safe-area-inset-left)) 0 max(15px, env(safe-area-inset-right));
}

@media (min-width: 576px) {
    .wrap {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .wrap {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .wrap {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .wrap {
        max-width: 1140px;
    }
}

.wrap.narrow {
    max-width: 720px;
}

.content {
    flex: 1 1 auto;
}

/* the pieces the pages share */
.surface {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 16px;
}

.section-title {
    margin: 32px 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
}

.section-title.first {
    margin-top: 0;
}

.sub-title {
    margin: 24px 0 8px;
    font-size: 18px;
}

/* an icon on a tonal round */
.round {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--container);
    color: var(--on-container);
}

.round.small {
    width: 40px;
    height: 40px;
}

.text-2 {
    color: var(--text-2);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0.375rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--primary);
    color: var(--on-primary);
    font: inherit;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
}

.button:hover {
    background: var(--primary-hover);
    color: var(--on-primary);
    text-decoration: none;
}

.button.tonal {
    background: var(--container);
    color: var(--on-container);
}

.button.tonal:hover {
    background: var(--outline);
    color: var(--text);
}

.button-lg {
    min-height: 48px;
    padding: 0.5rem 1rem;
    border-radius: 14px;
    font-size: 1.25rem;
}

.button:disabled {
    opacity: 0.65;
    cursor: default;
}

.button:disabled:hover {
    background: var(--primary);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.actions.start {
    justify-content: flex-start;
}

/* the top bar: the name and the way to the services and the contact form */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: calc(var(--top-bar-height) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bar);
    color: var(--on-bar);
}

.brand {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--on-bar);
    white-space: nowrap;
}

.brand:hover {
    color: var(--on-bar);
    text-decoration: none;
}

.logo {
    flex-shrink: 0;
}

.top-nav {
    display: flex;
    gap: 4px;
}

.top-link {
    height: 40px;
    padding: 0 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--on-bar);
    font-size: 15px;
    font-weight: 800;
}

.top-link:hover,
.top-link:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    color: var(--on-bar);
    text-decoration: none;
}

.top-link:focus-visible,
.brand:focus-visible {
    outline-color: var(--on-bar);
}

.top-link.active {
    background: var(--bar-active);
    color: var(--on-bar-active);
}

/* a phone: the icons only */
@media (max-width: 575px) {
    .top-link {
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    .top-label {
        display: none;
    }
}

/* the hero: the page's picture on a rounded surface, its name on a scrim at the foot */
.hero-holder {
    padding-top: 1rem;
}

.hero {
    position: relative;
    height: 360px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface-2);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 55%);
}

.hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-title {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 20px;
    z-index: 1;
    margin: 0;
    font-size: 40px;
    color: #fff;
}

@media (max-width: 575px) {
    .hero {
        height: 220px;
        border-radius: 16px;
    }

    .hero-title {
        left: 20px;
        bottom: 14px;
        font-size: 28px;
    }
}

/* the three services at a glance: outlined tiles, each with its icon on a tonal round */
.tiles {
    padding-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .tiles {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

.tile {
    height: 100%;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}

.tile:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

/* each service: an outlined surface, its picture on one side (above the text on a phone) */
.service {
    overflow: hidden;
    margin-bottom: 16px;
    display: grid;
}

@media (min-width: 768px) {
    .service {
        grid-template-columns: 1fr 1fr;
    }

    .service.image-right .service-image {
        order: 2;
    }
}

.service-image {
    min-height: 260px;
}

.service-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-text {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    align-self: start;
    padding: 28px;
    color: var(--text-2);
}

.service-heading {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
}

.price-heading {
    font-weight: 700;
    color: var(--text);
}

/* the prices: rows on a tonal surface */
.price-list {
    margin: 8px 0 0;
    padding: 4px 16px;
    border-radius: 12px;
    background: var(--surface-2);
}

.price-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: var(--text);
}

.price-row + .price-row {
    border-top: 1px solid var(--outline);
}

.price-row dt {
    font-weight: 400;
}

.price-row dd {
    margin: 0;
}

.price {
    font-weight: 800;
    white-space: nowrap;
}

.price-note {
    margin-top: 8px;
    font-size: 13px;
}

@media (max-width: 575px) {
    .service-image {
        min-height: 200px;
    }

    .service-text {
        padding: 20px;
    }
}

/* the contact form, the about page and the 404 page: one surface in the narrow column */
.contact,
.about,
.notfound {
    margin-top: 24px;
    padding: 28px;
}

.contact-direct a {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text);
}

.field input,
.field textarea {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--outline-strong);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    line-height: 1.5;
}

.field input {
    height: calc(1.5em + 0.75rem + 2px);
}

.field textarea {
    min-height: calc(4 * 1.5em + 0.75rem + 2px);
    max-height: calc(6 * 1.5em + 0.75rem + 2px);
    resize: vertical;
    field-sizing: content;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-2);
    opacity: 0.8;
}

.field input:focus,
.field textarea:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--focus);
}

.contact-website {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.alert {
    margin: 0 0 1rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 12px;
}

.alert[hidden] {
    display: none;
}

.alert-ok {
    background: var(--ok-bg);
    border-color: var(--ok-line);
    color: var(--ok-text);
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error-line);
    color: var(--error-text);
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info-line);
    color: var(--info-text);
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.spinner[hidden] {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation-duration: 1.5s;
    }
}

.facts {
    margin: 0;
    display: grid;
    gap: 12px;
}

.facts div {
    display: grid;
    gap: 2px;
}

.facts dt {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
}

.facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.link-list {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.link-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    border-radius: 16px;
    font-weight: 800;
    color: var(--text);
}

.link-list a:hover {
    background: var(--surface-2);
    text-decoration: none;
}

@media (max-width: 575px) {
    .contact,
    .about,
    .notfound {
        padding: 20px;
    }
}

/* the foot: a tonal surface under an outline */
.foot {
    margin-top: 48px;
    padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
    background: var(--surface-2);
    border-top: 1px solid var(--outline);
    color: var(--text-2);
}

.foot-grid {
    display: grid;
    align-items: center;
}

@media (min-width: 768px) {
    .foot-grid {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 30px;
    }
}

.foot-item {
    padding: 0.5rem 0;
}

.foot-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.foot-mail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary);
    overflow-wrap: anywhere;
}

.foot-copyright {
    font-size: 13px;
}
