/* ===================================
   RESET & BASE STYLES
   =================================== */

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

:root {
    /* Color Palette - inspired by logo */
    --coral-primary: #FF6B7A;
    --coral-light: #FFB3BA;
    --coral-dark: #E85563;
    --cream: #FAF8F5;
    --linen: #F5F1EC;
    --neutral-light: #E8E4DF;
    --neutral-mid: #9B9690;
    --neutral-dark: #4A4542;
    --white: #FFFFFF;
    
    /* Typography */
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 8px;
    
    /* Animation */
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--neutral-dark);
    background-color: var(--cream);
    background-image: url('images/haus_of_toots_canvas_13ct_512px.png');
    background-repeat: repeat;
    background-size: 512px 500px; /* Crop bottom by making height smaller */
    background-position: 0 0;
    overflow-x: hidden;
    padding-top: 70px; /* Account for fixed top navigation */
}

/* ===================================
   CONTAINER & LAYOUT
   =================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-lg) 0;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--coral-dark);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--neutral-mid);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.highlight {
    color: var(--coral-primary);
    position: relative;
}

/* ===================================
   SCROLL STITCH SIDEBAR
   =================================== */

.stitch-sidebar {
    position: fixed;
    right: 20px;
    top: 0;
    width: 25px;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
}

.stitch-line {
    width: 100%;
    height: 100%;
}

.x-stitch {
    transition: opacity 0.3s ease;
}

.x-stitch line {
    stroke-linejoin: round;
}

#needle {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ===================================
   CURSOR TRAIL
   =================================== */

#cursorCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ===================================
   TOP NAVIGATION
   =================================== */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 107, 122, 0.15);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s var(--transition-smooth);
}

.top-nav.scrolled {
    background: rgba(250, 248, 245, 0.7);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0.75rem var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-brand {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    transition: transform 0.3s var(--transition-smooth);
}

.nav-brand:hover {
    transform: translateY(-2px);
}

.nav-brand-logo {
    height: 42px;
    width: auto;
    display: block;
    margin-bottom: -2px;
}

.nav-brand-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--coral-dark);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: -2px;
}

.nav-brand-subtitle {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--neutral-mid);
    letter-spacing: 0.2px;
    white-space: nowrap;
    line-height: 1.2;
    margin-bottom: 4px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s var(--transition-smooth);
}

.nav-toggle:focus {
    outline: 3px solid var(--coral-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-toggle-icon {
    width: 30px;
    height: 3px;
    background: var(--coral-dark);
    border-radius: 2px;
    transition: all 0.3s var(--transition-smooth);
    transform-origin: center;
}

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

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Medium screens - reduce navigation gap for cleaner spacing */
@media (min-width: 769px) and (max-width: 1200px) {
    .nav-links {
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
    }
    
    .nav-cart-button {
        padding: 0.5rem 0.875rem;
        margin-left: var(--spacing-xs);
    }
}

/* Large screens - slightly reduced gap for optimal spacing */
@media (min-width: 1201px) and (max-width: 1399px) {
    .nav-links {
        gap: 1.25rem;
    }
}

/* Very large screens - maintain comfortable spacing */
@media (min-width: 1400px) {
    .nav-links {
        gap: 1.5rem;
    }
}

.nav-link {
    position: relative;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-dark);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--coral-primary);
    transition: width 0.3s var(--transition-smooth);
}

.nav-link:hover {
    color: var(--coral-primary);
}

.nav-link:hover::after {
    width: calc(100% - 2rem);
}

.nav-link.active {
    color: var(--coral-primary);
    background: rgba(255, 107, 122, 0.1);
}

.nav-link.active::after {
    width: calc(100% - 2rem);
}

/* Nav Cart Button */
.nav-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--coral-primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    white-space: nowrap;
    margin-left: var(--spacing-xs);
}

.nav-cart-button:hover {
    background: var(--coral-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 122, 0.4);
}

.nav-cart-button:active {
    transform: translateY(0);
}

.nav-cart-button svg {
    flex-shrink: 0;
}

.nav-cart-count {
    display: inline;
    font-weight: 600;
}

.nav-cart-count.hidden {
    display: none;
}

/* Tablet and Mobile Navigation (iPad mini and smaller) */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: rgba(250, 248, 245, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 2px solid rgba(255, 107, 122, 0.2);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
        padding: 0;
        gap: 0;
    }
    
    .nav-links.active {
        max-height: 500px;
        padding: var(--spacing-sm) 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem var(--spacing-md);
        text-align: left;
        border-bottom: 1px solid rgba(255, 107, 122, 0.1);
        width: 100%;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-link:hover {
        background: rgba(255, 107, 122, 0.1);
        color: var(--coral-primary);
    }
    
    .nav-cart-button {
        display: flex;
        width: calc(100% - var(--spacing-md) * 2);
        margin: var(--spacing-sm) var(--spacing-md) 0;
        justify-content: center;
        border-top: 1px solid rgba(255, 107, 122, 0.1);
        padding-top: var(--spacing-sm);
        margin-top: var(--spacing-sm);
    }
}

/* Mobile Navigation */
@media (max-width: 640px) {
    body {
        padding-top: 60px;
    }
    
    .nav-container {
        padding: 0.5rem var(--spacing-sm);
    }
    
    .nav-brand {
        align-items: center;
        gap: 0.4rem;
    }
    
    .nav-brand-logo {
        height: 32px;
        margin-bottom: 0;
    }
    
    .nav-brand-text {
        font-size: 1.25rem;
        margin-bottom: 0;
    }
    
    .nav-brand-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0;
    }
    
    .nav-cart-button {
        font-size: 0.875rem;
    }
    
    .nav-cart-button svg {
        width: 16px;
        height: 16px;
    }
}

/* Very small screens - hide subtitle */
@media (max-width: 480px) {
    .nav-brand-subtitle {
        display: none;
    }
    
    .nav-cart-button {
        padding: 0.4rem 0.625rem;
        font-size: 0.8125rem;
    }
    
    .nav-cart-count {
        font-size: 0.8125rem;
    }
}

/* ===================================
   HEADER (legacy styles kept for compatibility)
   =================================== */

.site-header {
    padding: var(--spacing-lg) 0 var(--spacing-md);
    text-align: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.logo {
    width: 200px;
    height: auto;
    display: block;
    transition: transform 0.3s var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.05);
}

.tagline {
    font-size: 1.125rem;
    color: var(--neutral-mid);
    font-weight: 500;
    max-width: 500px;
    margin: 0 auto;
}

/* ===================================
   STITCHED BORDER
   =================================== */

.stitched-border {
    position: relative;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 3px dashed var(--coral-primary);
    overflow: visible;
}

.stitched-border::before,
.stitched-border::after {
    content: '+';
    position: absolute;
    width: 32px;
    height: 32px;
    color: var(--coral-primary);
    font-size: 32px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0.85;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.stitched-border::before {
    top: -18px;
    left: -18px;
}

.stitched-border::after {
    bottom: -18px;
    right: -18px;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    padding: var(--spacing-lg) 0 var(--spacing-md);
    min-height: auto;
    display: flex;
    align-items: center;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-md);
    align-items: center;
    position: relative;
}

.hero-logo-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    transition: transform 0.3s var(--transition-smooth);
}

.hero-logo:hover {
    transform: scale(1.05);
}

.hero-photo-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.hero-hoop {
    width: 240px;
    height: 240px;
    max-width: 100%;
    margin: 0 auto;
}

/* Slightly larger on very wide screens */
@media (min-width: 1400px) {
    .hero-hoop {
        width: 260px;
        height: 260px;
    }
}

.hero-hoop .hero-hoop-ring {
    border: 12px solid #FFB3BA !important;
}

.hero-content-side {
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-sm);
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    width: 100%;
}

/* Mobile photo inside white box - hidden on desktop */
.hero-photo-mobile {
    display: none;
    margin-bottom: var(--spacing-md);
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.hero-text-mobile {
    width: 100%;
}

.hero-hoop-mobile {
    width: 180px;
    height: 180px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--neutral-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.0625rem;
    color: var(--neutral-mid);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
    width: 100%;
}

/* ===================================
   BUTTONS & CTA
   =================================== */

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    background: var(--coral-primary);
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.cta-button.large {
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
}

.cta-button:hover {
    background: var(--coral-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 122, 0.3);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button-secondary {
    background: var(--white);
    color: var(--coral-primary);
    border: 2px solid var(--coral-primary);
}

.cta-button-secondary:hover {
    background: var(--coral-primary);
    color: var(--white);
    border-color: var(--coral-primary);
}

.needle-icon {
    transition: transform 0.3s var(--transition-smooth);
}

.cta-button:hover .needle-icon {
    transform: translateX(4px);
}

/* Needle hover effect */
.needle-hover {
    position: relative;
}

.needle-hover::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid var(--coral-primary);
    border-radius: calc(var(--border-radius) + 2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.needle-hover:hover::before {
    opacity: 1;
    animation: needleTrace 1.5s ease-in-out;
}

@keyframes needleTrace {
    0% {
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    }
    25% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    75% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* ===================================
   ABOUT SECTION
   =================================== */

/* About section uses canvas background inherited from body */

.about-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.about-content .section-title {
    text-align: center;
}

.about-layout {
    overflow: hidden; /* Clear floats */
}

.about-image-wrapper {
    float: right;
    shape-outside: circle(60%);
}

.about-photo {
    margin: 0;
}

.about-text {
    text-align: left;
}

.about-text p {
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-sm);
    font-size: 1.125rem;
    color: var(--neutral-dark);
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--coral-dark);
    font-weight: 600;
}

/* About Cards - Choose Your Adventure Style */
.about-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.about-cards-three {
    grid-template-columns: repeat(3, 1fr);
}

.about-card {
    background: var(--white);
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s var(--transition-smooth);
    border: 2px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(255, 107, 122, 0.15);
    border-color: var(--coral-light);
}

.about-card-header {
    background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-dark) 100%);
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: center;
}

.about-card-header h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.about-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-sm);
    flex: 1;
}

.about-card-content p {
    margin: 0;
    font-size: 1rem;
    color: var(--neutral-dark);
    line-height: 1.6;
}

.card-footnote {
    font-size: 0.8125rem !important;
    color: var(--neutral-mid) !important;
    font-style: italic;
    line-height: 1.5 !important;
    margin-top: -1.5rem !important;
}

.about-card-cta {
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 2px dashed var(--neutral-light);
    font-size: 1rem !important;
}


/* ===================================
   EMBROIDERY HOOP
   =================================== */

.embroidery-hoop {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-hoop {
    width: 240px;
    height: 240px;
}

.gallery-hoop .hoop-ring {
    border-color: #FFB3BA;
}

.hoop-ring {
    position: absolute;
    inset: 0;
    border: 12px solid var(--neutral-dark);
    border-radius: 50%;
    box-shadow: 
        inset 0 0 0 4px var(--linen),
        inset 0 0 0 8px var(--coral-primary),
        0 8px 24px rgba(0, 0, 0, 0.15);
}

.canvas-placeholder {
    width: 85%;
    height: 85%;
    background: var(--cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.canvas-placeholder svg {
    width: 100%;
    height: 100%;
}

.bio-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Rotating Carousel Styles */
.rotating-carousel {
    position: relative;
}

.rotating-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.rotating-image.active {
    opacity: 1;
    position: relative;
}

/* ===================================
   GALLERY SECTION
   =================================== */

.gallery {
    text-align: center;
    background: var(--linen);
    /* Warm canvas texture behind the grid */
    position: relative;
}

.gallery::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('images/haus_of_toots_canvas_13ct_512px.png');
    background-repeat: repeat;
    background-size: 512px 500px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.gallery .container {
    position: relative;
    z-index: 1;
}

/* Gallery Hero Featured Piece - Playing Card Style */
.gallery-hero {
    margin: var(--spacing-lg) auto var(--spacing-xl);
    max-width: 900px;
    position: relative;
    perspective: 1500px;
}

.gallery-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    background: var(--white);
    border-radius: 16px;
    padding: var(--spacing-lg);
    position: relative;
    overflow: visible;
    /* Card depth with layered shadows */
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.06),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.04) inset;
    border: 1px solid rgba(255, 107, 122, 0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    /* Dealing animation ready */
    animation: dealCard 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dealCard {
    0% {
        opacity: 0;
        transform: translateX(-100px) translateY(-20px) rotateY(-15deg) rotateZ(-5deg);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) rotateY(0) rotateZ(0);
    }
}

/* Hover effect - card lifts and tilts */
.gallery-hero-content:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(0, 0, 0, 0.12),
        0 24px 48px rgba(255, 107, 122, 0.12),
        0 0 0 1px rgba(255, 107, 122, 0.15) inset;
}

/* Corner accent marks - minimal */
.gallery-hero-content::before,
.gallery-hero-content::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--coral-primary);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.gallery-hero-content::before {
    top: 12px;
    left: 12px;
    border-right: none;
    border-bottom: none;
}

.gallery-hero-content::after {
    bottom: 12px;
    right: 12px;
    border-left: none;
    border-top: none;
}

.gallery-hero-content:hover::before,
.gallery-hero-content:hover::after {
    opacity: 0.6;
}

.gallery-hero-image {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: var(--cream);
    /* Inner card depth */
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 2px 8px rgba(0, 0, 0, 0.06) inset;
    transition: transform 0.4s ease;
}

.gallery-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Slide in animation for dealing effect */
    animation: slideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gallery-hero-content:hover .gallery-hero-image {
    transform: scale(1.02);
}

.gallery-hero-content:hover .gallery-hero-image img {
    transform: scale(1.05);
}

.gallery-hero-story {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-md);
    /* Subtle inset panel on card */
    background: linear-gradient(135deg, rgba(250, 248, 245, 0.5) 0%, rgba(245, 241, 236, 0.5) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 122, 0.08);
    transition: background 0.3s ease;
}

.gallery-hero-content:hover .gallery-hero-story {
    background: linear-gradient(135deg, rgba(250, 248, 245, 0.8) 0%, rgba(245, 241, 236, 0.8) 100%);
}

.hero-story-label {
    display: none; /* Hidden per user request */
}

.hero-story-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--coral-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

.hero-story-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--coral-dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    opacity: 0;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

.hero-story-text {
    font-size: 0.9375rem;
    color: var(--neutral-dark);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    opacity: 0;
    animation: popIn 0.4s ease-out 0.6s forwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-story-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: var(--spacing-md);
    justify-content: center;
}

/* Card suit inspired navigation */
.hero-story-dot {
    width: 8px;
    height: 8px;
    background: var(--neutral-light);
    border: 2px solid var(--coral-primary);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.4;
}

.hero-story-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid var(--coral-primary);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.hero-story-dot.active {
    background: var(--coral-primary);
    opacity: 1;
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(255, 107, 122, 0.4);
}

.hero-story-dot.active::after {
    opacity: 0.6;
    transform: scale(1.4);
}

.hero-story-dot:hover {
    opacity: 1;
    transform: scale(1.15);
    background: var(--coral-light);
}

/* Hero responsive */
@media (max-width: 768px) {
    .gallery-hero::before {
        inset: -40px;
    }
    
    .gallery-hero-content {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }
    
    .gallery-hero-story {
        padding: var(--spacing-md);
    }
    
    .hero-story-title {
        font-size: 1.5rem;
    }
    
    .hero-story-text {
        font-size: 0.9375rem;
    }
    
    .hero-story-category {
        font-size: 0.75rem;
    }
}

/* Gallery Filter Chips */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) auto;
    max-width: 900px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--white);
    border: 2px solid var(--neutral-light);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-dark);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.filter-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--coral-light) 0%, var(--coral-primary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.filter-chip .chip-label,
.filter-chip .chip-count {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.filter-chip:hover {
    border-color: var(--coral-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 122, 0.2);
}

.filter-chip:hover::before {
    opacity: 0.1;
}

.filter-chip.active {
    background: var(--coral-primary);
    border-color: var(--coral-primary);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(255, 107, 122, 0.35);
}

.filter-chip.active .chip-label,
.filter-chip.active .chip-count {
    color: var(--white);
}

.filter-chip.active::before {
    opacity: 0;
}

.chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    background: var(--neutral-light);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 700;
}

.filter-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Unified Gallery Grid - with subtle masonry stagger */
.gallery-grid-unified {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    padding: 0;
    /* Subtle masonry feel */
    grid-auto-flow: dense;
}

.gallery-item-unified {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: var(--white);
    /* Card depth with layered shadows */
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 4px 8px rgba(0, 0, 0, 0.06),
        0 8px 16px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.03) inset;
    border: 1px solid rgba(255, 107, 122, 0.08);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(20px);
    transform-style: preserve-3d;
}

/* Initially hidden state */
.gallery-item-unified.hidden {
    display: none;
    opacity: 0;
}

/* Subtle staggered offsets for curated feel (5% variation) */
.gallery-item-unified:nth-child(3n+1) {
    transform: translateY(20px) translateX(2px);
}

.gallery-item-unified:nth-child(3n+2) {
    transform: translateY(20px) translateX(-2px);
}

.gallery-item-unified:nth-child(5n+3) {
    transform: translateY(20px) translateX(1px);
}

.gallery-item-unified:nth-child(7n+4) {
    transform: translateY(20px) translateX(-1px);
}

.gallery-item-unified.loaded:nth-child(3n+1) {
    transform: translateY(0) translateX(2px);
}

.gallery-item-unified.loaded:nth-child(3n+2) {
    transform: translateY(0) translateX(-2px);
}

.gallery-item-unified.loaded:nth-child(5n+3) {
    transform: translateY(0) translateX(1px);
}

.gallery-item-unified.loaded:nth-child(7n+4) {
    transform: translateY(0) translateX(-1px);
}

.gallery-item-unified.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover effect - lift and slight tilt */
.gallery-item-unified:hover {
    transform: translateY(-12px) scale(1.03) rotateX(2deg);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.06),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(255, 107, 122, 0.15),
        0 0 0 1px rgba(255, 107, 122, 0.12) inset;
    border-color: rgba(255, 107, 122, 0.2);
    z-index: 10;
}

/* Subtle corner accents */
.gallery-item-unified::before,
.gallery-item-unified::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1.5px solid var(--coral-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item-unified::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.gallery-item-unified::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

.gallery-item-unified:hover::before,
.gallery-item-unified:hover::after {
    opacity: 0.5;
}

.gallery-item-unified:focus {
    outline: 3px solid var(--coral-primary);
    outline-offset: 4px;
}

.gallery-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-item-unified:hover .gallery-item-image {
    transform: scale(1.06);
}

/* Lazy loading placeholder */
.gallery-item-image[data-lazy] {
    background: linear-gradient(
        90deg,
        var(--neutral-light) 0%,
        var(--linen) 50%,
        var(--neutral-light) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Badge for before/after images - card style */
.gallery-item-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    z-index: 4;
    pointer-events: none;
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease;
}

.gallery-item-unified:hover .gallery-item-badge {
    transform: scale(1.05);
}

.gallery-item-badge.before {
    background: linear-gradient(135deg, rgba(155, 150, 144, 0.95) 0%, rgba(74, 69, 66, 0.95) 100%);
    color: var(--white);
}

.gallery-item-badge.after {
    background: linear-gradient(135deg, rgba(255, 107, 122, 0.95) 0%, rgba(232, 85, 99, 0.95) 100%);
    color: var(--white);
}

/* Micro-story caption on hover - card style */
.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm);
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 50%, transparent 100%);
    color: var(--neutral-dark);
    text-align: center;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
    border-top: 1px solid rgba(255, 107, 122, 0.15);
}

.gallery-item-caption-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--coral-dark);
    margin-bottom: 2px;
    line-height: 1.2;
}

.gallery-item-caption-subtitle {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--neutral-mid);
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gallery-item-unified:hover .gallery-item-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Legacy category label */
.gallery-item-category {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-item-unified:hover .gallery-item-category {
    opacity: 1;
    transform: translateY(0);
}

/* Legacy gallery styles */
.gallery-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) auto 0;
    align-items: start; /* Prevent grid from stretching cards */
    max-width: 90%;
}

.gallery-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s var(--transition-smooth);
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: auto; /* Allow natural height */
    align-self: start; /* Prevent stretching */
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(255, 107, 122, 0.15);
    border-color: var(--coral-light);
}

.gallery-card:focus {
    outline: 3px solid var(--coral-primary);
    outline-offset: 4px;
}

.gallery-card[aria-expanded="true"] {
    border-color: var(--coral-primary);
    box-shadow: 0 8px 32px rgba(255, 107, 122, 0.25);
}

.gallery-card-header {
    background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-dark) 100%);
    padding: var(--spacing-sm) var(--spacing-sm);
    text-align: center;
}

.gallery-card-header h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-card-preview {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.gallery-preview-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    box-shadow: none;
    margin: 0;
}

.gallery-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-preview-text {
    font-size: 1rem;
    color: var(--neutral-dark);
    font-weight: 500;
    margin: 0;
    padding: var(--spacing-sm) var(--spacing-sm);
    text-align: center;
    transition: color 0.3s ease;
    line-height: 1.5;
}

.gallery-preview-text strong {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--coral-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.gallery-action-text {
    font-size: 0.875rem;
    color: var(--neutral-mid);
    font-weight: 400;
}

.gallery-card:hover .gallery-preview-text {
    color: var(--neutral-dark);
}

.gallery-card:hover .gallery-preview-text strong {
    color: var(--coral-primary);
}

.gallery-card[aria-expanded="true"] .gallery-preview-text strong {
    color: var(--coral-dark);
    font-weight: 700;
}

/* Thumbnail Grid */
.gallery-card-thumbnails {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 var(--spacing-md);
    background: var(--linen);
}

.gallery-card[aria-expanded="true"] .gallery-card-thumbnails {
    max-height: 1000px;
    padding: var(--spacing-md);
    border-top: 2px dashed var(--coral-light);
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-sm);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.thumbnail-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.thumbnail-item:hover {
    transform: scale(1.05) translateZ(0);
    border-color: var(--coral-primary);
    box-shadow: 0 4px 16px rgba(255, 107, 122, 0.3);
    z-index: 1;
}

.thumbnail-item:focus {
    outline: 3px solid var(--coral-primary);
    outline-offset: 2px;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    filter: blur(0.3px);
    -webkit-filter: blur(0.3px);
}

/* Top-align images in customization gallery (stockings only) */
.gallery-card[data-gallery="customizations"] .gallery-preview-image img[src*="Stocking"],
.gallery-card[data-gallery="customizations"] .thumbnail-item img.stocking-image,
.gallery-card[data-gallery="customizations"] .thumbnail-item img[src*="Stocking"],
.gallery-card[data-gallery="customizations"] .thumbnail-item img[src*="stocking"] {
    object-position: top !important;
}

/* Before/After Badges */
.before-after-badge::after {
    content: attr(data-badge);
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    pointer-events: none;
}

.before-after-badge[data-badge="Before"]::after {
    background: linear-gradient(135deg, #9B9690 0%, #4A4542 100%);
    color: var(--white);
}

.before-after-badge[data-badge="After"]::after {
    background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-dark) 100%);
    color: var(--white);
}

/* Badges for thumbnails - container needs relative positioning */
.thumbnail-item.before-after-badge {
    position: relative;
}

.thumbnail-item.before-after-badge::after {
    top: 6px;
    right: 6px;
    padding: 3px 8px;
    font-size: 0.65rem;
}

/* Badges for rotating carousel preview images - parent container provides positioning context */
.gallery-preview-image .rotating-image.before-after-badge::after {
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    font-size: 0.8rem;
}

/* Ensure rotating images with badges maintain their positioning */
.rotating-image.before-after-badge {
    position: absolute;
}

.rotating-image.before-after-badge.active {
    position: relative;
}

/* Legacy gallery styles for compatibility */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    justify-items: center;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item:focus {
    outline: 3px solid var(--coral-primary);
    outline-offset: 4px;
    border-radius: var(--border-radius);
}

.gallery-caption {
    font-size: 1rem;
    color: var(--neutral-dark);
    font-weight: 700;
}

/* ===================================
   HOW IT WORKS SECTION
   =================================== */

.how-it-works {
    text-align: center;
}

.how-it-works .section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.steps-list {
    max-width: 850px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.step-item {
    transition: all 0.3s var(--transition-smooth);
}

.step-card {
    background: var(--white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s var(--transition-smooth);
    border: 2px solid transparent;
}

.step-card:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 24px rgba(255, 107, 122, 0.15);
    border-color: var(--coral-light);
}

.step-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--coral-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(255, 107, 122, 0.35);
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--coral-dark);
    margin: 0;
    line-height: 1.3;
}

.step-description {
    font-size: 1.0625rem;
    color: var(--neutral-dark);
    line-height: 1.7;
    margin: 0 0 0 calc(44px + var(--spacing-md));
}

/* ===================================
   REQUEST SECTION
   =================================== */

/* Request section uses canvas background inherited from body */

.request-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.request-description {
    font-size: 1.125rem;
    color: var(--neutral-mid);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.contact-note {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 2px dashed var(--neutral-light);
}

.contact-note p {
    color: var(--neutral-mid);
    font-size: 1rem;
}

.instagram-link {
    color: var(--coral-primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.instagram-link:hover {
    border-bottom-color: var(--coral-primary);
}

/* ===================================
   FOOTER
   =================================== */

.site-footer {
    background: var(--neutral-dark);
    color: var(--cream);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--cream);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--coral-light);
}

.footer-divider {
    color: var(--neutral-mid);
}

.footer-social {
    margin-bottom: var(--spacing-sm);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--cream);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--coral-primary);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--coral-primary);
    transform: translateY(-2px);
}

.social-link svg {
    flex-shrink: 0;
}

.footer-credits {
    color: var(--neutral-light);
}

.footer-credits p {
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.heart {
    color: var(--coral-primary);
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20% { transform: scale(0.95); }
}

.copyright {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Gallery responsive adjustments */
@media (max-width: 1024px) {
    .gallery-grid-unified {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .filter-chip {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 768px) {
    .gallery-filters {
        gap: var(--spacing-xs);
        margin: var(--spacing-md) auto;
    }
    
    .filter-chip {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .chip-count {
        min-width: 1.25rem;
        height: 1.25rem;
        font-size: 0.75rem;
    }
    
    .gallery-grid-unified {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--spacing-xs);
    }
    
    .gallery-item-badge {
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 0.625rem;
    }
}

@media (max-width: 640px) {
    .gallery-grid-unified {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* ===================================
   DESKTOP (> 1024px)
   =================================== */
@media (min-width: 1025px) {
    /* Desktop: show original photo outside white box */
    .hero-photo-mobile {
        display: none;
    }
    
    .hero-photo-side {
        display: flex;
    }
    
    /* Desktop: 3-column grid layout */
    .hero-layout {
        grid-template-columns: 1fr 1fr 1fr;
        gap: var(--spacing-md);
    }
}

/* Gradually reduce margins before breakpoint for smoother transition */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-logo-side {
        padding: var(--spacing-sm);
    }
    
    .hero-content-side {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-photo-side {
        padding: var(--spacing-sm);
    }
    
    .hero-layout {
        gap: var(--spacing-md);
    }
    
    /* Allow logo to shrink slightly before breakpoint */
    .hero-logo {
        max-width: 300px;
    }
}

/* ===================================
   TABLET - iPad & iPad Mini (768px - 1024px)
   =================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Tablet: show photo inside white box, hide original photo */
    .hero-photo-mobile {
        display: flex;
    }
    
    .hero-photo-side {
        display: none;
    }
    
    /* Tablet: single column layout */
    .hero-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .hero-logo-side {
        order: 1;
    }
    
    .hero-content-side {
        order: 2;
        padding: 0;
    }
    
    .hero-photo-side {
        order: 3;
    }
    
    /* Tablet: center the white box and prevent cutoff */
    .container {
        overflow: visible;
        /* Add extra padding to account for 3px border on each side */
        padding: 0 calc(var(--spacing-sm) + 33px);
        box-sizing: border-box;
    }
    
    .hero-content-side {
        padding: 0;
        overflow: visible;
        width: 100%;
        box-sizing: border-box;
    }
    
    .stitched-border {
        margin: 0 auto;
        padding: var(--spacing-sm);
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    /* Tablet: side-by-side layout with left-justified text */
    .hero-content {
        display: flex;
        align-items: center;
        gap: var(--spacing-lg);
        text-align: left;
    }
    
    .hero-photo-mobile {
        margin-bottom: 0;
        margin-right: 0;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    
    .hero-text-mobile {
        flex: 0 1 auto;
        max-width: 400px;
        text-align: left;
    }
    
    .hero-title {
        text-align: left;
        margin-bottom: var(--spacing-xs);
    }
    
    .hero-description {
        text-align: left;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-buttons {
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .hero-hoop-mobile {
        width: 260px;
        height: 260px;
    }
    
    .hero-logo {
        max-width: 280px;
    }
    
    .hero-logo-side {
        padding: var(--spacing-xs);
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-sm) 0;
    }
    
    .hero-layout {
        gap: var(--spacing-sm);
    }
    
    /* Reduce section padding for iPad mini to show more content on load */
    section {
        padding: var(--spacing-md) 0;
    }
    
    .about {
        padding: var(--spacing-md) 0;
    }
    
    .about-cards {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-cards-three {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   MOBILE (< 768px)
   =================================== */
@media (max-width: 767px) {
    /* Mobile: show photo inside white box, hide original photo */
    .hero-photo-mobile {
        display: flex;
    }
    
    .hero-photo-side {
        display: none;
    }
    
    /* Mobile: single column layout */
    .hero-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .hero-logo-side {
        order: 1;
    }
    
    .hero-content-side {
        order: 2;
        padding: 0;
        display: flex;
        justify-content: center;
    }
    
    .hero-photo-side {
        order: 3;
    }
    
    /* Mobile: center the white box */
    .container {
        overflow: visible;
        /* Add extra padding to account for 3px border on each side */
        padding: 0 calc(var(--spacing-sm) + 3px);
        box-sizing: border-box;
    }
    
    .hero-content-side {
        overflow: visible;
        width: 100%;
        box-sizing: border-box;
    }
    
    .stitched-border {
        margin: 0 auto;
        padding: var(--spacing-md);
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    /* Mobile: stacked layout with centered text */
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .hero-photo-mobile {
        margin-bottom: var(--spacing-sm);
        margin-right: 0;
    }
    
    .hero-text-mobile {
        text-align: center;
    }
    
    .hero-title {
        text-align: center;
        margin-bottom: var(--spacing-xs);
    }
    
    .hero-description {
        text-align: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-buttons {
        align-items: center;
    }
    
    .hero-hoop-mobile {
        width: 200px;
        height: 200px;
    }
    
    .hero-logo {
        max-width: 280px;
    }
    
    .hero-logo-side {
        padding: var(--spacing-xs);
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-md) 0;
    }
    
    .hero-layout {
        gap: var(--spacing-sm);
    }
    
    .gallery-cards {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .stitch-sidebar {
        right: 10px;
        width: 17px;
    }
    
    .about-cards {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-cards-three {
        grid-template-columns: 1fr;
    }
    
    /* About page: stack image and text on mobile */
    .about-image-wrapper {
        float: none;
        margin: 0 auto var(--spacing-md);
        text-align: center;
    }
    
    .about-layout {
        display: flex;
        flex-direction: column;
    }
    
    /* Additional refinements for very small mobile screens */
    @media (max-width: 640px) {
        :root {
            --spacing-lg: 3rem;
            --spacing-xl: 4rem;
        }
        
        .hero-logo {
            max-width: 220px;
        }
        
        .stitched-border {
            padding: var(--spacing-md);
        }
        
        .hero-content,
        .request-content {
            padding: 0;
        }
        
        .hero-description {
            margin-bottom: var(--spacing-sm);
        }
        
        .hero-title {
            margin-bottom: var(--spacing-xs);
        }
        
        .thumbnails-grid {
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        }
        
        .step-card {
            padding: var(--spacing-md);
        }
        
        .step-card:hover {
            transform: translateX(4px);
        }
        
        .step-title {
            font-size: 1.25rem;
        }
        
        .step-number {
            width: 38px;
            height: 38px;
            font-size: 1.125rem;
        }
        
        .step-description {
            margin-left: 0;
            margin-top: var(--spacing-sm);
            font-size: 1rem;
        }
        
        .embroidery-hoop {
            width: 220px;
            height: 220px;
        }
        
        .gallery-hoop {
            width: 200px;
            height: 200px;
        }
        
        .hero-hoop-mobile {
            width: 180px;
            height: 180px;
        }
        
        .cta-button {
            width: 100%;
            justify-content: center;
            font-size: 1rem;
            padding: 0.875rem 1.5rem;
            white-space: nowrap;
        }
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

/* Fade in on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===================================
   LIGHTBOX
   =================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: var(--spacing-md);
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    font-family: var(--font-display);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: var(--coral-primary);
    color: var(--white);
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    line-height: 1;
    padding: 0;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--coral-dark);
    transform: scale(1.1);
}

.lightbox-close:focus,
.lightbox-prev:focus,
.lightbox-next:focus {
    outline: 3px solid var(--coral-light);
    outline-offset: 3px;
}

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

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Lightbox Badge */
.lightbox-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10002;
    pointer-events: none;
}

.lightbox-badge[data-type="before"] {
    background: linear-gradient(135deg, #9B9690 0%, #4A4542 100%);
    color: var(--white);
}

.lightbox-badge[data-type="after"] {
    background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-dark) 100%);
    color: var(--white);
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .lightbox-caption {
        font-size: 1rem;
    }
    
    .lightbox-badge {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* ===================================
   EMAIL LINK STYLING
   =================================== */

.about-text a[href^="mailto:"],
.about-card a[href^="mailto:"] {
    position: relative;
    display: inline;
    color: var(--coral-primary);
    font-weight: 700;
    text-decoration: none;
    padding: 0.15rem 0.25rem;
    background: linear-gradient(
        90deg,
        var(--coral-light) 0%,
        var(--coral-primary) 25%,
        var(--coral-dark) 50%,
        var(--coral-primary) 75%,
        var(--coral-light) 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: threadShimmer 3s ease-in-out infinite;
    border-radius: 6px;
    transition: all 0.3s ease;
}

@keyframes threadShimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.about-text a[href^="mailto:"]::before,
.about-card a[href^="mailto:"]::before {
    content: '✉️';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.about-text a[href^="mailto:"]::after,
.about-card a[href^="mailto:"]::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 14px;
    pointer-events: none;
}

.about-text a[href^="mailto:"]:hover,
.about-card a[href^="mailto:"]:hover {
    transform: translateY(-3px) scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(255, 107, 122, 0.4));
    animation: threadShimmer 1.5s ease-in-out infinite, emailBounce 0.6s ease;
}

.about-text a[href^="mailto:"]:hover::before,
.about-card a[href^="mailto:"]:hover::before {
    opacity: 1;
    left: -35px;
    animation: envelopeFloat 2s ease-in-out infinite;
}

/* Container for the stitch SVG */
.email-stitch-container {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 14px;
    pointer-events: none;
    overflow: visible;
}

.email-stitch-container svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

@keyframes emailBounce {
    0%, 100% { transform: translateY(-3px) scale(1.05); }
    25% { transform: translateY(-5px) scale(1.08); }
    50% { transform: translateY(-3px) scale(1.05); }
    75% { transform: translateY(-5px) scale(1.08); }
}

@keyframes envelopeFloat {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    25% { transform: translateY(-55%) rotate(-5deg); }
    75% { transform: translateY(-45%) rotate(5deg); }
}

/* Active/Focus state */
.about-text a[href^="mailto:"]:active,
.about-card a[href^="mailto:"]:active {
    transform: translateY(-1px) scale(1.02);
}

.about-text a[href^="mailto:"]:focus,
.about-card a[href^="mailto:"]:focus {
    outline: 3px dashed var(--coral-primary);
    outline-offset: 6px;
}

/* Mobile adjustments for email link */
@media (max-width: 640px) {
    .about-text a[href^="mailto:"]::before,
    .about-card a[href^="mailto:"]::before {
        left: -25px;
        font-size: 1em;
    }
    
    .about-text a[href^="mailto:"]:hover::before,
    .about-card a[href^="mailto:"]:hover::before {
        left: -28px;
    }
}

/* ===================================
   OTHER INLINE LINKS (like inquiry form)
   =================================== */

.about-text a:not([href^="mailto:"]),
.about-card a:not([href^="mailto:"]) {
    position: relative;
    display: inline;
    color: var(--coral-primary);
    font-weight: 600;
    text-decoration: none;
    padding: 0;
    background: linear-gradient(
        90deg,
        var(--coral-light) 0%,
        var(--coral-primary) 25%,
        var(--coral-dark) 50%,
        var(--coral-primary) 75%,
        var(--coral-light) 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: threadShimmer 3s ease-in-out infinite;
    transition: all 0.3s ease;
}


.about-text a:not([href^="mailto:"]):hover,
.about-card a:not([href^="mailto:"]):hover {
    animation: threadShimmer 1.5s ease-in-out infinite;
}

.about-text a:not([href^="mailto:"]):focus,
.about-card a:not([href^="mailto:"]):focus {
    outline: 2px solid var(--coral-primary);
    outline-offset: 4px;
}

/* Print styles */
@media print {
    .stitch-sidebar,
    #cursorCanvas,
    .carousel-nav,
    .carousel-dots,
    .lightbox {
        display: none;
    }
}

