:root {
    /* Brand palette — becomes the free Bootstrap theme's tokens (see scope Maybe/Future). */
    --gum-red: #b23446;       /* gum red — background */
    --tooth-inactive: #EAE0C8;  /* pearl — every tooth (the active tooth is shown by being clean, not by colour) */
    --toothpaste-mint: #a1fbe9; /* logo/accent — used to tint the brushing suds */
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    background-color: var(--gum-red);
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: transparent;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

#menu-container {
    width: 100%;
    height: 100vh;
    background-image: url("../images/background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.menu-section {
    position: relative;
    width: 100%;
    height: 50%;
    overflow: hidden;
}

#closed-top,
#closed-bottom,
#open-top,
#open-bottom {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#open-top,
#open-bottom {
    display: none;
}

@media (max-width: 700px) {
    #closed-top,
    #closed-bottom {
        display: none;
    }
    #open-top,
    #open-bottom {
        display: block;
    }
}

.tooth {
    cursor: pointer;
    color: var(--tooth-inactive);
}

.tooth-inner {
    transition: filter 120ms ease-out;
}

.tooth:hover .tooth-inner,
.tooth:focus-visible .tooth-inner {
    filter: brightness(1.15) drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.tooth:focus {
    outline: none;
}

.dirt-overlay {
    image-rendering: pixelated;
    pointer-events: none;
}

#brush-sprite {
    position: fixed;
    width: 140px;
    height: auto;
    pointer-events: none;
    z-index: 50;
    transform: translate(-50%, -100%);
}

#brush-sprite.bouncing {
    animation: brush-bounce 600ms ease-in-out infinite;
}

@keyframes brush-bounce {
    0%, 100% { transform: translate(-50%, -100%); }
    50% { transform: translate(-50%, -120%); }
}

.suds-sprite {
    position: fixed;
    width: 90px;
    height: 90px;
    pointer-events: none;
    z-index: 51;
    transform: translate(-50%, -50%);
    background-color: var(--toothpaste-mint);
    -webkit-mask: url("../images/suds.png") center / contain no-repeat;
    mask: url("../images/suds.png") center / contain no-repeat;
}

.suds-sprite.sweeping {
    animation: suds-sweep 500ms ease-out forwards;
}

@keyframes suds-sweep {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
    #brush-sprite.bouncing { animation: none; }
    .suds-sprite.sweeping { animation: none; opacity: 1; }
}

#main-content-container {
    position: relative;
    background-color: transparent;
}

/* ---- Page sections ---- */

.ts-hero {
    padding: 4rem 1rem;
    text-align: center;
    color: var(--tooth-inactive);
}

.ts-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.ts-hero-desc {
    font-size: 1.25rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

.ts-section {
    padding: 3rem 1rem;
    color: var(--tooth-inactive);
    max-width: 800px;
    margin: 0 auto;
}

.ts-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.ts-interactive {
    padding: 3rem 1rem;
    color: var(--tooth-inactive);
    max-width: 1000px;
    margin: 0 auto;
}

.ts-interactive h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* ---- Gallery ---- */

.ts-gallery {
    padding: 3rem 1rem;
    color: var(--tooth-inactive);
}

.ts-gallery h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.ts-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.ts-gallery-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.ts-gallery-thumb:hover,
.ts-gallery-thumb:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ts-gallery-thumb:focus {
    outline: none;
}

.ts-carousel {
    max-width: 900px;
    margin: 0 auto;
}

.ts-carousel .carousel-inner img {
    max-height: 500px;
    object-fit: contain;
}

/* ---- Lightbox ---- */

#ts-lightbox .modal-content {
    background: rgba(0, 0, 0, 0.92);
    border: none;
    position: relative;
    padding: 1rem;
}

#ts-lightbox .btn-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
}

#ts-lightbox .ts-lightbox-img {
    max-height: 80vh;
    width: 100%;
    object-fit: contain;
}

#ts-lightbox .ts-lightbox-prev,
#ts-lightbox .ts-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 150ms;
}

#ts-lightbox .ts-lightbox-prev:hover,
#ts-lightbox .ts-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

#ts-lightbox .ts-lightbox-prev { left: 0.5rem; }
#ts-lightbox .ts-lightbox-next { right: 0.5rem; }

#ts-lightbox .ts-lightbox-caption {
    text-align: center;
    color: var(--tooth-inactive);
    opacity: 0.8;
    padding: 0.75rem 0 0;
    margin: 0;
}

/* ---- Video ---- */

.ts-video {
    padding: 3rem 1rem;
    color: var(--tooth-inactive);
}

.ts-video h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.ts-video-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.ts-video-caption {
    text-align: center;
    opacity: 0.7;
    margin-top: 0.75rem;
}
