/* Property of Sistema THEAD. All rights reserved. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;700&display=swap');

:root {
    --home-blue: #0080C9;
    --home-blue-deep: #006ba8;
    --home-orange: #F59C00;
    --home-white: #ffffff;
    --home-ink: #03283f;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "DM Sans", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.12), transparent 24%),
        var(--home-blue);
    color: var(--home-white);
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -12vmin;
    right: -10vmin;
    width: 34vmin;
    height: 34vmin;
    background: rgba(255, 255, 255, 0.12);
}

body::after {
    bottom: -18vmin;
    left: -14vmin;
    width: 42vmin;
    height: 42vmin;
    background: rgba(3, 40, 63, 0.08);
}

.home-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 5vh, 48px);
    padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
}

.home-logo {
    width: min(320px, 72vw);
    height: auto;
}

.home-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(22px, 4vw, 38px);
}

.home-action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--home-white);
    text-decoration: none;
    background: transparent;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.home-action-button {
    appearance: none;
}

.home-action-button[aria-disabled="true"] {
    cursor: default;
}

.home-action-circle {
    width: clamp(158px, 29vw, 212px);
    height: clamp(158px, 29vw, 212px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 12px solid var(--home-orange);
    background: var(--home-white);
    box-shadow:
        0 16px 30px rgba(3, 40, 63, 0.2),
        inset 0 0 0 2px rgba(3, 40, 63, 0.04);
    transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-action img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.home-action--gallery img {
    width: 72%;
    height: 72%;
}

.home-action-label {
    font-size: clamp(1.05rem, 2.1vw, 1.35rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.home-action:hover .home-action-circle,
.home-action:focus-visible .home-action-circle {
    box-shadow:
        0 20px 34px rgba(3, 40, 63, 0.28),
        inset 0 0 0 2px rgba(3, 40, 63, 0.06);
    border-color: #ffb31f;
}

.home-action:active .home-action-circle {
    transform: scale(0.96);
}

.home-action-button[aria-disabled="true"]:hover .home-action-circle,
.home-action-button[aria-disabled="true"]:focus-visible .home-action-circle {
    box-shadow:
        0 16px 30px rgba(3, 40, 63, 0.2),
        inset 0 0 0 2px rgba(3, 40, 63, 0.04);
    border-color: var(--home-orange);
}

.home-action-button[aria-disabled="true"]:active .home-action-circle {
    transform: none;
}

.home-action:focus-visible {
    outline: none;
}

.home-action:focus-visible .home-action-label {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.swal-home-mode-popup {
    width: min(92vw, 760px) !important;
    border-radius: 34px !important;
    border: 6px solid rgba(245, 156, 0, 0.92) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 253, 0.98)) !important;
    color: var(--home-ink) !important;
    box-shadow: 0 24px 46px rgba(3, 40, 63, 0.28) !important;
    padding: clamp(1.2rem, 2vw, 1.6rem) !important;
}

.swal-home-mode-popup .swal2-title {
    margin: 0 1.7rem 0.35rem !important;
    color: var(--home-ink) !important;
    font-size: clamp(1.45rem, 3vw, 2rem) !important;
}

.swal-home-mode-popup .swal2-html-container {
    margin: 0 !important;
    overflow: visible !important;
}

.home-mode-popup-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: var(--home-ink);
}

.home-mode-popup-intro {
    margin: 0;
    text-align: center;
    color: rgba(3, 40, 63, 0.78);
    font-size: 1rem;
}

.home-mode-popup-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(16px, 3vw, 24px);
}

.home-mode-popup-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 10px 8px 0;
    color: var(--home-ink);
    text-decoration: none;
}

.home-mode-popup-circle {
    width: clamp(148px, 24vw, 190px);
    height: clamp(148px, 24vw, 190px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 10px solid var(--home-orange);
    background: var(--home-white);
    box-shadow:
        0 16px 28px rgba(3, 40, 63, 0.16),
        inset 0 0 0 2px rgba(3, 40, 63, 0.04);
    transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-mode-popup-option img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.home-mode-popup-label {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
    text-align: center;
}

.home-mode-popup-option:hover .home-mode-popup-circle,
.home-mode-popup-option:focus-visible .home-mode-popup-circle {
    box-shadow: 0 18px 34px rgba(3, 40, 63, 0.24);
    border-color: #ffb31f;
}

.home-mode-popup-option:active .home-mode-popup-circle {
    transform: scale(0.97);
}

.home-mode-popup-option:focus-visible {
    outline: none;
}

@media (orientation: landscape) {
    .home-actions {
        flex-direction: row;
    }
}

@media (min-width: 744px) and (orientation: portrait) {
    .home-actions {
        flex-direction: row;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    .home-shell {
        justify-content: center;
        gap: clamp(12px, 3vh, 18px);
        padding: max(10px, env(safe-area-inset-top)) 18px max(10px, env(safe-area-inset-bottom));
    }

    .home-logo {
        width: clamp(205px, 31vw, 280px);
        height: auto;
        max-height: none;
    }

    .home-actions {
        gap: clamp(18px, 2.8vw, 30px);
    }

    .home-action {
        gap: clamp(8px, 2vh, 12px);
    }

    .home-action-circle {
        width: min(18vw, 38vh);
        height: min(18vw, 38vh);
        min-width: 132px;
        min-height: 132px;
        max-width: 180px;
        max-height: 180px;
        border-width: clamp(8px, 1.8vh, 10px);
    }

    .home-action-label {
        font-size: clamp(1.08rem, 1.8vw, 1.28rem);
    }
}

@media (min-width: 700px) {
    .home-mode-popup-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-shell {
        gap: 24px;
    }

    .home-logo {
        width: min(280px, 78vw);
    }

    .swal-home-mode-popup {
        width: min(94vw, 760px) !important;
        border-radius: 28px !important;
        padding: 1.05rem !important;
    }

    .home-mode-popup-options {
        gap: 14px;
    }

    .home-mode-popup-circle {
        width: clamp(132px, 38vw, 176px);
        height: clamp(132px, 38vw, 176px);
        border-width: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-action-circle,
    .home-mode-popup-circle {
        transition: none;
    }
}

/*
 * Beagle mascot popup styles — mirrored from index/70-popups.css so the
 * home page's Story-Mode "coming soon" Swal (and any future home Swals)
 * gets the same mascot treatment as the editor / settings popups. The
 * swalMascot.js patch swaps SweetAlert2's default icon for a Beagle
 * image; without these rules, the image renders unsized and unstyled.
 */
.swal-mascot-popup .swal2-image {
    width: clamp(118px, 23vw, 164px) !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto 0.72rem !important;
    display: block !important;
    object-fit: contain !important;
}

.swal-mascot-popup .swal2-image.swal-mascot-image--success {
    width: clamp(146px, 29vw, 214px) !important;
}

.swal-mascot-popup .swal2-title {
    margin-top: 0 !important;
}

@media (max-width: 560px) {
    .swal-mascot-popup .swal2-image {
        width: clamp(112px, 40vw, 150px) !important;
        margin-bottom: 0.65rem !important;
    }

    .swal-mascot-popup .swal2-image.swal-mascot-image--success {
        width: clamp(138px, 52vw, 184px) !important;
    }
}
