/* Values taken from the compiled dad.at stylesheet (assets/styles/main.min.css). */
@font-face {
    font-family: "Trade Gothic LT Std Bold";
    src: url("../fonts/TradeGothicLTPro-Bold.woff2") format("woff2"),
         url("../fonts/TradeGothicLTPro-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Work Sans";
    src: url("../fonts/WorkSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Work Sans";
    src: url("../fonts/WorkSans-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #b4358b;
    --color-primary-dark: #8e2a6e;
    --color-text: #1c1c1e;
    --color-text-muted: #4a4a4f;
    --color-surface: #ffffff;
    --color-surface-alt: #f3f3f3;
    --color-border: rgba(0, 0, 0, 0.12);
    --color-notice-bg: #fff8e1;
    --color-notice-border: #ffe08a;
    --font-heading: "Trade Gothic LT Std Bold", Arial, sans-serif;
    --font-body: "Work Sans", Arial, sans-serif;
    --container: 1200px;
    --gutter: 16px;
}

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-surface);
}

img {
    max-width: 100%;
    height: auto;
}

[hidden] {
    display: none !important;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5em;
}

h1 {
    font-size: 29px;
}

h2 {
    font-size: 23px;
}

h3 {
    font-size: 19px;
}

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

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

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skiplink {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    z-index: 10;
    padding: 12px 16px;
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
}

.skiplink:focus {
    top: var(--gutter);
}

/* The live site uses a fixed header. It is static here on purpose: nothing can cover
   focused elements (WCAG 2.4.11) and the page needs no script to offset its content. */
.header {
    border-bottom: 2px solid var(--color-primary);
    background: var(--color-surface);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.header__logo {
    display: block;
    line-height: 0;
}

.header__logo img {
    width: 80px;
    height: auto;
}

.header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 32px;
    border: 2px solid var(--color-primary);
    border-radius: 0;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
}

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

.btn--primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
}

.btn--secondary {
    background-color: var(--color-surface);
    color: var(--color-primary);
}

.btn--secondary:hover {
    background-color: var(--color-surface-alt);
    color: var(--color-primary-dark);
}

.btn--small {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 13px;
}

.notice {
    background-color: var(--color-notice-bg);
    border-bottom: 1px solid var(--color-notice-border);
}

.notice__inner {
    padding-top: 40px;
    padding-bottom: 40px;
}

.notice__label {
    display: inline-block;
    margin: 0 0 12px;
    padding: 2px 10px;
    border: 1px solid var(--color-text);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notice__text {
    max-width: 70ch;
    margin: 0 0 12px;
    font-size: 18px;
}

.notice__updated {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
}

.section {
    padding-top: 48px;
    padding-bottom: 48px;
}

.section--alt {
    background-color: var(--color-surface-alt);
}

.section__intro {
    max-width: 70ch;
    margin: 0 0 24px;
}

.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
}

.card p {
    flex-grow: 1;
    margin: 0 0 20px;
}

.card .btn {
    align-self: flex-start;
}

h4 {
    font-size: 19px;
}

.login__status:empty {
    display: none;
}

.login__status {
    margin: 0 0 16px;
    font-weight: 600;
}

/* koop.js replaces <ebp-widget> with an iframe from konto.dad.at that draws its own card
   (purple header, shadow), so the frame itself stays invisible. Width matches that card,
   which keeps it aligned with the page text instead of floating in the middle.
   koop.js does not resize the first widget on a page, and its bundled iframe-resizer (v3)
   would switch off scrolling inside the frame if the widget page does not answer — so the
   height is fixed and generous; the widget scrolls inside if it needs more. */
.login__widget iframe {
    display: block;
    width: 100%;
    max-width: 560px;
    height: 720px;
    border: 0;
    background: transparent;
}

@media (max-width: 767px) {
    .login__widget iframe {
        max-width: none;
        height: 640px;
    }
}

.login__success h3 {
    /* inline-block: the focus ring after the login hugs the text, not the full row */
    display: inline-block;
    margin-bottom: 20px;
}

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

/* Always visible: online banking works without the widget, so nobody waits for it. */
.login__direct {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin: 0 0 24px;
    padding: 16px;
    background: var(--color-surface-alt);
}

.login__direct p {
    margin: 0;
}

/* Desktop: login frame left, direct link as a side column next to it. On small screens
   the direct link stays first in source order, i.e. above the frame and visible at once. */
@media (min-width: 992px) {
    .login {
        display: grid;
        grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
        gap: 0 48px;
        align-items: start;
    }

    .login__direct {
        grid-column: 2;
        grid-row: 1;
        flex-direction: column;
        align-items: flex-start;
        margin: 0;
        padding: 24px;
    }

    /* Every state takes the left column, so the direct link never moves. */
    .login__widget,
    .login__fallback,
    .login__success {
        grid-column: 1;
        grid-row: 1;
    }

    /* Two cards side by side would be too narrow for the button labels in 560px. */
    .login__success .cards {
        grid-template-columns: 1fr;
    }
}

.login__fallback p {
    max-width: 70ch;
}

.contact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.contact__block p {
    margin: 0 0 8px;
}

/* Standalone links, not inline text: they need the 24px target size (WCAG 2.5.8). */
.contact a,
.legal address a {
    display: inline-block;
    padding: 4px 0;
}

.contact__phone {
    font-family: var(--font-heading);
    font-size: 23px;
}

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

.contact__phone a:hover {
    text-decoration: underline;
}

.contact dl {
    margin: 0;
}

.contact dt {
    font-weight: 600;
}

.contact dd {
    margin: 0 0 12px;
}

.footer {
    padding-top: 32px;
    padding-bottom: 32px;
    border-top: 1px solid var(--color-border);
    font-size: 14px;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer__claim {
    font-family: var(--font-heading);
    font-size: 19px;
    margin: 0;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__links a {
    display: inline-block;
    padding: 4px 0;
}

.footer__copy {
    margin: 0;
}

.legal {
    max-width: 75ch;
}

.legal h2 {
    margin-top: 32px;
}

.legal address {
    font-style: normal;
}

@media (min-width: 768px) {
    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 29px;
    }

    .header__logo img {
        width: 100px;
    }

    .notice__inner {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .section {
        padding-top: 64px;
        padding-bottom: 64px;
    }

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

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

/* On small screens the header buttons would crowd the logo; the cards below offer the same entry points. */
@media (max-width: 479px) {
    .header__nav {
        display: none;
    }
}
