/* GTR Cash and Carry - theme tokens. Change the colours here (and theme_color in manifest.webmanifest). */
@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    src: url(../fonts/archivo-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    src: url(../fonts/archivo-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --red: #57A51B;
    --red-deep: #A8141A;
    --yellow: #FFD21F;
    --ink: #17191C;
    --concrete: #ECEDEE;
    --paper: #FFFFFF;
    --muted: #565B62;
    --radius: 6px;
    --wrap: 72rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    display: block;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    margin: 0;
    font-stretch: 62%;
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: 0.005em;
}

p {
    margin: 0;
}

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

.on-dark :focus-visible {
    outline-color: var(--yellow);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.wrap {
    width: min(var(--wrap), 100% - 2rem);
    margin-inline: auto;
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--yellow);
    padding: .6rem 1rem;
    font-weight: 700;
    z-index: 100;
}

.skip:focus {
    top: 1rem;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 3rem;
    padding: 0 1.4rem;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid var(--ink);
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
}

.btn:hover {
    background: var(--ink);
    color: var(--paper);
}

.btn-yellow {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--ink);
}

.btn-yellow:hover {
    background: var(--paper);
    border-color: var(--paper);
    color: var(--ink);
}

.btn-red {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.btn-red:hover {
    background: var(--red-deep);
    border-color: var(--red-deep);
    color: #fff;
}

.btn-light {
    border-color: #fff;
    color: #fff;
}

.btn-light:hover {
    background: #fff;
    color: var(--ink);
}

.btn-small {
    min-height: 2.5rem;
    padding: 0 1rem;
    font-size: .95rem;
}

.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
}

.site-header::after {
    content: '';
    display: block;
    height: 6px;
    background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--ink) 12px 24px);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.25rem;
}

.logo {
    display: block;
}

.logo img {
    height: 4.75rem;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nav a {
    text-decoration: none;
    font-weight: 600;
    padding: .55rem .8rem;
    border-radius: 4px;
}

.nav a:hover {
    background: var(--concrete);
}

.nav a[aria-current='page'] {
    background: var(--ink);
    color: #fff;
}

.nav .btn {
    margin-left: .5rem;
}

/* ---------- hero (home) ---------- */
.hero {
    background: var(--red);
    color: #fff;
    padding-top: clamp(2.5rem, 7vw, 5rem);
}

.hero h1 {
    font-size: clamp(4.25rem, 16vw, 10.5rem);
    font-weight: 900;
    line-height: .86;
    max-width: 9ch;
}

@media (min-width: 75rem) {
    .hero h1 {
        max-width: none;
        font-size: 9.75rem;
    }
}

.hero-copy {
    display: grid;
    gap: 1.5rem;
    max-width: 40rem;
    margin-top: 1.5rem;
    font-size: 1.15rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.hero-specials-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: clamp(2.5rem, 6vw, 4rem) 0 1rem;
}

.hero-specials-head h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.hero-specials-head a {
    font-weight: 600;
}

.ticket-row {
    position: relative;
    z-index: 2;
    margin-bottom: -5rem;
    min-height: 22rem;
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.ticket-row::-webkit-scrollbar {
    display: none;
}

.ticket-row > .ticket {
    flex: 0 0 min(17rem, 78vw);
    scroll-snap-align: start;
}

@media (min-width: 62rem) {
    .ticket-row {
        overflow: visible;
    }

    .ticket-row > .ticket {
        flex: 0 1 23rem;
        min-width: 0;
    }
}

.row-empty {
    flex: 1;
    display: grid;
    place-content: center;
    text-align: center;
    gap: .5rem;
    min-height: 18rem;
    padding: 2rem;
    border: 3px dashed rgba(255, 255, 255, .7);
    border-radius: var(--radius);
    font-size: 1.1rem;
}

.row-empty strong {
    font-stretch: 62%;
    font-weight: 800;
    font-size: 2rem;
    line-height: 1;
}

.section.after-hero {
    padding-top: 9rem;
    background: var(--paper);
}

/* ---------- sections ---------- */
.section {
    padding-block: clamp(3rem, 8vw, 6rem);
}

.section-tight-top {
    padding-top: 0;
}

.section h2 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
}

.about {
    display: grid;
    gap: 1.5rem 4rem;
}

.about-text {
    display: grid;
    gap: 1rem;
    font-size: 1.15rem;
    max-width: 36rem;
}

@media (min-width: 62rem) {
    .about {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.stock {
    background: var(--concrete);
}

.stock-intro {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 40rem;
}

.stock-intro p {
    font-size: 1.1rem;
    color: var(--muted);
}

.aisles {
    display: grid;
    gap: 1rem;
}

.aisle {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: grid;
    gap: .6rem;
    align-content: start;
}

.aisle h3 {
    font-size: 2.25rem;
}

.aisle p {
    color: var(--muted);
}

.aisle-main {
    background: var(--yellow);
}

.aisle-wide {
    background: var(--ink);
    grid-column: 1 / -1;
}

.aisle-wide h3 {
    color: var(--yellow);
}

.aisle-wide p {
    color: #C8CBD0;
}

.aisle-main p {
    color: var(--ink);
}

.aisle-main h3 {
    font-size: clamp(3rem, 7vw, 4.5rem);
}

@media (min-width: 40rem) {
    .aisles {
        grid-template-columns: 1fr 1fr;
    }

    .aisle-main {
        grid-column: 1 / -1;
    }
}

@media (min-width: 62rem) {
    .aisles {
        grid-template-columns: repeat(3, 1fr);
    }

    .aisle-main {
        grid-column: 1;
        grid-row: span 2;
        align-content: space-between;
    }
}

.visit {
    background: var(--ink);
    color: #fff;
}

.visit h2 {
    color: var(--yellow);
}

.visit-grid {
    display: grid;
    gap: 2rem;
}

.visit dl {
    margin: 0;
    display: grid;
    gap: 1.25rem;
}

.visit dt {
    font-size: .95rem;
    color: #C8CBD0;
}

.visit dd {
    margin: .15rem 0 0;
    font-size: 1.35rem;
    font-weight: 600;
    white-space: pre-line;
}

.visit a {
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

@media (min-width: 48rem) {
    .visit-grid {
        grid-template-columns: 1fr 2fr;
    }

    .visit dl {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- footer ---------- */
.site-footer {
    background: #0E0F11;
    color: #C8CBD0;
    padding-block: 1.75rem;
    font-size: .95rem;
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.site-footer nav {
    display: flex;
    gap: 1.5rem;
}

.site-footer a {
    color: #fff;
}

/* ---------- promotions page ---------- */
.page-head {
    background: var(--yellow);
    padding-block: clamp(2rem, 6vw, 3.5rem);
}

.page-head h1 {
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 900;
    line-height: .88;
}

.page-head p {
    margin-top: 1rem;
    max-width: 36rem;
    font-size: 1.1rem;
}

.promos {
    background: var(--concrete);
    padding-block: 1.75rem 4rem;
    flex: 1;
}

.tools {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .75rem 1rem;
    margin-bottom: 1.5rem;
}

.tools .field {
    flex: 1 1 14rem;
}

.tools .field-sort {
    flex: 0 1 13rem;
}

.count {
    margin-left: auto;
    color: var(--muted);
    font-weight: 600;
    align-self: center;
}

.ticket-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.empty {
    display: grid;
    justify-items: start;
    gap: .75rem;
    padding: 2rem;
    background: var(--paper);
    border: 3px dashed #B9BCC1;
    border-radius: var(--radius);
    max-width: 36rem;
}

.empty strong {
    font-stretch: 62%;
    font-weight: 800;
    font-size: 2.25rem;
    line-height: 1;
}

.empty p {
    color: var(--muted);
}

/* ---------- forms ---------- */
.field {
    display: grid;
    gap: .35rem;
}

.field label,
.field .label {
    font-weight: 700;
    font-size: .95rem;
}

.hint {
    font-size: .875rem;
    color: var(--muted);
    font-weight: 400;
}

.input,
.select {
    width: 100%;
    min-height: 3rem;
    padding: .5rem .85rem;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 4px;
}

.input:focus-visible,
.select:focus-visible {
    outline-offset: 1px;
}

.input-money {
    display: flex;
}

.input-money span {
    display: grid;
    place-items: center;
    padding: 0 .85rem;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    border-radius: 4px 0 0 4px;
}

.input-money .input {
    border-radius: 0 4px 4px 0;
}

.input[aria-invalid='true'] {
    border-color: var(--red);
}

/* ---------- ticket (promotion card) ---------- */
.ticket {
    --stub-h: 3.75rem;
    --notch: .6rem;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    border-radius: var(--radius);
    -webkit-mask:
        radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub-h)), #0000 97%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub-h)), #0000 97%, #000) right / 51% 100% no-repeat;
    mask:
        radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub-h)), #0000 97%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub-h)), #0000 97%, #000) right / 51% 100% no-repeat;
}

.ticket-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--concrete);
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}

.ticket-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ticket-media.no-photo {
    display: grid;
    place-items: center;
    background: repeating-linear-gradient(-45deg, #F4F4F5 0 14px, var(--concrete) 14px 28px);
}

.ticket-media.no-photo img {
    width: 45%;
    height: auto;
    opacity: .35;
    object-fit: contain;
}

.badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 1;
    background: var(--yellow);
    color: var(--ink);
    padding: .2rem .6rem;
    border-radius: 3px;
    font-stretch: 62%;
    font-weight: 900;
    font-size: 1.4rem;
    line-height: 1.1;
    transform: rotate(-3deg);
}

.ticket-body {
    flex: 1;
    padding: 1rem 1rem .9rem;
    display: grid;
    align-content: start;
    gap: .15rem;
}

.ticket-name {
    font-size: 1.05rem;
    font-stretch: 100%;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ticket-detail {
    color: var(--muted);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .15rem .85rem;
    margin-top: .5rem;
}

.price {
    display: inline-flex;
    align-items: flex-start;
    color: var(--red);
    font-stretch: 62%;
    font-weight: 900;
    line-height: .85;
}

.price .cur,
.price .cents {
    font-size: 1.7rem;
    margin-top: .3rem;
}

.price .rand {
    font-size: 4.25rem;
    letter-spacing: -.01em;
}

.price-empty {
    color: var(--muted);
    font-weight: 600;
    padding-block: 1.1rem;
}

.was {
    color: var(--muted);
    font-size: .95rem;
}

.was s {
    text-decoration-thickness: 2px;
}

.ticket-stub {
    height: var(--stub-h);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-top: 2px dashed rgba(23, 25, 28, .35);
    background: #F5F5F6;
    border-radius: 0 0 var(--radius) var(--radius);
}

.stub-label {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.2;
}

.stub-date {
    display: block;
    font-weight: 700;
    line-height: 1.25;
}

.stub-left {
    font-stretch: 62%;
    font-weight: 900;
    font-size: 1.6rem;
    line-height: 1;
    text-align: right;
}

.ticket.is-soon .ticket-stub {
    background: var(--yellow);
    border-top-color: rgba(23, 25, 28, .5);
}

.ticket.is-soon .stub-label {
    color: var(--ink);
}

.ticket.is-today .ticket-stub {
    background: var(--red);
    color: #fff;
    border-top-color: rgba(255, 255, 255, .7);
}

.ticket.is-today .stub-label {
    color: #fff;
}

.ticket.is-expired .ticket-stub {
    background: var(--ink);
    color: #fff;
    border-top-color: rgba(255, 255, 255, .5);
}

.ticket.is-expired .stub-label {
    color: #C8CBD0;
}

.ticket.is-expired .price {
    color: var(--muted);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 200;
    max-width: min(32rem, 100% - 2rem);
    padding: .85rem 1.25rem;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
}

.toast.is-error {
    background: var(--red);
}

.toast[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ---------- 404 ---------- */
.lost {
    display: grid;
    place-content: center;
    justify-items: start;
    gap: 1rem;
    min-height: 60vh;
}

.lost h1 {
    font-size: clamp(5rem, 22vw, 12rem);
    font-weight: 900;
    color: var(--red);
    line-height: .8;
}

/* ---------- management page ---------- */
.admin {
    background: var(--concrete);
}

.admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-head h1 {
    font-size: clamp(3rem, 9vw, 5.5rem);
    font-weight: 900;
    line-height: .88;
}

.admin-body {
    display: grid;
    gap: 2.5rem;
    padding-block: 1.75rem 4rem;
}

.panel {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.panel h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.login {
    max-width: 28rem;
    padding-block: 3rem 4rem;
}

.login .panel {
    display: grid;
    gap: 1rem;
}

.login h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: .9;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-error {
    color: var(--red-deep);
    font-weight: 600;
    min-height: 1.5em;
}

.check {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
}

.check input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--red);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.admin-grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.preview .ticket-grid {
    grid-template-columns: minmax(0, 18rem);
}

.preview-note {
    margin-top: 1rem;
    color: var(--muted);
    font-size: .9rem;
}

.admin-list {
    display: grid;
    gap: .75rem;
}

.admin-list h2 {
    margin-bottom: .25rem;
}

.admin-row {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: .5rem 1rem;
    align-items: center;
    background: var(--paper);
    padding: .75rem;
    border-radius: var(--radius);
}

.admin-row img,
.admin-row .thumb {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 4px;
    background: var(--concrete);
}

.admin-row .info {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.admin-row .info strong {
    overflow-wrap: anywhere;
}

.admin-row .money {
    font-weight: 600;
}

.admin-row .actions {
    grid-column: 1 / -1;
    display: flex;
    gap: .5rem;
}

.chip {
    display: inline-block;
    justify-self: start;
    padding: .05rem .65rem;
    border-radius: 99px;
    font-size: .85rem;
    font-weight: 700;
    background: var(--concrete);
}

.chip.is-live {
    background: #D8F2DC;
    color: #0F5B1F;
}

.chip.is-soon {
    background: var(--yellow);
}

.chip.is-expired {
    background: var(--ink);
    color: #fff;
}

.btn-danger:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

@media (min-width: 40rem) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .span-2 {
        grid-column: 1 / -1;
    }
}

@media (min-width: 48rem) {
    .admin-row {
        grid-template-columns: 4.5rem 1fr auto;
    }

    .admin-row .actions {
        grid-column: auto;
    }
}

@media (min-width: 62rem) {
    .admin-grid {
        grid-template-columns: 3fr 2fr;
    }

    .preview {
        position: sticky;
        top: 6.5rem;
    }
}
