/* ============================================================
   Tom Robert — Product & UX Consultant
   Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Arima:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------ */
:root {
    --green:        #16C172;
    --green-dark:   #0E9E5A;
    --green-light:  rgba(22, 193, 114, 0.12);
    --dark:         #0A0A0A;
    --text:         #383D38;
    --text-muted:   #5C615C;
    --bg:           #ECF0EB;
    --bg-section:   #ECF0EB;
    --radius:       8px;
    --radius-pill:  6px;
    --nav-height:   72px;
    --container:    1200px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg:    0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    --transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    background-color: var(--bg);
    color: var(--text-muted);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Arima', Georgia, serif;
    color: var(--text);
}

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

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ------------------------------------------------------------
   Utility
   ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 16px;
}

.section-title em {
    font-style: normal;
    font-weight: 600;
}

.section-sub {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 700px;
    line-height: 1.5;
}

/* Animate-in utility (driven by IntersectionObserver in main.js) */
.animate-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s var(--transition), transform 0.55s var(--transition);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.animate-in:nth-child(2) { transition-delay: 0.08s; }
.animate-in:nth-child(3) { transition-delay: 0.16s; }
.animate-in:nth-child(4) { transition-delay: 0.24s; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 13px 24px;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.btn:hover .btn-icon {
    transform: translate(2px, -2px);
}

.btn-primary {
    background: var(--green);
    color: #fff;
    box-shadow: 0 2px 0 var(--green-dark);
}

.btn-primary .btn-icon {
    background: rgba(255,255,255,0.18);
}

.btn-primary:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 0 #0a7a44;
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid rgba(0,0,0,0.18);
}

.btn-outline .btn-icon {
    background: rgba(0,0,0,0.06);
}

.btn-outline:hover {
    border-color: var(--green);
    color: var(--green);
}

.btn-outline:hover .btn-icon {
    background: var(--green-light);
}

/* Nav CTA */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 16px;
    background: #2B2B2B;
    color: #fff;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.btn-cta svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: #fff;
}

.btn-cta:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(236, 240, 235, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow var(--transition);
}

#navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    margin-inline: auto;
    padding-inline: 64px;
    gap: 24px;
}

/* Logo */
.nav-logo {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.nav-logo-text {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-start;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-section);
}

.nav-links a.active {
    color: var(--text);
    font-weight: 600;
}

/* Right actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.nav-linkedin {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}

.nav-linkedin:hover {
    color: var(--text);
}

.nav-linkedin svg {
    width: 18px;
    height: 18px;
}

/* ------------------------------------------------------------
   Hero Section
   ------------------------------------------------------------ */
.hero {
    display: flex;
    align-items: center;
    padding:64px 0px 0px 0px;
    padding-top: var(--nav-height);
    background: var(--bg);
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: max(128px);
    align-items: end;
    width: 100%;
    
    margin-inline: auto;
    padding: 80px 64px 64px;
}

/* Left column */
.hero-content {
    min-width: 0;
    width: 100%;
    max-width:1000px ;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 28px;
    border: 1px solid rgba(22, 193, 114, 0.2);
}

.hero-eyebrow-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 24px;
}

.hero h1 em {
    font-style: normal;
    font-weight: 600;
    color: #383D38;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0;
    width: 100%;
}

/* Right column */
.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

/* Stack de logos façon screenshot */
.client-stack {
    display: flex;
    align-items: center;
}

.client-stack-logo {
    width: 64px;
    height: 64px;
    border-radius: 24px;
    background: #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #9CA3AF;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-left: -14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.client-stack-logo:nth-child(1){
    background-image: url("../images/logo_projets/Arrive.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: transparent;
}

.client-stack-logo:nth-child(2){
    background-image: url("../images/logo_projets/Naolib.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: transparent;
}

.client-stack-logo:nth-child(3){
    background-image: url("../images/logo_projets/Santell.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: transparent;
}

.client-stack-logo:first-child {
    margin-left: 0;
}

.client-stack-count {
    width: 64px;
    height: 64px;
    border-radius: 24px;
    background: #2B2B2B;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    margin-left: -14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    letter-spacing: -0.02em;
}

.client-stack-label {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---- dead code kept as placeholder ---- */
.hero-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #E5E7EB;
    border: 2.5px solid var(--bg);
    margin-left: -10px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.hero-avatars .hero-avatar:first-child {
    margin-left: 0;
}

/* ------------------------------------------------------------
   Banner / Rive Section
   ------------------------------------------------------------ */
.banner-wrapper {
    padding: 0px 64px 80px;
}

.banner {
    min-height: 500px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(154% 152.94% at 57.11% -47.08%, rgba(236, 240, 235, 0.00) 77.47%, #ECF0EB 93.52%),
        radial-gradient(101.56% 101.38% at 52.24% -44.52%, #ECF0EB 0%, rgba(236, 240, 235, 0.97) 56.32%, rgba(236, 240, 235, 0.00) 100%),
        linear-gradient(0deg, #A6FAAE 0%, #A6FAAE 100%),
        #B9F8BF;
    overflow: hidden;
}

#canvasHead {
    display: block;
}

.rive-container {
    width: 100%;
    max-width: 600px;
    height: 400px;
    border: 1px solid rgba(22, 193, 114, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.rive-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Placeholder state (shown before Rive loads) */
.rive-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.875rem;
    font-weight: 500;
    position: absolute;
    inset: 0;
}

.rive-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

/* ------------------------------------------------------------
   Services Section
   ------------------------------------------------------------ */
#services {
    padding: 128px 96px;
    background: var(--bg-section);
}

.services-header {
    margin-bottom: 60px;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: #fff;
    border-radius: 20px;
    padding: 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-category {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    padding: 6px 14px;
    border-radius: 999px;
}

.service-title {
    font-size: 1.2125rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 0 0 -8px;
}

.service-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.service-livrables {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.service-livrables-avatar {
    width: 44px;
    height: 44px;
    border-radius: 25%;
    background-color: var(--green-light);
    overflow: hidden;
    flex-shrink: 0;
}

.service-livrables-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-livrables p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ------------------------------------------------------------
   Projects Section
   ------------------------------------------------------------ */
#projets {
    padding: 128px 96px;
    background: var(--bg);
}

.projects-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 56px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    min-width: 0;
    margin-bottom: 16px;
}

.project-card-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #F3F4F6;
    border-radius: 20px;
    position: relative;
    flex-shrink: 0;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card-image img {
    transform: scale(1.04);
}

.project-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
}

.project-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.project-card-info {
    min-width: 0;
}

.project-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-categories {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-cta {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 999px;
    background: #2B2B2B;
    color: #fff;
    transition: background var(--transition);
    white-space: nowrap;
}

.project-card:hover .project-card-cta {
    background: #1a1a1a;
}

/* No projects fallback */
.projects-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ------------------------------------------------------------
   Footer — CTA + bar
   ------------------------------------------------------------ */
footer {
    background:
        radial-gradient(156.19% 155.79% at 51.51% -105.79%, #ECF0EB 13.81%, #ECF0EB 75.96%, rgba(236, 240, 235, 0.00) 100%),
        rgba(166, 250, 174, 0.90);
}

.footer-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 140px 24px 100px;
    gap: 24px;
}

.footer-cta-title {
    font-family: 'Arima', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
}

.footer-cta-title em {
    font-style: normal;
    font-weight: 600;
}

.footer-cta-sub {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 440px;
    line-height: 1.7;
}

.footer-bar {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 20px 32px;
}

.footer-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--text);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-inner {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    /* Nav fixed to bottom on mobile */
    #navbar {
        top: auto;
        bottom: 0;
        border-bottom: none;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #navbar.scrolled {
        box-shadow: none;
    }

    #navbar.nav-hidden {
        transform: translateY(100%);
    }

    .nav-inner {
        justify-content: center;
        padding-inline: 24px;
    }

    #navbar .nav-actions {
        width: 100%;
    }

    #navbar .nav-actions .btn-cta {
        width: 100%;
        justify-content: center;
    }

    .nav-logo,
    .nav-links,
    .nav-linkedin {
        display: none;
    }

    /* Remove top offset — nav is no longer at top */
    .hero {
        padding-top: 0;
    }

    

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 128px 24px 64px;
        gap: 48px;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-visual {
        align-items: stretch;
    }

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

    #projets {
        padding: 0px 24px 80px;
    }

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

    .project-card-image {
        height: 500px;
    }

    .project-card{
        margin-bottom: 64px;
    }

    .projects-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .footer-bar .container {
    flex-direction: column;
}


    .section-title{
        text-align: left;
    }

    #services {
        padding-inline: 24px;
    }

    .services-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .service-card {
        position: sticky;
        margin-bottom: 80px;
        transform-origin: top center;
        will-change: transform;
        transition: box-shadow var(--transition);
    }

    .service-card:last-child {
        margin-bottom: 0;
    }

    /* Nav is at bottom on mobile — top offset controls stack position from top */
    .service-card:nth-child(1) { top: 100px; z-index: 1; }
    .service-card:nth-child(2) { top: 110px; z-index: 2; }
    .service-card:nth-child(3) { top: 120px; z-index: 3; }
    .service-card:nth-child(4) { top: 130px; z-index: 4; }
    .service-card:nth-child(5) { top: 140px; z-index: 5; }

    .banner-wrapper {
        padding-inline: 24px;
    }

    .banner {
        min-height: unset;
        max-height: 300px;
        padding: 60px 24px;
    }

    #canvasHead {
        width: 250px !important;
        height: 250px !important;
    }

    .rive-container {
        height: 260px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .service-card {
        padding: 28px 24px;
    }
}
