/*
 * Status page of Homepage Helden. Hand-written, no build step, no external fonts.
 * Colours, fonts and gradients follow the design tokens of homepage-helden.de
 * (resources/css/site.css and custom.css there). The fonts are self-hosted in public/fonts.
 */

@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/inter-v12-latin-300.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/inter-v12-latin-500.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/inter-v12-latin-600.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/inter-v12-latin-700.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/inter-tight-v3-latin-600.woff2') format('woff2');
}

/* Metric-compatible fallback while Inter loads, as on homepage-helden.de. */
@font-face {
    font-family: 'Inter-fallback';
    size-adjust: 107%;
    ascent-override: 90%;
    src: local('Arial');
}

:root {
    --color-primary: #0040b8;
    --color-primary-middle: #0078ff;
    --color-highlight: #be185d;
    --color-text: #32363d;
    --color-text-light: #484848;
    --color-neutral-light: #efefef;
    --color-neutral-middle: #d4d4d4;
    --color-neutral-dark: #484848;
    --color-background: #fff;
    --color-surface: #fff;
    --color-on-accent: #fff;
    --gradient-hero: linear-gradient(72.87deg, #1548bb 27.5%, #027cec 85.64%);
    --gradient-headline: linear-gradient(71.08deg, #003ec8 30.98%, #67baef 76.86%);
    --shadow-tile: -4px 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 6px;
    --font-sans: Inter, Inter-fallback, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --font-headline: 'Inter Tight', Inter-fallback, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.625;
    -webkit-font-smoothing: antialiased;
    color: var(--color-text);
    background: var(--color-background);
    overflow-wrap: break-word;
}

a {
    color: var(--color-primary);
    font-weight: 500;
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--color-primary-middle);
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 500;
    line-height: 1.25;
    color: var(--color-text);
}

/* Headline with gradient text as .title-gradient on homepage-helden.de; the box is only as
   wide as the text, so the gradient runs across the words. */
h1 {
    width: fit-content;
    max-width: 100%;
    margin: clamp(3rem, 2rem + 4vw, 5.5rem) auto 0;
    font-family: var(--font-headline);
    font-size: clamp(2.25rem, 5vw + 1rem, 4.375rem);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: var(--color-primary);
    background: var(--gradient-headline);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Long German words in a title do not fit narrow screens at headline size. */
@media (max-width: 40rem) {
    h1 {
        hyphens: auto;
    }
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 1.625rem;
}

p {
    margin: 0;
}

.container {
    width: 100%;
    max-width: 48rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 1rem;
}

/* Header and footer */

/* Pill bar as on homepage-helden.de, reduced to logo and contact button. */
.site-header {
    padding: 0.5rem 0.5rem 0;
}

@media (min-width: 48rem) {
    .site-header {
        padding-inline: 2.375rem;
    }
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    height: 72px;
    padding-inline: clamp(1rem, 3vw, 2.25rem);
    background: var(--gradient-hero);
    border-radius: 999px;
}

.site-header__logo {
    display: block;
    flex-shrink: 1;
    min-width: 0;
}

.site-header a:focus-visible {
    outline-color: var(--color-on-accent);
}

.logo {
    display: block;
    width: clamp(110px, 12vw + 2rem, 176px);
    max-width: 100%;
    height: auto;
}

/* The logo is white on the blue bar. */
.site-header .logo path {
    fill: var(--color-on-accent);
}

.button-cta {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.025em;
    color: var(--color-on-accent);
    white-space: nowrap;
    text-decoration: none;
    /* Exact button colour of homepage-helden.de. White text reaches only 3.9:1 on it; accepted
       as a contrast exception, see siteway/hph-status#3. */
    background: #f61a75;
    border-radius: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.button-cta:hover {
    color: var(--color-on-accent);
    background: #dc0f63;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (prefers-reduced-motion: no-preference) {
    .button-cta {
        transition: background-color 300ms ease-in-out, box-shadow 300ms ease-in-out;
    }
}

.site-footer {
    margin-top: min(clamp(3.5rem, 2rem + 5vw, 6rem), 17vh);
    padding-block: clamp(2rem, 1.5rem + 2vw, 3rem);
    color: var(--color-on-accent);
    text-align: center;
    background: var(--gradient-hero);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    font-weight: 300;
    color: var(--color-on-accent);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--color-on-accent);
    text-decoration: underline;
}

.site-footer a:focus-visible {
    outline-color: var(--color-on-accent);
}

.site-footer__copyright {
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* Boxes and cards */

.box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-tile);
}

@media (min-width: 48rem) {
    .box {
        padding: 1.5rem;
    }
}

.overall {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.overall__title {
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.3;
}

.overall__text {
    margin-top: 0.25rem;
}

.status-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--color-on-accent);
    border-radius: 50%;
}

.status-icon--ok {
    background: var(--color-primary);
}

.status-icon--warning {
    background: var(--color-highlight);
}

/* Generous vertical rhythm as on homepage-helden.de. */
h1 + .box {
    margin-top: clamp(2.5rem, 1.5rem + 4vw, 5rem);
}

/* Capped by the viewport height so low landscape screens keep no empty band above a section. */
.section {
    margin-top: min(clamp(3.5rem, 2rem + 5vw, 6rem), 17vh);
}

.empty {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

.cards {
    display: grid;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cards .box {
    margin-top: 0;
}

.card {
    position: relative;
}

@media (prefers-reduced-motion: no-preference) {
    .card {
        transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    .card:hover {
        transform: translateY(-0.5rem);
    }
}

.card:has(a:focus-visible) {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.card__title {
    margin-top: 0.75rem;
    font-size: 1.375rem;
}

.card__title a {
    color: inherit;
    text-decoration: none;
}

/* The card shows the focus ring; browsers without :has() keep the link's own ring. */
@supports selector(:has(*)) {
    .card__title a:focus-visible {
        outline: none;
    }
}

.card__title a::after {
    content: '';
    position: absolute;
    inset: 0;
}

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

.card__summary {
    margin-top: 0.5rem;
}

.card .meta {
    margin-top: 1rem;
}

/* Badges */

.badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.badges--center {
    justify-content: center;
    margin-top: clamp(1.25rem, 0.5rem + 3vw, 3.5rem);
}

.badge {
    padding: 0.125rem 0.625rem;
    font-size: 0.875rem;
    color: var(--color-on-accent);
    border-radius: 999px;
}

.badge--type {
    color: var(--color-text);
    background: var(--color-neutral-light);
}

.badge--open {
    background: var(--color-highlight);
}

.badge--ongoing,
.badge--planned {
    background: var(--color-primary);
}

.badge--resolved {
    background: var(--color-neutral-dark);
}

/* Period and affected areas */

.meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem 1rem;
    margin: 0;
}

.meta dt {
    font-weight: 500;
}

.meta dd {
    min-width: 0;
    margin: 0 0 0.5rem;
}

.meta dd:last-child {
    margin-bottom: 0;
}

@media (min-width: 40rem) {
    .meta {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .meta dd {
        margin-bottom: 0;
    }
}

/* Detail page */

.lead {
    margin-top: 1rem;
    font-size: 1.125rem;
    text-align: center;
}

.history {
    display: grid;
    gap: 1.5rem;
    margin: 0;
    padding: 0 0 0 1.5rem;
    list-style: none;
    border-left: 2px solid var(--color-neutral-middle);
}

.history__item {
    position: relative;
}

.history__item::before {
    content: '';
    position: absolute;
    top: 0.45rem;
    left: calc(-1.5rem - 7px);
    width: 12px;
    height: 12px;
    background: var(--color-neutral-middle);
    border-radius: 50%;
}

.history__item--current::before {
    background: var(--color-primary);
}

.history__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
}

.history__status {
    font-weight: 500;
}

.history__head time {
    color: var(--color-text-light);
}

.history__text {
    margin-top: 0.25rem;
    white-space: pre-line;
}

.text p {
    white-space: pre-line;
}

.text p + p {
    margin-top: 1rem;
}

/* A block without heading continues the block before it instead of opening a new section. */
.block + .block--plain {
    margin-top: 2rem;
}

/* FAQ: each question reads as a subheading, the answers sit flush without the browser indent. */
.faq {
    margin: 0;
}

.faq dt {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text);
}

.faq dt:not(:first-child) {
    margin-top: 2rem;
}

.faq dd {
    margin: 0.5rem 0 0;
}

.back {
    margin-top: 2.5rem;
}
