/*
Theme Name: Endrizzi Child
Theme URI: https://www.cristianaendrizzi.it
Description: Child theme per Cristiana Endrizzi Fotografie. Parent: Hello Elementor.
Author: Gianni Russo
Author URI: https://www.cristianaendrizzi.it
Template: hello-elementor
Version: 1.0.0
Text Domain: endrizzi-child
*/

/* Il tema Hello Elementor resetta molti stili. 
   Aggiungiamo qui le variabili e i reset necessari al design system. */
   
:root {
    --bg-color: #F8F7F3;
    --text-main: #0F0E0D;
    --text-light: #6A6763;
    --accent: #BFAFA3;
    --lines: #DFDBCE;
    --bg-hover: #ede8df;
    --font-display: 'Instrument Serif', serif;
    --font-sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    --pad-x: max(5vw, 40px);
    --section-y: 15vh;
}

/* Base Resets & Globals */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, .display-font {
    font-family: var(--font-display);
    font-weight: 400;
    margin-top: 0;
}

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

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

/* Utility / Animation Classes */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-img {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    border: 1px solid var(--text-main);
    border-radius: 100px;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    overflow: hidden;
    background: transparent;
    z-index: 1;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-main);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.btn:hover { color: var(--bg-color); }
.btn:hover::before { transform: translateY(0); }

/* Gallery Grid (Usata nei template) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
    padding: 0 var(--pad-x) var(--section-y);
}

.gal-item {
    overflow: visible;
    background: transparent;
    border: 1px solid var(--lines);
    padding: 0.5rem;
}

.gal-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gal-item img { height: auto !important; }
}

/* Header / Menu */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem var(--pad-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(248, 247, 243, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lines);
}

.logo {
    display: block;
    text-decoration: none;
}

.logo img {
    height: 52px;
    width: auto;
    display: block;
}

.menu-btn {
    background: none;
    border: none;
    color: inherit;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
}

.site-menu {
    position: fixed;
    top: 86px;
    right: var(--pad-x);
    min-width: 250px;
    display: grid;
    gap: 0.25rem;
    padding: 0.65rem;
    background: rgba(248, 247, 243, 0.98);
    border: 1px solid var(--lines);
    z-index: 110;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-menu a {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.7rem 0.85rem;
    transition: background 0.3s ease;
}

.site-menu a:hover {
    background: var(--bg-hover);
}

.submenu-group {
    display: grid;
    gap: 0.2rem;
}

.submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.62rem;
    padding: 0.45rem 0.85rem 0.2rem;
    cursor: pointer;
    text-align: left;
}

.submenu-arrow {
    font-size: 0.7rem;
    line-height: 1;
    transition: transform 0.25s ease;
}

.submenu-group.is-open .submenu-arrow {
    transform: rotate(180deg);
}

.site-submenu {
    display: none;
    gap: 0.15rem;
    padding-bottom: 0.2rem;
}

.submenu-group.is-open .site-submenu {
    display: grid;
}

.site-submenu a {
    padding-left: 1.25rem;
}

.site-menu[hidden] {
    display: none !important;
}

/* Footer */
footer {
    border-top: 1px solid var(--lines);
    margin-top: 4rem;
    padding: 2rem var(--pad-x);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

footer .copy,
footer .credits {
    color: var(--text-light);
}

footer .copy a {
    margin-left: 0.8rem;
    color: var(--text-main);
}

/* Home / generic sections used in templates */
.site-main {
    padding-top: 92px;
}

section {
    padding: var(--section-y) var(--pad-x);
}

.caption {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-main);
}

.eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background-color: var(--text-main);
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 6rem);
    line-height: 1;
    margin-bottom: 2rem;
}

.desc-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.3;
}

.link-explore {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-main);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--lines);
    transition: border-color 0.3s ease;
    width: fit-content;
}

.link-explore:hover {
    border-color: var(--text-main);
}

/* Home sections */
.hero-identity {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 5vw;
    align-items: center;
    padding-top: 140px;
}

.hero-identity-text {
    max-width: 760px;
}

.hero-identity-name {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 10vw, 9.5rem);
    font-weight: 400;
    line-height: 0.88;
    letter-spacing: -0.01em;
    margin: 1.5rem 0 1rem;
}

.hero-identity-role {
    font-family: var(--font-display);
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    margin-bottom: 1.2rem;
    color: var(--text-light);
}

.hero-identity .hero-identity-name,
.hero-identity .hero-identity-role {
    font-family: var(--font-display) !important;
}

.hero-identity-desc {
    font-size: 1rem;
    max-width: 520px;
    margin-bottom: 2rem;
}

.hero-identity-img {
    overflow: hidden;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
}

.hero-identity-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.silence-section {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: flex-end;
    padding-top: 10vh;
    padding-bottom: 8vh;
    overflow: hidden;
}

.silence-section .bg-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.silence-section .bg-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.silence-section .bg-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 14, 13, 0.68) 0%, rgba(15, 14, 13, 0.18) 40%, rgba(15, 14, 13, 0) 75%);
}

.silence-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 900px;
}

.silence-content .eyebrow {
    color: rgba(255, 255, 255, 0.92);
}

.silence-content .eyebrow::before {
    background-color: rgba(255, 255, 255, 0.9);
}

.silence-content h2 {
    font-size: clamp(2.5rem, 7vw, 6rem);
    line-height: 0.92;
    margin: 1.2rem 0 1.4rem;
}

.silence-content h2 em {
    font-style: italic;
}

.silence-content .link-explore {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.8);
}

.focus-project {
    display: grid;
    grid-template-columns: 4fr 5fr;
    gap: 5vw;
    align-items: center;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.image-wrapper {
    overflow: hidden;
    width: 100%;
    background: var(--bg-color);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2vw;
}

.pillar-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pillar-item.nikon {
    grid-column: 1 / 5;
}

.pillar-item.haiti {
    grid-column: 5 / 13;
    margin-top: 14vh;
}

.press-marquee {
    padding: 8vh 0;
    border-top: 1px solid var(--lines);
    border-bottom: 1px solid var(--lines);
    display: flex;
    overflow: hidden;
    white-space: nowrap;
}

.press-track {
    display: flex;
    gap: 5vw;
    animation: marquee 30s linear infinite;
}

.press-logo {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-transform: uppercase;
    color: var(--text-light);
}

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

.archive-list {
    margin-top: 8vh;
    border-top: 1px solid var(--lines);
}

.archive-row {
    display: grid;
    grid-template-columns: 2fr 4fr 2fr 1fr;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--lines);
    align-items: center;
    transition: background 0.4s ease;
    color: inherit;
    text-decoration: none;
}

a.archive-row {
    cursor: pointer;
}

.archive-row:hover {
    background: var(--bg-hover);
}

.archive-row .cat {
    color: var(--text-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.archive-row .title {
    font-family: var(--font-display);
    font-size: 2rem;
}

.archive-row .desc {
    font-size: 0.85rem;
    max-width: 300px;
    color: var(--text-light);
}

.archive-row .icon {
    text-align: right;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3vw;
    margin-top: 6vh;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-decoration: none;
    color: inherit;
}

.service-card .service-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.service-card .service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.service-card .service-body {
    padding: 2rem 0;
}

.service-card .service-name {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.1;
    margin-bottom: 0.8rem;
}

.service-card .service-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 90%;
    margin-bottom: 1.2rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10vw;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--lines);
    padding: 1rem 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
}

.form-group textarea {
    resize: none;
    height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--text-main);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    pointer-events: none;
    transition: 0.3s ease all;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -1.5rem;
}

/* Internal templates (galleries/projects) */
.internal-hero {
    padding: 160px var(--pad-x) 80px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    align-items: flex-end;
}

.story-section {
    padding: 10px var(--pad-x) 10px;
    display: flex;
    justify-content: center;
}

.story-content {
    max-width: 900px;
    text-align: center;
}

.story-text {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2rem);
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 4rem;
}

.story-subtext {
    color: var(--text-light);
}

.gallery-section {
    padding-top: 3rem;
}

@media (max-width: 900px) {
    .hero-identity,
    .focus-project,
    .hero-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .hero-identity {
        min-height: 0;
        padding-top: 120px;
    }

    .pillar-item.nikon,
    .pillar-item.haiti {
        grid-column: 1 / -1;
        margin-top: 4vh;
    }

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

    .archive-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .archive-row .icon {
        display: none;
    }

    .internal-hero {
        padding-top: 130px;
    }
}
