/* ==============================================
CSS/STYLE.CSS
This file contains all the custom styles for the E-Tech website.
==============================================
*/

/*
 * -- FONT & COLOR VARIABLES --
 * Defines the color palette and font families for the site.
 * Includes variables for both light and dark themes.
 */
:root {
    --bg-color: #F3F4F6;
    --text-color: #111827;
    --border-color: #111827;
    --card-bg-color: #FFFFFF;
    --header-bg-color: #E5E7EB;
}

html.dark {
    --bg-color: #111827;
    --text-color: #F3F4F6;
    --border-color: #F3F4F6;
    --card-bg-color: #1F2937;
    --header-bg-color: #374151;
}

/*
 * -- GENERAL BODY & TYPOGRAPHY --
 * Basic styles for the body, font smoothing, and transitions.
 */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s, color 0.3s;
}
.font-mono {
    font-family: 'IBM Plex Mono', monospace;
}
.accent-color {
    color: #F97316;
}
.accent-bg {
    background-color: #F97316;
}

.logo-svg {
    height: 48px; /* Control the height of the logo */
    width: auto;
    /* The 'fill: currentColor;' was removed to preserve original SVG colors */
}

/*
 * -- BORDERS & BUTTONS --
 * Styles for heavy borders and brutalist-style buttons.
 */
.border-heavy {
    border: 2px solid var(--border-color);
}
.btn {
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 var(--border-color);
    display: inline-block;
}
.btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-color);
}
.btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--border-color);
}
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 var(--border-color);
    display: inline-flex;
    align-items: center;
}
.btn-whatsapp:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-color);
}
.btn-whatsapp:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--border-color);
}

/*
 * -- HEADLINES & TITLES --
 * Large, impactful typography for section titles.
 */
.section-title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}
.headline {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}
@media (max-width: 924px) {
    .section-title {
        font-size: 2.5rem;
    }
    .headline {
        font-size: 3.5rem;
    }
}

@media (max-width: 510px) {
    .headline {
        font-size: 2.75rem; /* Further reduce size on very small screens */
    }
}

@media (max-width: 410px) {
    .headline {
        font-size: 2.25rem; /* Adjust for very narrow mobile screens */
    }
}

/*
 * -- MARQUEE & CAROUSELS --
 * Styles for the infinitely scrolling marquee and carousels.
 */
.marquee {
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}
.marquee .marquee-content {
    display: inline-block;
    animation: marquee 40s linear infinite;
    padding-right: 2rem; /* Spacing between duplicated content */
    white-space: nowrap;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.carousel-container {
    width: 100%;
    overflow: hidden;
}
.carousel-track {
    display: flex;
    width: calc(350px * 10); /* 5 items duplicated */
    animation: scroll 30s linear infinite;
}
.carousel-container:hover .carousel-track {
    animation-play-state: paused;
}
.carousel-item {
    width: 350px;
    flex-shrink: 0;
    padding-right: 1rem;
}
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-350px * 5));
    }
}

.portfolio-carousel-container {
    width: 100%;
    overflow: hidden;
}
.portfolio-carousel-track {
    display: flex;
    width: calc(500px * 8); /* 4 items duplicated */
    animation: portfolio-scroll 40s linear infinite;
}
.portfolio-carousel-container:hover .portfolio-carousel-track {
    animation-play-state: paused;
}
.portfolio-carousel-item {
    width: 500px;
    flex-shrink: 0;
    padding-right: 1.5rem; /* 24px */
}
@keyframes portfolio-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-500px * 4));
    }
}

/*
 * -- COMPONENTS --
 * Styles for various components like FAQ, cards, tooltips, etc.
 */
.faq-icon-plus, .faq-icon-minus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s;
}
.faq-icon-minus { opacity: 0; }

/* When the details element is open, hide the plus and show the minus */
details[open] .faq-icon-plus { opacity: 0; }
details[open] .faq-icon-minus { opacity: 1; }
.card {
    background-color: var(--card-bg-color);
}
.header-card {
     background-color: var(--header-bg-color);
}
.hover-invert:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}
.hover-bw img {
    transition: transform 0.3s ease-in-out;
}
.hover-bw:hover img {
    transform: scale(1.05);
}
.hover-bw .project-link {
    transition: letter-spacing 0.2s ease-in-out;
}
.hover-bw:hover .project-link {
    letter-spacing: 0.05em;
}

.price-toggle {
    border: 2px solid var(--border-color);
    display: inline-flex;
    margin-top: 1rem;
}
.price-toggle button {
    padding: 0.5rem 1rem;
    font-weight: 700;
    text-transform: uppercase;
}
.price-toggle button.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.tooltip-container {
    position: relative;
    display: inline-block;
}
.tooltip-trigger {
    text-decoration: underline;
    text-decoration-style: dotted;
}
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    width: max-content;
    max-width: 250px;
    padding: 8px;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 10;
}
.tooltip-container:hover .tooltip {
    opacity: 1;
}

/*
 * -- PARTICLE BACKGROUND & CURSOR --
 * Styles for the Three.js particle background and the custom cursor.
 */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/*
 * -- CALCULATOR --
 * Styles for the price calculator overlay.
 */
.calculator-option {
    border: 2px solid var(--border-color);
    padding: 1rem;
}
.calculator-option.selected {
    background-color: var(--text-color);
    color: var(--bg-color);
}
