/*
 * Savoka public design system
 * Theme: warm technology — graphite, ivory, signal red.
 * Loaded last so legacy pages share one consistent visual language.
 */
:root {
    --sv-ink: #111820;
    --sv-ink-soft: #202a34;
    --sv-paper: #f5f2eb;
    --sv-paper-2: #ebe7de;
    --sv-white: #ffffff;
    --sv-red: #d71920;
    --sv-red-dark: #a90f16;
    --sv-green: #19745c;
    --sv-copy: #59636e;
    --sv-line: rgba(17, 24, 32, .13);
    --primary-color: var(--sv-red);
    --secondary-color: var(--sv-red-dark);
    --accent-color: var(--sv-green);
    --dark-bg: var(--sv-ink);
    --darker-bg: #0b1016;
    --text-primary: var(--sv-white);
    --text-secondary: #d3d9df;
    --text-muted: #a7b0b9;
    --gradient-primary: linear-gradient(135deg, var(--sv-red), var(--sv-red-dark));
    --gradient-secondary: linear-gradient(135deg, var(--sv-red), #ed5b3d);
    --gradient-accent: linear-gradient(135deg, var(--sv-red), var(--sv-red-dark));
    --shadow-3d: 0 18px 50px rgba(17, 24, 32, .08);
    --shadow-3d-hover: 0 24px 65px rgba(17, 24, 32, .14);
    --shadow-glow: 0 12px 34px rgba(215, 25, 32, .18);
}

html { background: var(--sv-ink); overflow-x: hidden; }
body { font-family: 'Inter', sans-serif; background: var(--sv-paper); color: var(--sv-ink); overflow-x: hidden; }
.loading-screen { display: none !important; }
/* Content must remain readable even when legacy reveal animations do not run. */
.fade-in, .slide-in-left, .slide-in-right, .scale-in { opacity: 1 !important; transform: none !important; }
h1, h2, h3, h4, h5, h6 { font-family: 'Jost', 'Inter', sans-serif; letter-spacing: -.025em; }
.container { width: min(1240px, calc(100% - 48px)); max-width: 1240px; padding-inline: 0; }

/* Reduce decorative noise inherited from early theme versions. */
.background-3d, .grid-background, .particles-container, .hero-particles { opacity: .22; pointer-events: none; }
.grid-background { inset: 0 !important; width: auto !important; transform: none !important; }

/* Shared navigation */
.nav-3d {
    top: 14px;
    left: 50%;
    width: min(1240px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 0;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    background: rgba(11,16,22,.88);
    box-shadow: 0 12px 38px rgba(0,0,0,.18);
    backdrop-filter: blur(18px);
}
.nav-3d.scrolled { top: 8px; background: rgba(11,16,22,.96); border-color: rgba(255,255,255,.12); }
.nav-container { max-width: none; min-height: 68px; padding: .55rem 1rem; }
.logo-3d { gap: .7rem; }
.logo-glass { background: transparent; border: 0; box-shadow: none; }
.logo-word { color: var(--sv-red); letter-spacing: .13em; }
.nav-menu { gap: .2rem; }
.nav-link { padding: .62rem .78rem; border-radius: 9px; color: #c5ccd3; font-size: .84rem; font-weight: 600; }
.nav-link::before { display: none; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.075); }
.nav-link.active { box-shadow: inset 0 -2px var(--sv-red); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    cursor: pointer;
}
.nav-toggle .bar { display: block; width: 16px; height: 2px; margin: 0 auto; background: #fff; transition: transform .2s, opacity .2s; }
.nav-toggle.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active .bar:nth-child(2) { opacity: 0; }
.nav-toggle.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-link.nav-cta { background: var(--sv-red); color: #fff; }
.nav-link.nav-cta:hover, .nav-link.nav-cta.active { background: var(--sv-red-dark); color: #fff; box-shadow: none; }

/* Shared page introduction */
.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 480px;
    padding: 10rem 0 5.5rem;
    display: grid;
    place-items: center;
    background: var(--sv-ink);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .2;
    background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to bottom, #000, transparent 90%);
}
.page-hero .container, .page-hero .hero-content { position: relative; z-index: 1; }
.page-hero .hero-content { display: block; max-width: 850px; margin: 0 auto; text-align: center; }
.page-hero .hero-title { width: auto; margin: 0 auto 1.15rem; color: #fff; background: none; -webkit-text-fill-color: #fff; font-size: clamp(3rem, 6vw, 5.8rem); line-height: .98; letter-spacing: -.06em; }
.page-hero .hero-description { max-width: 700px; margin-inline: auto; color: #b5bec7; font-size: 1.08rem; line-height: 1.75; }

/* Reusable headings and sections */
.section-header { max-width: 760px; margin: 0 auto 3.25rem; text-align: center; }
.section-title { color: var(--sv-ink); font-size: clamp(2.25rem,4vw,4rem); line-height: 1.04; letter-spacing: -.05em; }
.section-title::after { width: 44px; height: 3px; margin-top: 1rem; background: var(--sv-red); box-shadow: none; }
.section-description { max-width: 720px; margin-inline: auto; color: var(--sv-copy); font-size: 1rem; line-height: 1.75; }
.services-section, .products-section, .portfolio-section, .about-section, .contact-section,
.solutions-section, .resources-section, .benefits-section, .positions-section, .company-story-section,
.mvv-section, .stats-section, .services-overview-section, .team-section, .culture-section,
.process-section, .blog-section { padding-block: clamp(5rem,8vw,8rem); }

/* Shared cards */
.service-card-3d, .product-card, .portfolio-item-advanced, .benefit-card, .position-card,
.mvv-card, .solution-card, .resource-card, .blog-card, .team-card, .stat-card, .process-step {
    border: 1px solid var(--sv-line);
    border-radius: 18px;
    background: rgba(255,255,255,.8);
    box-shadow: 0 14px 42px rgba(17,24,32,.055);
    backdrop-filter: none;
}
.service-card-3d::before, .product-card::before { background: var(--sv-red); }
.service-card-3d:hover, .product-card:hover, .benefit-card:hover, .mvv-card:hover,
.solution-card:hover, .resource-card:hover, .blog-card:hover {
    border-color: rgba(215,25,32,.35);
    transform: translateY(-6px);
    box-shadow: 0 22px 52px rgba(17,24,32,.1);
}
.service-icon-3d, .product-icon, .benefit-icon, .mvv-icon, .solution-icon, .resource-icon {
    color: var(--sv-red);
    background: rgba(215,25,32,.08);
    border-color: rgba(215,25,32,.14);
    box-shadow: none;
}
.service-title-3d, .product-title, .benefit-card h3, .mvv-card h3, .solution-card h3,
.resource-card h3, .position-card h3 { color: var(--sv-ink); }
.service-description-3d, .product-description, .benefit-card p, .mvv-card p,
.solution-card p, .resource-card p, .position-card p { color: var(--sv-copy); }
.service-arrow, .tech-tag, .product-status { color: var(--sv-red); border-color: rgba(215,25,32,.15); background: rgba(215,25,32,.06); }

/* Career page cleanup */
.career-overview, .open-positions, .application-process, .company-culture { padding-block: clamp(5rem,8vw,8rem); }
.career-overview, .application-process { background: var(--sv-paper); }
.open-positions, .company-culture { background: #ebe7de; }
.benefits-grid { gap: 1rem; }
.benefit-card { padding: 1.65rem; }
.benefit-title, .position-title, .step-title { color: var(--sv-ink); }
.benefit-description, .position-description, .step-description, .culture-description { color: var(--sv-copy); }
.position-card { overflow: hidden; }
.position-header { border-color: var(--sv-line); background: #f8f6f1; }
.position-icon, .step-number { color: #fff; background: var(--sv-red); box-shadow: none; }
.position-meta span { border-color: var(--sv-line); background: #ede9e1; color: #59636e; }
.position-requirements h4 { color: var(--sv-ink); }
.position-requirements li { color: var(--sv-copy); }
.position-salary { color: var(--sv-green); }
.process-steps { grid-template-columns: repeat(5, minmax(0,1fr)); gap: .8rem; }
.process-step { min-width: 0; padding: 1.25rem; text-align: left; }
.step-content { min-width: 0; width: auto; }
.culture-feature { color: var(--sv-ink); }

/* Career process, culture and company story */
.section-kicker { display: inline-block; margin-bottom: .85rem; color: var(--sv-red); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.application-process .section-header { max-width: 720px; }
.application-process .process-steps { position: relative; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 1rem; margin-top: 3.5rem; }
.application-process .process-steps::before { content: ''; position: absolute; top: 27px; right: 9%; left: 9%; height: 2px; background: #d8d2c7; }
.application-process .process-step { min-width: 0; padding: 0; text-align: center; background: transparent; border: 0; box-shadow: none; }
.application-process .step-number { position: relative; z-index: 1; width: 56px; height: 56px; margin: 0 auto 1.2rem; border: 7px solid var(--sv-paper); font-size: 1rem; }
.application-process .step-content { padding: 1.25rem 1rem; border: 1px solid var(--sv-line); border-radius: 14px; background: #fff; }
.application-process .step-title { margin-bottom: .65rem; font-size: 1rem; }
.application-process .step-description { margin: 0; font-size: .88rem; line-height: 1.62; }
.company-culture .culture-content { overflow: hidden; grid-template-columns: minmax(0,1fr) 300px; gap: 2rem; padding: clamp(2rem,5vw,4.5rem); border-radius: 24px; background: var(--sv-ink); }
.company-culture .culture-text { max-width: 760px; }
.company-culture .section-title { color: #fff; -webkit-text-fill-color: #fff; }
.company-culture .culture-description { color: #b9c2ca; }
.company-culture .culture-features { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.company-culture .culture-feature { min-height: 76px; padding: 1rem; color: #fff; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.055); }
.company-culture .culture-feature i { color: #ef5057; }
.company-culture .culture-feature span { color: #eef2f4; font-size: .9rem; }
.company-culture .culture-mascot { padding: 1.5rem; border-radius: 18px; background: rgba(255,255,255,.045); }
.company-overview { padding-block: clamp(5rem,8vw,8rem); background: var(--sv-paper); }
.company-overview .overview-content { grid-template-columns: minmax(0,1.25fr) minmax(240px,.75fr); gap: clamp(2rem,6vw,6rem); }
.company-overview .section-title { margin-bottom: 1.35rem; color: var(--sv-ink); font-size: clamp(2.5rem,5vw,4.5rem); letter-spacing: -.045em; }
.company-overview .overview-description { max-width: 760px; color: var(--sv-copy); font-size: 1.05rem; line-height: 1.82; }
.company-overview .overview-mascot { min-height: 360px; border: 1px solid var(--sv-line); border-radius: 24px; background: radial-gradient(circle at 50% 30%,rgba(215,25,32,.12),transparent 55%),#ebe7de; }
.story-principle { display: flex; gap: 1rem; margin-top: 2rem; padding: 1rem 1.2rem; border-left: 3px solid var(--sv-red); background: #ebe7de; color: var(--sv-copy); }
.story-principle strong { flex: 0 0 auto; color: var(--sv-ink); }

/* Explicit light-surface contrast: legacy components assumed a dark page. */
.products-section .product-title,
.products-section .product-card h3,
.portfolio-section .portfolio-content h3,
.portfolio-section .portfolio-content h4,
.application-process .step-title,
.company-overview .overview-description,
.contact-section .contact-details h4 { color: var(--sv-ink) !important; -webkit-text-fill-color: var(--sv-ink) !important; }
.products-section .product-description,
.portfolio-section .portfolio-content p,
.application-process .step-description,
.contact-section .contact-details p { color: var(--sv-copy) !important; -webkit-text-fill-color: var(--sv-copy) !important; }
.application-process .process-step,
.products-section .product-card,
.portfolio-section .portfolio-item-advanced { opacity: 1 !important; }

/* Career application form */
.career-application-section { padding-block: clamp(5rem,8vw,8rem); background: var(--sv-ink); }
.career-application-section .section-title { color: #fff; -webkit-text-fill-color: #fff; }
.career-application-section .section-description { color: #b9c2ca; }
.career-application-section .application-content { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 2rem; align-items: start; }
.career-application-section .application-mascot { padding: 1.5rem; border-radius: 18px; background: rgba(255,255,255,.05); }
.career-form-3d { padding: clamp(1.4rem,3vw,2.25rem); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: #fff; }
.career-form-3d .form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.career-form-3d .form-group { margin-bottom: 1rem; }
.career-form-3d .form-label { display: block; margin-bottom: .45rem; color: var(--sv-ink); font-size: .85rem; font-weight: 700; }
.career-form-3d .form-input { width: 100%; padding: .9rem 1rem; border: 1px solid #d5d7d4; border-radius: 10px; background: #f8f7f3; color: var(--sv-ink); }
.career-form-3d .form-help { color: #727c85; }
.career-form-3d .form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.career-form-3d .btn-outline { border-color: var(--sv-line); color: var(--sv-ink); }
.career-form-status { margin-bottom: 1rem; }

/* Buttons and controls */
.btn-modern, button.btn-modern, a.btn-modern {
    min-height: 50px;
    padding: .82rem 1.25rem;
    border: 1px solid var(--sv-red);
    border-radius: 11px;
    background: var(--sv-red);
    color: #fff;
    font-weight: 750;
    box-shadow: 0 12px 28px rgba(215,25,32,.18);
}
.btn-modern::before { display: none; }
.btn-modern:hover { border-color: var(--sv-red-dark); background: var(--sv-red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 15px 32px rgba(169,15,22,.22); }
.btn-modern.btn-outline { border-color: rgba(255,255,255,.25); background: transparent; color: #fff; box-shadow: none; }
.btn-modern.btn-outline:hover { border-color: #fff; background: #fff; color: var(--sv-ink); }
.filter-btn { border-color: var(--sv-line); background: transparent; color: var(--sv-copy); }
.filter-btn:hover, .filter-btn.active { border-color: var(--sv-red); background: var(--sv-red); color: #fff; }

/* Forms */
.contact-form, .modern-form, .application-form, .newsletter-form { border-color: var(--sv-line); border-radius: 18px; }
.modern-form input, .modern-form textarea, .modern-form select,
.application-form input, .application-form textarea, .application-form select,
.newsletter-form input {
    border: 1px solid #d5d7d4;
    border-radius: 11px;
    background: #fff;
    color: var(--sv-ink);
    box-shadow: none;
}
.modern-form input:focus, .modern-form textarea:focus, .modern-form select:focus,
.application-form input:focus, .application-form textarea:focus, .application-form select:focus {
    border-color: var(--sv-red);
    box-shadow: 0 0 0 4px rgba(215,25,32,.09);
}

/* Calls to action and footer */
.cta-section, .newsletter-section { background: var(--sv-red); }
.cta-section::before, .newsletter-section::before { opacity: .1; }
.cta-section .section-title, .newsletter-section .section-title,
.cta-section .cta-title { color: #fff; -webkit-text-fill-color: #fff; }
.cta-section .cta-description, .newsletter-section .section-description { color: rgba(255,255,255,.86); }
.cta-section .btn-modern { background: #fff; border-color: #fff; color: var(--sv-ink); box-shadow: none; }
.cta-section .btn-modern.btn-outline { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.footer-3d { padding-top: 5rem; background: #0b1016; border-top: 1px solid rgba(255,255,255,.09); }
.footer-content { gap: 2.5rem; }
.footer-subtitle, .footer-section h4 { color: #fff; }
.footer-description, .footer-links a, .footer-3d .contact-item, .footer-3d .contact-item a { color: #9ca6b0; }
.footer-links a:hover, .footer-3d .contact-item a:hover { color: #fff; }
.social-link { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #fff; }
.social-link:hover { border-color: var(--sv-red); background: var(--sv-red); }
.footer-bottom { border-color: rgba(255,255,255,.09); }
.whatsapp-btn { background: #168a67; box-shadow: 0 12px 28px rgba(22,138,103,.26); }

@media (max-width: 1100px) {
    .nav-toggle { display: flex !important; }
    .nav-container { position: relative; }
    .nav-menu {
        position: absolute !important;
        top: calc(100% + 10px) !important;
        right: 0 !important;
        left: auto !important;
        inset: auto !important;
        z-index: 40;
        width: min(280px, calc(100vw - 24px)) !important;
        height: auto !important;
        display: none !important;
        flex-direction: column !important;
        gap: .2rem !important;
        padding: .7rem !important;
        border: 1px solid rgba(255,255,255,.12) !important;
        border-radius: 16px !important;
        background: rgba(11,16,22,.97) !important;
        box-shadow: 0 18px 40px rgba(0,0,0,.28) !important;
        transform: none !important;
    }
    .nav-menu.active { display: flex !important; }
    .nav-menu li { display: block !important; width: 100%; }
    .nav-menu .nav-link { display: block; width: 100%; }
    .nav-menu .nav-cta { text-align: center; }
}

@media (max-width: 900px) {
    html, body {
        background: var(--sv-paper) !important;
        color: var(--sv-ink) !important;
        color-scheme: light !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    .container { width: min(100% - 32px, 720px); margin-inline: auto !important; }
    .nav-3d {
        top: 8px;
        width: calc(100% - 16px);
        height: auto !important;
        padding-top: 0 !important;
        border: 1px solid rgba(255,255,255,.1) !important;
        border-radius: 16px !important;
        background: rgba(11,16,22,.94) !important;
        box-shadow: 0 12px 38px rgba(0,0,0,.18) !important;
    }
    .nav-container { min-height: 62px; height: auto !important; }
    .page-hero { min-height: 410px; padding: 8rem 0 4rem; }
    #mobileAppTabbar, .mobile-app-tabbar { display: none !important; }
    .section-title, .form-label, .contact-info h3, .footer-section h3 { color: var(--sv-ink) !important; }
    .section-description, .hero-description, .service-description-3d, .form-help { color: var(--sv-copy) !important; }
    .page-hero .hero-description, .page-hero .hero-title { color: #fff !important; -webkit-text-fill-color: #fff !important; }
    .form-input, .form-textarea, .modern-form input, .modern-form textarea, .modern-form select,
    .career-form-3d .form-input, input, textarea, select {
        color: var(--sv-ink) !important;
        background: #fff !important;
        border-color: #d5d7d4 !important;
    }
    input::placeholder, textarea::placeholder { color: #7b858e !important; }
    .process-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .application-process .process-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .application-process .process-steps::before { display: none; }
    .company-culture .culture-content, .company-overview .overview-content { grid-template-columns: 1fr; }
    .company-culture .culture-mascot { display: none; }
    .career-application-section .application-content { grid-template-columns: 1fr; }
    .career-application-section .application-mascot { display: none; }
    .company-culture .section-title { color: #fff !important; -webkit-text-fill-color: #fff !important; }
    .career-application-section .section-title { color: #fff !important; -webkit-text-fill-color: #fff !important; }
}

@media (max-width: 520px) {
    .container { width: calc(100% - 28px); margin-inline: auto !important; }
    .page-hero .hero-title { font-size: 2.8rem; }
    .section-header { margin-bottom: 2.25rem; }
    .service-card-3d, .product-card, .benefit-card, .position-card, .mvv-card,
    .solution-card, .resource-card, .blog-card { border-radius: 15px; }
    .process-steps { grid-template-columns: 1fr; }
    .page-hero .hero-title { font-size: 2.65rem !important; line-height: 1 !important; }
    .positions-grid { grid-template-columns: minmax(0,1fr) !important; width: 100%; }
    .position-card { width: 100% !important; min-width: 0 !important; }
    .position-header { padding: 1.2rem; }
    .position-content { padding: 1.2rem; }
    .culture-content { display: block !important; }
    .culture-mascot { display: none !important; }
    .application-process .process-steps { grid-template-columns: 1fr; }
    .application-process .process-step { display: grid; grid-template-columns: 48px 1fr; gap: .8rem; align-items: start; text-align: left; }
    .application-process .step-number { width: 48px; height: 48px; margin: 0; border-width: 5px; }
    .application-process .step-content { padding: 1rem; }
    .company-culture .culture-content { padding: 2rem 1.25rem; border-radius: 18px; }
    .company-culture .culture-features { grid-template-columns: 1fr; }
    .company-overview .overview-mascot { display: none; }
    .story-principle { display: grid; }
    .career-form-3d .form-row { grid-template-columns: 1fr; }
}

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