/* ============================================
   BASE STYLES — Agence Ping Pong
   ============================================ */

/* --- Global --- */

html {
    background-color: var(--color-cream);
    color: var(--color-navy);
    font-family: var(--font-body);
    font-size: var(--text-body);
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* --- Headings --- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
}

h1 {
    font-size: var(--text-h1);
}

h2 {
    font-size: var(--text-h2);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* --- Text utilities --- */

.text-hero {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: -0.02em;
}

.text-small {
    font-size: var(--text-small);
}

.text-coral {
    color: var(--color-coral);
}

.text-turquoise {
    color: var(--color-turquoise);
}

.text-white {
    color: var(--color-white);
}

.text-center {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Container --- */

.container,
.o-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
    /* outline: 2px dashed red; */ /* DEBUG — disabled */
}

/* --- Section base --- */

.section {
    padding-block: var(--space-xl);
}

.section--fullscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section--dark {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.section--turquoise-light {
    background-color: var(--color-turquoise-light);
}

/* --- Selection --- */

::selection {
    background-color: var(--color-navy);
    color: var(--color-white);
}

/* --- Mac OS 7 Scrollbar --- */

::-webkit-scrollbar {
    width: 16px;
}

::-webkit-scrollbar-track {
    background-color: var(--color-cream);
    border-left: 1px solid var(--color-navy);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-cream);
    border-top: 2px solid #FFFFFF;
    border-left: 2px solid #FFFFFF;
    border-right: 2px solid #C4BFBA;
    border-bottom: 2px solid #C4BFBA;
    min-height: 40px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #E8E3DE;
}

::-webkit-scrollbar-button:single-button {
    background-color: var(--color-cream);
    display: block;
    height: 16px;
    border-top: 2px solid #FFFFFF;
    border-left: 2px solid #FFFFFF;
    border-right: 2px solid #C4BFBA;
    border-bottom: 2px solid #C4BFBA;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-cream) var(--color-cream);
}

/* --- Links --- */

a {
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--color-coral);
}

.link-underline {
    position: relative;
    display: inline-block;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width var(--duration-normal) var(--ease-out);
}

.link-underline:hover::after {
    width: 100%;
}

/* --- Images --- */

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

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* --- Accessibility: sr-only --- */

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

/* --- Prefers reduced motion --- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .ball-container,
    .trajectory-container {
        display: none !important;
    }
}
