:root {
    /* Dark theme: dark warm gray base */
    --color-bg: #3d3d3d;
    --color-text: #FAFAF8;
    --color-text-muted: #E6E4DF;
    --color-accent: #C97642;
    --color-accent-hover: #b56838;
    --color-on-accent: #4A4A4A;
    --color-secondary-bg: #4A4A4A;
    --color-bg-alt: #4A4A4A;
    --color-border: #5c5c5a;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --header-height: 80px;
}

:root[data-theme="light"] {
    /* Light theme: soft white & light greige */
    --color-bg: #FAFAF8;
    --color-text: #4A4A4A;
    --color-text-muted: #6A6A68;
    --color-accent: #C97642;
    --color-accent-hover: #b56838;
    --color-on-accent: #4A4A4A;
    --color-secondary-bg: #E6E4DF;
    --color-bg-alt: #E6E4DF;
    --color-border: #D0CEC8;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 0;
    color: var(--color-heading, var(--color-text));
}

:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] h3,
:root[data-theme="light"] h4,
:root[data-theme="light"] h5,
:root[data-theme="light"] h6 {
    color: var(--color-text);
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}


/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--color-accent);
    color: var(--color-on-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 2px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 118, 66, 0.35);
}

/* Forms */
input,
textarea,
select {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-secondary-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 2px;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Product Cards */
.product-card {
    background: var(--color-secondary-bg);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}

/* Footer */
footer {
    background-color: var(--color-secondary-bg);
    color: var(--color-text-muted);
    padding: var(--spacing-md) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}

/* Utilities / Extra */
#hero,
#hero h1,
#hero p {
    color: var(--color-text) !important;
}

.quality-image {
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
}

.product-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}


/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.process-step {
    padding: 1.5rem;
    background: var(--color-bg);
    /* Slight contrast against secondary-bg */
    border: 1px solid var(--color-border);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
}


/* Survey Section */
.survey-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-bg);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.survey-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.survey-step.active {
    display: block;
}

.survey-question {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.survey-options {
    display: grid;
    gap: 1rem;
}

.option-btn {
    background: transparent;
    border: 2px solid var(--color-border);
    padding: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--color-text);
}

.option-btn:hover {
    border-color: var(--color-accent);
    background: rgba(201, 118, 66, 0.2);
}

.option-btn.selected {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-on-accent);
}

.survey-navigation {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
}

/* Survey result: two options (WhatsApp + Email) */
.survey-result-intro {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

.survey-result-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.survey-option-card {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-secondary-bg);
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
    font-size: 1rem;
    min-width: 260px;
    justify-content: center;
}

.survey-option-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.survey-option-whatsapp {
    border-color: rgba(37, 211, 102, 0.5);
}

.survey-option-whatsapp:hover {
    border-color: #25D366;
    background: rgba(37, 211, 102, 0.08);
}

.survey-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.survey-option-whatsapp .survey-option-icon {
    color: #25D366;
}

.survey-option-email .survey-option-icon {
    color: var(--color-accent);
}

.survey-option-label {
    text-align: left;
}

.survey-email-form {
    max-width: 400px;
    margin: 0 auto 1rem;
    display: grid;
    gap: 0.75rem;
    text-align: left;
}

.survey-email-label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.survey-email-input {
    padding: 0.75rem 1rem;
}

.survey-email-send {
    width: 100%;
}

.survey-email-success {
    color: var(--color-accent);
    font-weight: 500;
    margin: 1rem 0 0;
    padding: 1rem;
    background: rgba(201, 118, 66, 0.15);
    border-radius: 4px;
    border: 1px solid var(--color-accent);
}

/* WhatsApp Button (legacy / other pages) */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s ease;
}


/* Product Tabs */
.product-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    color: var(--color-text-muted);
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn.active {
    color: var(--color-text);
    border-bottom-color: var(--color-accent);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: grid;
    /* restored grid display */
}

/* Contact Cards */
.contact-card {
    background: var(--color-bg);
    /* Use base bg or alt if available, using bg for contrast against potential section bg */
    padding: 2rem;
    border-radius: 8px;
    /* Hardcoded or var if available */
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
    display: block;
    /* Ensure it behaves like a block */
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

.contact-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

/* Ensure grid matches grid-2 behavior but can be specific if needed */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Carousel / Picture Roller */
.carousel {
    position: relative;
    height: 300px;
    /* Adjust height as needed */
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.carousel-track-container {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    display: flex;
}

.carousel-slide {
    position: relative;
    top: 0;
    bottom: 0;
    width: 100%;
    /* Will be set via JS usually, or flex basis */
    min-width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    z-index: 10;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button--left {
    left: 10px;
}

.carousel-button--right {
    right: 10px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    position: absolute;
    bottom: 10px;
    width: 100%;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    border: none;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
}

.carousel-indicator.current-slide {
    background: rgba(255, 255, 255, 1);
}

/* Benefit cards with image */
.benefits-section {
    padding: var(--spacing-lg) 0;
}

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

/* Brand logos (tuotteet page) */
.brand-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.brand-logo {
    height: 50px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.92;
    transition: opacity 0.2s ease;
}

.brand-logo:hover {
    opacity: 1;
}

/* Light mode: Visor logo is light-colored, make it visible on light background */
:root[data-theme="light"] .brand-logo-visor {
    filter: brightness(0);
}

.benefit-card {
    background: var(--color-secondary-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
}

.benefit-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.benefit-card-body {
    padding: 1.5rem;
    text-align: center;
}

.benefit-card-body h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}

.benefit-card-body p {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* CTAs section */
.ctas-section {
    padding: var(--spacing-md) 0;
    background: var(--color-secondary-bg);
}

.ctas-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-outline:hover {
    background: var(--color-accent);
    color: var(--color-on-accent);
}

/* Survey section */
.survey-section {
    padding: var(--spacing-lg) 0;
    background: var(--color-bg);
}

/* Header utils (theme + flag) */
.header-utils {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.lang-flag svg {
    display: block;
}

/* Contact: service area + WhatsApp card */
.service-area {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.contact-card-whatsapp .icon {
    color: #25D366;
}

.contact-card-whatsapp .icon svg {
    width: 2rem;
    height: 2rem;
}

/* Hero Background Image (Responsive) */
.hero-bg {
    background: url('../assets/images/hero2.png') no-repeat center center/cover;
}

@media (max-width: 768px) {
    .hero-bg {
        background: url('../assets/images/hero-2-mobile.png') no-repeat top center !important;
        background-size: 100% auto !important;
    }
    #hero {
        height: 179.16vw !important; /* Match exactly the proportions of the 1536x2752 image */
    }
    #hero .container {
        margin-top: 100vw !important; /* Push button cleanly towards the bottom part of the picture */
    }
    #hero p {
        display: none !important;
    }
}