/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --transition-speed: 0.3s;
}

body {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    background-color: #ffffff;
    color: #000000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 20px 20px 20px;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
    background-color: #000000;
    color: #ffffff;
}

body.dark .logo {
    filter: invert(1);
}

body.dark .contact-button {
    background-color: #ffffff;
    color: #000000;
}

body.dark .contact-info {
    background-color: #ffffff;
}

body.dark .email-link {
    color: #000000;
}

body.dark .product-tab.active {
    background-color: #ffffff;
}


/* Container */
.container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

/* Header and Logo */
header {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding: 2rem 2rem 0 2rem;
}

.logo-container {
    padding: 0;
    margin-left: -8px;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

.logo-container:hover {
    opacity: 0.8;
}

.logo-container:active {
    opacity: 0.6;
}

.logo {
    width: 72px;
    height: 72px;
    display: block;
}

/* Main Content */
main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 0 2rem;
}

.content {
    margin: 52px 0 32px;
    max-width: 800px;
    width: 100%;
    text-align: left;
}

.description {
    font-size: 22px;
    line-height: 1.8;
    letter-spacing: 0.5px;
    font-weight: 400;
    margin: 0;
    padding: 0;
}

/* Contact Button and Flip Effect */
.contact-wrapper {
    margin-top: 20px;
    perspective: 1000px;
    width: 100%;
    max-width: 100%;
}

.flip-container {
    width: 350px;
    height: 45px;
    position: relative;
}

.flip-container.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.flip-back {
    transform: rotateY(180deg);
}

.contact-button {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 15px 40px 15px 15px;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 100%;
    height: 100%;
    text-transform: none;
    text-align: left;
}

.contact-button:hover {
    transform: scale(1.02);
}

.contact-button:active {
    transform: scale(0.98);
}

.contact-info {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #000000;
    border-radius: 4px;
    padding: 15px 20px 15px 15px;
    box-sizing: border-box;
}

.email-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 1px;
    transition: opacity 0.2s ease;
    display: block;
    width: 100%;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.email-link:hover {
    opacity: 0.8;
}

/* Product Tabs */
.product-tabs-wrapper {
    margin-top: 54px;
    width: 100%;
}

.product-tabs {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 350px;
}

.product-tab {
    width: 45px;
    height: 45px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed), transform 0.2s ease;
    outline: none;
}

.product-tab:hover {
    transform: scale(1.05);
}

.product-tab:active {
    transform: scale(0.95);
}

.product-tab.active {
    background-color: #000000;
    transition: background-color var(--transition-speed), transform 0.2s ease;
}

.product-icon {
    width: 100%;
    height: 100%;
    display: block;
    transition: filter var(--transition-speed);
    /* Filter is controlled entirely by JavaScript */
}

.product-descriptions {
    position: relative;
    min-height: 0;
    width: 100%;
}

.product-description {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
}

.product-description.active {
    display: block;
    opacity: 1;
}

.product-title {
    font-size: 22px;
    line-height: 1.8;
    letter-spacing: 0.5px;
    font-weight: 400;
    margin: 0 0 12px 0;
    padding: 0;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
}

.product-text {
    font-size: 22px;
    line-height: 1.8;
    letter-spacing: 0.5px;
    font-weight: 400;
    margin: 0;
    padding: 0;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    header {
        padding: 1.5rem 1.5rem 0 1.5rem;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    main {
        padding: 0 1.5rem;
    }
    
    .content {
        margin: 52px 0 32px;
    }
    
    .description {
        font-size: 20px;
        line-height: 1.7;
    }
    
    .contact-wrapper {
        margin-top: 20px;
    }
    
    .flip-container {
        width: 100%;
        max-width: 100%;
        height: 41px;
    }
    
    .contact-button {
        font-size: 16px;
        padding: 12px 20px 12px 15px;
    }
    
    .email-link {
        font-size: 13px;
    }
    
    .contact-info {
        padding: 12px 20px 12px 15px;
    }
    
    .product-tabs {
        width: 100%;
        margin-bottom: 16px;
    }
    
    .product-tab {
        width: 41px;
        height: 41px;
        padding: 6px;
    }
    
    .product-title {
        font-size: 20px;
        line-height: 1.7;
        margin-bottom: 10px;
    }
    
    .product-text {
        font-size: 20px;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    
    .container {
        padding: 0;
    }
    
    header {
        padding: 1rem 1rem 0 1rem;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    main {
        padding: 0 1rem;
    }
    
    .content {
        margin: 52px 0 32px;
    }
    
    .description {
        font-size: 18px;
        line-height: 1.6;
    }
    
    .contact-wrapper {
        margin-top: 20px;
    }
    
    .flip-container {
        width: 100%;
        max-width: 100%;
        height: 38px;
    }
    
    .contact-button {
        font-size: 15px;
        padding: 10px 20px 10px 15px;
    }
    
    .email-link {
        font-size: 13px;
    }
    
    .contact-info {
        padding: 10px 20px 10px 15px;
    }
    
    .product-tabs {
        width: 100%;
        margin-bottom: 14px;
    }
    
    .product-tab {
        width: 36px;
        height: 36px;
        padding: 5px;
    }
    
    .product-title {
        font-size: 18px;
        line-height: 1.6;
        margin-bottom: 8px;
    }
    
    .product-text {
        font-size: 18px;
        line-height: 1.6;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .description {
        font-size: 21px;
    }
    
    .flip-container {
        width: 340px;
        height: 44px;
    }
    
    .product-tabs {
        width: 340px;
    }
    
    .product-tab {
        width: 44px;
        height: 44px;
    }
    
    .product-title {
        font-size: 21px;
    }
    
    .product-text {
        font-size: 21px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.contact-button:focus-visible,
.product-tab:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

