/* The public site's layout - colours, fonts and buttons come from theme.css */

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-skip {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    background: var(--x-yellow);
    color: var(--r-ink);
    padding: 6px 12px;
}

/* The header stays at the top: it slides away while scrolling down and comes back on the way up
   (public/js/site.js adds .is-hidden and .is-scrolled) */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--x-line);
    transition: transform .3s ease, box-shadow .3s ease;
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

.site-header.is-scrolled {
    box-shadow: 0 4px 18px rgba(29, 35, 64, .08);
}

/* On the home page the header starts see-through over the hero, and gets the paper colour once
   the page scrolls (layouts/app: headerOver) */
.site-header-over {
    transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, border-color .3s ease;
}

.site-header-over:not(.is-scrolled) {
    background: transparent;
    border-bottom-color: transparent;
}

/* The open phone menu needs a background to be readable */
.site-header-over:not(.is-scrolled):has(.navbar-collapse.show) {
    background: var(--bs-body-bg);
}

.site-nav {
    padding: 14px 24px;
}

/* Wide screens: logo | menu, centred on the page | cart and social links */
@media (min-width: 992px) {
    .site-nav {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .site-nav .site-menu {
        display: contents !important;
    }

    .site-nav-end {
        justify-self: end;
    }
}

.site-nav-end {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-social {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: .85rem;
    color: var(--x-charcoal);
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}

/* Logos drawn inline (X, Bluesky, Threads): the same size and colour as the icon font's */
.social-icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.site-social a:hover,
.site-social a:focus-visible {
    background: var(--x-yellow);
    color: var(--r-ink);
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .site-nav-end {
        padding: 12px 0 4px;
        border-top: 1px solid var(--x-line);
        margin-top: 8px;
    }
}

/* Back to the top: shows once the page is scrolled half a screen (public/js/site.js) */
.site-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--r-ink);
    color: var(--x-yellow);
    box-shadow: 0 8px 24px rgba(29, 35, 64, .25);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease, background-color .2s ease, color .2s ease;
}

.site-to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.site-to-top:hover,
.site-to-top:focus-visible {
    background: var(--x-yellow);
    color: var(--r-ink);
    transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .site-social a,
    .site-to-top {
        transition: none;
    }
}

.site-logo {
    display: inline-flex;
    align-items: center;
}

/* The mark, then the name set in the heading face: "shead" in the second ink */
.site-logo {
    gap: 10px;
    text-decoration: none;
}

.site-logo img {
    display: block;
    width: 34px;
    height: 34px;
    transition: transform .3s ease;
}

.site-logo:hover img {
    transform: rotate(-12deg);
}

.site-logo-name {
    font-family: var(--r-display-font);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
    color: var(--r-blue);
}

.site-logo-name > span:first-child {
    color: var(--r-pink-text);
}

.site-logo-tld {
    color: var(--r-ink);
    font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
    .site-logo img {
        transition: none;
    }
}

.site-nav .nav-link {
    font-family: var(--r-mono-font);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--x-charcoal);
}

/* Between tablet and wide screens the menu is tight: closer items, so none wraps onto two lines */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .site-nav {
        column-gap: 12px;
    }

    .site-nav .navbar-nav {
        gap: 0 !important;
    }

    .site-nav .navbar-nav .nav-link {
        padding-left: .4rem;
        padding-right: .4rem;
        letter-spacing: .04em;
    }
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus {
    color: var(--r-ink);
    text-decoration: underline;
    text-decoration-color: var(--r-pink);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* The page you're on: a yellow ink highlight behind the word */
.site-nav .nav-link.active {
    color: var(--r-ink);
    background: linear-gradient(transparent 50%, var(--r-yellow) 50%) content-box;
}

.site-main {
    flex: 1;
    padding: 56px 0;
}

.site-footer {
    background: #1d2340;
    color: #c9cbe0;
    padding: 26px 0;
    font-size: .85rem;
    border-top: 6px solid var(--r-pink);
    box-shadow: 0 -6px 0 var(--r-yellow);
}

.site-footer-motto {
    font-family: var(--r-mono-font);
    font-size: .75rem;
    letter-spacing: .04em;
}

/* Home page hero: yellow, with the circle motif */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--x-yellow);
    color: var(--r-ink);
    padding: 96px 0 104px;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border: 14px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 260px;
    height: 260px;
    right: 8%;
    top: -60px;
}

.hero::after {
    width: 150px;
    height: 150px;
    left: 4%;
    bottom: -40px;
}

.hero-words {
    font-size: clamp(2.6rem, 7vw, 4.8rem);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: -.02em;
    color: var(--r-ink);
    margin: 0 0 18px;
}

.hero-words span {
    display: block;
}

.hero-words .boxed {
    display: inline-block;
    background: var(--r-ink);
    color: var(--x-yellow);
    padding: 0 .15em;
}

.hero-words .light {
    font-weight: 300;
}

.hero-tagline {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.hero .btn-dark {
    --bs-btn-padding-x: 1.6rem;
    --bs-btn-padding-y: .7rem;
}

/* Login, register, account ... */
.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--bs-body-bg);
    padding: 36px;
    border-radius: var(--x-radius);
    box-shadow: var(--x-shadow);
    border-top: 5px solid var(--x-yellow);
}

.auth-card-wide {
    max-width: 520px;
}

.auth-card h1 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.auth-card h1::after {
    content: '.';
    color: var(--x-yellow-strong);
}

.auth-card legend {
    font-size: 1rem;
    font-weight: 600;
    color: var(--x-charcoal);
    margin-top: 10px;
}

.auth-links {
    margin: 22px 0 0;
    text-align: center;
    font-size: .875rem;
}

.site-main:has(.auth-card) {
    background: var(--x-grey-light);
}

/* Error pages */
.error-page {
    text-align: center;
    padding: 24px 0;
}

.error-status {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 700;
    line-height: 1;
    color: var(--r-ink);
    margin: 0 0 8px;
}

.error-status span {
    background: var(--x-yellow);
    padding: 0 .12em;
}

.error-details {
    text-align: left;
    margin-top: 40px;
}

.error-details pre {
    white-space: pre-wrap;
    word-break: break-word;
}

/* The registration form's hidden spam trap - off-screen rather than display:none, which some bots skip */
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Installer steps */
.install-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    font-size: .8rem;
    color: #8a8a8a;
}

.install-steps .active {
    color: var(--x-charcoal);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--x-yellow-strong);
    text-decoration-thickness: 3px;
}

.install-steps .done {
    color: #2e7d32;
}

/* Public forms' hidden field for bots (Security\FormGuard) - off screen, never shown to people */
.form-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Asking before Google Analytics runs (layouts/app, public/js/analytics.js) */
.site-consent {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1040;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    max-width: 560px;
    padding: 16px 20px;
    border-top: 4px solid var(--x-yellow);
    border-radius: var(--x-radius);
    background: var(--bs-body-bg);
    box-shadow: 0 12px 40px rgba(29, 35, 64, .2);
    font-size: .85rem;
    line-height: 1.5;
}

.site-consent[hidden] {
    display: none;
}

.site-consent-text {
    flex: 1 1 280px;
}

.site-consent-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.site-footer-link {
    color: inherit;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
    color: #fff;
}

.site-consent-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-consent-link[hidden] {
    display: none;
}

@media (max-width: 575.98px) {
    .site-consent {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
}
