/*======================================
Theme Name: voice-of-brand
Theme URI: https://divicake.com/
Description: www.voiceofbrand.ru site
Version: 1.0
Author: Urho Rättel
Author URI: https://facebook/com/urho.rattel
Template: Divi
======================================*/

/* ========================================
   FONT FACE DEFINITIONS
======================================== */
@font-face {
    font-family: 'TT Commons Pro';
    src: url('fonts/TT_Commons_Pro_Regular.woff2') format('woff2'),
         url('fonts/TT_Commons_Pro_Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'TT Commons Pro';
    src: url('fonts/TT_Commons_Pro_SemiBold.woff2') format('woff2'),
         url('fonts/TT_Commons_Pro_SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

/* ========================================
   ROOT VARIABLES (clamp definitions)
   Kõik fluid väärtused on siin ühes kohas
======================================== */
:root {
    /* Body font */
    --body-font-size: clamp(0.75rem, 1.2vw + 0.45rem, 1.125rem);
    
    /* Pealkirjad */
    --h1-size: clamp(3rem, 6vw + 1.2rem, 7.5rem);
    --h2-size: clamp(1.5rem, 2.2vw + 0.85rem, 3.125rem);
    --h3-size: clamp(1rem, 0.8vw + 0.75rem, 1.375rem);
    --h4-size: clamp(1.25rem, 1.2vw + 0.9rem, 2.125rem);
    
    /* Navigatsioon */
    --nav-link-size: clamp(0.75rem, 0.8vw + 0.55rem, 1rem);
}

/* ========================================
   ÜLDINE BODY
======================================== */
/* ========================================
   Üldine tekst (mobiil, tahvel, desktop kuni 1024 px)
   ======================================== */
html body {
    font-family: 'TT Commons Pro', sans-serif;
    font-weight: 400;
    line-height: 140%;

    /* 
       min       = 0,75 rem (mobiil)
       preferred = kasvab 480 px juures täpselt 0,875 rem-ks,
                   jõuab 768 px juures täpselt 1 rem
       max       = 1 rem (desktop ei ületa seda)
    */
    font-size: clamp(0.75rem,
                     calc(0.875rem + (100vw - 480px) * 0.125 / 288),
                     1rem);
}

/* ========================================
   XL desktop (alates 1025 px) – lubab 1 kuni 1,125 rem
   ======================================== */
@media (min-width: 1025px) {
    body {
        /* 
           min       = 1 rem (jätkab sujuvalt eelmisest max-ist)
           preferred = lineaarne tõus 1 rem-ilt 1,125 rem-ile
                       vahemikus 1025 px kuni 1440 px
           max       = 1,125 rem (XL desktop lagi)
        */
        font-size: clamp(1rem,
                         calc(1rem + (100vw - 1024px) * 0.125 / 416),
                         1.125rem);
    }
}
/* ========================================
   PEALKIRJAD
======================================== */
h1 {
    font-size: var(--h1-size);
    font-weight: 400;
    line-height: 1;               /* 100% asemel 1 – korrektne */
    letter-spacing: -0.02em;      /* -0.24rem oli liiga palju; muudetud em-põhiseks */
}

h2 {
    font-size: var(--h2-size);
    font-weight: 600;
}

h3 {
    font-size: var(--h3-size);
    font-weight: 600;
}

h4 {
    font-size: var(--h4-size);
    font-weight: 400;              /* vastavalt sinu soovile */
}

/* ========================================
   NAVIGATSIOONI LINGID (kui on custom class)
======================================== */
.custom-nav-link {
    font-size: var(--nav-link-size);
}