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

:root {
    --nord-red: #7D2027;
    --nord-olive: #4D4828;
    --nord-dark: #191919;
    --nord-cream: #ECE6D8;

    --font-bubble: 'Modak', system-ui;
    --font-primary: 'Inter', sans-serif;
    --font-handwritten: 'Caveat', cursive;

    --transition-bouncy: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--nord-cream);
    color: var(--nord-dark);
    font-family: var(--font-primary);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath fill='%23EE1D52' stroke='%23ffffff' stroke-width='1.5' d='M6 3l12 11.2-5.8.5 3.3 7.3-2.2 1-3.2-7.4-4.4 4.8z'/%3E%3C/svg%3E") 6 2, auto;
}

a,
button,
.info-card,
select,
input,
.btn-main,
.btn-ghost,
.card-arrow,
.floating-photo,
iframe {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath fill='%23BA0F3A' stroke='%23ffffff' stroke-width='1.5' d='M6 3l12 11.2-5.8.5 3.3 7.3-2.2 1-3.2-7.4-4.4 4.8z'/%3E%3C/svg%3E") 6 2, pointer !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── HERO: Floating Photos ─── */

.hero-floating {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: visible;
    background-color: var(--nord-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Centered NORD title */
.hero-title {
    position: relative;
    z-index: 20;
    text-align: center;
    pointer-events: none;
    user-select: none;
}

.nord-logo {
    width: clamp(280px, 55vw, 720px);
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 24px rgba(125, 32, 39, 0.2));
}

.hero-title .subtitle {
    font-family: var(--font-handwritten);
    font-size: clamp(1rem, 3vw, 2rem);
    color: var(--nord-red);
    display: block;
    margin-top: 0.8rem;
    text-align: center;
}

/* Floating photo cards */
.floating-photo {
    position: absolute;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transform-origin: center center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.floating-photo:hover {
    z-index: 30;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
    transform: scale(1.05) !important;
}

.floating-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    /* Per il cambio dinamico */
}

/* Initial state for JS randomization */
.floating-photo {
    opacity: 0;
    transition: opacity 0.4s ease-out;
    /* Più veloce per il turnover a 1.5s */
}

.floating-photo.ready {
    opacity: 1;
}

@keyframes float1 {

    0%,
    100% {
        transform-origin: center;
        translate: 0 0;
    }

    33% {
        translate: -8px -15px;
    }

    66% {
        translate: 6px 8px;
    }
}

@keyframes float2 {

    0%,
    100% {
        translate: 0 0;
    }

    33% {
        translate: 10px -12px;
    }

    66% {
        translate: -5px 10px;
    }
}

@keyframes float3 {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: -12px -18px;
    }
}

/* ─── STORYTELLING / NARRATIVE SECTION ─── */
.narrative-section {
    position: relative;
    padding: 8rem 0 6rem;
    background-color: var(--nord-cream);
}

.storyline {
    position: relative;
    padding: 1rem 0 0;
}

.storyline-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 140px;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

.storyline-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.storyline-svg path {
    fill: none;
    stroke: var(--nord-red);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 4 10;
}

.storyline-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    padding: 0 8%;
}

.story-block {
    max-width: 430px;
    text-align: left;
}

.story-block p {
    font-size: clamp(1rem, 1.4vw, 1.1rem);
    line-height: 1.7;
    color: var(--nord-dark);
}

.story-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nord-olive);
    margin-bottom: 0.6rem;
}

.story-media {
    margin-top: 1.6rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.story-media img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Alternanza destra/sinistra rispetto alla linea */
.story-block:nth-child(odd) {
    margin-right: auto;
    padding-right: 7%;
}

.story-block:nth-child(even) {
    margin-left: auto;
    padding-left: 7%;
}

.story-block:nth-child(odd) .story-media {
    margin-left: auto;
}

.story-block:nth-child(even) .story-media {
    margin-right: auto;
}

@media (max-width: 900px) {
    .storyline-track {
        width: 90px;
        opacity: 0.85;
    }

    .storyline-content {
        padding: 0 1.5rem;
    }

    .story-block,
    .story-block:nth-child(odd),
    .story-block:nth-child(even) {
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        text-align: left;
    }
}

@media (max-width: 600px) {
    .storyline-track {
        display: none;
    }
}

/* ─── DETAILS SECTION ─── */
.details-section {
    background-color: var(--nord-cream);
    color: var(--nord-dark);
    padding: 2rem 0 8rem;
}

/* ─── CTA RED SECTION ─── */
.cta-section {
    padding: 4.5rem 0;
    background: radial-gradient(circle at top left, #a63030 0%, var(--nord-red) 45%, #2e0d10 100%);
    color: var(--nord-cream);
}

.cta-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.cta-copy {
    max-width: 560px;
}

.cta-kicker {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 0.75rem;
}

.cta-title {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.cta-text {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
}

.cta-primary {
    font-size: 0.9rem;
    padding: 0.9rem 2.5rem;
}

.cta-primary {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.cta-secondary {
    border-color: rgba(236, 230, 216, 0.85);
    color: var(--nord-cream);
    background: transparent;
}

.cta-secondary:hover {
    background: var(--nord-cream);
    color: var(--nord-dark);
}

@media (max-width: 800px) {
    .cta-layout {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-actions {
        width: 100%;
        align-items: stretch;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}



.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
}

.details-menu-cta {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.details-menu-btn {
    font-size: 0.9rem;
    padding: 0.8rem 2.2rem;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ─── INTERACTIVE CARDS ─── */

.cards-row {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 2rem 0;
}

/* Each card: reference style — rich gradient, rounded, tall */
.info-card {
    width: 300px;
    min-height: 420px;
    border-radius: 28px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Initial "mazzo" state: tutte sovrapposte e leggermente inclinate */
.info-card.reveal {
    transform: translateY(10px) scale(0.96);
}

/* Stato finale: mazzo che si apre nelle posizioni */
.info-card.reveal.active:nth-child(1) {
    transform: translateX(-18px) rotate(-6deg);
}

.info-card.reveal.active:nth-child(2) {
    transform: translateY(-8px) scale(1.02);
}

.info-card.reveal.active:nth-child(3) {
    transform: translateX(18px) rotate(6deg);
}

.info-card.reveal.active:nth-child(1):hover {
    transform: translateX(-18px) rotate(-3deg) scale(1.04);
}

.info-card.reveal.active:nth-child(2):hover {
    transform: translateY(-12px) scale(1.05);
}

.info-card.reveal.active:nth-child(3):hover {
    transform: translateX(18px) rotate(3deg) scale(1.04);
}

.info-card:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Card body — gradient bg from red to dark */
.card-body {
    width: 100%;
    height: 100%;
    min-height: 420px;
    background: radial-gradient(ellipse at 60% 20%, #a63030 0%, #7D2027 40%, #2e0d10 100%);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--nord-cream);
}

/* Header row: icon chip + title + arrow button */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.card-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem 0.35rem 0.35rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    backdrop-filter: blur(4px);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.card-chip-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.card-tag {
    padding: 0.3rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.card-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--nord-cream);
    transition: background 0.25s, border-color 0.25s;
}

.card-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Big stat / date */
.card-stat {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    padding-top: 1rem;
    color: #fff;
}

.card-stat-arrow {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 300;
    margin-left: 0.2rem;
    vertical-align: super;
    opacity: 0.7;
}

/* Description text */
.card-desc {
    flex: 1;
}

.card-desc strong {
    font-size: 0.95rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.3rem;
    color: #fff;
}

.card-desc span {
    font-size: 0.85rem;
    line-height: 1.6;
    opacity: 0.7;
}

/* Thumbnail strip (like reference) */
.card-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.card-thumb {
    flex: 1;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.info-card:hover .card-thumb img {
    opacity: 1;
}

/* Dots pagination (decorative) */
.card-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding-top: 0.4rem;
}

.card-dots span {
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    flex: 1;
}

.card-dots span.active {
    background: rgba(255, 255, 255, 0.9);
    flex: 2;
}

/* Link styles on cards */
.card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.card-links .btn-ghost {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--nord-cream);
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
}

.card-links .btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

@media (max-width: 900px) {

    .info-card:nth-child(1),
    .info-card:nth-child(2),
    .info-card:nth-child(3) {
        transform: none;
    }

    .cards-row {
        flex-direction: column;
        align-items: center;
    }

    .info-card {
        width: min(300px, 90vw);
    }
}

/* ─── BUTTONS ─── */
.btn-main {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background-color: var(--nord-red);
    color: var(--nord-cream);
    text-decoration: none;
    font-family: var(--font-bubble);
    font-size: 0.9rem;
    border-radius: 50px;
    transition: var(--transition-bouncy);
}

.btn-main:hover {
    transform: scale(1.08) rotate(1deg);
    box-shadow: 0 12px 35px rgba(125, 32, 39, 0.45);
}

.hero-btn {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600;
    font-size: 0.9rem;
    /* Ulteriormente ridotto per eleganza */
    padding: 0.75rem 2rem;
    letter-spacing: -0.01em;
}

.btn-ghost {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border: 1px solid currentColor;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: var(--transition-smooth);
    color: var(--nord-cream);
}

.btn-ghost:hover {
    background-color: var(--nord-cream);
    color: var(--nord-dark);
}

/* ─── GALLERY GRID (mood) ─── */
.gallery-section {
    padding: 8rem 0;
    background-color: var(--nord-cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    align-items: end;
}

.gallery-item {
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--nord-olive);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease, opacity 0.5s ease;
    opacity: 0.9;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.06);
    opacity: 1;
}

.g-large {
    grid-column: span 7;
    height: 520px;
}

.g-small {
    grid-column: span 5;
    height: 360px;
}

.g-medium {
    grid-column: span 6;
    height: 420px;
}


.footer-wrap {
    position: relative;
    padding: 2rem;
    background-color: #000;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    margin-top: -40px;
    /* Pulls it up slightly if needed, or just let it sit. We'll leave it flat. */
}

/* Loop di foto in background */
.footer-bg-loop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.footer-bg-loop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2) contrast(1.05);
    /* Vintage feel come prima */
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .90) 60%, rgba(0, 0, 0, 1) 100%);
}

.footer-card {
    position: relative;
    z-index: 2;
    max-width: 1160px;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 25rem 3rem 1.6rem;
    box-shadow: none;
    color: #fff;
}

/* Top row */
.footer-top {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    padding-bottom: 2.4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Brand side */
.footer-brand {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.footer-tagline {
    font-size: 0.82rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 240px;
}

.footer-socials {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.footer-social-link {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.footer-social-link:hover {
    border-color: #ECE6D8;
    color: #ECE6D8;
    background: rgba(255, 255, 255, 0.1);
}

/* Nav columns */
.footer-nav {
    flex: 1;
    display: flex;
    gap: 3rem;
    justify-content: flex-end;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 130px;
}

.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0.3rem;
}

.footer-col a {
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.5;
}

.footer-col a:hover {
    color: #ECE6D8;
}

/* Bottom bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.4rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-legal {
    display: flex;
    gap: 1.4rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: #fff;
}

/* Footer responsive */
@media (max-width: 860px) {
    .footer-top {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-brand {
        flex: none;
    }

    .footer-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 2rem;
    }
}

@media (max-width: 500px) {
    .footer-card {
        padding: 2rem 1.5rem 1.2rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ─── REVEAL ANIMATION ─── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.22, 0.64, 1);
}

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

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {

    .photo-9,
    .photo-10,
    .photo-11,
    .photo-12 {
        display: none;
    }

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

    .g-large,
    .g-small,
    .g-medium {
        grid-column: span 1;
        height: 260px;
    }
}

@media (max-width: 600px) {

    /* Hero Title Priority */
    .hero-title {
        z-index: 50;
    }

    .hero-title .subtitle {
        background: transparent;
        padding: 0;
        border-radius: 0;
        backdrop-filter: none;
        box-shadow: none;
        position: relative;
        z-index: 60;
        font-size: 1.2rem;
        /* Sottotitolo più grande */
    }

    /* Scale down all photos even more on small screens */
    .floating-photo {
        scale: 0.7 !important;
        opacity: 0.9;
    }

    .hero-title h1 {
        font-size: 4.5rem;
    }

    /* Stacking Cards Effect Mobile */
    .details-section {
        overflow: visible !important;
    }

    .cards-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding-bottom: 80px;
        /* Ridotto: meno spazio dopo che il mazzo è pronto */
    }

    .info-card {
        position: -webkit-sticky;
        position: sticky;
        width: 90vw;
        max-width: 340px;
        margin: 0 auto 250px auto;
        /* Leggermente ridotto lo spazio tra card */
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
        z-index: 10;
        background: #7D2027;
    }

    /* Scarto di 80px: ideale per mostrare il chip senza coprirlo */
    .info-card:nth-child(1) {
        z-index: 1;
        top: 60px;
    }

    .info-card:nth-child(2) {
        z-index: 2;
        top: 140px;
    }

    .info-card:nth-child(3) {
        z-index: 3;
        top: 220px;
        margin-bottom: 60px;
        /* Ridotto: la card si "stacca" prima per avvicinarsi alla mappa */
    }

    .info-card.reveal {
        transform: none !important;
        opacity: 1 !important;
    }
}