/* ============================================
   VINS SINCÈRES — Styles
   Primary: Cobalt Blue #1B2FA0
   Secondary: Terracotta #C2654A
   ============================================ */

:root {
    --blue: #1B2FA0;
    --blue-dark: #111E6C;
    --blue-light: #2A42C0;
    --blue-pale: #E8EBF7;
    --terracotta: #C2654A;
    --terracotta-dark: #A04E36;
    --terracotta-light: #D4896F;
    --terracotta-pale: #F5E6DF;
    --cream: #FDFBF8;
    --white: #FFFFFF;
    --gray-50: #F8F7F5;
    --gray-100: #EEEDEA;
    --gray-200: #D5D3CE;
    --gray-400: #9A978F;
    --gray-600: #5C5A54;
    --gray-800: #2D2B27;
    --gray-900: #1A1917;

    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --nav-height: 72px;
    --container-max: 1200px;
    --section-padding: clamp(4rem, 10vw, 8rem);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-800);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* Screen-reader only (SEO h1) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.nav--scrolled {
    background-color: rgba(253, 251, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 47, 160, 0.08);
}

.nav__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo-img {
    height: 28px;
    width: auto;
    transition: opacity 0.3s ease;
}

.nav--scrolled .nav__logo-img {
    opacity: 1;
}

.nav:not(.nav--scrolled) .nav__logo-img {
    opacity: 0;
}

.nav__menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav__link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-600);
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.nav--scrolled .nav__link {
    color: var(--gray-600);
}

.nav:not(.nav--scrolled) .nav__link {
    color: rgba(255, 255, 255, 0.85);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terracotta);
    transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link--active::after {
    width: 100%;
}

.nav__link:hover {
    color: var(--blue);
}

.nav:not(.nav--scrolled) .nav__link:hover {
    color: var(--white);
}

/* Mobile Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-800);
    transition: all 0.3s ease;
}

.nav:not(.nav--scrolled) .nav__toggle span {
    background: var(--white);
}

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

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

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

/* ============================================
   HERO
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 40%, var(--blue-light) 70%, var(--terracotta) 100%);
    z-index: 0;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(194, 101, 74, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(42, 66, 192, 0.2) 0%, transparent 50%);
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.hero__logo {
    max-width: min(160px, 35vw);
    margin: 0 auto 2rem;
    animation: heroFadeIn 1.2s ease-out;
    filter: brightness(0) invert(1) drop-shadow(0 4px 24px rgba(0, 0, 0, 0.15));
}

.hero__tagline {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.04em;
    margin-bottom: 2.5rem;
    animation: heroFadeIn 1.2s ease-out 0.3s backwards;
}

.hero__cta {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 100px;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s ease;
    animation: heroFadeIn 1.2s ease-out 0.6s backwards;
}

.hero__cta:hover {
    background: var(--white);
    color: var(--blue);
    border-color: var(--white);
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hero__scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollLine {
    0%, 100% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    30% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    70% { opacity: 1; transform: scaleY(1); transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   SECTIONS (shared)
   ============================================ */

.section {
    padding: var(--section-padding) 0;
}

.section__header {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1rem;
}

.section__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--blue-dark);
    margin-bottom: 1rem;
}

.section__subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* ============================================
   PHILOSOPHIE
   ============================================ */

.philosophie {
    background: var(--white);
}

.philosophie__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.philosophie__text {
    max-width: 640px;
    margin: 0 auto;
    text-align: justify;
}

.philosophie__intro {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    line-height: 1.6;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.philosophie__text p {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 1.25rem;
}

.philosophie__text strong {
    color: var(--blue);
    font-weight: 600;
}

.philosophie__values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.value {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background: var(--gray-50);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(27, 47, 160, 0.08);
}

.value__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.25rem;
    color: var(--terracotta);
}

.value__title {
    font-size: 1.35rem;
    color: var(--blue-dark);
    margin-bottom: 0.75rem;
}

.value__desc {
    font-size: 0.9rem;
    color: var(--gray-400);
    line-height: 1.6;
}

/* ============================================
   ABOUT (Qui suis-je)
   ============================================ */

.about {
    background: var(--cream);
}

.about__content {
    max-width: 680px;
    margin: 0 auto;
}

.about__greeting {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--terracotta);
    margin-bottom: 1.5rem;
    font-weight: 400;
    text-align: left;
}

.about__text {
    text-align: justify;
}

.about__text p {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 1.25rem;
}

.about__text strong {
    color: var(--blue);
    font-weight: 600;
}

/* ============================================
   TERROIRS & VIGNERONS
   ============================================ */

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

.terroirs .section__label {
    color: var(--terracotta-light);
}

.terroirs .section__title {
    color: var(--white);
}

.terroirs .section__subtitle {
    color: rgba(255, 255, 255, 0.5);
}

.terroirs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.terroir-card {
    position: relative;
    padding: 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.4s ease;
}

.terroir-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(194, 101, 74, 0.4);
    transform: translateY(-3px);
}

.terroir-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--terracotta);
    border-radius: 0 0 3px 0;
    transition: height 0.4s ease;
}

.terroir-card:hover .terroir-card__accent {
    height: 100%;
}

.terroir-card__name {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.terroir-card__desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.terroir-card__vignerons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.terroir-card__vignerons span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--terracotta-light);
    background: rgba(194, 101, 74, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.terroir-card:hover .terroir-card__vignerons span {
    background: var(--terracotta);
    color: var(--white);
}

/* ============================================
   CONTACT
   ============================================ */

.contact {
    background: var(--white);
}

.contact__content {
    text-align: center;
}

.contact__details {
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 5vw, 4rem);
    margin-bottom: clamp(3rem, 6vw, 4rem);
    flex-wrap: wrap;
}

.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
}

.contact__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--terracotta);
    margin-top: 4px;
}

.contact__item h3 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 0.25rem;
}

.contact__item p,
.contact__item a {
    font-size: 1rem;
    color: var(--gray-800);
}

.contact__item a:hover {
    color: var(--blue);
}

/* CTA Button */
.contact__cta {
    display: flex;
    justify-content: center;
}

.btn-rdv {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 2.5rem;
    background: var(--blue);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 100px;
    transition: color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, gap 0.4s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.btn-rdv::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--white);
    border-radius: 100px;
    transition: width 0.4s ease;
    z-index: -1;
}

.btn-rdv:hover::before {
    width: 100%;
}

.btn-rdv:hover {
    color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27, 47, 160, 0.25);
    gap: 1.5rem;
}

.btn-rdv__text {
    position: relative;
    z-index: 1;
}

.btn-rdv__arrow {
    display: flex;
    align-items: center;
    width: 24px;
    height: 24px;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.btn-rdv:hover .btn-rdv__arrow {
    transform: translateX(4px);
}

/* ============================================
   GALERIE
   ============================================ */

.galerie {
    background: var(--cream);
}

.galerie__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
    gap: 1rem;
}

.galerie__item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.galerie__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.galerie__item:hover img {
    transform: scale(1.05);
}

.galerie__item--tall {
    grid-row: span 2;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--gray-900);
    color: rgba(255, 255, 255, 0.4);
    padding: 4rem 0 2rem;
}

.footer__content {
    text-align: center;
}

.footer__logo {
    height: 64px;
    width: auto;
    margin: 0 auto 1.25rem;
    opacity: 0.6;
    filter: brightness(0) invert(1);
}

.footer__text {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.35);
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.footer__links a {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.3s ease;
}

.footer__links a:hover {
    color: var(--terracotta-light);
}

.footer__legal {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.15);
}

.footer__credit {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.12);
    margin-top: 1.5rem;
    letter-spacing: 0.06em;
}

.footer__credit a {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 700;
    transition: color 0.3s ease;
}

.footer__credit a span {
    color: var(--terracotta);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.footer__credit a:hover {
    color: var(--white);
}

.footer__credit a:hover span {
    opacity: 1;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============================================
   RESPONSIVE — Tablet
   ============================================ */

@media (max-width: 1024px) {
    .terroirs__grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */

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

    /* Nav mobile */
    .nav__toggle {
        display: flex;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--cream);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav__menu--open {
        right: 0;
    }

    .nav__menu--open .nav__link {
        color: var(--gray-800) !important;
        font-size: 1.1rem;
    }

    /* Philosophie */
    .philosophie__values {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .value {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 1.25rem;
        padding: 1.25rem 1.5rem;
    }

    .value__icon {
        margin: 0;
        flex-shrink: 0;
    }

    /* Terroirs */
    .terroirs__grid {
        grid-template-columns: 1fr;
    }

    /* Galerie */
    .galerie__grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 200px;
    }

    .galerie__item--tall {
        grid-row: span 1;
    }

    /* Contact */
    .contact__details {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .contact__item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
}

/* ============================================
   RESPONSIVE — Small mobile
   ============================================ */

@media (max-width: 400px) {
    .hero__logo {
        max-width: min(140px, 40vw);
    }

    .terroir-card {
        padding: 1.5rem;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
