/* ============================================================
   De Kleimeppers - Padel aanmelding
   Premium styling on top of Tailwind CDN
   ============================================================ */

:root {
    --brand: #E94B36;
    --brand-dark: #C73D2A;
    --brand-accent: #7DB52F;
    --ink: #1F1F1F;
}

/* ============================================================
   TYPOGRAPHY POLISH
   Barlow Condensed feels athletic/sport, perfect for sportsclub.
   ============================================================ */
.font-display {
    letter-spacing: -0.01em;
}

/* Display headings vragen om iets meer ademruimte */
h1.font-display, h2.font-display { line-height: .95; }

/* Tabular nums voor counters/dates */
.tabular { font-variant-numeric: tabular-nums; }

/* ============================================================
   HERO - cinematic
   Foto met lange ken-burns zoom + diagonale gradient overlay.
   ============================================================ */
.hero-bg {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: #111;
}
.hero-bg::before {
    content: '';
    position: absolute;
    inset: -4%;
    z-index: -2;
    background-image: url('/assets/img/hero-court.jpg');
    background-size: cover;
    background-position: center;
    animation: kenburns 22s ease-in-out infinite alternate;
    will-change: transform;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        /* Donkere "spotlight" rond het midden voor leesbaarheid */
        radial-gradient(ellipse 75% 70% at 50% 50%,
            rgba(0, 0, 0, .65) 0%,
            rgba(0, 0, 0, .45) 55%,
            rgba(0, 0, 0, .25) 100%),
        /* Subtiele warme brand-rode tint op de hoeken */
        linear-gradient(135deg,
            rgba(15, 15, 15, .35) 0%,
            rgba(15, 15, 15, .25) 50%,
            rgba(199, 61, 42, .35) 100%);
}
@keyframes kenburns {
    0%   { transform: scale(1.04) translate(0, 0); }
    100% { transform: scale(1.12) translate(-1.5%, -1%); }
}

/* Hero pattern accent */
.hero-pattern {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .06) 1px, transparent 0);
    background-size: 28px 28px;
}

/* Hero text leesbaar houden */
.hero-text-shadow {
    text-shadow: 0 2px 18px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .4);
}

/* Roterende club-badge in hero */
.club-badge {
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, .96);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-shadow:
        0 25px 60px -10px rgba(0, 0, 0, .5),
        0 0 0 1px rgba(255, 255, 255, .25);
    transform: rotate(-6deg);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}
.club-badge:hover {
    transform: rotate(0deg) scale(1.04);
}
@media (min-width: 768px) {
    .club-badge { width: 170px; height: 170px; }
}

/* Scroll-indicator onderaan hero */
.scroll-indicator {
    width: 28px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 14px;
    position: relative;
}
.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, .8);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
    0%   { transform: translate(-50%, 0); opacity: 1; }
    60%  { transform: translate(-50%, 14px); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 0; }
}

/* ============================================================
   TIMELINE - cirkels + verbindingslijn
   Horizontaal op desktop, verticaal op mobiel.
   ============================================================ */
.timeline {
    position: relative;
}
.timeline-line-h {
    position: absolute;
    top: 48px;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    background: linear-gradient(to right,
        rgba(231, 75, 54, 0) 0%,
        rgba(231, 75, 54, 0.6) 25%,
        rgba(231, 75, 54, 0.6) 75%,
        rgba(231, 75, 54, 0) 100%);
    z-index: 0;
}
.timeline-line-v {
    position: absolute;
    left: 47px;
    top: 48px;
    bottom: 48px;
    width: 2px;
    background: rgba(231, 75, 54, 0.6);
    z-index: 0;
}
.timeline-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow:
        0 18px 40px -14px rgba(231, 75, 54, .45),
        0 0 0 6px rgba(231, 75, 54, .06);
    transition: transform .3s ease, box-shadow .3s ease;
}
.timeline-circle:hover {
    transform: translateY(-3px);
    box-shadow:
        0 24px 50px -14px rgba(231, 75, 54, .55),
        0 0 0 8px rgba(231, 75, 54, .08);
}
.timeline-circle .number {
    font-family: "Barlow Condensed", system-ui, sans-serif;
    font-weight: 900;
    font-size: 2.25rem;
    color: var(--brand);
    line-height: 1;
}

/* ============================================================
   FORM
   ============================================================ */
.brand-input {
    min-height: 48px;
}
.brand-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(233, 75, 54, 0.15);
}

/* Inline error highlight */
.input-error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-brand {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    transition: all .25s ease;
    min-height: 48px;
}
.btn-brand:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -8px rgba(231, 75, 54, .55);
}
.btn-brand:active { transform: translateY(0); }

/* Submit-knop in "nog-niet-akkoord" state */
.btn-disabled {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    color: white;
    cursor: not-allowed;
    box-shadow: none;
    transition: background .25s ease;
}
.btn-disabled:hover { transform: none; }

/* Korte schud-animatie als gebruiker klikt zonder akkoord */
@keyframes shakeNudge {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-4px); }
    40%      { transform: translateX(4px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(2px); }
}
.shake-nudge { animation: shakeNudge .45s ease-in-out; }

/* Hint zichtbaar maken (overschrijft .hidden) */
#agree-hint.show {
    display: flex;
    animation: fadeUp .3s ease both;
}

/* Card hover lift */
.card-lift {
    transition: transform .25s ease, box-shadow .25s ease;
}
.card-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .15);
}

/* ============================================================
   SCROLL-TO-TOP TENNISBAL
   Rolt mee tijdens scroll, valt licht door, stuitert kort als scroll stopt.
   ============================================================ */
.scroll-top-ball {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 72px;
    height: 72px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    z-index: 45;
    background: transparent;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .28));
    opacity: 0;
    pointer-events: none;
    --ball-drop: 0px;
    --ball-rotation: 0deg;
    transform: translateY(80px);
    transition: opacity .35s ease, transform .45s cubic-bezier(.4, 0, .2, 1);
}
.scroll-top-ball.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(var(--ball-drop));
}
.scroll-top-ball.is-falling {
    transition: transform .08s linear, opacity .35s ease;
}
.scroll-top-ball.is-bouncing {
    animation: ballBounce .7s cubic-bezier(.34, 1.56, .64, 1);
}
.scroll-top-ball:hover {
    filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .32));
}
.scroll-top-ball:active {
    transform: translateY(2px);
}

/* Inner spinner roteert mee tijdens scroll - arrow blijft erbuiten */
.scroll-top-ball .ball-spinner {
    position: absolute;
    inset: 0;
    display: block;
    transform: rotate(var(--ball-rotation));
}
.scroll-top-ball .ball-spinner svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Vaste pijl bovenop, draait niet mee */
.scroll-top-ball .ball-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #ffffff;
}
.scroll-top-ball .ball-icon svg {
    width: 42%;
    height: 42%;
    filter:
        drop-shadow(0 1px 2px rgba(0, 0, 0, .55))
        drop-shadow(0 0 4px rgba(0, 0, 0, .35));
}

@keyframes ballBounce {
    0%   { transform: translateY(14px); }
    35%  { transform: translateY(-10px); }
    55%  { transform: translateY(0); }
    75%  { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

/* Op mobiel iets kleiner zodat hij niet te aanwezig wordt */
@media (max-width: 767px) {
    .scroll-top-ball {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }
.fade-up-delay-1 { animation-delay: .1s; }
.fade-up-delay-2 { animation-delay: .2s; }
.fade-up-delay-3 { animation-delay: .3s; }

/* In-view triggered reveal (via JS IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s cubic-bezier(.4, 0, .2, 1), transform .8s cubic-bezier(.4, 0, .2, 1);
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@keyframes softPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
.pulse-soft { animation: softPulse 2.5s ease-in-out infinite; }

/* ============================================================
   CONFETTI - eenmalig bij geslaagde aanmelding
   Stukjes worden via JS aangemaakt op success.php (paid status).
   ============================================================ */
.confetti-piece {
    position: fixed;
    top: -20px;
    width: 8px;
    height: 14px;
    pointer-events: none;
    z-index: 5;
    border-radius: 1px;
    will-change: transform, opacity;
    animation: confettiFall 4s cubic-bezier(.4, 0, .6, 1) forwards;
}
@keyframes confettiFall {
    0%   { transform: translateY(-30px) rotate(0deg);    opacity: 1; }
    20%  {                                                opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg);  opacity: 0; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
*:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

@media print {
    header, footer, .no-print { display: none !important; }
}

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

/* Custom scrollbar in admin tables */
.scroll-thin::-webkit-scrollbar { height: 8px; width: 8px; }
.scroll-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.scroll-thin::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   RESPONSIVE TYPOGRAPHY FINETUNES
   ============================================================ */
@media (max-width: 380px) {
    .hero-headline { font-size: clamp(2.5rem, 12vw, 3.5rem); }
}
