/* BaskinInk Frontend Styles */

/* Fonts */
@font-face {
    font-family: 'Sohne';
    src: url('/fonts/TestSohne-Kraftig.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Color variables */
:root {
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-background: #fff;
    --color-border: #e0e0e0;
    --color-accent: #1a1a1a;
}

/* Utility classes */
.lead, .series-description {
    font-size: 1.34rem;
    line-height: 1.618;
    color: var(--color-text);
    font-weight: 500;
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-width: 320px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.618;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sohne', sans-serif;
}
h1 {
    line-height: 1.2;
}
h1.hidden {
    display: none !important;
}

/* Header */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.618rem 1.618rem 1.618rem;
}

.header-logo {
    display: block;
}

.header-logo img {
    height: 8rem;
    width: auto;
    margin-right: 3rem;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 2.618rem;
    margin-top: 1.618rem;
}

.header-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.header-nav a:hover {
    color: var(--color-accent);
}

.header-nav a.active {
    color: var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.25rem;
}

/* Content links */
main a:not(.artwork-item a):not(.artwork-zoom):not(.artwork-nav a):not(.series-nav a):not(.blog-nav a):not(.read-more):not(.post-header a):not(.pagination-prev):not(.pagination-next) {
    color: var(--color-text);
    text-decoration: none;
    background-image: linear-gradient(var(--color-border), var(--color-border));
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.2s ease, color 0.2s ease, background-image 0.2s ease;
}

main a:not(.artwork-item a):not(.artwork-zoom):not(.artwork-nav a):not(.series-nav a):not(.blog-nav a):not(.read-more):not(.post-header a):not(.pagination-prev):not(.pagination-next):hover {
    color: #7B9DB7;
    background-image: linear-gradient(#7B9DB7, #7B9DB7);
    background-size: 100% 2px;
}

/* Layout */
main {
    max-width: 89rem;
    margin: 0 auto;
    padding: 2.618rem 1.618rem;
    flex: 1 0 auto;
    width: 100%;
}

/* Cookie notice */
.cookie-notice {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.618rem 1.618rem;
    background-color: #f5f5f5;
    border-top: 1px solid var(--color-border);
    font-size: 0.813rem;
    color: var(--color-text-muted);
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice p {
    margin: 0;
}

.cookie-notice button {
    padding: 0.25rem 0.75rem;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cookie-notice button:hover {
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

/* Footer */
.footer {
    flex-shrink: 0;
    background-color: var(--color-accent);
    color: var(--color-background);
    padding: 2.618rem 1.618rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.618rem;
    max-width: 89rem;
    margin: 0 auto;
}

.footer-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-column-center {
    text-align: center;
}

.footer-column-right {
    align-items: flex-end;
}

.footer-column p {
    margin: 0;
    opacity: 0.8;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 0.618rem;
    color: var(--color-background);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-social:hover {
    opacity: 1;
}

.footer-social svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Masonry artwork grid */
.artwork-grid {
    margin: 2em auto 0 auto;
}

.artwork-item {
    width: calc(33.333% - 14px);
    margin-bottom: 21px;
    background: var(--color-background);
    overflow: hidden;
    position: relative;
}

.artwork-expand {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    border-radius: 0.2rem;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.artwork-expand svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

.artwork-item:hover .artwork-expand {
    opacity: 1;
}

.artwork-expand:hover {
    background: rgba(0, 0, 0, 0.75);
}

.artwork-expand:focus-visible {
    opacity: 1;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.artwork-item a {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.artwork-item img {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    display: block;
    transition: transform 0.3s ease;
}

.artwork-item:hover img {
    transform: scale(1.03);
}

.artwork-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.artwork-item:hover .artwork-info {
    opacity: 1;
}

.artwork-info h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
}

.artwork-meta {
    margin: 0 0 0.618rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.artwork-description {
    margin: 0 0 0.618rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.artwork-price {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-accent);
}

/* Single artwork page */
.artwork-single {
    max-width: 55rem;
    margin: 0 auto;
}

.artwork-header {
    margin-bottom: 2.618rem;
    text-align: center;
}

.artwork-header h1 {
    margin: 0 0 0.618rem;
    font-size: 2.618rem;
    font-weight: 400;
    color: var(--color-accent);
}

.artwork-series {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text);
}

/* Series page */
.series-page {
    max-width: 55rem;
    margin: 0 auto;
}

.series-header {
    margin-bottom: 2.618rem;
}

.series-header h1 {
    margin: 0 0 0.618rem;
    font-size: 2.618rem;
    font-weight: 400;
    color: var(--color-accent);
}

.series-nav {
    margin-top: 2.618rem;
    padding-top: 1.618rem;
    border-top: 1px solid var(--color-border);
}

.series-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.series-nav a:hover {
    color: var(--color-accent);
}

.artwork-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.618rem;
}

.artwork-figure {
    margin: 0;
}

.artwork-figure img {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
}

.artwork-zoom {
    display: block;
    position: relative;
    cursor: zoom-in;
}

.zoom-hint {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.382rem 0.618rem;
    font-size: 0.75rem;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.artwork-zoom:hover .zoom-hint {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.618rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.618rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

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

.artwork-details {
    padding: 1.618rem;
    background: #fafafa;
    border: 1px solid var(--color-border);
}

.artwork-specs {
    margin: 0 0 1.618rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.618rem;
}

.artwork-specs dt {
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.artwork-specs dd {
    margin: 0;
    color: var(--color-text);
}

.artwork-specs .artwork-price {
    font-weight: 600;
    font-size: 1.272rem;
}

.artwork-details .artwork-description {
    margin: 0;
    font-size: 1rem;
    line-height: 1.618;
    color: var(--color-text);
}

.artwork-nav {
    margin-top: 2.618rem;
}

.artwork-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.artwork-nav a:hover {
    color: var(--color-accent);
}

/* Blog index */
/* Static pages */
.page-single {
    max-width: 55rem;
    margin: 0 auto;
}

.page-single h1 {
    margin: 0 0 1.618rem;
    font-size: 2.618rem;
    font-weight: 400;
    color: var(--color-accent);
}

.page-body {
    line-height: 1.618;
}

.page-body p {
    margin: 0 0 1.618rem;
}

/* Blog index */
.blog-index {
    max-width: 55rem;
    margin: 0 auto;
}

.blog-header {
    margin-bottom: 2.618rem;
}

.blog-header h1 {
    margin: 0;
    font-size: 2.618rem;
    font-weight: 400;
    color: var(--color-accent);
}

.blog-empty {
    color: var(--color-text-muted);
    font-style: italic;
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2.618rem;
}

.blog-post {
    padding-bottom: 2.618rem;
    border-bottom: 1px solid var(--color-border);
}

.blog-post.has-featured-image {
    display: flex;
    gap: 1.618rem;
}

.post-featured-image {
    flex-shrink: 0;
    width: 13rem;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-post.has-featured-image .post-content {
    flex: 1;
    min-width: 0;
}

.blog-post:last-child {
    border-bottom: none;
}

.post-header h2 {
    margin: 0 0 0.5rem;
    font-size: 2.1rem;
    line-height: 1.2;
    font-weight: 500;
}

.post-header h2 a {
    display: block;
    color: var(--color-accent);
    text-decoration: none;
}

.post-header h2 a:hover {
    opacity: 0.8;
}

.post-meta {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.post-meta time {
    display: inline;
}

.post-topic {
    margin-left: 0.618rem;
    padding-left: 0.618rem;
    border-left: 1px solid var(--color-border);
}

.post-preamble {
    margin: 1rem 0;
    color: var(--color-text-light);
    line-height: 1.618;
}

.post-footer {
    margin-top: 1rem;
}

.read-more {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.read-more:hover {
    color: var(--color-accent);
}

/* Blog pagination */
.blog-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.618rem;
    padding-top: 1.618rem;
    border-top: 1px solid var(--color-border);
}

.pagination-prev,
.pagination-next {
    color: var(--color-text-muted);
    text-decoration: none;
}

.pagination-prev:hover,
.pagination-next:hover {
    color: var(--color-accent);
}

.pagination-info {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Single blog post */
.blog-single {
    max-width: 55rem;
    margin: 0 auto;
}

.blog-single-header {
    margin-bottom: 2.618rem;
}

.blog-single-header h1 {
    margin: 0 0 0.618rem;
    font-size: 2.618rem;
    font-weight: 400;
    color: var(--color-accent);
}

.blog-single-preamble {
    margin: 0 0 2.618rem;
    font-size: 1.272rem;
    color: var(--color-text-light);
    line-height: 1.618;
    font-style: italic;
}

.blog-single-body {
    line-height: 1.618;
}

.blog-single-body p {
    margin: 0 0 1.618rem;
}

.blog-single-body h2 {
    margin: 2.618rem 0 1rem;
    font-size: 1.618rem;
    font-weight: 500;
    color: var(--color-accent);
}

.blog-single-body h3 {
    margin: 2rem 0 0.618rem;
    font-size: 1.272rem;
    font-weight: 500;
    color: var(--color-accent);
}

.blog-single-body img {
    margin: 1.618rem 0;
    border: 1px solid var(--color-border);
}

.blog-single-body blockquote {
    margin: 1.618rem 0;
    padding: 1rem 1.618rem;
    border-left: 3px solid var(--color-border);
    color: var(--color-text-light);
    font-style: italic;
}

.blog-single-body pre {
    margin: 1.618rem 0;
    padding: 1rem;
    background: #fafafa;
    border: 1px solid var(--color-border);
    overflow-x: auto;
}

.blog-single-body code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875em;
}

.blog-nav {
    margin-top: 2.618rem;
    padding-top: 1.618rem;
    border-top: 1px solid var(--color-border);
}

.blog-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.blog-nav a:hover {
    color: var(--color-accent);
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 55rem) {
    .artwork-item {
        width: calc(50% - 11px);
    }

    .artwork-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 34rem) {
    .header {
        padding: 1.618rem 1rem;
        position: relative;
    }

    .header-logo {
        margin-top: 1.618rem;
    }

    .header-logo img {
        height: 5rem;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 1.5rem;
        height: 1.125rem;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        position: absolute;
        top: 1.618rem;
        right: 1rem;
    }

    .nav-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--color-text);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .header-nav {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 1.618rem;
        width: 100%;
        padding-top: 1.618rem;
    }

    .header-nav.is-open {
        display: flex;
    }

    .artwork-item {
        width: 100%;
    }

    main {
        padding: 1.618rem 1rem;
    }

    .blog-post.has-featured-image {
        flex-direction: column;
    }

    .post-featured-image {
        width: 100%;
    }

    .artwork-header h1,
    .blog-header h1,
    .blog-single-header h1,
    .series-header h1 {
        font-size: 1.618rem;
    }

    .artwork-specs {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .artwork-specs dt {
        margin-top: 0.618rem;
    }

    .blog-single-preamble {
        font-size: 1rem;
    }

    .blog-pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ------------------------------------------------------------------ */
/* Skip link                                                           */
/* ------------------------------------------------------------------ */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0 0 0.25rem 0.25rem;
    transition: top 0.1s;
}

.skip-link:focus {
    top: 0;
}

/* ------------------------------------------------------------------ */
/* Breadcrumb                                                          */
/* ------------------------------------------------------------------ */

.breadcrumb {
    margin-bottom: 1.618rem;
}

.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: var(--color-muted, #888);
}

.breadcrumb li + li::before {
    content: '/';
    margin-right: 0.25rem;
    color: var(--color-muted, #888);
}

.breadcrumb a {
    color: var(--color-muted, #888);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
    color: inherit;
}

/* ------------------------------------------------------------------ */
/* Lightbox caption                                                    */
/* ------------------------------------------------------------------ */

.lightbox-caption {
    position: absolute;
    bottom: 1.618rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80vw;
    pointer-events: none;
}
