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

:root {
    --bg: #f5f3ef;
    --text: #1a1a1a;
    --text-muted: #666;
    --nav-height: 3.8rem;
    --font: "Times New Roman", "Georgia", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html {
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.7rem 2rem 0;
    z-index: 100;
    background: var(--bg);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.site-title {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
    white-space: nowrap;
}

.site-title a {
    color: var(--text);
    text-decoration: none;
}

.tagline {
    display: none; /* toggle on when ready */
    font-size: 0.65rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.03em;
    text-transform: none;
    color: var(--text-muted);
    margin-left: 0.6rem;
    position: relative;
}

.tagline-fr {
    opacity: 0;
    margin-left: 0.5rem;
    font-style: italic;
    transition: opacity 0.3s;
}

.tagline:hover .tagline-fr {
    opacity: 1;
}

/* ── Ticker (scrolling text) ── */
.ticker-wrap {
    overflow: hidden;
    width: 100%;
    max-width: 50vw;
}

.ticker {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker-scroll 20s linear infinite;
}

.ticker-text {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding-right: 4rem;
}

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

/* ── Nav links (right side) ── */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-right a {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.header-right a:hover,
.header-right a.active {
    color: var(--text);
}

/* ── Marquee Gallery ── */
.marquee-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: grab;
}

.marquee-container.dragging {
    cursor: grabbing;
}

.marquee-track {
    display: flex;
    will-change: transform;
    padding: 2rem 0;
}

.marquee-images {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 0.75rem;
    white-space: nowrap;
}

.gallery-item {
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: opacity 0.3s;
}

.gallery-item:hover {
    opacity: 0.88;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.visible {
    opacity: 1;
    pointer-events: auto;
    touch-action: pinch-zoom;
    overscroll-behavior: none;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-family: var(--font-sans);
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-img {
    width: 90vw;
    height: 80vh;
    object-fit: contain;
    opacity: 0;
}

.lightbox-img.loaded {
    opacity: 1;
}

.lightbox-info {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    margin-top: 1.5rem;
    text-align: center;
    line-height: 1.6;
}

.lightbox-details {
    display: block;
    margin-top: 1rem;
    font-family: var(--font);
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 0.1rem;
    transition: color 0.2s, border-color 0.2s;
}

.lightbox-details:hover {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ── Works Page ── */
.page-body {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
}

.works-list {
    padding: calc(var(--nav-height) + 3rem) 4rem 6rem;
    max-width: 1400px;
    margin: 0 auto;
}

.work-item {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    margin-bottom: 6rem;
}

.work-item:nth-child(even) {
    flex-direction: row-reverse;
}

.work-image {
    flex: 0 0 55%;
    max-width: 55%;
}

.work-image img {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: opacity 0.3s;
}

.work-image img:hover {
    opacity: 0.88;
}

.work-details {
    flex: 1;
    padding-top: 1rem;
}

.work-details h2 {
    font-family: var(--font);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1.2rem;
    font-style: italic;
}

.work-details .meta {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    line-height: 2;
}

.work-details .description {
    font-family: var(--font);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 1.5rem;
    color: var(--text);
    max-width: 40ch;
}

.inquire {
    display: inline-block;
    margin-top: 1.5rem;
    font-family: var(--font);
    font-size: 0.85rem;
    font-style: italic;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: var(--text-muted);
    border-bottom: 1px solid var(--text-muted);
    padding-bottom: 0.1rem;
    transition: color 0.2s, border-color 0.2s;
}


.inquire:hover {
    color: var(--text);
    border-color: var(--text);
}

/* ── Notify me ── */
.notify-wrap {
    margin-top: 0.8rem;
}

.notify-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font);
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.notify-btn:hover {
    border-color: var(--text-muted);
}

.notify-form {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.notify-wrap.open .notify-btn {
    display: none;
}

.notify-wrap.open .notify-form {
    display: flex;
}

.notify-form input[type="email"] {
    font-family: var(--font);
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--text-muted);
    background: transparent;
    color: var(--text);
    outline: none;
    width: 14rem;
    transition: border-color 0.2s;
}

.notify-form input[type="email"]:focus {
    border-color: var(--text);
}

.notify-form button[type="submit"] {
    font-family: var(--font);
    font-size: 0.8rem;
    font-style: italic;
    padding: 0.4rem 1rem;
    border: 1px solid var(--text);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.notify-form button[type="submit"]:hover {
    background: var(--text);
    color: var(--bg);
}

.notify-thanks {
    display: none;
    font-family: var(--font);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
}

.notify-form.sent input,
.notify-form.sent button[type="submit"] {
    display: none;
}

.notify-form.sent .notify-thanks {
    display: inline;
}

/* ── About Page ── */
.about-page {
    padding: calc(var(--nav-height) + 4rem) 4rem 6rem;
    max-width: 1000px;
    margin: 0 auto;
}

.about-section {
    display: flex;
    gap: 4rem;
    margin-bottom: 6rem;
    align-items: flex-start;
}

.about-section:nth-child(even) {
    flex-direction: row-reverse;
}

.about-photo {
    flex: 0 0 40%;
    max-width: 40%;
}

.about-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    flex: 1;
}

.about-text h1 {
    font-family: var(--font);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-family: var(--font);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1rem;
}

.about-text .contact {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2rem;
    letter-spacing: 0.03em;
}

.about-text .contact a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--text-muted);
}

.about-contact {
    font-family: var(--font);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.about-contact a,
.about-contact a:visited {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--text-muted);
    transition: border-color 0.2s;
}

.about-contact a:hover {
    border-color: var(--text);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    :root {
        --nav-height: 3.2rem;
    }

    /* Header: stack title + nav vertically on mobile */
    .site-header {
        padding: 0.5rem 1rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
    }

    .header-left {
        flex-direction: row;
        align-items: baseline;
        gap: 0.8rem;
    }

    .site-title {
        font-size: 0.75rem;
    }

    .ticker-wrap {
        max-width: 50vw;
    }

    .ticker-text {
        font-size: 0.55rem;
    }

    .header-right {
        gap: 0.2rem;
    }

    .header-right a {
        font-size: 0.65rem;
        letter-spacing: 0.04em;
    }

    /* Gallery: tighter gaps, images scale via JS --mobile-scale */
    .marquee-images {
        gap: 0.8rem;
        padding: 0 0.4rem;
    }

    /* Lightbox: bigger touch targets */
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
        padding: 0.5rem;
    }

    .lightbox-img {
        max-width: 95vw;
        max-height: 75vh;
    }

    .lightbox-info {
        font-size: 0.7rem;
        margin-top: 1rem;
        padding: 0 1rem;
    }

    /* Works page: stacked layout */
    .works-list {
        padding: calc(var(--nav-height) + 1.5rem) 1.2rem 4rem;
    }

    .work-item {
        margin-bottom: 3.5rem;
    }

    .work-item,
    .work-item:nth-child(even) {
        flex-direction: column;
        gap: 1.2rem;
    }

    .work-image {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .work-details h2 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .work-details .meta {
        font-size: 0.75rem;
    }

    .work-details .description {
        font-size: 0.95rem;
        margin-top: 1rem;
        max-width: none;
    }

    /* About page: stacked layout */
    .about-page {
        padding: calc(var(--nav-height) + 2rem) 1.2rem 4rem;
    }

    .about-section,
    .about-section:nth-child(even) {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 4rem;
    }

    .about-photo {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .about-text h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .about-text p {
        font-size: 0.95rem;
    }
}
