/* Ripples Website - Global Styles */

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

/* CSS Variables */
:root {
    /* Spacing */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-6: 3rem;
    --space-8: 4rem;
    
    /* Colors */
    --brand: #222;
    --accent: #aaa4a4;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #fff;
    --bg-alt: #f8f8f8;

    
    /* Typography */
    /* Terminal-inspired monospace stack; ui-monospace first where supported */
    --font-terminal: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    /* Legacy system stack kept in case needed for selective overrides */
    --font-system: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-mono: var(--font-terminal);
    
    /* Fluid typography */
    --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.4vw, 1.0rem);
    --text-lg: clamp(1rem, 0.6rem + 0.5vw, 00.5rem);
    --text-xl: clamp(1rem, 1.1rem + 0.2vw, 0.8em);
    --text-2xl: clamp(1rem, 1rem + 1vw, 1.2rem);
    --text-3xl: clamp(1.5rem, 1.2rem + 1.2vw, 1.2rem);
    
    /* Layout */
    --container-max: 1200px;
    --content-max: 65ch;
    --breakpoint: 48rem;
    
    /* Root font sizing */
    --root-font-size: 75%; /* 12px base if browser default is 16px */
}

html { font-size: var(--root-font-size); }

/* Base Typography */
body {
    font-family: var(--font-terminal);
    font-size: var(--text-base);
    line-height: 1.6; /* Increase a bit for smaller base to keep readability */
    letter-spacing: 0.01em;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: var(--space-2);
    letter-spacing: 0.5px; /* Improve readability with monospace headings */
}
/* Terminal aesthetic helper */
.terminal-block {
    background: #111;
    color: #e2e2e2;
    font-family: var(--font-terminal);
    padding: var(--space-2) var(--space-3);
    border-radius: 6px;
    border: 1px solid #333;
    overflow-x: auto;
}

.terminal-block code { font-family: inherit; }


h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-2);
    max-width: var(--content-max);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Hover & focus-visible states */
a:hover,
a:focus-visible {
    color: var(--brand);
    text-decoration: underline;
}

/* Focus styles for accessibility (use :focus-visible to reduce noise) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-2);
}

.content {
    max-width: var(--content-max);
    margin: 0 auto;
}

/* Header & Navigation */
header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Ensure header is always visible */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

nav {
    display: flex;
    align-items: center;
    justify-content: center; /* outer centering; inner grid handles symmetry */
    padding: var(--space-2);
    max-width: var(--container-max);
    margin: 0 auto;
}

.logo {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.logo:hover,
.logo:focus {
    color: var(--accent);
    text-decoration: none;
}

.logo-image {
    height: 32px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--brand);
}

/* Split navigation layout */
.nav-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* left group | logo/spacer | right group */
    align-items: center;
    width: 100%;
    gap: clamp(var(--space-2), 4vw, var(--space-6));
    position: relative;
}
.nav-home .nav-spacer { /* mimic logo width for symmetry */
    width: clamp(160px, 15vw, 240px);
    height: 1px;
}
.nav-logo-placeholder { display:block; width:100%; height:80px; }

.nav-split .logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Increase logo size */
.logo-image {
    height: 80px; /* slightly bigger */
    width: auto;
    transition: transform 0.25s ease;
}
.logo-link:hover .logo-image, .logo-link:focus-visible .logo-image {
    transform: scale(1.03);
}

.nav-group {
    list-style: none;
    display: flex;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
}
/* Align inner groups toward center for precise balance */
.nav-left { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }
.nav-left, .nav-right { display: flex; }

.nav-group a { 
    color: var(--text);
    padding: var(--space-1);
    border-radius: 4px;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-group a:hover,
.nav-group a:focus {
    background-color: var(--bg-alt);
}

/* Better touch targets on mobile */
@media (max-width: 820px) {
    .nav-group a {
        padding: var(--space-1) var(--space-2);
        min-height: 44px; /* iOS recommended touch target */
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Collapse to single column on small screens */
@media (max-width: 820px) {
    nav {
        padding: var(--space-1) 0; /* Only top/bottom padding, no side padding */
    }
    
    .nav-split { 
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); /* Left | Logo | Right - prevent overflow */
        grid-template-rows: auto;
        gap: var(--space-1);
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0 var(--space-2); /* Consistent padding on both sides */
    }
    
    /* Logo in center with proper size */
    .nav-split .logo-link {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        justify-content: center;
        padding: 0 var(--space-1);
        min-width: 0; /* Allow shrinking */
    }
    
    /* Left nav group */
    .nav-left {
        grid-column: 1;
        grid-row: 1;
        display: grid !important;
        grid-template-columns: repeat(2, auto);
        gap: var(--space-1); /* Tighter gap between pairs */
        justify-content: end; /* Align to the right (toward logo) */
        padding-left: var(--space-1); /* Extra padding from screen edge */
    }
    
    /* Right nav group */
    .nav-right {
        grid-column: 3;
        grid-row: 1;
        display: grid !important;
        grid-template-columns: repeat(2, auto);
        gap: var(--space-1); /* Tighter gap between pairs */
        justify-content: start; /* Align to the left (toward logo) */
        padding-right: var(--space-1); /* Extra padding from screen edge */
    }
    
    .nav-group { 
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    /* Each link */
    .nav-group li {
        display: flex;
    }
    
    .logo-image { 
        height: 48px; /* Smaller for iPhone 12 mini and similar small screens */
        width: auto;
        max-width: 100%;
    }
    
    /* Reduce font size on very small screens */
    .nav-group a {
        font-size: 0.85rem;
    }
}

/* ── Hamburger menu (mobile only) ── */
.hamburger-btn {
    display: none; /* hidden on desktop */
}

@media (max-width: 820px) {
    /* Hide the normal split nav on mobile */
    .nav-split {
        display: none !important;
    }

    /* Show a simple header row: hamburger on left, logo truly centred */
    .nav-mobile-bar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        width: 100%;
        padding: var(--space-1) var(--space-3);
    }

    .nav-mobile-bar .nav-mobile-logo {
        grid-column: 2;
        display: flex;
        justify-content: center;
    }

    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: var(--space-1);
        border-radius: 4px;
        width: 40px;
        height: 40px;
    }

    .hamburger-btn span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    /* Animate to X when open */
    .hamburger-btn[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger-btn[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-mobile-logo {
        display: flex;
        align-items: center;
        text-decoration: none;
    }

    .nav-mobile-logo .logo-image {
        height: 48px;
        width: auto;
    }

    /* Dropdown panel */
    .nav-mobile-menu {
        display: none;
        flex-direction: column;
        background: var(--bg);
        border-top: 1px solid var(--border);
        padding: var(--space-2) 0;
        width: 100%;
    }

    .nav-mobile-menu.is-open {
        display: flex;
    }

    .nav-mobile-menu a {
        color: var(--text);
        text-decoration: none;
        padding: var(--space-2) var(--space-4);
        font-size: 1rem;
        border-bottom: 1px solid var(--border);
        display: block;
    }

    .nav-mobile-menu a:last-child {
        border-bottom: none;
    }

    .nav-mobile-menu a:hover,
    .nav-mobile-menu a:focus {
        background: var(--bg-alt);
    }
}

/* On desktop, hide the mobile bar entirely */
@media (min-width: 821px) {
    .nav-mobile-bar {
        display: none;
    }
    .nav-mobile-menu {
        display: none !important;
    }
}

/* Legacy .nav-list kept (if any pages not yet migrated) */
.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-3);
    margin: 0;
}

.nav-list a {
    color: var(--text);
    font-weight: 500;
    padding: var(--space-1);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus {
    background-color: var(--bg-alt);
    text-decoration: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-2);
    }
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: var(--space-4) 0;
}

section {
    margin-bottom: var(--space-6);
    padding: 0 var(--space-2);
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--space-6) var(--space-2); /* reduced vertical padding */
    margin-bottom: var(--space-4); /* tighten gap below hero */
}

.hero h1 {
    color: var(--brand);
    margin-bottom: var(--space-2);
}

/* New visual hero variant */
.hero-visual {
    background: none;
}
.hero-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}
.hero-image {
    width: clamp(160px, 40vw, 320px);
    height: auto;
    display: block;
}
.hero-full { /* slightly less vertical occupancy so text sits higher */
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: flex-start; /* start higher */
    padding-top: var(--space-6);
}

.tagline {
    font-size: var(--text-lg);
    color: var(--text-light);
    max-width: 60ch;
    margin: 0 auto;
}

/* Index-specific content centering */
body.home .highlights,
body.home .newsletter-signup {
    text-align: center;
}
body.home .highlights p,
body.home .newsletter-signup p {
    margin-left: auto;
    margin-right: auto;
}
/* When hero appears later (hero-offset) give it additional top spacing without full viewport height */
.hero-offset {
    padding: var(--space-6) var(--space-2) var(--space-6);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
}
.hero-offset .tagline { margin-top: var(--space-2); }
/* New hero-balanced: moderate top spacing with natural flow */
.hero-balanced {
    /* Further reduced top padding plus external lift */
    padding: var(--space-3, 2rem) var(--space-2) var(--space-6);
    margin-top: -1.75rem; /* lift entire block upward */
    margin-bottom: var(--space-4);
}
@media (min-width: 900px) {
    .hero-balanced { margin-top: -2.5rem; }
}
.hero-balanced .tagline { margin-top: var(--space-2); }

/* Hero banner image refinement */
.hero-figure { margin: 0; }
.hero-banner {
    display: block;
    width: 100%;
    max-width: var(--container-max);
    height: auto;
    margin-left: auto;
    margin-right: auto;
    transform: translateY(-1.5rem); /* stronger upward shift */
}
/* Wide variant placed directly in hero (not constrained by hero-inner) */
.hero-figure-wide { 
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-2);
}
.hero-text { max-width: 640px; margin: 0 auto; }
@media (min-width: 900px) {
    .hero-banner { transform: translateY(-0.75rem); }
}

/* Retired pull-up utilities; now we use positive rhythm spacing */
.pull-up, .pull-up-more { margin-top: 0 !important; }

/* Increase vertical separation between subsequent top sections */
body.home .highlights { margin-top: var(--space-2); margin-bottom: var(--space-5, 2.5rem); }
body.home .newsletter-signup { margin-top: var(--space-4); margin-bottom: var(--space-6); }

/* About page background decorations */
body.about::before,
body.about::after {
    content: '';
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 600px;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: -1; /* Behind content */
    pointer-events: none;
    opacity: 0.6; /* More visible */
}

body.about::before {
    left: 20px;
    background-image: url('../images/decorative/left-bg.svg');
}

body.about::after {
    right: 20px;
    background-image: url('../images/decorative/right-bg.svg');
}

/* Temporarily disable hiding on smaller screens for debugging */
/*
@media (max-width: 1200px) {
    body.about::before,
    body.about::after {
        display: none;
    }
}
*/

/* Hide decorative side images on mobile — they overlap content */
@media (max-width: 820px) {
    body.about::before,
    body.about::after {
        display: none;
    }
}

/* Ripple sketch — upper right corner, desktop only */
.about-ripple-deco {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 380px;
    height: auto;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
}

@media (max-width: 820px) {
    .about-ripple-deco {
        display: none;
    }
}

/* Buttons & CTAs (restyled: white, square, subtle) */
.cta-button {
    display: inline-block;
    background: #fff;
    color: #000;
    padding: 0.5rem 0.75rem; /* slightly smaller */
    border-radius: 0; /* square corners */
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    border: 1px solid #d0d0d0; /* lighter grey border */
    cursor: pointer;
    font-size: var(--text-sm);
    line-height: 1.2;
    margin: 0 0.5rem 0.5rem 0; /* separation when buttons wrap */
}

.cta-button:hover,
.cta-button:focus-visible {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    text-decoration: none;
}

.cta-button:active {
    background: #000;
    color: #fff;
}

/* Maintain accessible focus ring distinct from background change */
.cta-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Grouped listening links and other button clusters */
.link-list {
    list-style: none;
    padding: 0;
    margin: var(--space-3) 0 var(--space-2);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem; /* base gap; margin on button provides larger visual spacing */
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: var(--space-4);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-3);
    transition: box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Release detail page sections */
.card section[data-section] {
    clear: both;
    overflow: visible;
    position: static;
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
}

.card header {
    position: static;
    overflow: visible;
    margin-bottom: var(--space-4);
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    align-items: flex-start;
}

/* News items and read-more functionality */
.news-item time {
    display: block;
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
}

.read-more {
    background: none;
    border: none;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    margin-left: var(--space-1);
}

.read-more:hover,
.read-more:focus {
    color: var(--brand);
}

/* Project cards */
.project-card {
    max-width: 300px;
    justify-self: start;
}

.project-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: var(--space-2);
}

.project-card h3 {
    margin-bottom: var(--space-1);
}

/* Show posters */
.show-card {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

@media (max-width: 640px) {
    .show-card { flex-direction: column; }
}

.show-poster-wrap {
    flex: 0 0 160px;
    max-width: 160px;
}

.show-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
}

.show-meta h3 { margin-top: 0; }

/* Release covers */
.release-card {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

/* Make the entire release card anchor behave like the layout container (progressive enhancement) */
.release-link {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
    border-radius: 6px; /* radius for clearer focus outline shape */
}

.release-link:hover h3,
.release-link:focus-visible h3 {
    text-decoration: underline;
}

.release-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
    text-decoration: none;
}

.release-link:focus-visible .release-cover {
    box-shadow: 0 0 0 3px var(--accent);
}

@media (max-width: 640px) {
    .release-card { flex-direction: column; }
}

.release-cover-wrap {
    flex: 0 0 120px;
    max-width: 120px;
}

.release-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid var(--border);
    background: var(--bg-alt);
}

.release-cover.img-error {
    object-fit: contain;
    background: repeating-conic-gradient(from 45deg, var(--bg-alt) 0deg 15deg, var(--border) 15deg 30deg);
    color: var(--text-light);
    padding: var(--space-2);
}

.release-meta h3 { margin-top: 0; }

/* Shop gallery */
.shop-item {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    max-width: 300px;
    justify-self: start;
}
.shop-category-items, .shop-category-items--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 300px));
    gap: var(--space-4);
    align-items: start;
}
/* Fallback if markup doesn't yet have a wrapper class: target direct children */

.shop-image-wrap {
    margin: var(--space-2) 0 var(--space-2);
    border-radius: 4px;
    background: var(--bg-alt);
    overflow: hidden;
    width: 100%;
}
img.shop-main {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.shop-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.shop-item-content:hover {
    background: var(--bg-alt);
    transition: background-color 0.2s ease;
}

.shop-thumb {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
    line-height: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.shop-thumb:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.shop-thumb img {
    /* Reduced thumbnail size */
    --shop-thumb-width: 56px; /* was 72px */
    --shop-thumb-height: 42px; /* was 54px */
    width: var(--shop-thumb-width);
    height: var(--shop-thumb-height);
    object-fit: cover;
    display: block;
    border-radius: 3px;
}
.shop-thumb:hover, .shop-thumb:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent) inset;
}

/* Contact layout */
.contact-layout {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    align-items: stretch; /* overridden at larger screens for vertical centering */
}
.contact-layout .contact-info,
.contact-layout .newsletter-column {
    flex: 1 1 100%;
}
@media (min-width: 780px) {
    .contact-layout { align-items: center; }
    .contact-layout .contact-info { flex: 1 1 48%; }
    .contact-layout .newsletter-column { flex: 1 1 48%; }
}

@media (max-width: 779px) {
    .contact-layout .contact-info,
    .contact-layout .newsletter-column { flex: 1 1 100%; }
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy loading images below the fold */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    img[loading="lazy"] { transition: none; }
}

@media (max-width: 600px) {
    .shop-category-items, .shop-category-items--grid {
        grid-template-columns: 1fr; /* single column on narrow screens */
    }
}

/* Forms */
.form-group {
    margin-bottom: var(--space-3);
}

label {
    display: block;
    margin-bottom: var(--space-1);
    font-weight: 600;
    color: var(--text);
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: var(--space-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: var(--text-base);
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
}

/* Newsletter form */
.newsletter-form {
    background: var(--bg-alt);
    padding: var(--space-4);
    border-radius: 8px;
    text-align: center;
}

/* Footer */
footer {
    background: var(--bg);
    color: var(--text);
    text-align: left;
    padding: var(--space-3) var(--space-4);
    margin-top: var(--space-6);
    border-top: 1px solid var(--border);
}

footer p {
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
}

.privacy-note {
    color: var(--text-light);
    font-size: var(--text-sm);
}

/* Home logo scroll docking animation (continuous & reversible) */
.logo-scroll-anim { will-change: transform; transform-origin: center center; }
body.logo-docked .nav-home .nav-spacer { width: clamp(120px, 12vw, 160px); }
@media (prefers-reduced-motion: reduce) { .logo-scroll-anim { transition: none !important; } }

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Font scale utilities */
.font-scale-small { font-size: 81.25%; } /* ~13px base */
.font-scale-default { font-size: 100%; }

.text-center { text-align: center; }
.text-light { color: var(--text-light); }

/* Print Styles */
@media print {
    header, footer, nav {
        display: none;
    }
    
    main {
        padding: 0;
    }
    
    a {
        color: var(--brand) !important;
        text-decoration: underline;
    }
}

/* Product Detail Page */
.back-link {
    display: inline-block;
    margin-bottom: var(--space-2);
    color: var(--text-light);
    text-decoration: none;
    font-size: var(--text-sm);
}

.back-link:hover {
    color: var(--brand);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-top: var(--space-3);
    position: relative;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.product-main-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-alt);
}

.product-thumbnails {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.product-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.product-thumb:hover,
.product-thumb.active {
    border-color: var(--brand);
}

.product-info h2 {
    margin-bottom: var(--space-1);
}

.product-price {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--brand);
    margin-bottom: var(--space-2);
}

.product-availability {
    font-size: var(--text-sm);
    color: var(--text-light);
    margin-bottom: var(--space-3);
}

.product-description {
    margin-bottom: var(--space-3);
    line-height: 1.6;
}

.product-materials {
    background: var(--bg-alt);
    padding: var(--space-3);
    border-radius: 8px;
    margin-bottom: var(--space-3);
}

.product-materials h3 {
    margin-bottom: var(--space-2);
    font-size: var(--text-base);
}

.product-materials ul {
    list-style: none;
    padding: 0;
}

.product-materials li {
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--border);
}

.product-materials li:last-child {
    border-bottom: none;
}

.product-purchase {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.purchase-button {
    display: inline-block;
    background: var(--brand);
    color: white;
    padding: var(--space-2) var(--space-3);
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.purchase-button:hover {
    background: var(--brand-dark, #0056b3);
}

.purchase-button:disabled,
.purchase-button.coming-soon {
    background: var(--text-light);
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
}

/* Product Page Layout */
.page-header {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border);
}

.back-link {
    display: inline-block;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.back-link:hover {
    color: var(--brand);
}

#product-title {
    margin: 0;
    font-size: var(--text-3xl);
    color: var(--brand);
}
/* Process dot navigation - subtle easter egg */
.process-dot {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--text);
    border-radius: 50%;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.process-dot:hover,
.process-dot:focus-visible {
    opacity: 0.8;
    transform: translateX(-50%);
}

.process-dot:focus-visible {
    outline: none;
}

/* Process page specific styles */
.process-page {
    background: #000;
    color: #fff;
}

.process-page header {
    background: #000;
}

.process-page nav .nav-group {
    visibility: hidden;
}

.process-page main {
    background: #000;
}

.process-page footer {
    background: #000;
    color: #fff;
    border-top-color: #333;
}

.process-page .page-header h1,
.process-page .page-header p {
    color: #fff;
}

.process-page .text-light {
    color: #999;
}

/* Process page styles */
.process-bookshelf {
    padding: var(--space-4) 0;
}

.bookshelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-3);
}

.process-spine {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.process-spine:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
    border-color: #666;
}

.process-spine-cover {
    width: 100%;
    flex: 0 0 60%;
    object-fit: cover;
    display: block;
}

.process-spine-info {
    padding: var(--space-2);
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.process-spine h3 {
    margin: 0 0 var(--space-1) 0;
    font-size: var(--text-base);
}

.process-spine .text-light {
    font-size: var(--text-sm);
    margin: 0;
}

/* Process video modal */
.process-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.process-modal-content {
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.process-close {
    position: absolute;
    top: -2rem;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
    line-height: 1;
}

.process-close:hover {
    color: var(--accent);
}

.process-video-container {
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--space-3);
}

.process-video-container video {
    width: 100%;
    height: auto;
    display: block;
}

.process-info {
    background: var(--bg);
    padding: var(--space-3);
    border-radius: 8px;
}

.process-info h2 {
    margin-top: 0;
    color: var(--brand);
}

@media (max-width: 768px) {
    .bookshelf-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-3);
    }
    
    .process-modal {
        padding: var(--space-2);
    }
    
    .process-close {
        top: -1.5rem;
        font-size: 1.5rem;
    }
}
