/* Nordic Business Forum — Kaunas screening registration.
   Palette sampled from the event artwork: deep indigo ground, orange accent. */

:root {
    --indigo: #1B1150;
    --indigo-deep: #070A2E;
    --purple: #3B235D;
    --orange: #F07702;
    --white: #FFFFFF;
    --paper: #F5F4F9;
    --line: #DAD7E6;
    --muted: #625C7A;
    --error: #D64545;
    --radius: 4px;
    --font: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--indigo-deep);
    background: var(--paper);
}

/* ---------- admin link ---------- */

.admin-link {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 60;
    padding: 7px 12px;
    background: var(--indigo-deep);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.12s linear, border-color 0.12s linear;
}

.admin-link:hover { background: var(--purple); border-color: var(--orange); }
.admin-link:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- hero ---------- */

.hero { background: var(--indigo); color: var(--white); }

/* Top padding clears the fixed Administravimas chip, which sits over the hero
   in the stacked layout. */
.hero-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 64px 20px 32px;
    display: grid;
    gap: 24px;
    align-items: center;
}

/* Beside the text once there is room for both; the poster is square, so a
   full-width band would only ever show a slice of its lettering. */
@media (min-width: 820px) {
    .hero-inner {
        grid-template-columns: 300px 1fr;
        gap: 36px;
        padding: 64px 20px 40px;
    }
}

.hero-art { max-width: 340px; margin: 0 auto; width: 100%; }

.hero-image {
    display: block;
    width: 100%;
    height: auto;          /* whole poster, never cropped */
    border-radius: var(--radius);
}

.hero-kicker {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--orange);
}

.hero-title {
    margin: 0 0 16px;
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.hero-lead {
    margin: 0 0 22px;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
    max-width: 52ch;
}

.hero-facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.hero-fact {
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius);
}

.hero-fact dt {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--orange);
}

.hero-fact dd { margin: 0; font-size: 17px; font-weight: 700; }

/* ---------- page ---------- */

.page { max-width: 900px; margin: 0 auto; padding: 28px 20px 64px; }

/* ---------- desktop: the whole registration on one screen ----------

   Wide enough and the hero and the form sit side by side, the shell filling
   exactly one viewport. Each column scrolls inside itself rather than the page,
   so a tall error state can never push the submit button out of reach and the
   page itself never scrolls. Below this width the two stack and the page
   scrolls normally — a phone cannot fit both, and pretending otherwise would
   only shrink the form. */

@media (min-width: 1080px) {
    .shell {
        display: grid;
        grid-template-columns: minmax(400px, 42%) 1fr;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero {
        display: flex;
        align-items: center;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
    }

    /* The left column is narrow, so the poster goes back above the text. */
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 40px;
        max-width: 560px;
    }

    .hero-art { margin: 0; max-width: 300px; }
    .hero-title { font-size: clamp(26px, 2.2vw, 33px); margin-bottom: 14px; }
    .hero-lead { margin-bottom: 20px; }

    .page {
        max-width: none;
        margin: 0;
        /* Top padding clears the fixed Administravimas chip so it never sits
           on the card's corner. */
        padding: 52px 32px 16px;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* "safe" keeps the top of an over-tall card reachable instead of
           clipping it above the scroll origin. */
        justify-content: safe center;
    }

    .form-card, .notice {
        width: 100%;
        max-width: 660px;
        margin-left: auto;
        margin-right: auto;
        padding: 26px 32px;
    }

    .contact { max-width: 660px; margin: 14px auto 0; }

    /* Everything below trims vertical rhythm so the submit button clears the
       fold on a 800px-tall laptop, the shortest screen this layout targets. */
    .field-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        margin-bottom: 18px;
    }
    .field-row .field { margin-bottom: 0; }
    .field { margin-bottom: 18px; }
    .form-head { margin-bottom: 20px; }
    .legend-sub { margin-bottom: 10px; }
    .day-ui { padding: 16px; }
    .day-seats { margin-top: 10px; }
    .submit { padding: 15px 24px; }
}

.form-card, .notice {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 22px;
}

@media (min-width: 768px) {
    .form-card, .notice { padding: 36px 40px; }
}

.form-head { margin-bottom: 28px; }
.form-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--indigo); }
.form-note { margin: 0; font-size: 14px; color: var(--muted); }
.req { color: var(--error); }

/* ---------- fields ---------- */

.field { margin-bottom: 24px; border: 0; padding: 0; }

.field > label, .field legend {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--indigo-deep);
    padding: 0;
}

.legend-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

input[type="text"], input[type="email"], select {
    width: 100%;
    padding: 14px;
    font-family: inherit;
    font-size: 16px;   /* 16px stops iOS zooming the page on focus */
    color: var(--indigo-deep);
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.12s linear, background-color 0.12s linear;
}

input:hover, select:hover { border-color: var(--muted); }

input:focus-visible, select:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-color: var(--indigo);
    background: var(--white);
}

.field.has-error input,
.field.has-error select { border-color: var(--error); }

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 44px; }

.select-chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--indigo);
}

.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

.field-error {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--error);
}

/* ---------- day choice ---------- */

.day-stack { display: grid; gap: 12px; }

@media (min-width: 620px) { .day-stack { grid-template-columns: 1fr 1fr; } }

.day { display: block; cursor: pointer; }

.day input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.day-ui {
    display: block;
    height: 100%;
    padding: 20px;
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.14s linear, background-color 0.14s linear;
}

.day-title { display: block; font-size: 19px; font-weight: 700; color: var(--indigo); }
.day-sub { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

.day-seats {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.day-bar {
    display: block;
    height: 6px;
    margin-top: 8px;
    background: var(--line);
    border-radius: 3px;
    overflow: hidden;
}

.day-bar span {
    display: block;
    height: 100%;
    background: var(--orange);
    transition: width 0.2s linear;
}

.day:hover .day-ui { border-color: var(--muted); }

.day input:focus-visible + .day-ui {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.day input:checked + .day-ui {
    border-color: var(--orange);
    background: var(--white);
    box-shadow: inset 0 0 0 2px var(--orange);
}

/* Full day: visibly unavailable, and the input is disabled so it cannot be
   chosen by keyboard either. */
.day--full .day-ui { opacity: 0.55; cursor: not-allowed; }
.day--full .day-title { color: var(--muted); }

.day-full-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 10px;
    background: var(--error);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ---------- submit ---------- */

.submit {
    width: 100%;
    padding: 18px 24px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--indigo-deep);
    background: var(--orange);
    border: 2px solid var(--orange);
    border-radius: var(--radius);
    cursor: pointer;
    transition: filter 0.12s linear;
}

.submit:hover:not(:disabled) { filter: brightness(1.08); }
.submit:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
.submit:disabled { opacity: 0.55; cursor: not-allowed; }

.form-error {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: rgba(214, 69, 69, 0.1);
    border-left: 4px solid var(--error);
    font-size: 15px;
    font-weight: 600;
    color: var(--error);
}

.contact {
    margin: 28px 0 0;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

/* ---------- notices ---------- */

.notice-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--indigo); }
.notice-lead { margin: 0; font-size: 15px; color: var(--muted); }

.notice--inline {
    margin: 0 0 24px;
    padding: 18px;
    background: var(--paper);
    border: 0;
    border-left: 4px solid var(--orange);
}

.notice--inline .notice-title { font-size: 17px; }

/* ---------- success overlay ---------- */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--indigo);
    color: var(--white);
    overflow-y: auto;
}

.overlay[hidden] { display: none; }

.overlay-inner { width: 100%; max-width: 520px; }
.overlay-star { margin-bottom: 18px; }
.overlay-title { margin: 0 0 10px; font-size: 30px; font-weight: 800; }
.overlay-lead { margin: 0 0 26px; font-size: 16px; color: rgba(255, 255, 255, 0.82); }

.overlay-details { margin: 0 0 26px; border-top: 2px solid var(--orange); }

.overlay-details div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.overlay-details dt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
}

.overlay-details dd { margin: 0; font-size: 15px; font-weight: 600; text-align: right; }

.overlay-footer { margin: 0; font-size: 15px; color: rgba(255, 255, 255, 0.82); }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
