/* Fonts */
@font-face {
    font-family: "SoDoSans";
    src: url("/assets/fonts/Sodo/SoDoSans-Regular-5e3f15434deaac09b5004c5bbf57311f.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SoDoSansNarrow";
    src: url("/assets/fonts/Sodo/SoDoSansNarrow-SemiBold-0dc0c0800591b53e702f8ed1d8343e4c.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Starbucks Serif";
    src: url("/assets/fonts/Starbucks/StarbucksSerif-Regular-c895da6ce13f607cda3bce3e392fad51.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Base */
* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: "SoDoSans", Arial, sans-serif;
    background: linear-gradient(
            155.74deg,
            #c4081e 32.98%,
            #8a1e23 90.9%
    );
}

/* Ribbon background */
#container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    text-align: center;
    background-image: url("/assets/images/SB_2027_ribbon_bg-cd87313266e6784a335cb3621ab41cf9.png");
    background-position: center 100px;
    background-size: auto calc(100% - 100px);
    background-repeat: no-repeat;
}

/* Navigation */
.navbar {
    flex-shrink: 0;
    padding: 10px 24px;
    font-family: "SoDoSansNarrow", Arial, sans-serif;
}

.navbar-layout {
    padding: 0;
}

.navbar-brand {
    position: static;
    transform: none;
    margin-right: 28px;
    flex-shrink: 0;
}

.navbar-brand img {
    display: block;
    width: 44px;
    height: auto;
}

.navbar-nav {
    gap: 16px;
}

.navbar .nav-link {
    padding: 8px 12px;
    color: #fff;
    font-weight: 600;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #fff;
    text-decoration: underline;
}

.navbar-toggler {
    border: 0;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.check-stickers-link {
    white-space: nowrap;
    font-family: "SoDoSansNarrow", Arial, sans-serif;
    font-size: clamp(12px, 1.2vw, 18px);
}

/* Desktop: logo, links, button */
.navbar-layout .navbar-brand {
    order: 1;
}

.navbar-layout .navbar-collapse {
    order: 2;
}

.navbar-layout .check-stickers-link {
    order: 3;
}

/* Main content */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 48px 44px;
}

/* Only this heading uses Starbucks Serif. */
.header-text {
    margin: 0 0 12px;
    padding: 0;
    color: #fff;
    font-family: "Starbucks Serif", Georgia, serif;
    font-size: clamp(32px, 4vw, 60px);
    font-weight: 400;
    line-height: 1.1;
}

/* White scanner card */
.table-bg-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 974px;
    min-height: 0;
    margin: 0 auto;
    padding: clamp(20px, 4vh, 40px) 24px;
    overflow: visible;
    background: #fff;
    color: #000;
}

.sticker-heading {
    margin: 0 0 10px;
    font-family: "SoDoSansNarrow", Arial, sans-serif;
    font-size: clamp(24px, 2.5vw, 34px);
    font-weight: 600;
    line-height: 1.2;
}

.sticker-description {
    margin: 0 0 20px;
    color: #444;
    font-size: 14px;
    line-height: 1.5;
}

#errorDiv {
    width: 100%;
    max-width: 600px;
}

/* reCAPTCHA */
#html_element {
    margin: 0 auto;
}

#html_element > div {
    margin: 0 auto;
}

/* QR scanner */
.scanner-section {
    width: 100%;
}

.scan-action {
    margin-top: 20px;
}

.check-sticker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 24px;
    border: 1px solid #020202;
    border-radius: 6px;
    background: #020202;
    color: #fff;
    font-family: "SoDoSansNarrow", Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.check-sticker:hover {
    background: #252525;
}

.check-sticker:focus-visible {
    outline: 3px solid #00754a;
    outline-offset: 3px;
}

#qr-canvas {
    display: block;
    width: calc(100% - 20px);
    max-width: 250px;
    height: 250px;
    margin: 24px auto 0;
    border-radius: 10px;
}

#qr-canvas[hidden] {
    display: none;
}

#btn-scan-qr {
    cursor: pointer;
}

#btn-scan-qr img {
    height: 10em;
    padding: 15px;
    margin: 15px;
    background: #fff;
}

#qr-result {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    font-size: 1.2em;
}

#result {
    margin-top: 20px;
    color: #c52d37;
    font-size: clamp(48px, 10vw, 120px);
    overflow-wrap: anywhere;
}

.btn-success {
    background-color: #1e3932 !important;
    border-color: #1e3932 !important;
}

/* Flowers */
.card-leaf {
    position: absolute;
    bottom: -32px;
    z-index: 1;
    width: 120px;
    height: auto;
    pointer-events: none;
}

.card-leaf-left {
    left: -40px;
}

.card-leaf-right {
    right: -40px;
    transform: scaleX(-1);
}

/* Footer */
.site-footer {
    flex-shrink: 0;
    padding: 20px 24px;
    background: #2e1b19;
    color: #fff;
    text-align: left;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-wordmark {
    margin-bottom: 8px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 3px;
    line-height: 1.2;
}

.footer-wordmark sup {
    font-size: 10px;
    letter-spacing: 0;
}

.footer-contact h2 {
    margin: 0 0 8px;
    font-family: "SoDoSansNarrow", Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.footer-hours {
    display: grid;
    gap: 4px;
    margin-bottom: 6px;
}

.footer-hours-row {
    display: grid;
    grid-template-columns: 260px auto;
    gap: 20px;
}

.footer-contact,
.footer-legal {
    min-width: 0;
    font-size: 12px;
    line-height: 1.5;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    text-decoration: underline;
}

.footer-legal {
    color: #d0c5c3;
    text-align: right;
}

.footer-legal p {
    margin: 0 0 4px;
}

.footer-permit {
    font-style: italic;
}

.footer-terms {
    color: #fff !important;
    font-weight: 700;
}

/* Smaller desktops */
@media (min-width: 768px) and (max-width: 1100px) {
    .card-leaf-left {
        left: -20px;
    }

    .card-leaf-right {
        right: -20px;
    }
}

/* Tablets */
@media (max-width: 991.98px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .footer-legal {
        text-align: left;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .navbar {
        padding: 8px 12px;
    }

    /* Menu left, logo center, button right */
    .navbar > .navbar-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 0;
    }

    .navbar-layout .navbar-toggler {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        margin: 0;
        padding: 6px;
    }

    .navbar-layout .navbar-brand {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        margin: 0;
        padding: 0;
    }

    .navbar-layout .navbar-brand img {
        width: 44px;
    }

    .navbar-layout .check-stickers-link {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        margin: 0;
        padding-inline: 6px;
        font-size: 12px;
    }

    .navbar-layout .navbar-collapse {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        margin-top: 14px;
        padding: 12px;
        background: #8a1e23;
        border-radius: 6px;
        text-align: left;
    }

    .navbar-nav {
        gap: 0;
        text-align: left;
    }

    .hero-content {
        padding: 12px 20px 36px;
    }

    .header-text {
        margin-bottom: 10px;
        font-size: clamp(28px, 6vw, 40px);
    }

    .table-bg-wrapper {
        min-height: 0;
        padding: 20px 8px;
    }

    .sticker-heading {
        font-size: 24px;
    }

    .sticker-description {
        margin-bottom: 14px;
        font-size: 13px;
    }

    .scan-action {
        margin-top: 14px;
    }

    .card-leaf {
        bottom: -24px;
        width: 80px;
    }

    .card-leaf-left {
        left: -16px;
    }

    .card-leaf-right {
        right: -16px;
    }

    .site-footer {
        padding: 16px 20px;
    }

    .footer-wordmark {
        font-size: 22px;
    }

    .footer-contact h2 {
        font-size: 14px;
    }

    .footer-contact,
    .footer-legal {
        font-size: 11px;
    }

    .footer-hours-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* Narrow mobile screens */
@media (max-width: 359.98px) {
    .hero-content {
        padding-right: 8px;
        padding-left: 8px;
    }

    .table-bg-wrapper {
        padding-right: 0;
        padding-left: 0;
    }
}

/* Desktop proportions matching the Figma reference */
@media (min-width: 992px) and (min-height: 700px) {
    body {
        min-height: 100dvh;
    }

    #container {
        flex: 1 0 auto;
        min-height: 73dvh;
    }

    .navbar {
        padding: 14px 24px;
    }

    .navbar-brand img {
        width: 53px;
    }

    .hero-content {
        justify-content: flex-start;
        padding: 18px 48px 48px;
    }

    .header-text {
        margin-bottom: 16px;
        font-size: clamp(40px, 4.8vw, 72px);
        line-height: 1.1;
    }

    .table-bg-wrapper {
        width: 100%;
        max-width: 974px;
        min-height: 40dvh;
        padding:  clamp(28px, 5dvh, 54px) 32px 28px;
    }

    .sticker-heading {
        margin-bottom: 12px;
        font-size: clamp(28px, 2.7vw, 40px);
    }

    .sticker-description {
        margin-bottom: 24px;
        font-size: clamp(14px, 1.2vw, 18px);
    }

    .scan-action {
        margin-top: 24px;
    }

    .check-sticker {
        min-height: 44px;
        padding: 10px 28px;
    }

    .card-leaf {
        width: clamp(120px, 12vw, 180px);
        bottom: -42px;
    }

    .card-leaf-left {
        left: -42px;
    }

    .card-leaf-right {
        right: -42px;
    }

    .site-footer {
        min-height: 27dvh;
        display: flex;
        align-items: center;
        padding: 24px 48px;
    }

    .footer-inner {
        width: 100%;
        max-width: 1200px;
        gap: 32px;
    }

    .footer-wordmark {
        margin-bottom: 12px;
        font-size: 32px;
    }

    .footer-contact h2 {
        margin-bottom: 12px;
        font-size: 18px;
    }

    .footer-contact,
    .footer-legal {
        font-size: 13px;
        line-height: 1.6;
    }

    .footer-hours {
        gap: 6px;
        margin-bottom: 8px;
    }
}

@media (max-width: 767.98px) {
    #container {
        background-position: center 70px;
        background-size: auto calc(100% - 70px);
    }

    .hero-content {
        justify-content: flex-start;
        padding: 28px 20px 44px;
    }

    .header-text {
        margin-bottom: 14px;
        font-size: clamp(28px, 6vw, 40px);
        line-height: 1.15;
    }

    .table-bg-wrapper {
        padding: 28px 8px 32px;
    }

    .sticker-heading {
        margin-bottom: 12px;
        font-size: 24px;
    }

    .sticker-description {
        margin-bottom: 20px;
        font-size: 13px;
    }

    .scan-action {
        margin-top: 22px;
    }

    .card-leaf {
        width: 80px;
        bottom: -24px;
    }

    .site-footer {
        padding: 22px 20px;
    }

    .footer-inner {
        gap: 16px;
    }
}

/* Keep the standard reCAPTCHA within narrow screens. */
@media (max-width: 359.98px) {
    .hero-content {
        padding-right: 8px;
        padding-left: 8px;
    }

    .table-bg-wrapper {
        padding-right: 0;
        padding-left: 0;
    }
}

@media (max-width: 767.98px) {
    .table-bg-wrapper {
        min-height: 440px;
        justify-content: center;
        padding: 36px 8px;
    }
}

.footer-wordmark img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
}

@media (max-width: 767.98px) {
    .footer-wordmark img {
        width: 180px;
    }
}