/* ============================================================
   DEMO PAGE — /demo
   A dark page: a grid of loops from Yesper's own views across the
   width, and on top of it one white panel with the one field. The
   field and the notice are the contact page's (contact.css); the
   rest is here.
   ============================================================ */

/* The page is one of the site's dark pages: body.dark-page (styles.css) turns
   the shared header and footer. The background is the dark footer's own
   colour, so page and footer are one surface, and the header takes it too.
   The panel is the one light surface. */
body.demo-page {
    background-color: #111827;
}
body.demo-page #header {
    background: rgba(17, 24, 39, 0.9);
}
body.demo-page footer {
    margin-top: 0;
}

.demo-stage {
    padding: 100px 20px 0;
}
.demo-stage-inner {
    position: relative;
    display: flex;
    /* The wall starts at the top; where the panel is the taller of the two,
       the room is left under the wall. */
    align-items: flex-start;
    min-height: 790px;
}

/* ---------- The wall: eight loops in a four-column grid ---------- */
/* One two-by-two tile, one two-by-one, six singles, across the whole width
   and at half strength: a backdrop, with the field as the thing to look at. */
.demo-wall {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}
.demo-tile {
    position: relative;
    aspect-ratio: 456 / 332;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    overflow: hidden;
    background: #1a2233;
}
.demo-tile--big {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}
.demo-tile--wide {
    grid-column: span 2;
    aspect-ratio: 926 / 332;
}
.demo-tile video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- The panel, on top of the wall ---------- */
.demo-panel {
    position: absolute;
    z-index: 1;
    left: 28px;
    /* A little down from the top of the wall, not centred on it. */
    top: clamp(28px, 8%, 96px);
    width: 420px;
    padding: 40px 36px 28px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.75), 0 8px 24px rgba(0, 0, 0, 0.4);
}
.demo-panel h1 {
    margin: 0;
    font-family: 'Instrument Serif', serif;
    font-weight: 300;
    font-size: 56px;
    line-height: 1.02;
    letter-spacing: -0.8px;
    color: rgb(10, 10, 10);
}
/* One short line, in the points' own size, so it reads as their lead-in. */
.demo-lead {
    margin: 14px 0 0;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 22px;
    color: rgb(10, 10, 10);
}

.demo-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 0;
}
/* Two short points on what a booking is, above the field. */
.demo-points.contact-points {
    margin: 0 0 18px;
    gap: 9px;
}
.demo-form[hidden] {
    display: none;
}
/* The field is the next step. On a computer it has the cursor from the start
   (demo.js). While it is empty and waiting, a halo in the amber the loops use
   for what is selected breathes slowly around it; with the cursor in it the
   border turns amber and the halo holds still, so only a field that is active
   looks active. */
.demo-email {
    padding: 14px 17px;
    font-size: 16px;
    border: 2px solid rgba(10, 10, 10, 0.32);
    animation: demo-breathe 3s ease-in-out infinite;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.demo-email:not(:placeholder-shown) {
    animation: none;
}
.demo-email:focus {
    animation: none;
    border-color: #c8903a;
    box-shadow: 0 0 0 4px rgba(200, 144, 58, 0.3);
}
@keyframes demo-breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 144, 58, 0); }
    50% { box-shadow: 0 0 0 5px rgba(200, 144, 58, 0.3); }
}
@media (prefers-reduced-motion: reduce) {
    .demo-email { animation: none; }
}
.demo-submit {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    padding: 15px 26px;
    border: none;
    border-radius: 6px;
    background-color: rgb(10, 10, 10);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.3s;
}
.demo-submit:disabled {
    cursor: default;
    opacity: 0.6;
}
/* Asks for a work email when the address is at a free mail provider. */
.demo-work-hint {
    margin: 2px 0 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: rgb(160, 50, 40);
}
.demo-work-hint[hidden] {
    display: none;
}
.demo-email[aria-invalid="true"],
.demo-email[aria-invalid="true"]:focus {
    animation: none;
    border-color: rgb(180, 60, 50);
    box-shadow: 0 0 0 4px rgba(180, 60, 50, 0.16);
}

/* Honeypot: off screen, never shown, never focused. */
.demo-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.demo-notice {
    margin: 12px 0 0;
}
.demo-notice[hidden] {
    display: none;
}

/* Shown instead of the form to someone whose organisation already has Yesper. */
.demo-existing {
    margin: 26px 0 0;
}
.demo-existing[hidden] {
    display: none;
}
.demo-existing:focus {
    outline: none;
}
.demo-existing-title {
    font-family: 'Instrument Serif', serif;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: -0.4px;
    line-height: 32px;
    color: rgb(10, 10, 10);
    margin: 0 0 10px;
}
.demo-existing-body {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 23px;
    color: rgba(10, 10, 10, 0.75);
    margin: 0;
}
.demo-existing-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    margin-top: 22px;
}
.demo-existing-back {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgb(10, 10, 10);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}
.demo-existing-back:hover {
    opacity: 0.6;
}

/* The customer logos, small, at the foot of the panel. */
.demo-logos.trust-logos {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 8px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(10, 10, 10, 0.08);
}
.demo-logos .trust-logo-card,
.demo-logos .trust-logo-card:nth-child(n) {
    height: 38px;
    padding: 0 4px;
    border: none;
}
.demo-logos.trust-logos img {
    height: calc(var(--logo-h) * 0.68);
    opacity: 0.85;
}

/* The way to the examples, under the logos, behind a hairline of its own. */
.demo-try {
    margin: 18px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(10, 10, 10, 0.08);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 21px;
    color: rgba(10, 10, 10, 0.6);
}
.demo-try a {
    font-weight: 500;
    color: rgb(10, 10, 10);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}
.demo-try a:hover {
    opacity: 0.6;
}

/* ---------- The customer quote, under the stage ---------- */
.demo-quote {
    max-width: 680px;
    margin: 0 auto;
    padding: 88px 24px 104px;
    text-align: center;
}
.demo-quote blockquote {
    margin: 0;
    font-family: 'Instrument Serif', serif;
    font-weight: 300;
    font-size: 26px;
    line-height: 34px;
    letter-spacing: -0.2px;
    color: #f4f1ea;
    text-wrap: balance;
}
.demo-quote figcaption {
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 19px;
    color: rgba(244, 241, 234, 0.6);
}
.demo-quote-name {
    font-weight: 500;
    color: #f4f1ea;
}
.demo-quote-name::after {
    content: ' · ';
    font-weight: 400;
    color: rgba(244, 241, 234, 0.4);
}

/* ---------- Narrow: the panel first, the wall under it in two columns ---------- */
@media (max-width: 1099px) {
    .demo-stage {
        padding: 96px 16px 0;
    }
    .demo-stage-inner {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
    }
    .demo-panel {
        position: static;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
        padding: 30px 24px 22px;
    }
    .demo-panel h1 { font-size: 46px; }
    .demo-wall {
        order: 2;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        max-width: 720px;
        margin: 28px auto 0;
    }
    .demo-tile--big { aspect-ratio: 926 / 678; grid-row: auto; }
    .demo-quote { padding: 64px 16px 80px; }
    .demo-quote blockquote { font-size: 22px; line-height: 30px; }
}
