/* Gary Penca Studio */

:root {
    --navy: #14364a;
    --navy-dark: #0d2838;
    --cream: #f6f3ed;
    --cream-alt: #ebe7df;
    --white: #ffffff;
    --gold: #aa8957;
    --text: #252525;
    --muted: #66635f;
    --header-height: 78px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.lightbox-open {
    overflow: hidden;
}

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

a {
    color: inherit;
}

/* Header / navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(20, 54, 74, 0.12);
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: 1580px;
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.logo {
    flex: 0 0 auto;
    color: var(--navy);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 17px;
}

.main-nav a {
    position: relative;
    color: #343434;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.065em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -7px;
    height: 1px;
    background: var(--gold);
    transition: right 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    right: 0;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--navy);
}

/* Hero */
.hero {
    min-height: 78vh;
    padding: 90px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-size: cover;
    color: white;
    text-align: center;
}

.hero-content {
    width: min(820px, 100%);
    padding: 28px;
}

.eyebrow {
    margin-bottom: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero h1 {
    margin-bottom: 24px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 300;
    letter-spacing: -0.035em;
    line-height: 0.98;
}

.hero-description {
    width: min(650px, 100%);
    margin: 0 auto 34px;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.55;
}

.hero-button,
.contact-button {
    display: inline-block;
    padding: 13px 26px;
    border: 1px solid currentColor;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 180ms ease, color 180ms ease;
}

.hero-button:hover,
.hero-button:focus-visible {
    background: white;
    color: var(--navy);
}

/* Artwork sections */
.art-section {
    padding: 100px 5%;
    scroll-margin-top: calc(var(--header-height) + 12px);
}

.alternate-section {
    background: var(--cream-alt);
}

.section-intro {
    width: min(760px, 100%);
    margin: 0 auto 48px;
    text-align: center;
}

.section-intro h2,
.about-inner h2,
.contact-inner h2 {
    margin-bottom: 20px;
    color: var(--navy);
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(2.35rem, 4.5vw, 4.2rem);
    font-weight: 300;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.section-intro p {
    color: var(--muted);
    font-size: 1.02rem;
}

/* Horizontal gallery */
.gallery-wrapper {
    position: relative;
    width: min(1450px, 100%);
    margin: 0 auto;
}

.gallery {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.art-card {
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 0;
    scroll-snap-align: start;
}

.art-image-button {
    width: 100%;
    height: 430px;
    padding: 16px;
    border: 0;
    background: rgba(255, 255, 255, 0.58);
    cursor: zoom-in;
}

.art-image-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 180ms ease, opacity 180ms ease;
}

.art-image-button:hover img,
.art-image-button:focus-visible img {
    transform: scale(1.012);
    opacity: 0.96;
}

.art-image-button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.art-card figcaption {
    padding: 14px 6px 0;
    color: var(--navy);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.gallery-arrow {
    position: absolute;
    top: 205px;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid var(--navy);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--navy);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    font-size: 1.15rem;
    transform: translateY(-50%);
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
    background: var(--navy);
    color: white;
}

.gallery-arrow-left {
    left: -22px;
}

.gallery-arrow-right {
    right: -22px;
}

.swipe-hint {
    display: none;
    margin-top: 18px;
    color: #77736d;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

/* About / contact */
.about-section,
.contact-section {
    scroll-margin-top: calc(var(--header-height) + 12px);
}

.about-section {
    padding: 110px 6%;
    background: var(--navy);
    color: white;
}

.about-inner {
    width: min(760px, 100%);
    margin: 0 auto;
    text-align: center;
}

.about-inner h2 {
    color: white;
}

.about-inner p {
    margin: 0 auto 20px;
    color: #dfe6e9;
    font-size: 1.05rem;
}

.contact-section {
    padding: 110px 6%;
    background: white;
    text-align: center;
}

.contact-inner {
    width: min(700px, 100%);
    margin: 0 auto;
}

.contact-inner p {
    margin-bottom: 30px;
    color: var(--muted);
}

.contact-button {
    color: var(--navy);
}

.contact-button:hover,
.contact-button:focus-visible {
    background: var(--navy);
    color: white;
}

footer {
    padding: 30px 20px;
    background: var(--navy-dark);
    color: #b8c4ca;
    font-size: 0.8rem;
    text-align: center;
}

/* Artwork lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(5, 16, 23, 0.9);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-content {
    max-width: min(1200px, 92vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lightbox-content img {
    max-width: 92vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.35);
}

.lightbox-content p {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    color: white;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

/* Tablet / compact navigation */
@media (max-width: 1120px) {
    .header-inner {
        position: relative;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        max-height: calc(100vh - var(--header-height));
        padding: 12px 5% 22px;
        overflow-y: auto;
        background: rgba(255, 255, 255, 0.99);
        border-bottom: 1px solid rgba(20, 54, 74, 0.12);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }

    .main-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }

    .main-nav a {
        padding: 13px 10px;
        border-bottom: 1px solid #eeeae4;
        font-size: 0.76rem;
        text-align: center;
    }

    .main-nav a::after {
        display: none;
    }

    .art-image-button {
        height: 390px;
    }

    .gallery-arrow {
        top: 185px;
    }
}

/* Mobile: one centered image per view, swipeable */
@media (max-width: 700px) {
    :root {
        --header-height: 68px;
    }

    .header-inner {
        min-height: var(--header-height);
        padding: 0 18px;
    }

    .logo {
        font-size: 1.13rem;
    }

    .main-nav.is-open {
        grid-template-columns: 1fr;
        padding: 6px 18px 16px;
    }

    .main-nav a {
        padding: 11px 8px;
    }

    .hero {
        min-height: 70vh;
        padding: 74px 18px;
        background-position: center;
    }

    .hero-content {
        padding: 10px;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 13vw, 4.2rem);
    }

    .hero-description {
        font-size: 1.05rem;
    }

    .art-section {
        padding: 72px 0 78px;
    }

    .section-intro {
        margin-bottom: 34px;
        padding: 0 22px;
    }

    .section-intro h2,
    .about-inner h2,
    .contact-inner h2 {
        font-size: clamp(2.3rem, 11vw, 3.4rem);
    }

    .section-intro p {
        font-size: 0.98rem;
    }

    .gallery-wrapper {
        width: 100%;
        overflow: hidden;
    }

    .gallery {
        gap: 16px;
        padding: 0 13vw;
        scroll-padding-inline: 13vw;
        scroll-snap-type: x mandatory;
    }

    .art-card {
        flex: 0 0 74vw;
        max-width: 430px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .art-image-button {
        height: clamp(300px, 52vh, 450px);
        padding: 10px;
        background: rgba(255, 255, 255, 0.66);
    }

    .art-card figcaption {
        padding-top: 12px;
        font-size: 0.96rem;
    }

    .gallery-arrow {
        top: calc(clamp(300px, 52vh, 450px) / 2);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.94);
    }

    .gallery-arrow-left {
        left: 8px;
    }

    .gallery-arrow-right {
        right: 8px;
    }

    .swipe-hint {
        display: block;
        padding: 0 20px;
    }

    .about-section,
    .contact-section {
        padding: 82px 24px;
    }

    .lightbox {
        padding: 18px;
    }

    .lightbox-content img {
        max-width: 94vw;
        max-height: 78vh;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 420px) {
    .gallery {
        padding: 0 11vw;
        scroll-padding-inline: 11vw;
    }

    .art-card {
        flex-basis: 78vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    html,
    .gallery {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
