/*
 * Strony przed zalogowaniem (logowanie, blokada) – nawiązują do strony głównej metr24:
 * głęboka zieleń, kremowe tło, złote „24”, Manrope + DM Sans.
 * Panel po zalogowaniu ma osobny, data-dense styl: app.css.
 */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(../fonts/dm-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(../fonts/dm-sans-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --g-bg: #f5f6f0;
    --g-ink: #173d33;
    --g-ink-soft: #50685c;
    --g-muted: #77866b;
    --g-line: #cfdcc6;
    --g-card: #fcfdf9;
    --g-gold: #c9b78a;
    --g-gold-dark: #93763f;
    --g-lime: #d4f485;
    --g-ring: #6d9449;
    --g-bad: #a3362f;
    --g-bad-bg: #fbeeec;
    --g-bad-line: #e5bfba;
    --g-display: 'Manrope', Arial, sans-serif;
    --g-body: 'DM Sans', Arial, sans-serif;
    /* Ten sam kafel co w animacji tła (180×140) – animowane obrysy trafiają dokładnie w narysowane budynki. */
    --g-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='140' viewBox='0 0 180 140'%3E%3Cg fill='none' stroke='%23173d33' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' opacity='.09'%3E%3Cpath d='M20 64 45 42l25 22v34H27V64z'/%3E%3Cpath d='M39 98V76h13v22'/%3E%3Cpath d='M105 96V50h38v46'/%3E%3Cpath d='M98 50h52'/%3E%3Cpath d='M113 62h8M130 62h8M113 75h8M130 75h8'/%3E%3Cpath d='M78 112h60'/%3E%3Cpath d='M78 112V82l20-16 20 16v30'/%3E%3Cpath d='M92 112V94h12v18'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100svh;
    background-color: var(--g-bg);
    background-image:
        radial-gradient(1100px 620px at 50% -10%, rgba(212, 244, 133, .22), transparent 62%),
        var(--g-pattern);
    background-size: auto, 180px 140px;
    /* Wzór przypięty do okna jak warstwa animacji (position: fixed) – obrysy nie rozjeżdżają się przy przewijaniu. */
    background-attachment: scroll, fixed;
    color: var(--g-ink);
    font-family: var(--g-body);
    -webkit-font-smoothing: antialiased;
}

.guest {
    position: relative;
    z-index: 1;
    min-height: 100svh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    padding: 0 20px;
}

.guest-header {
    width: 100%;
    max-width: 1060px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 30px 0 8px;
}

.guest-toplink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid var(--g-line);
    border-radius: 999px;
    background: rgba(252, 253, 249, .8);
    color: var(--g-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}

.guest-toplink:hover { border-color: #a9c19b; background: #fff; }
.guest-toplink:focus-visible { outline: 2px solid var(--g-ring); outline-offset: 3px; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--g-ink);
    font-family: var(--g-display);
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -1.1px;
    line-height: 1;
    text-decoration: none;
}

.brand-mark { width: 49px; height: 45px; flex: none; }
.brand-number { color: var(--g-gold-dark); }
.brand:focus-visible { outline: 2px solid var(--g-ring); outline-offset: 6px; border-radius: 6px; }

.guest-main {
    width: 100%;
    display: grid;
    place-items: center;
    padding: 22px 0;
}

/* Strona logowania: treść po lewej, karta po prawej. */
.guest-main.has-intro {
    max-width: 1060px;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 420px);
    align-items: center;
    gap: 64px;
    padding: 30px 0 38px;
}

.intro { min-width: 0; animation: card-enter .4s ease-out backwards; }

.intro-eyebrow {
    margin: 0 0 16px;
    color: var(--g-gold-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.intro h1 {
    margin: 0 0 18px;
    font: 600 clamp(32px, 3.4vw, 44px)/1.1 var(--g-display);
    letter-spacing: -1.6px;
}

.intro-lead { max-width: 30em; margin: 0; color: var(--g-ink-soft); font-size: 16px; line-height: 1.65; }

.benefits { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.benefits li { display: flex; align-items: center; gap: 14px; color: var(--g-ink-soft); font-size: 14px; line-height: 1.45; }
.benefits strong { display: block; color: var(--g-ink); font-size: 15px; font-weight: 650; }

.benefit-icon {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--g-lime);
    color: var(--g-ink);
}

.info-box {
    max-width: 30em;
    margin-top: 30px;
    padding: 15px 17px;
    display: flex;
    gap: 13px;
    border: 1px solid var(--g-line);
    border-radius: 16px;
    background: rgba(252, 253, 249, .82);
}

.info-box svg { flex: none; margin-top: 1px; color: #4f7a3c; }
.info-box p { margin: 0; color: var(--g-ink-soft); font-size: 13px; line-height: 1.6; }
.info-box strong { display: block; color: var(--g-ink); font-size: 14px; }
.info-box a { color: #50723d; font-weight: 600; text-underline-offset: 3px; }
.info-box a:hover { color: #234e35; }

.card {
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    background: var(--g-card);
    border: 1px solid var(--g-line);
    border-radius: 20px;
    box-shadow: 0 3px 9px rgba(23, 61, 51, .03), 0 24px 55px -25px rgba(23, 61, 51, .2);
    animation: card-enter .4s ease-out .08s backwards;
}

.card-head {
    padding: 24px 28px 25px;
    background: var(--g-ink);
    color: #f4f7ed;
}

.card-eyebrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--g-gold);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.6px;
    line-height: 20px;
    text-transform: uppercase;
}

.card-eyebrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: .4px; font-size: 11px; }
.card-eyebrow svg { flex: none; color: var(--g-lime); }

.card-head :is(h1, h2) {
    margin: 10px 0 8px;
    font: 500 31px/1.2 var(--g-display);
    letter-spacing: -1.2px;
}

.card-head p { margin: 0; color: #cbdac1; font-size: 13px; line-height: 1.6; }

.card-body { padding: 24px 28px 26px; }

.alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    background: var(--g-bad-bg);
    border: 1px solid var(--g-bad-line);
    border-radius: 10px;
    color: var(--g-bad);
    font-size: 13px;
    line-height: 1.45;
}

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--g-ink-soft); }

.field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--g-line);
    border-radius: 11px;
    color: var(--g-ink);
    font: inherit;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input::placeholder { color: #9aa894; }
.field input:hover { border-color: #b3c6a8; }
.field input:focus { outline: none; border-color: var(--g-ring); box-shadow: 0 0 0 3px rgba(109, 148, 73, .2); }
.field input[aria-invalid="true"] { border-color: var(--g-bad); }

.turnstile-field { margin: 4px 0 12px; min-height: 65px; }
.turnstile-test-notice { margin: 8px 0 0; color: var(--g-muted); font-size: 11px; line-height: 1.5; }

.submit {
    width: 100%;
    min-height: 49px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--g-ink);
    color: #f4f7ed;
    font: 600 14px var(--g-body);
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

.submit:hover { background: #21503f; }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 2px solid var(--g-ring); outline-offset: 4px; }
.submit[disabled] { opacity: .7; cursor: progress; }
.submit svg { flex: none; transition: transform .15s ease; }
.submit:hover svg { transform: translateX(2px); }

.card-note { margin: 16px 0 0; color: var(--g-muted); font-size: 12px; line-height: 1.6; text-align: center; }
.card-note a, .guest-footer a { color: #50723d; font-weight: 500; text-underline-offset: 3px; }
.card-note a:hover, .guest-footer a:hover { color: #234e35; }

.guest-footer { padding: 18px 0 22px; color: var(--g-muted); font-size: 11px; text-align: center; }

@keyframes card-enter {
    from { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 900px) {
    /* Formularz jest celem wizyty – na wąskim ekranie idzie pierwszy, treść pod nim. */
    .guest-main.has-intro { grid-template-columns: minmax(0, 420px); justify-content: center; gap: 34px; padding-top: 22px; }
    .guest-main.has-intro .card { order: -1; }
    .intro h1 { font-size: 32px; letter-spacing: -1.2px; }
    .intro-lead { font-size: 15px; }
}

@media (max-width: 520px) {
    .guest-header { padding-top: 22px; }
    .guest-toplink { padding: 8px 12px; font-size: 12px; }
    .brand { font-size: 27px; }
    .brand-mark { width: 42px; height: 39px; }
    .card-head { padding: 22px; }
    .card-head :is(h1, h2) { font-size: 28px; }
    .card-body { padding: 22px 21px; }
}

@media (prefers-reduced-motion: reduce) {
    .card, .intro { animation: none; }
    .guest-toplink { transition: none; }
    .submit, .submit svg, .field input { transition: none; }
}
