/* ===== Client Lounge ===== */

/* ----- Login page: sage background with bouncing bubbles ----- */
.lounge-login {
    position: relative;           /* the bubbles bounce inside this section */
    overflow: hidden;             /* and never spill out of it */
    background: var(--sage);      /* same as your home page hero */
    color: var(--off-white);      /* light heading and intro text */
}

.lounge-login .section-inner {
    position: relative;
    z-index: 1;                   /* the heading and card sit in front */
}

/* ----- Login card ----- */
.lounge-form {
    position: relative;           /* Simon is positioned inside the card */
    display: grid;
    gap: 1.25rem;
    max-width: 28rem;             /* a neat, narrow card */
    margin: 2.5rem auto 0;        /* centred under the heading */
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    background: var(--cream);
    color: var(--sage);           /* keep the text inside the card dark */
    text-align: left;
}

.lounge-form .btn {
    justify-self: start;          /* button only as wide as its words */
    cursor: pointer;
    font: inherit;
}

/* ----- Wrong email or password ----- */
.lounge-error {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: var(--off-white);
    color: #A3442F;               /* the same warm red as your contact form */
    font-weight: 500;
}

/* ----- Lounge page (after logging in) ----- */
.lounge-inner {
    max-width: 52rem;             /* comfy reading width */
    text-align: left;
}

.lounge-inner .section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.lounge .btn {
    cursor: pointer;
    font: inherit;
}

/* Welcome text */
.lounge-intro {
    line-height: 1.8;
}

.lounge-intro p + p,
.lounge-intro ul + p {
    margin-top: 1rem;
}

.lounge-intro ul {
    margin: 0.5rem 0 0 1.25rem;
}

/* The bookmark tip */
.lounge-tip {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: var(--mint);
    font-weight: 500;
}

/* Cream cards for the video and guides */
.lounge-card {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 1.5rem;
    background: var(--cream);
    line-height: 1.7;
}

.lounge-card h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.lounge-card p + p {
    margin-top: 0.75rem;
}

/* The video */
.lounge-video {
    display: block;
    width: 100%;                  /* fills the card on any screen */
    margin: 1.5rem 0;
    border-radius: 1rem;
    background: var(--sage);      /* shows while the video loads */
}

.lounge-note {
    font-size: 0.95rem;
    font-style: italic;
}

/* The two guides: side by side on wider screens */
.lounge-downloads {
    display: grid;
    gap: 0 2rem;
}

@media (min-width: 768px) {
    .lounge-downloads {
        grid-template-columns: 1fr 1fr;
    }
}

.lounge-downloads .lounge-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;      /* buttons only as wide as their words */
}

.lounge-downloads p {
    margin-bottom: 1.5rem;
}

.lounge-downloads .btn {
    margin-top: auto;             /* both buttons line up at the bottom */
}

/* Log out, centred at the end */
.lounge-logout {
    margin-top: 3rem;
    text-align: center;
}

/* ===== Simon delivers the login ===== */
/* lounge-login.js adds "is-delivering" to the form when Log in is pressed */

/* The box that holds Simon, his thread and the key */
.simon-delivery {
    position: absolute;
    top: 0;
    left: 5.25rem;                /* lined up with the middle of the button */
    pointer-events: none;         /* never blocks a click */
    z-index: 2;                   /* Simon sits in front of the button */
}

/* His silk thread, growing down from the top of the card */
.simon-delivery::before {
    content: "";
    position: absolute;
    top: 0;
    left: -1px;
    height: 0;
    border-left: 2px dashed var(--sage);
    opacity: 0.4;
    transition: height 0.7s ease-in-out;
}

/* Simon himself: waiting out of sight at the top */
.lounge-form .simon-login {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    overflow: visible;
    opacity: 0;
    transition: top 0.7s ease-in-out, opacity 0.2s ease;
}

/* Delivering: the thread grows and Simon drops to the button */
.lounge-form.is-delivering .simon-delivery::before {
    height: var(--simon-drop, 0px);
}

.lounge-form.is-delivering .simon-login {
    top: var(--simon-drop, 0px);
    opacity: 1;
}

/* ----- Simon's key ----- */
/* Waits hidden, follows Simon up and down, and appears when he grabs it */
.simon-key {
    position: absolute;
    left: 0;
    top: calc(var(--simon-drop, 0px) + 22px);    /* hanging just under Simon */
    transform: translate(-50%, -50%) rotate(90deg);
    overflow: visible;
    opacity: 0;
    transition: top 0.7s ease-in-out, opacity 0.2s ease;
}

.simon-key circle {
    fill: var(--butter);          /* a golden key */
    stroke: var(--sage);
    stroke-width: 2;
}

.simon-key path {
    fill: none;
    stroke: var(--butter);
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* Simon has grabbed it */
.lounge-form.has-key .simon-key {
    opacity: 1;
}

/* The three terms links, as soft pills */
.lounge-terms {
    list-style: none;
    display: flex;
    flex-wrap: wrap;              /* wraps neatly on phones */
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.lounge-terms a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: var(--off-white);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.lounge-terms a:hover,
.lounge-terms a:focus-visible {
    background: var(--sage);
    color: var(--off-white);
}

/* ----- Terms to accept ----- */
.lounge-agreements {
    list-style: none;
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

/* Each set of terms sits in its own soft off-white row */
.lounge-agreement {
    display: flex;
    flex-wrap: wrap;              /* stacks neatly on phones */
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    background: var(--off-white);
}

/* Terms name with the version underneath */
.lounge-agreement-name {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lounge-agreement-name a {
    font-weight: 500;
    text-underline-offset: 3px;   /* underline sits a little lower, easier to read */
}

.lounge-agreement-name a:hover,
.lounge-agreement-name a:focus-visible {
    text-decoration-thickness: 2px;
}

.lounge-version {
    font-size: 0.85rem;
    opacity: 0.75;                /* softer, so the name stands out */
}

/* "✓ Accepted on 11/11/26" as a mint pill, like your bookmark tip */
.lounge-accepted {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--mint);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Tick box and Accept button side by side */
.lounge-accept-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

.lounge-accept-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;              /* clicking the words ticks the box too */
}

.lounge-accept-form input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;               /* never squashed on small screens */
    accent-color: var(--sage);    /* tick box in your brand colour */
    cursor: pointer;
}

/* A slightly smaller button, so it doesn't overpower the row */
.lounge-accept-form .btn {
    padding: 0.55rem 1.4rem;
}

/* Accepted pill and Download button side by side */
.lounge-accepted-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.lounge-accepted-actions .btn {
    padding: 0.55rem 1.4rem;      /* same size as the Accept button */
}

/* Thank-you message: same mint style as Contact, spaced for the Lounge */
.lounge .form-success {
    margin: 0 auto 2rem;
    text-align: center;
}

@media (min-width: 640px) {
    /* Name on the left, pill and button on the right, every row the same */
    .lounge-agreement {
        display: grid;
        grid-template-columns: 1fr auto;
    }
}
