/* ============================================================
   OAGC — Design System
   Observatoire Astronomique du Gros Cerveau
   ============================================================ */

/* --- Custom Properties --- */
:root {
    --bg: #ebefe8;
    --dark: #131c19;
    --accent: #86997a;
    --white: #ffffff;
    --accent-light: #a8b9a0;
    --accent-dark: #5e7055;
    --gray: #6b7c72;
    --light-gray: #d5dbd0;

    --font: 'Futura', 'Century Gothic', 'Trebuchet MS', sans-serif;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --shadow: 0 4px 24px rgba(19, 28, 25, 0.08);
    --shadow-lg: 0 12px 48px rgba(19, 28, 25, 0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --max-width: 1200px;
    --header-height: 100px;
}

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul,
ol {
    list-style: none;
}

button,
input,
textarea,
select {
    font: inherit;
    border: none;
    outline: none;
    background: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray);
}

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

.text-light {
    color: var(--accent-light);
}

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

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

.section-dark p {
    color: var(--accent-light);
}

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

.section-header {
    margin-bottom: 60px;
}

.section-header .label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 12px;
    padding: 6px 16px;
    border: 1px solid var(--accent);
    border-radius: 100px;
}

.section-dark .section-header .label {
    border-color: var(--accent-light);
    color: var(--accent-light);
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    max-width: 600px;
    font-size: 1.1rem;
}

/* --- Dot Pattern Background --- */
.dot-pattern {
    position: relative;
}

.dot-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--light-gray) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.dot-pattern>* {
    position: relative;
    z-index: 1;
}

/* --- Header / Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(235, 239, 232, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(19, 28, 25, 0.08);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo img {
    height: 100px;
    width: auto;
}

.navbar-logo span {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    color: var(--dark);
}

.hero-section .navbar-logo span {
    color: var(--white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--accent-dark);
}

.nav-cta {
    padding: 10px 24px;
    background: var(--dark);
    color: var(--white) !important;
    border-radius: 100px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background: var(--accent-dark) !important;
    color: var(--white) !important;
    transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(235, 239, 232, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mobile-nav.open {
    display: flex;
    opacity: 1;
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    transition: var(--transition);
}

.mobile-nav a:hover {
    color: var(--accent);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--dark);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(19, 28, 25, 0.3) 0%,
            rgba(19, 28, 25, 0.7) 60%,
            var(--dark) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: var(--header-height);
}

.hero h1 {
    color: var(--white);
    margin-bottom: 24px;
    max-width: 800px;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent-light);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--accent-light);
    max-width: 550px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
}

.scroll-indicator .arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent-light);
    border-bottom: 2px solid var(--accent-light);
    transform: rotate(45deg);
}

@keyframes float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(134, 153, 122, 0.3);
}

.btn-outline {
    border: 2px solid var(--accent-light);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--accent-light);
    color: var(--dark);
    transform: translateY(-2px);
}

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

.btn-dark:hover {
    background: #1e2d28;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    color: var(--dark);
    font-weight: 600;
    padding: 14px 0;
}

.btn-ghost::after {
    content: '→';
    transition: var(--transition);
}

.btn-ghost:hover::after {
    transform: translateX(4px);
}

.btn-ghost:hover {
    color: var(--accent-dark);
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 28px;
}

.card-body .label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(134, 153, 122, 0.12);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.card-body h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.card-body p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.card-link:hover {
    gap: 10px;
    color: var(--accent);
}

.card-link::after {
    content: '→';
}

/* Dark card variant */
.card-dark {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.card-dark:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-dark .card-body h3 {
    color: var(--white);
}

.card-dark .card-body p {
    color: var(--accent-light);
}

.card-dark .card-link {
    color: var(--accent-light);
}

/* --- Event Banner --- */
.event-banner {
    position: relative;
    background: var(--dark);
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 60px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.event-banner-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(134, 153, 122, 0.2) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.event-banner-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.event-banner-content .date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-light);
    margin-bottom: 20px;
}

.event-banner-content .date .dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.event-banner-content h2 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.event-banner-content p {
    color: var(--accent-light);
    margin-bottom: 24px;
    max-width: 450px;
}

.event-banner-image {
    flex-shrink: 0;
    width: 280px;
    position: relative;
    z-index: 1;
}

.event-banner-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* --- Stats / Key Figures --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item {
    padding: 32px 16px;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
}

.section-dark .stat-number {
    color: var(--accent-light);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray);
}

.section-dark .stat-label {
    color: var(--accent-light);
    opacity: 0.7;
}

/* --- Page Header (for sub-pages) --- */
.page-header {
    padding: 160px 0 80px;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(134, 153, 122, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.page-header h1 {
    color: var(--white);
    position: relative;
    z-index: 1;
}

.page-header p {
    color: var(--accent-light);
    font-size: 1.15rem;
    max-width: 600px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

/* --- Sub-navigation (anchors on sub-pages) --- */
.sub-nav {
    position: sticky;
    top: var(--header-height);
    background: rgba(235, 239, 232, 0.95);
    backdrop-filter: blur(16px);
    z-index: 100;
    border-bottom: 1px solid var(--light-gray);
}

.sub-nav .container {
    display: flex;
    gap: 32px;
    overflow-x: auto;
    padding: 16px 24px;
    scrollbar-width: none;
}

.sub-nav .container::-webkit-scrollbar {
    display: none;
}

.sub-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray);
    white-space: nowrap;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.sub-nav a:hover,
.sub-nav a.active {
    color: var(--dark);
    border-bottom-color: var(--accent);
}

/* --- Content Blocks --- */
.content-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 80px 0;
}

.content-block.reverse {
    direction: rtl;
}

.content-block.reverse>* {
    direction: ltr;
}

.content-block-text h3 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    margin-bottom: 16px;
}

.content-block-text p {
    margin-bottom: 24px;
}

.content-block-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--light-gray);
}

.content-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(19, 28, 25, 0.6) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay span {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- Calendar / Event List --- */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.event-row:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-lg);
}

.event-date-badge {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.event-date-badge .day {
    font-size: 1.5rem;
    font-weight: 800;
}

.event-date-badge .month {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.event-info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.event-info p {
    font-size: 0.85rem;
}

.event-info .time {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

/* --- Form --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--dark);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(134, 153, 122, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

/* --- CTA Section --- */
.cta-section {
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section h2 {
    margin-bottom: 16px;
}

.cta-section p {
    max-width: 500px;
    margin: 0 auto 32px;
    font-size: 1.1rem;
}

.cta-section .cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand img {
    height: 48px;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--accent-light);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-light);
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 0;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

/* --- Animations (scroll reveal) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(19, 28, 25, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .content-block {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .content-block.reverse {
        direction: ltr;
    }

    .event-banner {
        flex-direction: column;
        padding: 40px;
        text-align: center;
    }

    .event-banner-content p {
        max-width: none;
    }

    .event-banner-image {
        width: 200px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .section {
        padding: 60px 0;
    }

    .hero {
        min-height: 90vh;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .event-banner {
        padding: 32px 24px;
    }

    .event-banner-image {
        width: 180px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-row {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}