/* ============================================
   Horvatis Studio – Global Styles
   Art, Architecture & Invention
   ============================================ */

:root {
    --hs-black: #0B0620;
    --hs-white: #ffffff;
    --hs-off-white: #f8f8f6;
    --hs-grey: #767676;
    --hs-light-grey: #e8e8e6;
    --hs-transition: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === GLOBAL: 1px Border Radius Enforcement === */
*,
*::before,
*::after {
    border-radius: 1px !important;
}

/* === Typography refinements === */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hs-heading-thin {
    font-weight: 200;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hs-heading-light {
    font-weight: 300;
    letter-spacing: 0.02em;
}

.hs-body-small {
    font-size: 0.875rem;
    color: var(--hs-grey);
    letter-spacing: 0.01em;
}

/* === Subtle Scroll Reveal Animations === */
.hs-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--hs-transition), transform var(--hs-transition);
}

.hs-reveal.hs-visible {
    opacity: 1;
    transform: translateY(0);
}

.hs-reveal-delay-1 { transition-delay: 0.1s; }
.hs-reveal-delay-2 { transition-delay: 0.2s; }
.hs-reveal-delay-3 { transition-delay: 0.3s; }
.hs-reveal-delay-4 { transition-delay: 0.4s; }

.hs-fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hs-fade-in.hs-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .hs-reveal, .hs-fade-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* === Masonry Gallery === */
@keyframes hs-masonry-fade-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hs-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 80rem;
    margin: 0 auto;
}

.hs-masonry .wp-block-image,
.hs-masonry > figure,
.hs-masonry > div {
    margin: 0 !important;
    padding: 0;
    overflow: hidden;
}

/* Auto-play staggered fade-in for all masonry gallery items (no scroll needed) */
.hs-masonry > .wp-block-image,
.hs-masonry > figure {
    opacity: 0 !important;
    animation: hs-masonry-fade-in 0.6s ease 1.8s forwards !important;
}

.hs-masonry > :nth-child(1) { animation-delay: 1.8s !important; }
.hs-masonry > :nth-child(2) { animation-delay: 1.88s !important; }
.hs-masonry > :nth-child(3) { animation-delay: 1.96s !important; }
.hs-masonry > :nth-child(4) { animation-delay: 2.04s !important; }
.hs-masonry > :nth-child(5) { animation-delay: 2.12s !important; }
.hs-masonry > :nth-child(6) { animation-delay: 2.2s !important; }
.hs-masonry > :nth-child(7) { animation-delay: 2.28s !important; }
.hs-masonry > :nth-child(8) { animation-delay: 2.36s !important; }
.hs-masonry > :nth-child(9) { animation-delay: 2.44s !important; }

.hs-masonry .wp-block-image figure,
.hs-masonry figure {
    margin: 0 !important;
    height: 100%;
}

.hs-masonry img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 1px !important;
    transition: opacity 0.4s ease;
}

/* Landscape images span full width of the masonry grid */
.hs-masonry .hs-landscape {
    grid-column: 1 / -1;
}

.hs-masonry img:hover {
    opacity: 0.92;
}

@media (max-width: 900px) {
    .hs-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .hs-masonry {
        grid-template-columns: 1fr;
    }
}

/* === Header / Navigation === */
.hs-header {
    border-bottom: 1px solid var(--hs-light-grey);
}

.hs-header .wp-block-site-title a {
    text-decoration: none !important;
    font-weight: 300;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.9rem !important;
}

.hs-header .wp-block-navigation a {
    text-decoration: none !important;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem !important;
    transition: opacity 0.3s ease;
}

.hs-header .wp-block-navigation a:hover {
    opacity: 0.6;
}

/* === Footer === */
.hs-footer {
    border-top: 1px solid var(--hs-light-grey);
    padding: 2rem 0;
}

.hs-footer p,
.hs-footer a {
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hs-grey);
}

.hs-footer a:hover {
    color: var(--hs-black);
}

/* === Hero / Intro Section === */
.hs-hero {
    min-height: 50vh;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 3rem;
}

/* Override any WordPress layout classes inside the hero (but not .hs-hero itself) */
.hs-hero > *,
.hs-hero .wp-block-group,
.hs-hero .is-layout-flow,
.hs-hero .is-layout-constrained,
.hs-hero .is-layout-flex,
.hs-hero .wp-block-group-is-layout-flex,
.hs-hero .wp-block-group-is-layout-flow,
.hs-hero .wp-block-group-is-layout-constrained,
.hs-hero [class*="is-layout-"] {
    display: block !important;
    /* Safari fallback: if display:block is ignored, force column stacking */
    -webkit-flex-direction: column !important;
    flex-direction: column !important;
    -webkit-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    -webkit-align-items: center !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100%;
    text-align: center;
}

.hs-hero h1 {
    font-weight: 200;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
    margin: 0 auto;
    width: 100%;
}

.hs-hero p {
    max-width: 540px;
    margin: 1.5rem auto 0;
    font-weight: 300;
    color: var(--hs-grey);
    line-height: 1.7;
    text-align: center;
    width: 100%;
}

/* === Artist Preview Cards (Homepage) === */
.hs-artist-preview {
    overflow: hidden;
    position: relative;
    flex: 1 1 0%;
}

.hs-artist-preview .wp-block-image,
.hs-artist-preview figure {
    margin: 0 !important;
}

.hs-artist-preview figure {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}

.hs-artist-preview img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hs-artist-preview:hover img {
    transform: translateX(-50%) scale(1.02);
}

.hs-artist-preview h3 {
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 1rem;
}

.hs-artist-preview p {
    font-size: 0.875rem;
    color: var(--hs-grey);
    font-weight: 300;
}

/* === Portfolio Page Styles === */
.hs-portfolio-intro {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem 3rem;
}

.hs-portfolio-intro h1 {
    font-weight: 200;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hs-portfolio-intro .hs-subtitle {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hs-grey);
    margin-bottom: 1.5rem;
}

.hs-portfolio-intro p {
    font-weight: 300;
    color: var(--hs-grey);
    line-height: 1.8;
}

/* === Artist-Specific: John (Dark/Dramatic) === */
.hs-john-page {
    background-color: #0a0a0a;
    color: #e0e0e0;
}

.hs-john-page .hs-portfolio-intro p,
.hs-john-page .hs-portfolio-intro .hs-subtitle {
    color: #999;
}

.hs-john-page .hs-masonry img {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* === Artist-Specific: August (White Space) === */
.hs-august-page .hs-portfolio-intro {
    padding: 6rem 2rem 4rem;
}

/* August's middle (non-landscape) images: 2 per row instead of 3 */
.hs-august-page .hs-masonry {
    grid-template-columns: repeat(2, 1fr);
}

.hs-august-page .hs-masonry .hs-landscape {
    grid-column: 1 / -1;
}

/* === Artist-Specific: Richard (Architectural Precision) === */
.hs-richard-page .hs-masonry img {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* === Buttons / Links === */
.hs-view-portfolio {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: var(--hs-black);
    border-bottom: 1px solid var(--hs-black);
    padding-bottom: 2px;
    transition: opacity 0.3s ease;
}

.hs-view-portfolio:hover {
    opacity: 0.6;
}

/* === Separator === */
.hs-separator {
    width: 40px;
    height: 1px;
    background: var(--hs-light-grey);
    margin: 2rem auto;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .hs-hero {
        min-height: 50vh;
        padding: 4rem 1.5rem;
    }

    .hs-artist-preview figure {
        aspect-ratio: 3 / 4;
    }

    .hs-portfolio-intro {
        padding: 3rem 1.5rem 2rem;
    }
}
