/*
 * IceSymmetrics site styles, layered on Bootstrap 5.3.3.
 *
 * Palette, taken from the Squarespace site this replaces:
 *   --brand        #b54e4e  the logo's brick red (5.0:1 on white)
 *   --brand-deep   #9e3f3f  hover/pressed (6.5:1 on white)
 *   --ink-dark     #212121  navbar and footer (Squarespace header colour)
 *   --brand-light  #e8a0a0  brand red for text on the dark bars (7.6:1)
 */
:root {
    --brand: #b54e4e;
    --brand-deep: #9e3f3f;
    --brand-light: #e8a0a0;
    --ink-dark: #212121;
    --nav-clearance: 64px;
    --bs-link-color-rgb: 158, 63, 63;
    --bs-link-hover-color-rgb: 122, 48, 48;
}

/* Footer stays at the window's bottom on short pages. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--nav-clearance);
    background-color: #fff;
}

body > main {
    flex: 1 0 auto;
}

/* Anything a link or the skip link can land on clears the fixed navbar. */
[id] {
    scroll-margin-top: calc(var(--nav-clearance) + 16px);
}

.navbar {
    background-color: var(--ink-dark);
}

/* The logo file is 72px (2x); drawn at 36px. */
.navbar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link[aria-current="page"] {
    color: var(--brand-light);
}

/* Links in running text are underlined so they are not told apart by
   colour alone (WCAG 1.4.1). */
main p a,
main li a {
    text-decoration: underline;
}

.btn-brand {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-deep);
    --bs-btn-hover-border-color: var(--brand-deep);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand-deep);
    --bs-btn-active-border-color: var(--brand-deep);
    --bs-btn-focus-shadow-rgb: 181, 78, 78;
}

/* <picture> only offers the WebP; the <img> keeps its own layout. */
picture {
    display: contents;
}

/* A page's first photo, always shown whole: never cropped by CSS. */
.lead-photo {
    display: block;
    width: 100%;
}

.section-heading {
    color: var(--brand);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lead-statement {
    font-size: 1.35rem;
    font-weight: 300;
}

.season {
    padding: 2rem 0;
    border-top: 1px solid #dee2e6;
}

.season:first-of-type {
    border-top: 0;
}

/* Every Teams photo sits in the same 4:3 frame, gallery slide or single.
   `contain` shows a photo that is not 4:3 whole, with margins; never cover. */
.season-frame {
    aspect-ratio: 4 / 3;
}

.season-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.season-gallery .carousel-control-prev,
.season-gallery .carousel-control-next {
    bottom: 2rem; /* clear the indicators under the frame */
    width: 12%;
    opacity: 1;
}

.season-gallery .carousel-control-prev-icon,
.season-gallery .carousel-control-next-icon {
    background-color: rgb(0 0 0 / 60%);
    background-size: 60%;
    border-radius: 50%;
}

/* Gesture rules that go with js/carousel-drag.js (see its
   header). Vertical pan and pinch stay the browser's; horizontal is the reel's
   until the page is pinched (js/zoom-controls.js sets data-zoomed). */
.carousel.slide {
    touch-action: pan-y pinch-zoom;
}

[data-zoomed] .carousel.slide[data-reel] {
    touch-action: auto;
}

/* While reeling, carousel-drag.js positions the two staged photos itself. */
.carousel.is-reeling .carousel-item {
    transition: none;
}

.carousel.is-reeling .carousel-item.is-staged {
    display: block;
    will-change: transform;
}

.carousel.is-reeling .carousel-item:not(.is-staged) {
    display: none;
}

.season-gallery-indicators {
    position: static;
    margin: 0.5rem 0 0;
}

.season-gallery-indicators [data-bs-target] {
    background-color: #495057;
}

.photo-credit {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.coach-photo {
    max-width: 260px;
}

.award-list {
    padding-left: 1.2rem;
}

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

.skip-to-content:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    padding: 8px 12px;
    background: #fff;
    color: #000;
}

footer.site-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background-color: var(--ink-dark);
    color: #cfcfcf;
}

footer.site-footer a {
    color: #cfcfcf;
    text-decoration: none;
}

footer.site-footer a:hover,
footer.site-footer a:focus-visible {
    color: var(--brand-light);
}

footer.site-footer .footer-icons a {
    display: inline-block;
    margin: 0 0.6rem;
    font-size: 1.4rem;
}

.footer-icon {
    width: 1.25em;
    height: 1em;
    vertical-align: -0.125em;
}

/* Team Portal (portal/*.html, filled by js/portal.js); the rest is
   Bootstrap utilities.  Inset shadows draw the brand stripes. */
.portal-account {
    box-shadow: inset 4px 0 var(--brand);
}

.portal-card {
    box-shadow: inset 0 4px var(--brand);
}

.portal-avatar {
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--brand);
}

.portal-note {
    white-space: pre-line;
}

/* Google's light "Sign in with Google" button, per its branding guidelines,
   drawn here rather than loaded from Google. */
.btn-google {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #747775;
    border-radius: 20px;
    background: #fff;
    color: #1f1f1f;
    font: 500 14px/20px Roboto, Arial, sans-serif;
    letter-spacing: 0.25px;
    text-decoration: none;
}

.btn-google:hover {
    background: #ececec;
    color: #1f1f1f;
}

.btn-google-logo {
    width: 20px;
    height: 20px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
