/* The ticket: the box every page carries at its bottom right (the homepage's markup is home/film-box.html; about.html
   and onepage.html hold the same markup with the class in-page). Loaded by all three pages. */
.landing-header {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 340px;
    max-width: calc(100vw - 32px);
    z-index: 90; /* below opened inline boxes (100) and windows (5000) */
    padding: 0;
    margin: 0;
    /* The widget is set in Lekton, without the Tahoma letter spacing */
    font-family: var(--font-ui-2);
    letter-spacing: 0;
    line-height: 1.5;
}

/* The film box is this site's, and it is drawn as a ticket: the film at the top (the trailer as a small square beside
   the title), then the night, its date the biggest thing in the box and "Get tickets" the one pink button, then a
   perforation, and under it the stub: the sign-up, for those who can't come. */
.landing-header { font-size: 14px; color: var(--text); text-align: left; }
.landing-header p, .landing-header h2 { margin: 0; max-width: none; font-family: inherit; font-weight: 400; text-shadow: none; letter-spacing: 0; }
.landing-header a { border: 0; text-shadow: none; }
.landing-box {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
}

.ticket-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px; }
.ticket-trailer { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 6px; background: var(--surface); }
.landing-film-title { color: var(--text); font-size: 14px; font-weight: 700 !important; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.8px; }
.landing-film-by { color: var(--text-muted); font-size: 12px; margin-top: 3px !important; }
.landing-film-by a { color: var(--accent); text-decoration: none; }
.landing-film-by a:hover { text-decoration: underline; }

.ticket-night { padding: 0 16px 18px; }
.ticket-date { color: #fff; font-size: 34px; font-weight: 700 !important; line-height: 1.05; }
.ticket-place { color: var(--text); font-size: 14px; margin-top: 4px !important; }
.ticket-kind { color: var(--text-muted); font-size: 12px; margin-top: 2px !important; }
.ticket-buy {
    display: grid; place-items: center; height: 46px; margin-top: 14px;
    background: var(--accent); border: 1px solid var(--accent); border-radius: 8px;
    color: var(--bg); font-size: 14px; font-weight: 700; text-decoration: none;
    transition: filter 0.2s;
}
.ticket-buy:hover { filter: brightness(1.12); }
.ticket-buy:focus-visible, .landing-invite-submit:focus-visible { outline: 1px solid var(--text); outline-offset: 2px; }

/* the perforation, a half-circle bitten out of each edge */
.ticket-tear { position: relative; height: 1px; border-top: 1px dashed var(--border-strong); }
.ticket-tear::before, .ticket-tear::after { content: ""; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border-strong); }
.ticket-tear::before { left: -10px; }
.ticket-tear::after { right: -10px; }

.ticket-stub { padding: 14px 16px 16px; }
.landing-invite-bot-field { display: none; }
.landing-invite-heading { color: rgba(249, 247, 247, 0.5); font-size: 13px; line-height: 1.5; margin-bottom: 10px !important; }
/* Label stays for screen readers; the placeholder carries it visually */
.landing-invite-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.landing-invite-row { display: flex; gap: 8px; }
.landing-invite-input {
    flex: 1; min-width: 0; box-sizing: border-box; height: 40px; padding: 0 12px;
    background: none; border: 1px solid var(--border-strong); border-radius: 8px;
    color: var(--text); font-family: var(--font-ui-2); font-size: 13px; outline: none; cursor: text;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.landing-invite-input:hover { border-color: rgba(255, 138, 247, 0.45); }
.landing-invite-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 247, 0.22); }
.landing-invite-input::placeholder { color: rgba(249, 248, 248, 0.45); }
/* the stub's button is an outline: the ticket has one pink button, and it is the one above */
.landing-invite-submit {
    flex: none; height: 40px; padding: 0 16px;
    background: none; border: 1px solid rgba(255, 138, 247, 0.45); border-radius: 8px;
    color: var(--accent); font-family: var(--font-ui-2); font-size: 13px; white-space: nowrap; cursor: pointer;
    transition: border-color 0.2s;
}
.landing-invite-submit:hover { border-color: var(--accent); }
.landing-invite-submit:disabled { opacity: 0.6; cursor: default; }
.landing-invite-success { color: var(--accent); font-size: 13px; }
.landing-invite-status { color: var(--accent-soft); font-size: 12px; margin-top: 8px !important; }

@media (max-width: 768px) {
    .landing-header { right: 12px; bottom: 12px; left: 12px; width: auto; max-width: none; }
    /* Phones: the ticket without the trailer, the byline or the line under the place, to keep the pinned box short;
       the field in type large enough that a phone does not zoom into it, and both tall enough to tap */
    .ticket-top { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 8px; }
    .ticket-trailer, .landing-film-by, .ticket-kind { display: none; }
    .ticket-date { font-size: 30px; }
    .ticket-night { padding-bottom: 16px; }
    .ticket-buy { height: 48px; margin-top: 12px; font-size: 16px; }
    .ticket-stub { padding: 12px 16px 14px; }
    .landing-invite-heading { margin-bottom: 8px !important; }
    .landing-invite-input, .landing-invite-submit { height: 46px; font-size: 16px; }
    /* Phones only: the film / signup box shows on the landing, not inside a chapter */
    body.in-chapter .landing-header { display: none; }
}

/* A short phone: the ticket tighter still, and the stub without its line, so the folders keep their room above it */
@media (max-width: 768px) and (max-height: 620px) {
    .ticket-top { padding: 12px 16px 6px; }
    .landing-film-title { font-size: 12px; }
    .ticket-date { font-size: 24px; }
    .ticket-night { padding-bottom: 12px; }
    .ticket-buy { height: 44px; margin-top: 10px; }
    .ticket-stub { padding: 10px 16px 12px; }
    .landing-invite-heading { display: none; }
    .landing-invite-input, .landing-invite-submit { height: 44px; }
}
/* A phone on its side: wide, and no taller than the ticket. The ticket goes without the trailer, the byline and the
   small lines, so all of it fits, and the folders keep to the left of it */
@media (min-width: 769px) and (max-height: 480px) {
    .landing-header { bottom: 12px; right: 12px; width: 300px; }
    .ticket-top { grid-template-columns: minmax(0, 1fr); padding: 12px 14px 6px; }
    .ticket-trailer, .landing-film-by, .ticket-kind, .landing-invite-heading { display: none; }
    .landing-film-title { font-size: 12px; }
    .ticket-date { font-size: 26px; }
    .ticket-night { padding: 0 14px 12px; }
    .ticket-buy { height: 44px; margin-top: 10px; }
    .ticket-stub { padding: 10px 14px 12px; }
    .landing-invite-input, .landing-invite-submit { height: 44px; font-size: 16px; }
    body.landing .split-container { padding-right: 324px; box-sizing: border-box; }
}

/* The ticket is pinned at the bottom right on every page, the same place and the same hold as on the homepage, and
   lies over whatever scrolls under it. Only on a phone, on the pages that scroll (about, film, performance), is it
   part of the page, at its end: pinned there it would cover a third of the screen being read. */
@media (max-width: 768px) {
    .landing-header.in-page { position: static; width: 100%; max-width: none; margin: 48px auto 0; }
}
/* a narrow window: the end of the page can be scrolled clear of the pinned ticket */
@media (min-width: 769px) and (max-width: 1180px) { html.about main { padding-bottom: 440px; } }
html.admin .landing-header.in-page { display: none; }   /* out of the way while laying things out */
