/* ═══════════════════════════════════════════════════════
   VARIABLES & RESET
═══════════════════════════════════════════════════════ */

:root {
    --bg:       #F5F4EF;
    --bg-alt:   #EDECEA;
    --bg-dark:  #111010;
    --fg:       #111010;
    --fg-dark:  #F5F4EF;
    --muted:    #999;
    --border:   #DDDCD6;

    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;

    --container: 1320px;
    --gap:       clamp(2rem, 5vw, 5rem);

    --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
    --ease-inout:  cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

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

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ═══════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════ */

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 5vw, 4rem);
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════ */

.fade-up {
    opacity: 0;
    transform: translateY(44px);
    transition:
        opacity  0.8s var(--ease-out),
        transform 0.8s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered elements use a CSS custom property --delay */
.anim-stagger {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity  0.7s var(--ease-out),
        transform 0.7s var(--ease-out);
    transition-delay: var(--delay, 0s);
}
.anim-stagger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════ */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem clamp(1.5rem, 5vw, 4rem);
    transition:
        background      0.4s var(--ease-inout),
        backdrop-filter 0.4s,
        border-color    0.4s;
    border-bottom: 1px solid transparent;
}

.nav--scrolled {
    background: rgba(245, 244, 239, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.nav-links { display: flex; gap: 2.5rem; }

.nav-link {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    transition: color 0.25s;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 1px;
    background: var(--fg);
    transition: width 0.3s var(--ease-out);
}
.nav-link:hover,
.nav-link.active { color: var(--fg); }
.nav-link.active::after { width: 100%; }

/* ═══════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════ */

.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 3rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.hero-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.9rem;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 7.5vw, 6.5rem);
    font-weight: 800;
    line-height: 0.93;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}
.hero-name span { display: block; }

.hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}
.role-tag {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--fg);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hero-bio {
    font-size: clamp(0.9375rem, 1.4vw, 1.05rem);
    line-height: 1.75;
    color: #555;
    max-width: 46ch;
    margin-bottom: 1.75rem;
}

.hero-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    overflow: hidden;
    cursor: default;
    transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.tool-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.tool-icon img {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

/* Hero visual */
.hero-visual { position: relative; }
.hero-img-wrap {
    border-radius: 40px;
    overflow: hidden;
    aspect-ratio: 1/1;
    max-height: 68vh;
}
.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Scroll hint */
.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 0;
}
.scroll-indicator span {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.scroll-bar {
    height: 1px;
    width: 80px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}
.scroll-bar::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    height: 100%; width: 100%;
    background: var(--fg);
    animation: scanline 2.4s var(--ease-inout) infinite;
}
@keyframes scanline {
    0%   { left: -100%; }
    100% { left:  100%; }
}

/* ═══════════════════════════════════════════════════════
   BIO SPLIT (career + education timeline)
═══════════════════════════════════════════════════════ */

.bio-split {
    padding-block: clamp(3rem, 6vw, 5rem);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 7rem);
}

.bio-col-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.bio-entry {
    display: grid;
    grid-template-columns: 4.25rem 1px 1fr;
    gap: 0 1.25rem;
    min-height: 5rem;
}

.bio-years {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.02em;
    padding-top: 0.15rem;
}

.bio-line {
    width: 1px;
    background: var(--border);
    position: relative;
    align-self: stretch;
}
.bio-line::before {
    content: '';
    position: absolute;
    top: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fg);
    outline: 2px solid var(--bg);
    outline-offset: 1px;
}

.bio-info {
    padding-bottom: 0.5rem;
}

.bio-info strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.bio-info > span {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.4;
}

.bio-sub {
    font-size: 0.775rem !important;
    font-style: italic;
    margin-top: 0.1rem;
}

.bio-bullets {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    list-style: none;
}

.bio-bullets li {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.55;
    padding-left: 1rem;
    position: relative;
}
.bio-bullets li::before {
    content: '·';
    position: absolute;
    left: 0.1rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.3;
}

@media (max-width: 860px) {
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ═══════════════════════════════════════════════════════
   SECTIONS — BASE
═══════════════════════════════════════════════════════ */

.section { padding-block: clamp(4rem, 10vw, 8rem); }
.section--alt  { background: var(--bg-alt); }

#workflow {
    background-color: var(--bg-alt);
    background-image: radial-gradient(circle, #b8b5af 1.2px, transparent 1.2px);
    background-size: 22px 22px;
}
.section--dark { background: var(--bg-dark); color: var(--fg-dark); }

.section-header { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

.section-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════════ */

.project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-items: center;
    padding-block: clamp(3rem, 6vw, 5rem);
    border-top: 1px solid var(--border);
}
.project:last-child { border-bottom: 1px solid var(--border); }

/* Flip: swap columns */
.project--flip .project-media { order: 2; }
.project--flip .project-body  { order: 1; }

/* ── Media ── */
.project-media { position: relative; }

.project-main-img {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.project-main-img img {
    width: 100%;
    transition: transform 0.6s var(--ease-out);
}
.project-main-img:hover img { transform: scale(1.03); }

/* Hover CTA badge */
.media-cta {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    background: rgba(255,255,255,0.95);
    color: var(--fg);
    padding: 0.65rem 1.4rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.3s var(--ease-out);
}
.project-main-img:hover .media-cta {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Secondary brand image floating bottom-right */
.project-extra-img {
    position: absolute;
    bottom: -1.5rem;
    right: -1.5rem;
    width: 42%;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid var(--bg);
    box-shadow: 0 16px 48px rgba(0,0,0,0.14);
    z-index: 2;
}
.project-extra-img img { width: 100%; }
.project--flip .project-extra-img {
    right: auto;
    left: -1.5rem;
    width: 20%;
}

/* Vacanza studio banner strip */
.banner-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}
.banner-strip img {
    width: 100%;
    border-radius: 6px;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.banner-strip--catalog img {
    aspect-ratio: 3/4;
    object-fit: cover;
}
.tip-overlay-stack {
    position: absolute;
    bottom: -1rem;
    left: -1.5rem;
    width: 32%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}
.tip-overlay-stack img {
    width: 100%;
    border-radius: 8px;
    border: 3px solid var(--bg);
    box-shadow: 0 12px 36px rgba(0,0,0,0.16);
}

/* Body+ video */
.project-media--video .video-wrap {
    border-radius: 20px;
    overflow: hidden;
    background: #2D1B5E;
    max-width: 300px;
    margin-inline: auto;
}
.project-media--video video {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
}

/* Flyer preview (Volantini) */
.flyer-preview {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: #E2E1DC;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}
.flyer-preview img {
    width: calc(50% - 0.625rem);
    flex-shrink: 0;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    object-fit: contain;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.flyer-preview img:hover {
    transform: translateY(-6px) rotate(1.5deg);
    box-shadow: 0 20px 48px rgba(0,0,0,0.18);
}

.flyer {
    flex: 1;
    max-width: 180px;
    aspect-ratio: 1 / 1.414;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.flyer:hover {
    transform: translateY(-6px) rotate(1.5deg);
    box-shadow: 0 20px 48px rgba(0,0,0,0.18);
}
.flyer--color { background: #E84C2B; color: white; }
.flyer--bw    { background: #fff; color: #111; border: 1px solid #e0e0e0; }

.flyer-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.flyer-lines { display: flex; flex-direction: column; gap: 5px; }
.flyer-lines div { height: 1.5px; background: currentColor; opacity: 0.25; }

/* Tip cover (To Tip or Not to Tip) */
.tip-cover {
    background: var(--fg);
    border-radius: 12px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}
.tip-cover::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: var(--bg);
}
.tip-text-block {
    position: relative;
    z-index: 1;
}
.tip-line {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
}
.tip-line--dark  { color: var(--fg); }
.tip-line--light { color: var(--fg-dark); }
.tip-sub {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(245, 244, 239, 0.45);
}

/* ── Project body ── */
.project-num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(5rem, 11vw, 9rem);
    font-weight: 800;
    color: rgba(0,0,0,0.05);
    line-height: 0.85;
    margin-bottom: -0.4rem;
    letter-spacing: -0.05em;
    user-select: none;
}

.project-title {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}
.project-tags span {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    background: rgba(0,0,0,0.06);
    border-radius: 100px;
    color: var(--muted);
}

.project-text {
    font-size: clamp(0.875rem, 1.35vw, 0.9875rem);
    line-height: 1.8;
    color: #555;
    max-width: 52ch;
    margin-bottom: 1.5rem;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--fg);
    padding-bottom: 2px;
    transition: opacity 0.2s;
}
.cta-link:hover { opacity: 0.45; }

/* ═══════════════════════════════════════════════════════
   WORKFLOW
═══════════════════════════════════════════════════════ */

.workflow-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.wf-phase {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.75rem;
}

.wf-phase-num {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.wf-phase-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.wf-phase-desc {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #777;
}

.wf-tools-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.wf-tools-list li {
    font-size: 0.875rem;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.wf-tools-list li::before {
    content: '→';
    font-size: 0.7rem;
    opacity: 0.3;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   GALLERY
═══════════════════════════════════════════════════════ */

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 290px;
    gap: 8px;
}

.g-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-alt);
}
.g-item--tall { grid-row: span 2; }
.g-item--wide { grid-column: span 2; }

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}
.g-item:hover img { transform: scale(1.05); }

.g-label {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.25rem 1rem 0.9rem;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s;
}
.g-item:hover .g-label { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   CONTACT / DARK SECTION
═══════════════════════════════════════════════════════ */

.section--dark .section-label {
    color: rgba(245, 244, 239, 0.35);
}

.contact-wrap {
    padding-block: clamp(4rem, 10vw, 7rem) clamp(3rem, 6vw, 5rem);
}

.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.0;
    margin-top: 0.75rem;
    margin-bottom: 2.5rem;
}

.contact-email {
    display: inline-block;
    font-size: clamp(1rem, 2.5vw, 1.45rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    border-bottom: 1px solid rgba(245, 244, 239, 0.25);
    padding-bottom: 4px;
    margin-bottom: 2.5rem;
    transition: border-color 0.3s;
}
.contact-email:hover {
    border-color: var(--fg-dark);
}

.contact-social {
    display: flex;
    gap: 2rem;
}
.contact-social a {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(245, 244, 239, 0.4);
    transition: color 0.25s;
}
.contact-social a:hover { color: var(--fg-dark); }

.contact-footer {
    padding-block: 1.75rem;
    border-top: 1px solid rgba(245, 244, 239, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.contact-footer span {
    font-size: 0.78rem;
    color: rgba(245, 244, 239, 0.28);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .workflow-wrap {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .hero-visual { display: none; }

    .project {
        grid-template-columns: 1fr;
    }
    .project--flip .project-media { order: -1; }
    .project--flip .project-body  { order:  0; }

    .project-num { font-size: clamp(4rem, 12vw, 6rem); }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }
    .g-item--wide { grid-column: span 2; }
    .g-item--tall { grid-row: span 1; }

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

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

    .workflow-wrap { grid-template-columns: 1fr; }

    .gallery {
        grid-auto-rows: 180px;
    }

    .contact-footer {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }

    .contact-social { flex-wrap: wrap; gap: 1rem; }

    .flyer-preview { padding: 1.5rem; min-height: 280px; }
}
