/**
 * Hoqmail — Layout
 *
 * Page-level structure only: the shell, the topbar, the footer and the two
 * page skeletons (landing split and application page).
 */

/* -------------------------------------------------------------------
   Shell — footer always sits at the bottom, never mid-screen
   ------------------------------------------------------------------- */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1 0 auto;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* -------------------------------------------------------------------
   Topbar
   ------------------------------------------------------------------- */
.topbar {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.topbar__inner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-height: var(--topbar-height);
}

.topbar__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.topbar__brand picture { display: inline-flex; }

.topbar__brand img {
    height: var(--logo-height-bar);
    width: auto;
}

.topbar__search {
    flex: 1 1 auto;
    max-width: 30rem;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
}

/* -------------------------------------------------------------------
   Application page
   ------------------------------------------------------------------- */
.page {
    padding-block: var(--space-6) var(--space-8);
}

.page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.page__title {
    font-size: var(--fs-h5);
    line-height: var(--lh-snug);
}

.page__subtitle {
    margin-top: var(--space-1);
    color: var(--color-text-muted);
    font-size: var(--fs-caption);
}

/* -------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------- */
.site-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-4);
    color: var(--color-text-muted);
    font-size: var(--fs-caption);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
    text-align: center;
}

/*
 * Full-bleed pages — the landing split — run their content to the viewport
 * edge. Without this the footer would keep the centred container's rhythm and
 * the copyright would sit hundreds of pixels right of the hero above it.
 */
.site-footer--full .site-footer__inner {
    max-width: none;
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-5);
}

.site-footer__nav a {
    color: var(--color-text-muted);
}

.site-footer__nav a:hover {
    color: var(--color-brand-ink);
}

@media (min-width: 576px) {
    .site-footer__inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* -------------------------------------------------------------------
   Landing — two deliberate zones, never a stack on desktop
   ------------------------------------------------------------------- */
.landing {
    display: grid;
    grid-template-columns: 1fr;
    flex: 1 0 auto;
}

.landing__pitch {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-5);
    background-color: var(--color-brand-tint);
    padding: var(--space-8) var(--container-pad);
}

.landing__pitch-inner {
    width: 100%;
    max-width: 34rem;
    margin-inline: auto;
}

.landing__form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--container-pad);
}

.landing__logo {
    height: var(--logo-height-hero);
    width: auto;
    margin-bottom: var(--space-5);
}

.landing__title {
    font-size: var(--fs-h1);
    line-height: var(--lh-snug);
    letter-spacing: var(--tracking-tight);
    font-weight: var(--fw-bold);
    color: var(--color-text-strong);
}

.landing__lead {
    margin-top: var(--space-4);
    font-size: var(--fs-body-1);
    line-height: var(--lh-loose);
    color: var(--color-text);
}

.landing__rule {
    width: 56px;
    height: 4px;
    margin-block: var(--space-6);
    background-color: var(--color-brand);
    border-radius: var(--radius-pill);
}

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

    .landing__pitch-inner {
        margin-inline: 0 auto;
    }
}

/* -------------------------------------------------------------------
   Content page with artwork
   One column until there is room for a second; the illustration is
   decorative, so small screens simply do without it.
   ------------------------------------------------------------------- */
.page-layout {
    display: grid;
    gap: var(--space-7);
}

.page-art {
    display: none;
}

@media (min-width: 992px) {
    .page-layout {
        grid-template-columns: minmax(0, 42rem) minmax(0, 1fr);
        align-items: start;
        gap: var(--space-9);
    }

    .page-art {
        display: flex;
        justify-content: center;
        position: sticky;
        top: var(--space-6);
    }
}
