:root {
    --bg: #f7f3ea;
    --bg-alt: #ede5d2;
    --bg-dark: #0a2e23;
    --fg: #1a1f1c;
    --primary: #0d3b2e;
    --primary-light: #1f5a47;
    --accent: #c5642e;
    --accent-light: #e08855;
    --gold: #b8954a;
    --gold-light: #d4b574;
    --muted: #6e6a5f;
    --border: #d4ccb8;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
}

.font-display {
    font-family: 'Fraunces', serif;
    font-feature-settings: "ss01" on;
}

/* === Texture & Patterns === */
.texture-paper {
    background-image:
        radial-gradient(circle at 15% 20%, rgba(184, 149, 74, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(13, 59, 46, 0.05) 0%, transparent 45%);
}

.grain {
    position: relative;
}

.grain::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* === Boutons === */
.btn-primary {
    background-color: var(--primary);
    color: var(--bg);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary>* {
    position: relative;
    z-index: 1;
}

.btn-primary:hover::before {
    transform: translateY(0);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -12px rgba(197, 100, 46, 0.45);
}

.btn-ghost {
    border: 1px solid rgba(247, 243, 234, 0.4);
    color: var(--bg);
    transition: all 0.35s ease;
    backdrop-filter: blur(8px);
    background: rgba(13, 59, 46, 0.15);
}

.btn-ghost:hover {
    background: rgba(247, 243, 234, 0.95);
    color: var(--primary);
    border-color: var(--bg);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    transition: all 0.35s ease;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg);
    transform: translateY(-2px);
}

/* === Hero Video Placeholder === */
.hero-bg {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(31, 90, 71, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(197, 100, 46, 0.25) 0%, transparent 50%),
        linear-gradient(135deg, #0a2e23 0%, #0d3b2e 50%, #1f5a47 100%);
}

.water-ripple {
    position: absolute;
    border: 1px solid rgba(212, 181, 116, 0.25);
    border-radius: 50%;
    pointer-events: none;
    animation: ripple-expand 6s ease-out infinite;
}

@keyframes ripple-expand {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* === Marquee === */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

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

/* === Reveal Animation === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.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;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* === Patent Certificate === */
.certificate-frame {
    background: linear-gradient(135deg, #fdfaf0 0%, #f5edd6 100%);
    border: 1px solid var(--gold);
    box-shadow:
        inset 0 0 0 6px #fdfaf0,
        inset 0 0 0 7px var(--gold-light),
        inset 0 0 0 14px #fdfaf0,
        inset 0 0 0 15px var(--gold),
        0 30px 60px -30px rgba(13, 59, 46, 0.3);
    position: relative;
}

.certificate-frame::before,
.certificate-frame::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid var(--gold);
}

.certificate-frame::before {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.certificate-frame::after {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

.corner-tr,
.corner-bl {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid var(--gold);
}

.corner-tr {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

/* === Patent Stamp === */
.patent-stamp {
    border: 3px double var(--accent);
    color: var(--accent);
    transform: rotate(-12deg);
    font-family: 'Fraunces', serif;
    box-shadow: inset 0 0 0 2px transparent;
    position: relative;
}

.patent-stamp::before {
    content: '';
    position: absolute;
    inset: -3px;
    border: 1px solid var(--accent);
    opacity: 0.4;
}

/* === Image Placeholder === */
.img-ph {
    background:
        linear-gradient(135deg, rgba(212, 204, 184, 0.4) 0%, rgba(184, 173, 149, 0.5) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-ph::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, rgba(13, 59, 46, 0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(13, 59, 46, 0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(13, 59, 46, 0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(13, 59, 46, 0.04) 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.img-ph-label {
    position: relative;
    z-index: 2;
    color: var(--primary);
    opacity: 0.55;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
}

/* === Cards === */
.benefit-card {
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fdfaf0;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--accent), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.benefit-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-light);
    box-shadow: 0 24px 48px -24px rgba(13, 59, 46, 0.2);
}

.benefit-card:hover::before {
    transform: scaleX(1);
}

.benefit-card:hover .benefit-icon {
    background: var(--primary);
    color: var(--bg);
    transform: rotate(-8deg) scale(1.1);
}

.benefit-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Section Divider Wave === */
.wave-divider {
    display: block;
    width: 100%;
    height: 60px;
}

/* === Numbered Project Cards === */
.project-card {
    background: #fdfaf0;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    position: relative;
}

.project-card:hover {
    border-color: var(--primary);
    background: white;
}

.project-num {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 3.5rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.85;
}

/* === Navigation === */
#navbar {
    transition: all 0.4s ease;
}

.nav-scrolled {
    background: rgba(247, 243, 234, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-scrolled .nav-link {
    color: var(--primary);
}

.nav-scrolled .nav-brand {
    color: var(--primary);
}

.nav-scrolled .nav-cta {
    background: var(--primary);
    color: var(--bg);
}

.nav-link {
    position: relative;
    color: rgba(247, 243, 234, 0.85);
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--bg);
}

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

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* === Selection === */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* === Form === */
.form-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--fg);
    transition: border-color 0.3s ease;
    padding: 0.85rem 0;
    width: 100%;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--muted);
}

/* === Mobile Menu === */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* === Back to top === */
.back-top {
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.back-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* === Animated underline links === */
.link-underline {
    position: relative;
    display: inline-block;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* === Decorative dotted line === */
.dotted-line {
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 8px 8px;
    background-repeat: repeat-x;
    background-position: center;
    height: 1px;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* === NgorFaye === */
.nav-cta {
    background: #0d3b2e;
    color: white;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
}