:root {
    --bg: #0a0a0a;
    --card-bg: #111111;
    --text-main: #e0e0e0;
    --text-muted: #666666;
    --accent: #9f7aea;
    --border: #333333;
    --gold: #d69e2e;
    --highlight: #ffffff;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    position: relative;
}

@keyframes gentleSway {
    0%, 100% {
        transform: translate(0, 0) scale(1.05);
    }
    25% {
        transform: translate(1%, -0.5%) scale(1.05) rotate(0.2deg);
    }
    50% {
        transform: translate(0.5%, 0.5%) scale(1.05) rotate(-0.1deg);
    }
    75% {
        transform: translate(-0.5%, -0.3%) scale(1.05) rotate(0.15deg);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Background pattern - FIXED PATH */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../content/img/larkspur_flowers.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    filter: brightness(0.4);
    z-index: -1;
    pointer-events: none;
    will-change: transform;
    animation: gentleSway 20s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none;
        transform: scale(1.05);
    }
    
    @keyframes slideIn {
        from {
            opacity: 1;
            transform: translateX(0);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    body::before {
        animation-duration: 30s;
    }
}

.container {
    width: 100%;
    max-width: 600px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.flower {
    color: var(--accent);
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.project-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--highlight);
}

.grid-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
}

.spec-key {
    color: var(--text-muted);
}

.spec-val {
    color: var(--text-main);
}

.btn {
    display: block;
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.1s, color 0.1s;
    cursor: pointer;
    font-family: "Courier New", Courier, monospace;
}

.btn:hover {
    background: var(--text-main);
    color: var(--bg);
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg);
    border: 1px solid var(--text-main);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-main);
}

.footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    display: flex;
    gap: 1rem;
}

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

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

.section-title {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

/* Gallery Grid - Desktop */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1.5rem;
}

.gallery-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    border: 1px solid var(--border);
    background: #1a1a1a;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s;
    object-fit: contain;
    display: block;
}

.gallery-img:hover {
    border-color: var(--accent);
}

/* Mobile Carousel */
.carousel-wrapper {
    display: none;
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #1a1a1a;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    touch-action: pan-y;
}

.carousel-slide {
    width: 100%;
    aspect-ratio: 1/1;
    animation: slideIn 0.3s ease-out forwards;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.carousel-counter {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 10px;
    padding: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: all 0.2s;
    border: none;
    padding: 0;
}

.modal-nav:hover {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
}

.modal-nav.prev {
    left: -70px;
}

.modal-nav.next {
    right: -70px;
}

.modal-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 0.9rem;
    text-align: center;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    white-space: nowrap;
}

.modal-counter {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 0.8rem;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
}

.modal-close {
    position: absolute;
    top: -60px;
    right: 0;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: none;
}

.modal-close:hover {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
}

.box-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: #ccc;
}

.box-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.box-list li:last-child {
    border-bottom: none;
}

/* Home Page Specific Styles */
.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
    opacity: 0;
}

.delay-2 {
    animation-delay: 0.2s;
    opacity: 0;
}

.delay-3 {
    animation-delay: 0.3s;
    opacity: 0;
}

.delay-4 {
    animation-delay: 0.4s;
    opacity: 0;
}

.motto {
    text-align: center;
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.section {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.section-icon {
    color: var(--accent);
}

.section-content {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.6;
}

.section-content p {
    margin-bottom: 0.8rem;
}

.section-content p:last-child {
    margin-bottom: 0;
}

.docs-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}

.docs-section .section-title {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.highlight-box {
    background: #0f0f0f;
    border-left: 3px solid var(--accent);
    padding: 1rem;
    margin: 1rem 0;
}

.highlight-box strong {
    color: var(--text-main);
}

/* Product Carousel - Home Page (Desktop + Mobile) */
.product-carousel-wrapper {
    display: block;
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.product-carousel-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.product-carousel-link:hover .product-carousel-container {
    border-color: var(--accent);
}

.product-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #1a1a1a;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    touch-action: pan-y;
    aspect-ratio: 1/1;
}

.product-carousel-slide {
    width: 100%;
    height: 100%;
    animation: slideIn 0.3s ease-out forwards;
}

.product-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-carousel-counter {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 10px;
    padding: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .motto {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    /* Show carousel on mobile, hide grid */
    .carousel-wrapper {
        display: block;
    }

    .gallery-grid {
        display: none;
    }

    .modal-nav {
        display: none;
    }

    .modal-close {
        top: -50px;
    }

    .modal-counter {
        top: -50px;
    }

    .modal-caption {
        bottom: -50px;
        font-size: 0.8rem;
    }

    .modal-img {
        max-height: 85vh;
    }

    .modal-content {
        max-width: 100vw;
        max-height: 100vh;
    }

    .box-list li {
        flex-direction: column;
        gap: 0.3rem;
    }

    .box-list li span:last-child {
        font-size: 0.8rem;
    }

    .product-name {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 10px;
    }
}

