/* ==========================================================================
   Physique Calculator — shared stylesheet
   Loaded by every page. Page-specific additions live in their own small
   file (e.g. /css/exercises.css) and are only loaded where needed, so no
   page ships CSS it doesn't use.
   ========================================================================== */

:root {
    --primary: #001F3F;      /* Navy Blue - main accent */
    --secondary: #00FFFF;    /* Cyan - complementary accent */
    --accent: #32CD32;       /* Lime Green - highlight */
    --neutral-bg: #F8F8F8;
    --neutral-card: #FFFFFF;
    --text-dark: #000000;
    --text-medium: #333333;
    --text-light: #666666;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--neutral-bg);
    color: var(--text-medium);
    overflow-x: hidden;
}

.display-font {
    font-family: 'Bebas Neue', sans-serif;
    overflow-wrap: break-word;
    word-break: break-word;
}

.cyan-accent {
    color: var(--secondary);
}

.green-accent {
    color: var(--accent);
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary) 0%, #003875 60%, #005a8a 100%);
}

/* Hero background used at the top of every page (radial-gradient blobs) */
.hero-bg {
    background: linear-gradient(135deg, var(--primary) 0%, #003875 50%, #005a8a 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(50, 205, 50, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.section-tag {
    display: inline-block;
    background: rgba(0, 255, 255, 0.12);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 255, 255, 0.25);
}

.section-tag.dark {
    background: rgba(0, 31, 63, 0.08);
    color: var(--primary);
    border-color: rgba(0, 31, 63, 0.2);
}

.cyan-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
    margin: 1rem 0 1.5rem;
}

.cyan-divider.center {
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 31, 63, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 31, 63, 0.14);
}

.value-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 31, 63, 0.08), rgba(0, 255, 255, 0.1));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-box {
    background: linear-gradient(135deg, var(--primary), #003875);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.tip-box {
    background: linear-gradient(135deg, rgba(0, 31, 63, 0.04), rgba(0, 255, 255, 0.06));
    border-left: 4px solid var(--secondary);
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1rem 1.25rem;
}

.insta-btn {
    background: linear-gradient(135deg, #405de6, #833ab4, #e1306c, #fd1d1d);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: opacity 0.3s, transform 0.2s;
}

.insta-btn:hover {
    opacity: 0.9;
    transform: scale(1.04);
}

.insta-card {
    background: linear-gradient(135deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
    border-radius: 1.5rem;
    padding: 3px;
}

.insta-inner {
    background: white;
    border-radius: calc(1.5rem - 3px);
    padding: 2.5rem;
}

.timeline-line {
    position: absolute;
    left: 1.25rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--secondary), var(--accent));
}

/* Scroll reveal (used with the IntersectionObserver in main.js) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.7s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

.progress-ring__circle {
    transition: stroke-dashoffset 0.8s ease-in-out;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* FFMI reference scale (calculator page) */
.ffmi-scale {
    position: relative;
    padding-top: 34px;
}

.ffmi-scale-track {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ffmi-scale-zone {
    flex: 1;
}

.ffmi-scale-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.ffmi-scale-marker-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    margin: 0 auto 4px;
}

.ffmi-scale-marker-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.animate-pulse-soft {
    animation: pulseSoft 2.4s infinite;
}

@keyframes pulseSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.tooltip {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.has-tooltip:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Gender / unit-system toggle buttons */
.gender-btn {
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

.gender-btn.active {
    border-color: var(--primary);
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 31, 63, 0.3);
}

.gender-btn:not(.active):hover {
    background-color: var(--neutral-bg);
    color: var(--primary);
    border-color: var(--primary);
}

input[type="number"]:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 31, 63, 0.15);
    outline: none;
}

.form-checkbox {
    accent-color: var(--primary);
}

.relative span {
    pointer-events: none;
}

.unit-suffix {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
}

input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Visible keyboard focus rings on every interactive control */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

.step-num {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
    font-weight: 700;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(21, 128, 61, 0.15);
}

/* Muscle-group preview tiles (homepage → exercise library deep links) */
.muscle-preview-tile {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 31, 63, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: block;
}

.muscle-preview-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 31, 63, 0.14);
    border-color: rgba(0, 255, 255, 0.4);
}

/* Framed photo (About page) */
.photo-frame {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 1.5rem;
    padding: 4px;
}

.photo-frame-inner {
    border-radius: calc(1.5rem - 4px);
    overflow: hidden;
}

/* ── Responsive nav (identical markup/behaviour on every page) ── */
#mobileMenu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#mobileMenu.is-open {
    max-height: 420px;
    opacity: 1;
}

#hamburgerIcon {
    transition: transform 0.3s ease;
}

#mobileMenuBtn.is-open #hamburgerIcon {
    transform: rotate(90deg);
}
