/* Design Tokens & Custom Properties (Variant 2 - Hele teema) */
:root {
    --bg-dark: #fcfdfc;              /* Väga hele, puhas ja värske taust roheka alatooniga */
    --bg-card: #ffffff;               /* Puhas valge kaartidele ja sisualadele */
    --bg-card-alt: #f3f6f4;           /* Helehall/rohekas taust pehmete sektsioonide jaoks */
    --border-color: #dbe3de;          /* Pehme ja soliidne hallikas-rohekas raam */
    --border-accent: #E6D8B5;         /* Liivakarva beež dekoratiiv-aktsent */
    --accent-primary: #1F4D3A;        /* Sügav tume metsaroheline brändi põhitoon */
    --accent-secondary: #E6D8B5;      /* Soe beež kõrvalaktsent */
    --accent-light: #f1ebd9;          /* Helebeež taust hoveritele ja märkidele */
    --accent-hover: #143326;          /* Veel tumedam metsaroheline nuppude hoveriks */
    --text-primary: #1c2521;          /* Tume rohekas-must loetav põhitekst */
    --text-secondary: #47554e;        /* Pehmem rohekas-hall kõrvaltekst */
    --text-muted: #798b81;            /* Vaigistatud detailitekst */
    --white: #ffffff;
    --shadow-premium: 0 12px 36px -12px rgba(31, 77, 58, 0.08), 0 4px 12px -4px rgba(31, 77, 58, 0.04);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Global Resets & Elements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Main Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(252, 253, 252, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--border-accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

.nav-btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    background-color: var(--accent-primary);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.nav-btn:hover {
    background-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--accent-primary);
    transition: 0.3s;
}

/* Sections */
section {
    padding: 7rem 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.section-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-primary);
    background: rgba(31, 77, 58, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    margin-bottom: 1.2rem;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--accent-primary);
}

.section-lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: 13rem;
    padding-bottom: 7rem;
    background: radial-gradient(circle at 80% 20%, rgba(31, 77, 58, 0.05) 0%, transparent 60%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: rgba(31, 77, 58, 0.05);
    margin-bottom: 1.5rem;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary) 30%, var(--border-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    background-color: var(--accent-primary);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-primary);
    background-color: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
    background-color: rgba(31, 77, 58, 0.05);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.visual-card {
    padding: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1.2;
    overflow: hidden;
    background: var(--white);
}

.hero-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(31, 77, 58, 0.12));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Feature Cards Grid */
.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 3rem 2.5rem;
}

.feature-card h3 {
    color: var(--accent-primary);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-premium);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Comparison Table */
.table-responsive {
    overflow-x: auto;
    padding: 1rem;
    margin-bottom: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 750px;
}

.comparison-table th, .comparison-table td {
    padding: 1.4rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    background-color: rgba(31, 77, 58, 0.03);
}

.comparison-table th.highlight {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
}

.comparison-table td.highlight-val {
    color: var(--accent-primary);
    font-weight: 600;
}

.comparison-table tbody tr:hover {
    background: rgba(31, 77, 58, 0.02);
}

.prop-title {
    font-weight: 500;
    color: var(--text-primary);
}

/* Calculator Section */
.calculator-section {
    background: radial-gradient(circle at 10% 80%, rgba(31, 77, 58, 0.04) 0%, transparent 40%);
}

.grid-calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.calc-content h2 {
    margin-bottom: 1.5rem;
}

.calc-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.calc-inputs {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
}

.input-group label {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 5px;
    background: #e2e8e4;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.input-number {
    width: 100px;
    padding: 0.75rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    outline: none;
}

.calc-results {
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.calc-results h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    color: var(--accent-primary);
}

.result-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

.res-val {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.calc-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Product Catalog */
.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.product-card h3 {
    color: var(--accent-primary);
}

.product-media {
    width: 100%;
    height: 180px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.08);
}

.product-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.product-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.product-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(31, 77, 58, 0.04);
}

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

/* Tech / Image Section */
.tech-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.tech-media-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-media-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Contact Section */
.grid-contact {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
    align-items: center;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item strong {
    color: var(--accent-primary);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.detail-item span {
    color: var(--text-secondary);
}

.contact-form-container {
    padding: 3.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    padding: 0.9rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-primary);
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input {
    margin-top: 0.25rem;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
}

.btn-submit {
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: var(--accent-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.form-success-msg {
    text-align: center;
    padding: 3rem 0;
}

.form-success-msg h4 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.form-success-msg p {
    color: var(--text-secondary);
}

/* Ehitajale Page Specific Styling */
.guide-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.guide-step-card {
    padding: 2.5rem;
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.step-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(31, 77, 58, 0.08);
    line-height: 1;
}

.guide-step-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    padding-right: 2rem;
}

.guide-step-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.guide-section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.guide-section:last-of-type {
    border-bottom: none;
}

.text-content ul {
    list-style-position: inside;
    margin-left: 0.5rem;
    margin-top: 1rem;
}

.text-content li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.alert-box {
    background: rgba(31, 77, 58, 0.03);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
}

.alert-box p {
    margin: 0;
    font-style: italic;
    color: var(--accent-primary);
}

/* Language Switcher Styling */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.lang-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.lang-link:hover {
    color: var(--accent-primary);
}

.lang-link.active {
    color: var(--accent-primary);
    cursor: default;
    pointer-events: none;
}

.lang-divider {
    color: var(--border-color);
    font-weight: 300;
}

/* Footer */
.site-footer {
    background: #f0f4f1;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-brand .footer-logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-copy p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Page Banner (for subpages) */
.page-banner {
    padding-top: 12rem;
    padding-bottom: 5rem;
    background: linear-gradient(180deg, rgba(31, 77, 58, 0.03) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.page-banner h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-banner p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive Rules */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }
    
    .hero-container, .tech-details-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .grid-calculator {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .grid-contact {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 5rem 0;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 90px;
        left: 100%;
        width: 100%;
        height: calc(100vh - 90px);
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        transition: left 0.3s ease;
        padding-bottom: 5rem;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.3rem;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-btn {
        font-size: 1.2rem;
        padding: 1rem 2.5rem;
    }
    
    .contact-form-container {
        padding: 2rem;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
