/*
 * The interior pages: /free-invitation/ and /book-a-stand/.
 *
 * ============================================================================
 * WHAT IS IN HERE, AND WHY IT IS NOT IN site.css
 * ============================================================================
 * site.css is the design file's stylesheet, copied byte for byte, and it stays that way — so
 * anything these pages need that the design has no rule for gets its own file, the same
 * arrangement switcher.css has. A future design revision can replace site.css wholesale
 * without anyone having to remember what was bolted onto it.
 *
 * These pages are COMPOSED from the design's own components: the hero, the deep-purple
 * section, `.footer-form`, `.experience-card`, `.final-cta`, the real header and footer. The
 * form sits on a dark section because that is where the design puts forms — `.footer-form`
 * styles its inputs as transparent with a white underline, which is invisible on white.
 *
 * So what is left is exactly this: the controls the design never drew, because the homepage
 * has no dropdown, no multiple choice, and no form longer than four fields.
 *
 *   1. a <select> on a dark section
 *   2. a chip you can choose (the design draws `.sector-list span` as a LABEL, not a control)
 *   3. a two-column form on a wide screen, since these forms have up to ten fields
 *   4. the required marker and the per-field error state
 *   5. the confirmation panel shown after sending
 *
 * Every value below is taken from the design: the same colours, the same 1px borders, the
 * same 5px radius, the same uppercase 11px labels. Nothing here invents a new measurement.
 * ============================================================================
 */

/* ------------------------------------------------------------ the form grid */

/* One column on a phone, two from tablet width. The design's own breakpoint is 760px. */
@media (min-width: 761px) {
    .wex-form {
        grid-template-columns: 1fr 1fr;
        column-gap: 22px;
    }

    .wex-form .wex-field--wide,
    .wex-form .footer-message,
    .wex-form button.footer-button {
        grid-column: 1 / -1;
    }
}

.wex-field {
    display: grid;
    gap: 6px;
    align-content: start;
}

.wex-field > label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}

.wex-field > label .req {
    color: var(--gold);
    margin-inline-start: 4px;
}

/* ------------------------------------------------------------------ select */

/* Matched to `.footer-form input`: transparent, underlined, white. The arrow is drawn here
   because a native one renders as a dark glyph on a dark field on most platforms. */
.wex-form select {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    padding: 10px 26px 10px 0;
    font: 13px "DM Sans", sans-serif;
    outline: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, .6) 50%),
                      linear-gradient(135deg, rgba(255, 255, 255, .6) 50%, transparent 50%);
    background-position: right 10px center, right 5px center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

[dir="rtl"] .wex-form select {
    padding: 10px 0 10px 26px;
    background-position: left 10px center, left 5px center;
}

.wex-form select:focus {
    border-color: var(--gold);
}

/* A dropdown's list is drawn by the operating system, which does not inherit the dark
   section — so the options need a colour of their own or they are white on white. */
.wex-form select option {
    background: var(--black);
    color: #fff;
}

/* ------------------------------------------------------------------- chips */

/* The design draws `.sector-list span` as a bordered label. These are the same shape, made
   choosable: the checkbox itself is hidden and the label carries the state. */
.wex-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wex-chips input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.wex-chips label {
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 4px;
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .8);
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
}

.wex-chips label:hover {
    border-color: var(--gold);
    color: #fff;
}

.wex-chips input:checked + label {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
}

/* Keyboard users cannot see a hover, and the checkbox they are focusing is hidden. */
.wex-chips input:focus-visible + label {
    outline: 2px solid var(--lav);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ errors */

.wex-field.invalid > label {
    color: var(--gold);
}

.wex-field.invalid input,
.wex-field.invalid select,
.wex-field.invalid textarea {
    border-color: var(--gold);
}

.wex-field .wex-error {
    font-size: 11px;
    color: var(--gold);
    min-height: 14px;
}

/* ------------------------------------------------------------ confirmation */

/* Shown in place of the form after a successful send. Built from `.hero-card`: same purple,
   same gold top rule, same type. */
.wex-done {
    background: var(--purple);
    border-top: 5px solid var(--gold);
    border-radius: 8px;
    padding: 34px;
}

.wex-done h3 {
    font-family: "Bebas Neue Custom", Impact, sans-serif;
    font-size: 34px;
    line-height: .95;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.wex-done p {
    color: rgba(255, 255, 255, .82);
    line-height: 1.7;
    margin: 0 0 22px;
}

.wex-done .wex-reference {
    display: block;
    border-top: 1px solid rgba(255, 255, 255, .23);
    padding-top: 16px;
}

.wex-done .wex-reference small {
    display: block;
    color: var(--lav);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 5px;
}

.wex-done .wex-reference strong {
    font-family: "Bebas Neue Custom", Impact, sans-serif;
    font-size: 30px;
    letter-spacing: .06em;
}

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

/* The form section is `.journey` — the design's deep-purple band — with the copy beside the
   form. `.journey-head` already lays out a 1fr/.6fr pair; this is the same shape the other
   way round, because on these pages the form is the point and the copy supports it. */
.wex-form-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 55px;
    align-items: start;
}

@media (max-width: 900px) {
    .wex-form-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* `.experience-panel` is a 1.4fr/.8fr/.8fr row because its first card is the wide one with a
   photograph. These cards are equals, so they get equal columns. */
.wex-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 800px) {
    .wex-cards {
        grid-template-columns: 1fr;
    }
}

/* A shorter hero than the homepage's. The homepage hero is the first thing a visitor ever
   sees and earns its 610px; on a page whose job is a form, that much space before the form
   is a scroll nobody wants. */
.hero.wex-page-hero,
.hero.wex-page-hero .hero-grid {
    min-height: 420px;
}

.hero.wex-page-hero .hero-grid {
    padding: 56px 0 40px;
}

@media (max-width: 760px) {
    .hero.wex-page-hero,
    .hero.wex-page-hero .hero-grid {
        min-height: 360px;
    }
}

/* ------------------------------------------------------------------
 * A step card that does not open anything
 * ------------------------------------------------------------------
 * `.step` is the design's journey card, and on the homepage every one of them opens a
 * pop-up, so the design gives it `cursor:pointer`. The content pages reuse the same card for
 * lists that are just lists -- the dates, the sectors, the FAQ. A hand cursor over something
 * that cannot be clicked is a promise the page does not keep, so it is taken back for those.
 *
 * Nothing else about the card changes: same size, same colours, same type, same hover
 * movement the design gives it.
 * ------------------------------------------------------------------ */

.wex-steps .step {
    cursor: default;
}

/* ------------------------------------------------------------------
 * A headline word longer than the design ever had
 * ------------------------------------------------------------------
 * The design's hero headline is "WHERE YOUR NEW LIFE BEGINS." -- no word in it is wider than
 * a phone. The content pages take their headlines from the owner's document, and "The
 * International Exhibition for Home and Wedding Preparations." has "Preparations." in it,
 * which at the hero's 52px is 397px wide: wider than a 390px screen.
 *
 * A grid column is `minmax(auto, 1fr)`, and `auto` will not shrink below its longest word,
 * so that one word pushed the whole page sideways -- the reader could swipe the header off
 * the screen.
 *
 * `overflow-wrap` only does anything when a word genuinely cannot fit on its own line, so
 * the homepage is untouched and every headline that fits is untouched. It applies where the
 * alternative is not a nicer line break but a broken page. `min-width: 0` lets the column
 * do the shrinking rather than the word being cut at the viewport edge.
 * ------------------------------------------------------------------ */

/* Every grid that holds a heading, not only the hero's: the same thing happened again on
 * /exhibit/, where "International participation." came to 429px on a 390px screen and the
 * .experience-intro grid would not shrink below it. With min-width:0 the heading wraps onto
 * two lines, which is what it does on a wide screen anyway. */
.wex-page-hero .hero-grid > *,
.experience-intro > *,
.journey-head > *,
.relive-head > *,
.intro-grid > * {
    min-width: 0;
}

/* Only the hero also needs the word itself to be breakable: "Preparations." alone is wider
 * than a phone at the hero's size, so there is no line break that would save it. */
.wex-page-hero h1 {
    overflow-wrap: break-word;
}

/* ------------------------------------------------------------------
 * Two links side by side that do not both fit
 * ------------------------------------------------------------------
 * `.intro-actions` is `display:flex` with no wrap. In the design it holds "Why Visit →" and
 * "Why Exhibit →", which fit a phone together. The content pages put longer pairs there --
 * "Plan Your Visit →" beside "Free Invitation →" came to 5px more than a 390px screen, and
 * a flex row that cannot wrap does not shorten, it overflows.
 *
 * Wrapping is what the row would do if the designer had been given a longer label; it costs
 * nothing when both fit, which is every case in the design itself.
 * ------------------------------------------------------------------ */

.intro-actions {
    flex-wrap: wrap;
}
