/* ============================================
   SANOVOGEN - CSS STYLESHEET
   Figma Design: 3840 × 2160 px
   Scale factor for 1920px: 0.5 (50%)
   ============================================ */

/* Google Fonts - Graphik alternative (Inter is very similar) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    /* Base scale - Figma is 3840px, we calculate from viewport */
    --scale: calc(100vw / 3840);
    
    /* Colors from Figma */
    --bg-primary: #0a0f1a;
    --text-primary: #ffffff;
    --text-secondary: #668496;
    --border-nav: #315564;
    --accent-orange: #e8863a;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ============================================
   HEADER / NAVIGATION
   Figma: 3840 × 224 px, border 1px #315564
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* Height: 224px at 3840px = 5.83vw */
    height: calc(224 * var(--scale));
    min-height: 56px;
    max-height: 112px;
    border-bottom: 1px solid var(--border-nav);
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color var(--transition-normal);
}

.header.scrolled {
    background-color: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(10px);
}

.container {
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 calc(80 * var(--scale));
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Header Logo */
.logo a {
    display: flex;
    align-items: center;
    gap: calc(16 * var(--scale));
}

.logo-image {
    height: calc(102 * var(--scale));
    width: calc(467 * var(--scale));
    min-height: 24px;
    max-height: 60px;
    max-width: 240px;
}

.logo-text {
    font-size: clamp(12px, calc(36 * var(--scale)), 20px);
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-primary);
}

/* Navigation */
.nav-list {
    display: flex;
    gap: calc(80 * var(--scale));
}

.nav-link {
    font-size: clamp(14px, calc(35 * var(--scale)), 22px);
    font-weight: 600;
    color: #F9F6EE;
    transition: color var(--transition-fast);
    letter-spacing: 0;
    line-height: 100%;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
}

.mobile-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-fast);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-bg-image {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/mainBg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    max-width: calc(1700 * var(--scale));
    padding: 0 24px;
}

/* ============================================
   HERO LOGO
   Figma: 394 × 394 px, top: 425px, left: 1723px
   ============================================ */

.hero-logo {
    /* Margin bottom: distance to text logo */
    margin-bottom: calc(51 * var(--scale));
}

.logo-circle {
    /* Size: 394px at 3840px */
    width: calc(394 * var(--scale));
    height: calc(394 * var(--scale));
    min-width: 120px;
    min-height: 120px;
    max-width: 200px;
    max-height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    border: calc(3 * var(--scale)) solid var(--accent-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
}

.hero-logo-image {
    /* Logo size: 394px at 3840px */
    width: calc(394 * var(--scale));
    height: calc(394 * var(--scale));
    min-width: 120px;
    min-height: 120px;
    max-width: 200px;
    max-height: 200px;
    display: block;
    margin: 0 auto;
}

/* ============================================
   HERO BRAND TEXT "SANOVOGEN"
   Figma: 692 × 54 px, top: 921px
   ============================================ */

.hero-brand {
    /* Font size calculated to match 54px height at 3840px */
    font-size: clamp(16px, calc(54 * var(--scale)), 36px);
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--text-primary);
    margin-bottom: calc(80 * var(--scale));
    text-transform: uppercase;
}

.hero-brand-image {
    /* Image replacement for SANOVOGEN text */
    max-width: calc(692 * var(--scale));
    width: 100%;
    height: auto;
    margin: 0 auto calc(200 * var(--scale));
    display: block;
}

/* ============================================
   HERO DIVIDER LINE
   ============================================ */

.hero-divider {
    width: 100%;
    max-width: calc(1673 * var(--scale));
    height: 0;
    border-top: 0.65px solid #315564;
    margin: 0 auto;
    padding: 0;
    opacity: 1;
}

/* ============================================
   HERO HEADLINE
   Figma: Graphik Semibold, 100px, #FFFFFF
   Block: 1676 × 133 px, top: 1248px
   ============================================ */

.hero-headline {
    /* Font size адаптивный и пропорциональный ширине линии */
    font-size: clamp(20px, 5.2vw, 100px);
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 auto;
    padding: 0;
    line-height: 1;
    letter-spacing: 0%;
    max-width: calc(1673 * var(--scale));
}

/* ============================================
   HERO DESCRIPTION
   Figma: Graphik Light, 50px, line-height 75px
   Color: #668496
   Block: 1673 × 400 px, top: 1456px
   ============================================ */

.hero-description {
    /* 50px at 3840px viewport */
    font-size: clamp(13px, calc(50 * var(--scale)), 26px);
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.3;
    letter-spacing: 0;
    max-width: calc(1673 * var(--scale));
    margin: 0 auto;
    padding: 0;
}

.hero-description br {
    display: block;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeIn 1s ease-out;
}

.hero-logo {
    animation: fadeInUp 0.8s ease-out;
}

.hero-brand {
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-divider {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-headline {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-description {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ============================================
   RESPONSIVE - LARGE DESKTOP (2560px+)
   ============================================ */

@media (min-width: 2560px) {
    .header {
        height: 100px;
        max-height: 140px;
    }
    
    .logo-image {
        max-height: 50px;
    }
    
    .logo-circle {
        max-width: 260px;
        max-height: 260px;
    }
    
    .hero-brand {
        font-size: 42px;
    }
    
    .hero-headline {
        font-size: 64px;
    }
    
    .hero-description {
        font-size: 32px;
    }
}

/* ============================================
   RESPONSIVE - STANDARD DESKTOP (1440px - 1920px)
   ============================================ */

@media (min-width: 1440px) and (max-width: 2559px) {
    .header {
        height: 80px;
    }
    
    .logo-circle {
        width: 180px;
        height: 180px;
        max-width: 180px;
        max-height: 180px;
    }
    
    .hero-brand {
        font-size: 24px;
        margin-bottom: 40px;
    }
    
    .hero-divider {
        max-width: 600px;
        margin-bottom: 40px;
    }
    
    .hero-headline {
        font-size: 36px;
        margin-bottom: 32px;
    }
    
    .hero-description {
        font-size: 18px;
        max-width: 700px;
    }
}

/* ============================================
   RESPONSIVE - SMALL DESKTOP / LAPTOP (1024px - 1439px)
   ============================================ */

@media (min-width: 1024px) and (max-width: 1439px) {
    .header {
        height: 70px;
    }
    
    .container {
        padding: 0 40px;
    }
    
    .logo-circle {
        width: 160px;
        height: 160px;
        max-width: 160px;
        max-height: 160px;
    }
    
    .hero-brand {
        font-size: 20px;
        letter-spacing: 0.35em;
        margin-bottom: 32px;
    }
    
    .hero-divider {
        max-width: 500px;
        margin-bottom: 32px;
    }
    
    .hero-headline {
        font-size: 40px;
        margin-bottom: 24px;
    }
    
    .hero-description {
        font-size: 16px;
        max-width: 600px;
    }
}

/* ============================================
   RESPONSIVE - TABLETS (768px - 1023px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .header {
        height: 64px;
    }
    
    .container {
        padding: 0 32px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo-image {
        height: 28px;
    }
    
    .nav-list {
        gap: 40px;
    }
    
    .nav-link {
        font-size: 16px;
    }
    
    .logo-circle {
        width: 140px;
        height: 140px;
        min-width: 140px;
        min-height: 140px;
        max-width: 140px;
        max-height: 140px;
    }
    
    .hero-logo {
        margin-bottom: 24px;
    }
    
    .hero-brand {
        font-size: 18px;
        letter-spacing: 0.3em;
        margin-bottom: 28px;
    }
    
    .hero-divider {
        max-width: 400px;
        margin-bottom: 28px;
    }
    
    .hero-headline {
        font-size: clamp(24px, 4.2vw, 36px);
        margin-bottom: 20px;
        line-height: 110%;
    }
    
    .hero-description {
        font-size: 15px;
        max-width: 500px;
        line-height: 1.6;
    }
    
    .hero-description br {
        display: none;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (max 767px)
   ============================================ */

@media (max-width: 767px) {
    .header {
        height: 60px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .logo-text {
        font-size: 12px;
        letter-spacing: 0.1em;
    }
    
    .logo-image {
        height: 24px;
    }
    
    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--border-nav);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 16px 0;
        border-bottom: 1px solid rgba(49, 85, 100, 0.3);
        font-size: 16px;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero {
        min-height: 100svh;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .logo-circle {
        width: 120px;
        height: 120px;
        min-width: 120px;
        min-height: 120px;
        max-width: 120px;
        max-height: 120px;
        border-width: 2px;
    }
    
    .hero-logo {
        margin-bottom: 20px;
    }
    
    .hero-brand {
        font-size: 14px;
        letter-spacing: 0.25em;
        margin-bottom: 24px;
    }
    
    .hero-divider {
        max-width: 280px;
        margin-bottom: 24px;
    }
    
    .hero-headline {
        font-size: clamp(18px, 5vw, 26px);
        margin-bottom: 16px;
        line-height: 120%;
        max-width: 100%;
    }
    
    .hero-description {
        font-size: 14px;
        line-height: 1.6;
        max-width: 100%;
    }
    
    .hero-description br {
        display: none;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max 480px)
   ============================================ */

@media (max-width: 480px) {
    .header {
        height: 56px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 11px;
    }
    
    .logo-image {
        height: 22px;
    }
    
    .nav {
        top: 56px;
    }
    
    .logo-circle {
        width: 100px;
        height: 100px;
        min-width: 100px;
        min-height: 100px;
        max-width: 100px;
        max-height: 100px;
    }
    
    .hero-brand {
        font-size: 12px;
        letter-spacing: 0.2em;
        margin-bottom: 20px;
    }
    
    .hero-divider {
        max-width: 240px;
        margin-bottom: 20px;
    }
    
    .hero-headline {
        font-size: clamp(16px, 4.5vw, 22px);
        margin-bottom: 14px;
        line-height: 120%;
    }
    
    .hero-description {
        font-size: 13px;
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(60px + 24px) 0 24px;
    }
    
    .logo-circle {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
        max-width: 80px;
        max-height: 80px;
    }
    
    .hero-logo {
        margin-bottom: 12px;
    }
    
    .hero-brand {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .hero-divider {
        margin-bottom: 12px;
    }
    
    .hero-headline {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .hero-description {
        font-size: 12px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

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