/* Custom styles for Colour Constructor website */

@font-face {
    font-family: 'Archive';
    src: url('./Archive.otf') format('opentype'),
         url('./Archive.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #DFCB57;
    --primary-dark: #B8941E;
    --secondary-color: #00ff88;
    --accent-purple: #8844ff;
    --accent-cyan: #00d4ff;
    --accent-green: #44ff44;
    --dark-bg: #0a0a0a;
    --darker-bg: #1a1a1a;
    --card-bg: #2a2a2a;
    --text-light: #f5f5f5;
    --text-muted: #999;
}

* {
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--dark-bg) !important;
    color: var(--text-light);
    line-height: 1.6;
}

/* Typography improvements */
.title, h1, h2, h3, h4, h5, h6 {
    font-family: 'Archive', 'Inter', 'Arial', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: -0.02em;
}

/* Force Archive font on specific elements */
.title.is-1, .title.is-2, .title.is-3, .title.is-4, .title.is-5 {
    font-family: 'Archive', monospace !important;
    font-weight: normal !important;
}

/* Main hero title inherits from above */

/* Hero title styling with drop shadows */
.title.is-1 span {
    font-family: 'Archive', monospace !important;
}

.title.is-1 span:nth-child(1) {
    color: white !important;
    text-shadow: 0 3px 0 #7F7F7F;
}

.title.is-1 span:nth-child(2) {
    color: var(--primary-color) !important;
    text-shadow: 0 3px 0 #746227;
}

.title.is-1 span:nth-child(3) {
    color: var(--accent-cyan) !important;
    text-shadow: 0 3px 0 #006A7F;
}

.subtitle {
    font-weight: 400;
    opacity: 0.9;
}

/* Enhanced navbar */
.navbar.is-dark {
    background-color: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-item {
    font-weight: 500;
}

/* Logo styling */
.navbar-logo {
    height: 40px;
    max-height: 40px;
    width: auto;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.navbar-brand .navbar-item {
    padding: 0.5rem 0.75rem;
}

/* Hero section enhancements */
.hero {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        /* Dithering noise pattern */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E"),
        /* Gradient lights */
        radial-gradient(circle at 25% 25%, rgba(223, 203, 87, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(136, 68, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-body {
    position: relative;
    z-index: 1;
}

/* Enhanced buttons */
.button.is-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: #000 !important;
}

.button.is-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(223, 203, 87, 0.4);
    color: #000 !important;
}

.button.is-secondary {
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-cyan));
    border: none;
    font-weight: 600;
    color: #000;
}

.button.is-outlined.is-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    background: transparent;
    font-weight: 500;
}

.button.is-outlined.is-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Enhanced cards */
.box {
    background-color: var(--card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.box:hover {
    /* Remove hover effects for non-interactive elements */
}

.card {
    background-color: var(--card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    /* Remove hover effects for non-interactive elements */
}

/* Section spacing */
.section {
    padding: 4rem 1.5rem;
}

/* Documentation content section spacing */
.content > div {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content > div:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Major section headers */
.content h2.title {
    margin-top: 0;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

/* Add more spacing between color picker sections */
.color-picking .columns {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.color-picking .columns:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Menu styling for documentation */
.menu-label {
    color: var(--text-muted) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.menu-list a {
    color: var(--text-muted) !important;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.menu-list a:hover,
.menu-list a.is-active {
    background-color: rgba(0, 209, 178, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Content styling */
.content h2, .content h3 {
    margin-top: 2rem;
}

.content h2:first-child {
    margin-top: 0;
}

.content ul, .content ol {
    margin-left: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* FAQ text should be lighter */
.content p {
    color: var(--text-light) !important;
}

/* List item styling */
.content li {
    color: var(--text-light) !important;
}

.content li strong {
    color: var(--text-light) !important;
    font-weight: 600;
}

/* Box text styling */
.box p {
    color: var(--text-light) !important;
}

.box p strong {
    color: var(--text-light) !important;
}

/* Content paragraph styling */
.content > p {
    color: var(--text-light) !important;
}

.content > p strong {
    color: var(--text-light) !important;
}

/* Content section paragraph styling */
.content div p {
    color: var(--text-light) !important;
}

.content div p strong {
    color: var(--text-light) !important;
}

/* Code styling */
kbd {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text-light);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    padding: 2px 6px;
}

/* Footer */
.footer {
    background-color: var(--dark-bg) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-body {
        text-align: center;
    }

    .buttons {
        justify-content: center;
    }

    .hero .column:first-child {
        order: 2;
    }

    .hero .column:last-child {
        order: 1;
        margin-bottom: 2rem;
    }
}

/* Image styling */
.image img {
    max-width: 100%;
    height: auto;
}

/* Screenshot gallery */
.card-image {
    overflow: hidden;
}

.card-image img {
    transition: transform 0.3s ease;
    cursor: pointer;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.card-image:hover img {
    transform: none;
}

.card-content {
    background-color: var(--card-bg) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive image sizing */
@media (max-width: 768px) {
    .card-image {
        margin-bottom: 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Link styling */
a.has-text-primary {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

a.has-text-primary:hover {
    border-bottom-color: var(--primary-color);
}

/* Enhanced primary color */
.has-text-primary {
    color: var(--primary-color) !important;
}

.is-primary {
    background-color: var(--primary-color) !important;
}

/* Loading animation for images */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.box, .card {
    animation: fadeIn 0.6s ease-out;
}

/* Focus styles for accessibility */
.button:focus,
.navbar-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Hero Carousel Styles */
.hero-media-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 2rem auto 4rem auto;
}

.hero-carousel {
    position: relative;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

.carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--darker-bg);
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.media-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-container img,
.media-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: white;
    padding: 1.5rem 1rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 400;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-slide.active .slide-caption {
    opacity: 0.9;
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-carousel:hover .carousel-controls {
    opacity: 1;
}

.carousel-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: auto;
    user-select: none;
    font-weight: bold;
    padding: 0;
    margin: 0;
    position: relative;
}

.carousel-prev::after {
    content: "◀";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
}

.carousel-next::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
}

.carousel-btn:hover {
    background: black;
    color: #fff;
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-play-pause {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #000;
    font-size: 0.8rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.7;
}

.hero-carousel:hover .carousel-play-pause {
    opacity: 1;
}

.carousel-play-pause:hover {
    background: white;
    transform: translateX(50%) scale(1.1);
}

/* Carousel Dots */
.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(223, 203, 87, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: block;
    padding: 0;
    margin: 0;
    min-width: 4px;
    min-height: 4px;
}

.carousel-dot:hover {
    background: rgba(223, 203, 87, 0.8);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.5);
}

/* Loading state */
.carousel-slide[data-loading="true"] .media-container {
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide[data-loading="true"] .media-container::after {
    content: '⟳';
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.5);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive carousel */
@media (max-width: 1024px) {
    .hero-media-section {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-media-section {
        width: 100%;
        max-width: 100%;
    }

    .carousel-container {
        aspect-ratio: 4/3;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .carousel-controls {
        padding: 0 0.5rem;
    }

    .slide-caption {
        padding: 1.5rem 1rem 0.75rem;
        font-size: 0.8rem;
    }

    .carousel-play-pause {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
        bottom: -40px;
        right: 50%;
        transform: translateX(50%);
    }
}

/* Smooth entrance animation */
.hero-carousel {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sticky sidebar navigation */
.documentation-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

/* Menu section styling */
.menu-section {
    margin-bottom: 1rem;
}

/* Collapsible menu styling */
.menu-toggle {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.menu-toggle .menu-label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-toggle-icon {
    transition: transform 0.3s ease;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.menu-toggle.collapsed .menu-toggle-icon {
    transform: rotate(-90deg);
}

.menu-content {
    transition: all 0.3s ease;
    overflow: hidden;
    margin-left: 0.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 0.75rem;
}

.menu-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

.menu-content:not(.collapsed) {
    max-height: 500px;
    opacity: 1;
    margin-bottom: 0.5rem;
}

/* Smooth scrolling for menu links */
.menu-list a {
    scroll-margin-top: 2rem;
}

/* Mobile responsiveness for sidebar */
@media (max-width: 768px) {
    .documentation-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }

    .menu-toggle {
        display: flex;
    }
}